This commit is contained in:
cansnow
2025-12-24 04:12:56 +08:00
parent f49f1f1ad1
commit f289f79813
26 changed files with 636 additions and 484 deletions
+4 -3
View File
@@ -32,7 +32,7 @@ export const businessModify = (params) =>
// 用户信息
export const businessInfoUpdate = (params) =>
uni.$u?.http.post(
"/user/info",
"/user/profile",
JSON.stringify({...params}),
{
header: {
@@ -80,9 +80,10 @@ export const businessSearchUser = (keyword,searchtype) =>
},
}
);
export const getArticle = (id,type) => uni.$u?.http.post("/article/detail",JSON.stringify({id,type:(type? type : 'id')}));
export const getSpage = (name) => uni.$u?.http.get(`/article/singpage?name=${name}`);
export const getArticle = (id) => uni.$u?.http.get(`/article/detail?id=${id}`);
export const getFriendCircle = (page=1,limit=10) =>{
return uni.$u?.http.get("/friendcircle/list",JSON.stringify({limit:limit,page:page}));
return uni.$u?.http.get(`/friendcircle/list?limit=${limit}&page=${page}`);
}
export const getFriendCircleNewcount = () =>{
return uni.$u?.http.get("/friendcircle/newcount");
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "回声",
"appid" : "__UNI__CA458BA",
"description" : "",
"versionName" : "3.3.4",
"versionCode" : 334,
"versionName" : "3.3.5",
"versionCode" : 335,
"transformPx" : false,
"app-plus" : {
"bounce" : "none",
+54 -8
View File
@@ -1,20 +1,38 @@
<template>
<view class="n-ps-all-base">
<uv-parse v-if="content" :content="content"></uv-parse>
<view class="n-flex-row" v-if="showButton" :style="{marginTop:'100rpx'}">
<uv-button class="n-flex-1 n-ms-base" v-for="(item, idx) in buttonList" :key="idx" @click="switchButton(idx, item)" :text="item.title" :icon="'/static/image/' + item.value + '.png'" :plain="current==idx" :color="current==idx ? item.color:'#f8f8f8'" :customStyle="{height:'80rpx'}" :customTextStyle="{color:current==idx ? item.color:'#333333',marginLeft:'20rpx'}" shape="circle" color="#f8f8f8" throttleTime="1000"></uv-button>
<uni-nav-bar
left-icon="back"
@clickLeft="goto(1)"
fixed
statusBar
:title="title">
</uni-nav-bar>
<view class="u-content">
<u-parse
v-if="content"
:domain="config.website"
:previewImg="false"
:showImgMenu="false"
:content="content">
</u-parse>
</view>
<uv-empty :show="empty" icon="/static/image/empty.png" text="暂无数据~" width="200" marginTop="100"></uv-empty>
<view class="n-flex-row" v-if="showButton" :style="{marginTop:'100rpx'}">
<u-button class="n-flex-1 n-ms-base" v-for="(item, idx) in buttonList" :key="idx" @click="switchButton(idx, item)" :text="item.title" :icon="'/static/image/' + item.value + '.png'" :plain="current==idx" :color="current==idx ? item.color:'#f8f8f8'" :customStyle="{height:'80rpx'}" :customTextStyle="{color:current==idx ? item.color:'#333333',marginLeft:'20rpx'}" shape="circle" color="#f8f8f8" throttleTime="1000"></u-button>
</view>
<u-empty :show="empty" icon="/static/image/empty.png" text="暂无数据~" width="200" marginTop="100"></u-empty>
</view>
</template>
<script>
import {getArticle} from '@/api/login.js'
import {getSpage,getArticle} from '@/api/login.js'
import { mapGetters } from "vuex";
import util from "@/util"
export default {
data() {
return {
empty: false,
title:"",
content: '',
current: null,
questionId: 0,
@@ -28,9 +46,14 @@
onLoad(evt) {
if(evt.type=='config') this.setConfig(evt)
if(evt.type=='question') this.setQuestion(evt)
if(evt.type=='article') this.setArticle(evt)
if(evt.type=='spage') this.setSpage(evt)
this.title = evt.title;
uni.setNavigationBarTitle({title:evt.title})
},
computed:{
...mapGetters(["config"]),
},
methods: {
// 设置配置内容
setConfig(evt) {
@@ -47,15 +70,38 @@
this.questionId = evt.id
this.showButton = true
},
setArticle(evt) {
this.showButton = false;
getArticle(evt.id).then(res=>{
this.content = res.content
}).catch(e=>{
console.log(e);
})
},
setSpage(evt) {
this.showButton = false;
getSpage(evt.name).then(res=>{
this.content = res.content
}).catch(e=>{
console.log(e);
})
},
// 切换按钮
switchButton(idx, item) {
this.current = idx
getArticle({id:this.questionId,type:item.value})
}
},
goto:util.goto
}
}
</script>
<style>
<style lang="scss" scoped>
.u-content {
padding: 24rpx;
font-size: 32rpx;
color: $u-content-color;
line-height: 1.6;
}
</style>
+249 -276
View File
@@ -1,309 +1,282 @@
<template>
<view class="group_card_container">
<custom-nav-bar title="" />
<u-toast ref="uToast"></u-toast>
<view class="group_card_container">
<custom-nav-bar title="" />
<u-toast ref="uToast"></u-toast>
<view class="main">
<view class="base_info">
<my-avatar :src="sourceGroupInfo.faceURL" :isGroup="true" size="48" />
<view>
<view class="group_name">
<text>{{ sourceGroupInfo.groupName }}</text>
<text v-if="!!sourceGroupInfo.memberCount"
>{{ sourceGroupInfo.memberCount }}</text
>
</view>
<view class="create_time">
<u-icon name="clock" color="#999" size="14"></u-icon>
<text>{{ getCreateTime }}</text>
</view>
</view>
</view>
<view class="main">
<view class="base_info">
<my-avatar :src="sourceGroupInfo.faceURL" :isGroup="true" size="48" />
<view>
<view class="group_name">
<text>{{ sourceGroupInfo.groupName }}</text>
<text v-if="!!sourceGroupInfo.memberCount">{{ sourceGroupInfo.memberCount }}</text>
</view>
<view class="create_time">
<u-icon name="clock" color="#999" size="14"></u-icon>
<text>{{ getCreateTime }}</text>
</view>
</view>
</view>
<view
v-if="!!sourceGroupInfo.memberCount"
@click="toMemberList"
class="member_row info_row"
>
<view class="member_desc">
<text>群成员</text>
<text class="member_count">{{
<view v-if="!!sourceGroupInfo.memberCount" @click="toMemberList" class="member_row info_row">
<view class="member_desc">
<text>群成员</text>
<text class="member_count">{{
`${sourceGroupInfo.memberCount}`
}}</text>
<u-icon name="arrow-right" color="#999" size="18"></u-icon>
</view>
<view class="member_list">
<my-avatar
v-for="member in getRenderMemberList"
:key="member.userID"
class="member_item"
size="42"
:src="member.faceURL"
:desc="member.nickname"
></my-avatar>
<u-avatar
bgColor="#5496EB"
icon="more-dot-fill"
shape="square"
size="42"
></u-avatar>
</view>
</view>
<u-icon name="arrow-right" color="#999" size="18"></u-icon>
</view>
<view class="member_list">
<my-avatar v-for="member in getRenderMemberList" :key="member.userID" class="member_item" size="42"
:src="member.faceURL" :desc="member.nickname"></my-avatar>
<u-avatar bgColor="#5496EB" icon="more-dot-fill" shape="square" size="42"></u-avatar>
</view>
</view>
<view class="info_row">
<user-info-row-item lable="群ID号" :content="sourceGroupInfo.groupID" />
</view>
</view>
<view class="info_row">
<user-info-row-item lable="群ID号" :content="sourceGroupInfo.groupID" />
</view>
</view>
<view class="action_row">
<u-button type="primary" v-if="!isJoinedGroup" @click="joinGroup"
>申请加入该群</u-button
>
<u-button type="primary" v-else @click="chatingInGroup">发消息</u-button>
</view>
</view>
<view class="action_row">
<u-button type="primary" v-if="!isJoinedGroup" @click="joinGroup">申请加入该群</u-button>
<u-button type="primary" v-else @click="chatingInGroup">发消息</u-button>
</view>
</view>
</template>
<script>
import { GroupMemberListTypes } from "@/constant";
import { navigateToDesignatedConversation } from "@/util/imCommon";
import IMSDK, {
GroupVerificationType,
SessionType,
} from "openim-uniapp-polyfill";
import dayjs from "dayjs";
import MyAvatar from "@/components/MyAvatar/index.vue";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
import {GroupMemberListTypes} from "@/constant";
import {navigateToDesignatedConversation} from "@/util/imCommon";
import IMSDK, {GroupVerificationType,SessionType,} from "openim-uniapp-polyfill";
import dayjs from "dayjs";
import MyAvatar from "@/components/MyAvatar/index.vue";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserInfoRowItem from "../userCard/components/UserInfoRowItem.vue";
import userIcon from "static/images/contact_my_friend.png";
import userIcon from "static/images/contact_my_friend.png";
export default {
components: {
CustomNavBar,
MyAvatar,
UserInfoRowItem,
},
data() {
return {
sourceID: "",
isScan: false,
sourceGroupInfo: {},
groupMemberList: [],
};
},
computed: {
isJoinedGroup() {
return (
this.$store.getters.storeGroupList.findIndex(
(group) => group.groupID === this.sourceID,
) !== -1
);
},
getCreateTime() {
return dayjs(this.sourceGroupInfo.createTime).format("YYYY-MM-DD");
},
getRenderMemberList() {
if (this.isJoinedGroup) {
this.groupMemberList;
return this.groupMemberList;
}
const memberCount = this.sourceGroupInfo.memberCount ?? 0;
return new Array(memberCount >= 6 ? 6 : memberCount)
.fill(1)
.map((item, idx) => ({
userID: idx,
src: userIcon,
}));
},
},
onLoad(options) {
const { sourceID, sourceInfo, isScan } = options;
this.isScan = !!isScan;
if (sourceID) {
this.sourceID = sourceID;
this.getSourceGroupInfo();
} else {
const info = JSON.parse(sourceInfo);
this.sourceID = info.groupID;
this.sourceGroupInfo = {
...info,
};
}
this.getGroupMemberList();
},
methods: {
toMemberList() {
if (this.isJoinedGroup) {
this.$store.dispatch("conversation/getCurrentGroup", this.sourceID);
this.$store.dispatch(
"conversation/getCurrentMemberInGroup",
this.sourceID,
);
uni.navigateTo({
url: `/pages/conversation/groupMemberList/index?type=${GroupMemberListTypes.Preview}&groupID=${this.sourceID}`,
});
}
},
joinGroup() {
uni.$u.route("/pages/common/sendAddRequest/index", {
isGroup: true,
sourceID: this.sourceID,
isScan: this.isScan,
notNeedVerification:
this.sourceGroupInfo.needVerification ===
GroupVerificationType.AllNot,
sessionType: SessionType.WorkingGroup,
});
},
chatingInGroup() {
navigateToDesignatedConversation(
this.sourceID,
SessionType.WorkingGroup,
).catch(() => this.showToast("获取会话信息失败"));
},
async getSourceGroupInfo() {
let info = null;
if (this.isJoinedGroup) {
info = this.$store.getters.storeGroupList.find(
(group) => group.groupID === this.sourceID,
);
} else {
try {
const { data } = await IMSDK.asyncApi(
IMSDK.IMMethods.GetSpecifiedGroupsInfo,
IMSDK.uuid(),
[this.sourceID],
);
info = data[0] ?? {};
} catch (e) {
info = {};
}
}
this.sourceGroupInfo = {
...info,
};
},
getGroupMemberList() {
if (this.isJoinedGroup) {
IMSDK.asyncApi(IMSDK.IMMethods.GetGroupMemberList, IMSDK.uuid(), {
groupID: this.sourceID,
filter: 0,
offset: 0,
count: 6,
}).then(({ data }) => {
this.groupMemberList = [...data];
});
}
},
showToast(message) {
this.$refs.uToast.show({
message,
});
},
},
};
export default {
components: {CustomNavBar,MyAvatar,UserInfoRowItem,},
data() {
return {
sourceID: "",
isScan: false,
sourceGroupInfo: {},
groupMemberList: [],
};
},
computed: {
isJoinedGroup() {
return (this.$store.getters.storeGroupList.findIndex((group) => group.groupID === this.sourceID,) !== -1);
},
getCreateTime() {
return dayjs(this.sourceGroupInfo.createTime).format("YYYY-MM-DD");
},
getRenderMemberList() {
if (this.isJoinedGroup) {
this.groupMemberList;
return this.groupMemberList;
}
const memberCount = this.sourceGroupInfo.memberCount ?? 0;
return new Array(memberCount >= 6 ? 6 : memberCount)
.fill(1)
.map((item, idx) => ({
userID: idx,
src: userIcon,
}));
},
},
onLoad(options) {
const {sourceID,sourceInfo,isScan} = options;
this.isScan = !!isScan;
if (sourceID) {
this.sourceID = sourceID;
this.getSourceGroupInfo();
} else {
const info = JSON.parse(sourceInfo);
this.sourceID = info.groupID;
this.sourceGroupInfo = {
...info,
};
}
this.getGroupMemberList();
},
methods: {
toMemberList() {
if (this.isJoinedGroup) {
this.$store.dispatch("conversation/getCurrentGroup", this.sourceID);
this.$store.dispatch(
"conversation/getCurrentMemberInGroup",
this.sourceID,
);
uni.navigateTo({
url: `/pages/conversation/groupMemberList/index?type=${GroupMemberListTypes.Preview}&groupID=${this.sourceID}`,
});
}
},
joinGroup() {
uni.$u.route("/pages/common/sendAddRequest/index", {
isGroup: true,
sourceID: this.sourceID,
isScan: this.isScan,
notNeedVerification: this.sourceGroupInfo.needVerification ===
GroupVerificationType.AllNot,
sessionType: SessionType.WorkingGroup,
});
},
chatingInGroup() {
navigateToDesignatedConversation(
this.sourceID,
SessionType.WorkingGroup,
).catch(() => this.showToast("获取会话信息失败"));
},
async getSourceGroupInfo() {
let info = null;
if (this.isJoinedGroup) {
info = this.$store.getters.storeGroupList.find(
(group) => group.groupID === this.sourceID,
);
} else {
try {
const {
data
} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetSpecifiedGroupsInfo,
IMSDK.uuid(),
[this.sourceID],
);
info = data[0] ?? {};
} catch (e) {
info = {};
}
}
this.sourceGroupInfo = {
...info,
};
},
getGroupMemberList() {
if (this.isJoinedGroup) {
IMSDK.asyncApi(IMSDK.IMMethods.GetGroupMemberList, IMSDK.uuid(), {
groupID: this.sourceID,
filter: 0,
offset: 0,
count: 6,
}).then(({
data
}) => {
this.groupMemberList = [...data];
});
}
},
showToast(message) {
this.$refs.uToast.show({
message,
});
},
},
};
</script>
<style lang="scss" scoped>
.group_card_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.group_card_container {
@include colBox(false);
height: 100vh;
background-color: #f6f6f6;
.main {
display: flex;
flex-direction: column;
flex: 1;
}
.main {
display: flex;
flex-direction: column;
flex: 1;
}
.base_info {
@include vCenterBox();
background-color: #fff;
padding: 44rpx;
margin-bottom: 18rpx;
.base_info {
@include vCenterBox();
background-color: #fff;
padding: 44rpx;
margin-bottom: 18rpx;
.u-avatar {
margin-right: 24rpx;
}
.u-avatar {
margin-right: 24rpx;
}
.group_name {
display: flex;
margin-bottom: 12rpx;
}
.group_name {
display: flex;
margin-bottom: 12rpx;
}
.create_time {
@include vCenterBox();
justify-content: center;
color: #adadad;
font-size: 26rpx;
.create_time {
@include vCenterBox();
justify-content: center;
color: #adadad;
font-size: 26rpx;
.u-icon {
margin-right: 12rpx;
}
}
}
.u-icon {
margin-right: 12rpx;
}
}
}
.member_row {
padding: 24rpx 44rpx;
.member_row {
padding: 24rpx 44rpx;
.member_desc {
margin-bottom: 24rpx;
position: relative;
.member_desc {
margin-bottom: 24rpx;
position: relative;
.member_count {
font-size: 28rpx;
color: #adadad;
margin-left: 24rpx;
}
.member_count {
font-size: 28rpx;
color: #adadad;
margin-left: 24rpx;
}
.u-icon {
position: absolute;
right: 0;
top: 0;
}
}
.u-icon {
position: absolute;
right: 0;
top: 0;
}
}
.member_list {
display: flex;
.member_list {
display: flex;
.member_item {
margin-right: 12rpx;
.member_item {
margin-right: 12rpx;
&:nth-child(7) {
margin-right: 0;
}
}
}
}
&:nth-child(7) {
margin-right: 0;
}
}
}
}
.info_row {
background-color: #fff;
margin-bottom: 24rpx;
.info_row {
background-color: #fff;
margin-bottom: 24rpx;
::v-deep .content {
color: #adadad;
}
}
::v-deep .content {
color: #adadad;
}
}
.action_row {
background-color: #fff;
padding: 44rpx 44rpx;
}
.action_row {
background-color: #fff;
padding: 44rpx 44rpx;
}
.online_state {
@include vCenterBox();
margin-left: 24rpx;
font-size: 24rpx;
color: #999;
.online_state {
@include vCenterBox();
margin-left: 24rpx;
font-size: 24rpx;
color: #999;
.dot {
background-color: #10cc64;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 12rpx;
}
}
}
</style>
.dot {
background-color: #10cc64;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 12rpx;
}
}
}
</style>
-1
View File
@@ -86,7 +86,6 @@
);
info = data[0];
}
console.log(info)
if (info) {
uni.navigateTo({
url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(info,)}`,
+85 -46
View File
@@ -14,11 +14,11 @@
</uni-nav-bar>
<view style="flex:1;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<view class="info_card">
<my-avatar :src="userInfo.faceURL" :desc="userInfo.nickname" size="64" />
<my-avatar :src="source.faceURL" :desc="source.showName" size="64" />
<view class="id_row">
<text class="nickname">{{ userInfo.nickname }}</text>
<view class="id_row_copy" @click="copy">
<text class="id">{{ userInfo.userID }}</text>
<text class="nickname">{{ source.showName }}</text>
<view class="id_row_copy" @click="copy(source.code)">
<text class="id">{{ source.code }}</text>
<image style="width: 32rpx; height: 32rpx" src="@/static/images/id_copy.png" mode="" />
</view>
</view>
@@ -29,7 +29,7 @@
<view style="width: 80%;display: flex;align-items: center;justify-content: center;height: 20%;">
<u-button type="default" plain :hairline="false" iconColor="#9aa2b2" @click="scan">扫一扫</u-button>
<u-button type="default" plain :hairline="false" iconColor="#9aa2b2">换个样式</u-button>
<u-button type="default" plain :hairline="false" iconColor="#9aa2b2">保存图片</u-button>
<u-button @click="save" type="default" plain :hairline="false" iconColor="#9aa2b2">保存图片</u-button>
</view>
</view>
</template>
@@ -39,6 +39,8 @@
import QRCode from "@/components/qrcode.js";
import UserBase from '@/components/User.vue';
import util from "@/util";
import { mapGetters } from "vuex";
import md5 from "md5";
export default {
mixins:[UserBase],
components: {
@@ -46,15 +48,54 @@
},
data() {
return {
qrcodeUrl:"",
qrcode_src:"",
source:{
type:"user",
showName:"",
faceURL:"",
code:"",
}
}
},
onLoad() {
console.log(this.userInfo)
computed:{
...mapGetters(["storeFriendList","storeGroupList","config"]),
},
onLoad(opt) {
if(opt.sourceInfo){
this.source = JSON.parse(opt.sourceInfo);
}else{
this.source = {
type:"user",
showName:"",
faceURL:"",
code:"",
};
}
console.log(this.config);
if(this.source.type == "user"){
this.qrcodeUrl = `${this.config.website}/u/${this.source.code}`;
}else{
this.qrcodeUrl = `${this.config.website}/g/${this.source.code}`;
}
console.log(this.qrcodeUrl);
this.createQrcode();
},
methods: {
...util,
save(){
const _this = this;
uni.saveImageToPhotosAlbum({
filePath:_this.qrcode_src,
success() {
util.success("保存成功");
},
fail(e) {
console.log(e);
util.error("保存失败");
}
})
},
createQrcode() {
const _this = this;
return new Promise((resolve, reject) => {
@@ -64,7 +105,7 @@
usingComponents: true, // 是否是自定义组件
showLoading: false, // 是否显示loading
loadingText: "", // loading文字
text: "/pages/common/invite_register?code=", // 生成内容
text: `${this.qrcodeUrl}`, // 生成内容
size: 320, // 二维码大小
background: "#fff", // 背景色
foreground: '#000000', // 前景色
@@ -73,7 +114,7 @@
image: "", // 二维码图标
imageSize: 40, // 二维码图标大小
cbResult: function(res) { // 生成二维码的回调
//_this.qrcode_src = (res)
_this.qrcode_src = (res)
//resolve(res);
},
});
@@ -84,48 +125,46 @@
</script>
<style scoped lang="scss">
.info_card {
width: 600rpx;
height: 196rpx;
border-radius: 6px;
background: #fff;
margin: 0 auto 0 auto;
padding: 0 36rpx;
color: #0c1c33;
.info_card {
width: 600rpx;
border-radius: 6px;
background: #fff;
margin: 0 auto 0 auto;
padding: 40rpx 36rpx;
color: #0c1c33;
display: flex;
align-items: center;
.id_row {
display: flex;
align-items: center;
margin-left: 16rpx;
flex-direction: column;
align-items: flex-start;
justify-content: space-around;
height: 100%;
flex: 1;
font-size: 28rpx;
.id_row {
&_copy {
@include vCenterBox();
display: flex;
//height: 46px;
margin-left: 16rpx;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
flex: 1;
font-size: 28rpx;
&_copy {
@include vCenterBox();
}
.nickname {
@include nomalEllipsis();
max-width: 400rpx;
font-weight: 500;
font-size: 34rpx;
}
.id {
color: #8e9ab0;
}
}
img {
width: 18px;
height: 18px;
.nickname {
@include nomalEllipsis();
max-width: 400rpx;
font-weight: 500;
font-size: 34rpx;
}
.id {
color: #8e9ab0;
}
}
img {
width: 18px;
height: 18px;
}
}
</style>
@@ -6,13 +6,11 @@
<view id="scroll_wrap">
<u-loadmore nomoreText="" :status="loadMoreStatus" />
<view class="msg_item" v-for="item in storeHistoryMessageList" :key="item.clientMsgID" @click="onUserMessageEvent({type:'selected'},item)">
<template v-if="selectFlag">
<uni-icons class="selectedIcon" size="30" color="#07c160" type="checkbox-filled" v-if="selectClientMsgIDItems.indexOf(item.clientMsgID)>-1"></uni-icons>
<uni-icons class="selectedIcon" size="30" color="#ccc" type="circle" v-else></uni-icons>
</template>
<MessageItemRender
@userEvent="onUserMessageEvent"
:source="item"
:selectItems="selectItems"
:selectFlag="selectFlag"
:conversationID="storeCurrentConversation.conversationID"
:isSender="item.sendID === storeCurrentUserID"
/>
@@ -74,13 +72,6 @@
return "nomore";
}
return this.messageLoadState.loading ? "loading" : "loadmore";
},
selectClientMsgIDItems(){
let arr = [];
this.selectItems.forEach((v,k)=>{
arr.push(v.clientMsgID);
});
return arr;
}
},
mounted() {
@@ -1,35 +1,39 @@
<template>
<view v-if="!getNoticeContent" :id="`auchor${source.clientMsgID}`" class="message_item"
:class="{ message_item_self: isSender, message_item_active: isActive }">
<my-avatar size="42" :desc="source.senderNickname" :src="source.senderFaceUrl" @click="viewDetail" />
<view class="message_container">
<view class="message_sender" :style="{ 'flex-direction': !isSender ? 'row-reverse' : 'row' }">
<text>{{ formattedMessageTime }}</text>
<text style="margin-left: 2rpx; margin-right: 2rpx">{{ "" }}</text>
<text v-if="!isSingle">{{ source.senderNickname }}</text>
</view>
<view class="message_send_state_box">
<view style="height: 100%;display: flex;justify-items: center;align-items: center;">
<view class="message_send_state">
<u-loading-icon v-if="showSending && !isPreview" />
<image v-if="isFailedMessage && !isPreview" class="state_img" src="@/static/images/chating_message_failed.png" />
</view>
<view v-if="isNoticeMessage" class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`">
<text>{{ getNoticeContent }}</text>
</view>
<view v-else class="message_wrapper">
<template v-if="selectFlag">
<uni-icons class="selectedIcon" size="30" color="#07c160" type="checkbox-filled" v-if="selectClientMsgIDItems.indexOf(source.clientMsgID)>-1"></uni-icons>
<uni-icons class="selectedIcon" size="30" color="#ccc" type="circle" v-else></uni-icons>
</template>
<view :id="`auchor${source.clientMsgID}`" class="message_item"
:class="{ message_item_self: isSender, message_item_active: isActive }">
<my-avatar size="42" :desc="source.senderNickname" :src="source.senderFaceUrl" @click="viewDetail" />
<view class="message_container">
<view class="message_sender" :style="{ 'flex-direction': !isSender ? 'row-reverse' : 'row' }">
<text>{{ formattedMessageTime }}</text>
<text style="margin-left: 2rpx; margin-right: 2rpx">{{ "" }}</text>
<text v-if="!isSingle">{{ source.senderNickname }}</text>
</view>
<view class="message_content_wrap message_content_wrap_shadow" :id="`message_content_wrap_${source.clientMsgID}`" @longtap.stop.prevent="longtapEvent($event)">
<component :is="component"
@messageEvent="onMessageEvent"
:isSender="isSender"
:message="source"
:conversationID="conversationID"
></component>
<view class="message_send_state_box">
<view style="height: 100%;display: flex;justify-items: center;align-items: center;">
<view class="message_send_state">
<u-loading-icon v-if="showSending && !isPreview" />
<image v-if="isFailedMessage && !isPreview" class="state_img" src="@/static/images/chating_message_failed.png" />
</view>
</view>
<view class="message_content_wrap message_content_wrap_shadow" :id="`message_content_wrap_${source.clientMsgID}`" @longtap.stop.prevent="longtapEvent($event)">
<component :is="component"
@messageEvent="onMessageEvent"
:isSender="isSender"
:message="source"
:conversationID="conversationID"
></component>
</view>
</view>
</view>
</view>
</view>
<view v-else class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`">
<text>{{ getNoticeContent }}</text>
</view>
</template>
@@ -89,6 +93,16 @@
conversationID:String,
isPreview: Boolean,
isActive: Boolean,
selectFlag:{
type:Boolean,
default:false
},
selectItems:{
type:Array,
default(){
return [];
}
}
},
data() {
return {
@@ -97,7 +111,7 @@
toolTipFlag: false,
popPostion:"default",
toolTipData: [],
component:"ErrorMessageRender",
component:"ErrorMessageRender"
};
},
computed: {
@@ -113,16 +127,17 @@
formattedMessageTime() {
return formatMessageTime(this.source.sendTime);
},
isNoticeMessage(){
return noticeMessageTypes.includes(this.source.contentType);
},
getNoticeContent() {
const isNoticeMessage = noticeMessageTypes.includes(
this.source.contentType
);
return !isNoticeMessage ?
"" :
tipMessaggeFormat(
if(this.isNoticeMessage){
return tipMessaggeFormat(
this.source,
this.$store.getters.storeCurrentUserID
);
}
return "";
},
isSuccessMessage() {
return this.source.status === MessageStatus.Succeed;
@@ -133,6 +148,13 @@
showSending() {
return this.source.status === MessageStatus.Sending && !this.sendingDelay;
},
selectClientMsgIDItems(){
let arr = [];
this.selectItems.forEach((v,k)=>{
arr.push(v.clientMsgID);
});
return arr;
}
},
mounted() {
const MsgType2Components = {
@@ -174,7 +196,6 @@
}
},
longtapEvent(e){
console.log('longtapEvent');
this.$emit('userEvent',{type:"longtapMsgContent"},this.source);
},
onMessageEvent(e){
@@ -185,9 +206,16 @@
</script>
<style scoped lang="scss">
.message_wrapper{
display: flex;
flex-direction: row;
align-items: flex-start;
width: 100%;
}
.message_item {
display: flex;
flex-direction: row;
flex:1;
padding: 16rpx 44rpx;
// padding-top: 48rpx;
position: relative;
+14 -6
View File
@@ -19,7 +19,7 @@
<script>
import {mapActions,mapGetters} from "vuex";
import {offlinePushInfo} from "@/util/imCommon";
import {PageEvents,ContactChooseTypes } from "@/constant";
import {PageEvents,ContactChooseTypes,noticeMessageTypes} from "@/constant";
import ChatingHeader from "./components/ChatingHeader";
import ChatingFooter from "./components/ChatingFooter/index";
import ChatingList from "./components/ChatingList";
@@ -174,9 +174,6 @@
}
},
sendMessage(message, user_id, group_id) {
//this.scrollToBottom();
//console.log(message);
//console.log(user_id,group_id);
IMSDK.asyncApi(IMSDK.IMMethods.SendMessage, IMSDK.uuid(), {
recvID: user_id,
groupID: group_id,
@@ -184,8 +181,16 @@
offlinePushInfo,
})
.then(({data}) => {
console.log(data);
this.pushNewMessage(message);
if(user_id && this.storeCurrentConversation.userID == user_id){
this.pushNewMessage(message);
this.scrollToBottom();
return ;
}
if(group_id && this.storeCurrentConversation.groupID == group_id){
this.pushNewMessage(message);
this.scrollToBottom();
return ;
}
})
.catch((res = {data,errCode,errMsg}) => {
console.log(res);
@@ -207,6 +212,9 @@
}
if (e.type == 'selected') {
if (this.selectFlag == true) {
if(noticeMessageTypes.includes(data.contentType)){
return ;
}
let founded = false;
let arr = [];
for (var index = 0; index < this.selectItems.length; index++) {
@@ -75,9 +75,9 @@
// uni.switchTab({
// url:"/pages/user/index/index"
// })
uni.navigateTo({
url:"/pages/user/vip/vip"
});
// uni.navigateTo({
// url:"/pages/user/vip/vip"
// });
//prepareConversationState(this.storeConversationList[2]);
},1000)
},
+11 -2
View File
@@ -25,13 +25,13 @@
<uni-list>
<uni-list-item title="群聊名称" :rightText="storeCurrentConversation.showName" @click="editGroupName" :clickable="isOwner || isAdmin" :showArrow="isOwner || isAdmin"></uni-list-item>
<uni-list-item title="群公告" to="/pages/conversation/groupSettings/announcement" clickable showArrow></uni-list-item>
<uni-list-item title="群二维码" :to="'/pages/common/userOrGroupQrCode?groupID='+storeCurrentConversation.groupID" clickable showArrow></uni-list-item>
<uni-list-item title="群二维码" :to="getGroupQrcdeUrl" clickable showArrow></uni-list-item>
<uni-list-item v-if="isOwner || isAdmin" title="群管理" to="/pages/conversation/groupManage/index" clickable showArrow></uni-list-item>
<uni-list-item v-if="1==2" title="备注" :rightText="storeCurrentConversation.showName" @click="editGroupName" :clickable="isOwner || isAdmin" :showArrow="isOwner || isAdmin"></uni-list-item>
</uni-list>
<u-gap></u-gap>
<uni-list>
<uni-list-item title="查找聊天内容" to=""></uni-list-item>
<uni-list-item title="查找聊天内容" :to="'/pages/common/search/index?type=conversation&conversationID='+storeCurrentConversation.conversationID" showArrow></uni-list-item>
</uni-list>
<u-gap></u-gap>
<uni-list>
@@ -192,6 +192,15 @@
isAdmin() {
return this.storeCurrentMemberInGroup.roleLevel === GroupMemberRole.Admin;
},
getGroupQrcdeUrl(){
const info = {
code : this.storeCurrentConversation.groupID,
showName: `${this.storeCurrentConversation.showName}(${this.storeCurrentGroup.memberCount})`,
faceURL : this.storeCurrentConversation.faceURL,
type : "group",
};
return `/pages/common/userOrGroupQrCode?sourceInfo=${JSON.stringify(info,)}`;
},
getGroupVerStr() {
if (
this.storeCurrentGroup.needVerification ===
+3 -3
View File
@@ -267,7 +267,7 @@
itemList:['更换相册封面'],
success: function (res) {
if(res.tapIndex == 0){
_this.goto('/pages/workbench/friend-circle/chooseCircleBgImg');
_this.goto('/pages/find/friend-circle/chooseCircleBgImg');
}
},
fail: function (res) {
@@ -471,7 +471,7 @@
//点击自定义组件相机按钮
linkToRelease(params) {
console.log(params);
let url = "/pages/workbench/friend-circle/releaseFriendCircle?";
let url = "/pages/find/friend-circle/releaseFriendCircle?";
for(let key in params){
if(key!="tempFilePaths"){
url+=key+"="+params[key]+"&";
@@ -490,7 +490,7 @@
//return videoSrc;
},
leftClick(e){
this.goto('/pages/workbench/index/index',"2");
this.goto('/pages/find/index/index',"2");
},
onUserEvent(e){
switch(e.type){
+21 -10
View File
@@ -7,10 +7,10 @@
background-color="transparent"></uni-nav-bar>
<uni-list>
<uni-list-item title="朋友圈"
thumb="/static/images/workbench/01.png"
thumb="/static/images/find/01.png"
:thumbSize="thumbSize"
showArrow
to="/pages/workbench/friend-circle/friend-circle">
to="/pages/find/friend-circle/friend-circle">
<view slot="footer" v-if="last_unread_item&&last_unread_item.avatar.length>0">
<u-avatar :src="last_unread_item.avatar" mode="square" :size="70"></u-avatar>
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
@@ -19,17 +19,18 @@
</uni-list>
<u-gap :height="10"></u-gap>
<uni-list>
<uni-list-item title="扫一扫" thumb="/static/images/workbench/03.png" :thumbSize="thumbSize" @click="scan" clickable showArrow></uni-list-item>
<uni-list-item title="摇一摇" thumb="/static/images/workbench/05.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="看一看" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="听一听" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="附近" thumb="/static/images/workbench/08.png" :thumbSize="thumbSize" to="/pages/workbench/near/near" showArrow></uni-list-item>
<uni-list-item title="购物" thumb="/static/images/workbench/09.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="扫一扫" thumb="/static/images/find/03.png" :thumbSize="thumbSize" @click="scan" clickable showArrow></uni-list-item>
<uni-list-item v-if="1==2" title="摇一摇" thumb="/static/images/find/05.png" :thumbSize="thumbSize" to="/pages/find/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item v-if="1==2" title="看一看" thumb="/static/images/find/06.png" :thumbSize="thumbSize" to="/pages/find/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item v-if="1==2" title="听一听" thumb="/static/images/find/06.png" :thumbSize="thumbSize" to="/pages/find/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item v-if="config.near_user_open == '1'" title="附近" thumb="/static/images/find/08.png" :thumbSize="thumbSize" to="/pages/find/near/near" showArrow></uni-list-item>
<uni-list-item title="购物" thumb="/static/images/find/09.png" :thumbSize="thumbSize" :to="'/pages/common/webview?url='+encodeURI('http://pinduoduo.com')" showArrow></uni-list-item>
</uni-list>
</view>
</template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {
@@ -37,6 +38,7 @@
};
},
computed:{
...mapGetters(["config"]),
circleUnreadCount() {
return this.$store.getters.storeCircleUnreadCount;
},
@@ -60,8 +62,17 @@
//res.result;
return ;
}
if(res.result.startsWith("http")){
return ;
const user_prefix = `${this.config.website}/u/`;
if(res.result.startsWith(user_prefix)){
return uni.navigateTo({
url:"/pages/common/userCard/index?sourceID="+res.result.replace(user_prefix,'')
});
}
const group_prefix = `${this.config.website}/g/`;
if(res.result.startsWith(group_prefix)){
return uni.navigateTo({
url:"/pages/common/groupCard/index?sourceID="+res.result.replace(group_prefix,'')
});
}
}
}
+12 -8
View File
@@ -5,14 +5,14 @@
<image src="@/static/images/about_logo.png" mode=""></image>
<view>{{ appversion }}</view>
<info-item @click="checkUpdate" class="check" title="检测更新" content="" />
<info-item @click="openurl('http://baidu.com')" class="check" title="官方网站" content="" />
<info-item @click="goto('/pages/common/article?type=article&name=coom&title=商务合作')" class="check" title="商务合作" content="" />
<info-item @click="goto('/pages/common/article?type=article&name=contract&title=用户协议')" class="check" title="用户协议" content="" />
<info-item @click="goto('/pages/common/article?type=article&name=privacy&title=隐私政策')" class="check" title="隐私政策" content="" />
<info-item @click="goto('/pages/common/article?type=article&name=aboutus&title=关于我们')" class="check" title="关于我们" content="" />
<info-item @click="clearcache" class="check" title="清除缓存" content="" />
<info-item @click="show = true" class="check" title="上传调试日志" content="" />
<info-item @click="checkUpdate" class="check" title="检测更新" />
<info-item @click="openurl(config.website)" class="check" title="官方网站" />
<info-item @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
<info-item @click="goto('/pages/common/article?type=spage&name=terms_of_service&title=用户协议')" class="check" title="用户协议" />
<info-item @click="goto('/pages/common/article?type=spage&name=privacy_policy&title=隐私政策')" class="check" title="隐私政策" />
<info-item @click="goto('/pages/common/article?type=spage&name=aboutus&title=关于我们')" class="check" title="关于我们" />
<info-item @click="clearcache" class="check" title="清除缓存" />
<info-item @click="show = true" class="check" title="上传调试日志" />
<u-modal showCancelButton :show="show" title="上传日志" @confirm="uploadLog" @cancel="show = false">
<view class="slot-content">
@@ -30,6 +30,7 @@
import {PageEvents } from "@/constant";
import InfoItem from "../selfInfo/InfoItem.vue";
import {checkUpgrade} from "@/api/login.js"
import { mapGetters } from "vuex";
export default {
components: {
CustomNavBar,
@@ -43,6 +44,9 @@
loading: false,
};
},
computed:{
...mapGetters(["config"]),
},
onLoad() {
this.getAppVersion();
},
+53 -22
View File
@@ -20,23 +20,23 @@
</view>
</view>
</view>
<!-- v-if="userinfo.role_id==2" -->
<view class="vipbar" @click="goto('/pages/user/vip/vip')">
<img src="/static/images/user/member_crown.png" alt="" />
<text>会员到期时间:{{userinfo.expire_at}}</text>
<u-button>我的权益</u-button>
</view>
<view class="vipbar" @click="goto('/pages/user/vip/vip')">
<img src="/static/images/user/member_crown.png" alt="" />
<text>开通会员立享特权</text>
<u-button>开通</u-button>
</view>
<u-alert title="我的信息" type = "warning" :closable="closable" :description = "description"></u-alert>
<!-- 会员 -->
<template v-if="config.role_buy_open == '1'">
<view v-if="selfInfo.role_id==2" class="vipbar" @click="goto('/pages/user/vip/vip')">
<image src="/static/images/user/member_crown.png" mode="widthFix" alt="" />
<text>会员到期时间:{{selfInfo.expire_at}}</text>
<u-button>我的权益</u-button>
</view>
<view v-else class="vipbar" @click="goto('/pages/user/vip/vip')">
<image src="/static/images/user/member_crown.png" mode="widthFix" alt="" />
<text>开通会员立享特权</text>
<u-button>开通</u-button>
</view>
</template>
<uni-list style="margin: 20rpx auto;width: 100%;">
<uni-list-item title="我的信息" thumb="/static/images/profile_menu_info.png" to="/pages/user/selfInfo/index" clickable showArrow ></uni-list-item>
<uni-list-item title="账号设置" thumb="/static/images/profile_menu_account.png" to="/pages/user/messageNotification/index" clickable showArrow ></uni-list-item>
<uni-list-item title="关于我们" thumb="/static/images/profile_menu_about.png" to="/pages/user/accountSetting/index" clickable showArrow ></uni-list-item>
<uni-list-item title="账号设置" thumb="/static/images/profile_menu_account.png" to="/pages/user/accountSetting/index" clickable showArrow ></uni-list-item>
<uni-list-item title="关于我们" thumb="/static/images/profile_menu_about.png" to="/pages/user/about/index" clickable showArrow ></uni-list-item>
</uni-list>
<uni-list>
<uni-list-item title="退出登录" thumb="/static/images/profile_menu_logout.png" @click="logout" clickable showArrow ></uni-list-item>
@@ -50,10 +50,17 @@
import IMSDK from "openim-uniapp-polyfill";
import MyAvatar from "@/components/MyAvatar/index.vue";
import util from "@/util";
import { mapGetters } from "vuex";
export default {
components: {
MyAvatar,
},
computed:{
...mapGetters(["config"]),
selfInfo() {
return this.$store.getters.storeSelfInfo || {expire_at:0};
},
},
data() {
return {
profileMenus: [
@@ -65,15 +72,9 @@
],
};
},
computed: {
selfInfo() {
return this.$store.getters.storeSelfInfo;
},
},
methods: {
...util,
copy() {
console.log(this.selfInfo)
uni.setClipboardData({
showToast: false,
data: this.selfInfo.userID,
@@ -115,8 +116,15 @@
});
},
toSelfQr() {
const info = {
code : this.selfInfo.userID,
showName: `${this.selfInfo.nickname}`,
faceURL : this.selfInfo.faceURL,
type : "user",
};
const url = `/pages/common/userOrGroupQrCode?sourceInfo=${JSON.stringify(info,)}`;
uni.navigateTo({
url: `/pages/common/userOrGroupQrCode`,
url: url,
});
},
},
@@ -131,6 +139,29 @@
background: #0c1c33;
color: #FFF;
border-radius: 20rpx;
display: flex;
align-items: center;
margin: 20rpx 20rpx 0 20rpx;
padding: 20rpx 20rpx;
gap: 10rpx;
uni-image{
width: 50rpx;
height: 50rpx;
}
uni-text{
flex: 1;
color: #f00;
font-size: 36rpx;
}
.u-button{
font-size: 32rpx;
background-color: $uni-color-success;
border-color: $uni-color-success;
color: #FFF;
padding: 0;
height: 2em;
width: 6em;
}
}
.self_info_row {
-1
View File
@@ -140,7 +140,6 @@
},
async updateSelfInfo(data, key) {
try {
console.log(data);
await businessInfoUpdate({
userID: this.selfInfo.userID,
...data,
+12 -34
View File
@@ -6,7 +6,6 @@
@clickLeft="goto(1)"
>
</uni-nav-bar>
<view class="m-navbg"></view>
<view class="m-card n-ms-base n-ps-all-ll n-radius-base n-position-relative">
<view class="n-flex-row n-align-center">
<image class="m-avatar" :src="userinfo.avatar"></image>
@@ -18,42 +17,21 @@
<text class="m-card-text n-size-s" :style="{marginTop:'50rpx'}">会员到期时间{{userinfo.role_id==2 ? userinfo.expire_at:'未开通'}}</text>
<image class="m-card-crown n-position-absolute" src="/static/images/user/member_crown.png" mode="widthFix"></image>
</view>
<view class="n-ps-base n-ms-top-ll">
<text class="n-size-l n-weight-7">会员权益</text>
<view class="n-flex-row n-wrap-wrap n-ms-top-ss">
<u-cell-group>
<u-cell :class="[idx%2==0 ? 'n-ms-right-s':'', 'n-bg-page', 'n-radius-s', 'n-ms-top-s', 'n-ps-tb-ss']"
v-for="(item, idx) in powerList" :key="idx"
:icon="item.image_text"
:title="item.title"
:label="item.content"
:border="false"
:iconStyle="{width:'80rpx',height:'80rpx',borderRadius:'40rpx'}" >
</u-cell>
</u-cell-group>
</view>
</view>
<swiper class="swiper" circular :indicator-dots="false" :autoplay="false">
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
<u-gap></u-gap>
<view class="n-ps-base">
<text class="n-size-l n-weight-7 n-ms-top-ss">会员套餐</text>
<scroll-view class="n-flex-row n-ms-top-ll n-wrap-nowrap" :scroll-x="true" :show-scrollbar="false">
<view :class="[idx==current ? 'm-thali-active':'m-thali', 'n-ps-all-ll', 'n-ms-right-l', 'n-flex-column', 'n-radius-base', 'n-align-center', 'n-position-relative']" v-for="(item, idx) in thaliList" :key="idx" @click="current=idx">
<text class="n-size-l n-ms-top-s n-weight-7">{{item.title}}</text>
<view class="n-flex-row n-align-end n-ms-top-base">
<text class="m-card-text n-size-s"></text>
<text class="m-card-text n-size-ll">{{item.price}}</text>
</view>
<text class="n-size-ss n-ms-top-ss n-color-forth n-text-decoration-through">{{item.orig_price}}</text>
<u-tag class="n-ms-bottom-s n-ms-top-base"
:text="'立省' + (item.orig_price - item.price) + '元'"
size="mini" shape="circle"
bgColor="#efcf95"
borderColor="#efcf95"></u-tag>
<!-- 标签 -->
<u-button class="n-position-absolute" v-if="item.label" :text="item.label" :style="{top:0,left:0}" size="mini" color="#fc393f"></u-button>
</view>
</scroll-view>
<view class="n-flex-row n-ms-top-l n-justify-center">
<view class="n-flex-row n-wrap-wrap n-align-start n-ms-top-base n-align-center">
<view>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 KiB

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

+21
View File
@@ -41,6 +41,9 @@ const mutations = {
const actions = {
async getFriendList({commit }) {
//#ifndef APP
return [];
//#endif
let offset = 0;
let friendInfoList = [];
let initialFetch = true;
@@ -63,6 +66,9 @@ const actions = {
commit("SET_FRIEND_LIST", friendInfoList);
},
async getGrouplist({commit}) {
//#ifndef APP
return [];
//#endif
let offset = 0;
let groupList = [];
while (true) {
@@ -86,6 +92,9 @@ const actions = {
commit("SET_GROUP_LIST", groupList);
},
getBlacklist({commit}) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(IMSDK.IMMethods.GetBlackList, uuidv4()).then(({
data
}) => {
@@ -93,6 +102,9 @@ const actions = {
});
},
getRecvFriendApplications({commit}) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(
IMSDK.IMMethods.GetFriendApplicationListAsRecipient,
uuidv4(),
@@ -103,6 +115,9 @@ const actions = {
});
},
getSentFriendApplications({ commit }) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(
IMSDK.IMMethods.GetFriendApplicationListAsApplicant,
uuidv4(),
@@ -113,6 +128,9 @@ const actions = {
});
},
getRecvGroupApplications({ commit }) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(
IMSDK.IMMethods.GetGroupApplicationListAsRecipient,
uuidv4(),
@@ -123,6 +141,9 @@ const actions = {
});
},
getSentGroupApplications({ commit }) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(
IMSDK.IMMethods.GetGroupApplicationListAsApplicant,
uuidv4(),
+12
View File
@@ -45,6 +45,9 @@ const mutations = {
const actions = {
async getConversationList({state,commit}, isFirstPage = true) {
//#ifndef APP
return [];
//#endif
try {
const {data} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetConversationListSplit,
@@ -65,6 +68,9 @@ const actions = {
}
},
getCurrentGroup({commit}, groupID) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupsInfo, uuidv4(), [
groupID,
]).then(({
@@ -74,6 +80,9 @@ const actions = {
});
},
getCurrentMemberInGroup({commit,rootState}, groupID) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupMembersInfo, uuidv4(), {
groupID,
userIDList: [rootState.user.selfInfo.userID],
@@ -84,6 +93,9 @@ const actions = {
});
},
getUnReadCount({commit}) {
//#ifndef APP
return [];
//#endif
IMSDK.asyncApi(IMSDK.IMMethods.GetTotalUnreadMsgCount, uuidv4()).then(
(res) => {
//console.log(res);
+3
View File
@@ -29,6 +29,9 @@ const actions = {
commit("SET_CURRENT_MSG", message);
},
async getHistoryMesageList({commit,state}, params) {
//#ifndef APP
return [];
//#endif
let emptyFlag = true;
try {
//console.log(params);
+3
View File
@@ -39,6 +39,9 @@ const mutations = {
const actions = {
async getSelfInfo({ commit }) {
//#ifndef APP
return [];
//#endif
try {
const result = await IMSDK.asyncApi(IMSDK.IMMethods.GetSelfUserInfo,uuidv4(),);
const res = await businessGetUserInfo(result.data.userID);
@@ -362,7 +362,6 @@
this._mapInstance.clearOverLays();
// 创建新注记
data.markers && data.markers.forEach(item => {
console.log(item)
const option = {};
if (item.icon) {
option.icon = new T.Icon({
+1 -4
View File
@@ -259,10 +259,7 @@ export default{
v = v.replace(/\\/ig,"/").replace('/\/\/ig',"/");
//console.log(v);
if(isString(v)){
if(v.startsWith('blob:')){
return v;
}
if(v.startsWith('file://')){
if(v.startsWith('blob:') || v.startsWith('file://') || v.startsWith('http')){
return v;
}
v= v.startsWith('/') ? v : '/'+v;
+8 -8
View File
@@ -1,12 +1,12 @@
module.exports = {
configureWebpack: {
// 开启缓存
cache: true,
// 并行构建
parallel: require('os').cpus().length > 1,
// 关闭sourcemap加速生产构建
productionSourceMap: false
},
// configureWebpack: {
// // 开启缓存
// cache: true,
// // 并行构建
// parallel: true,
// // 关闭sourcemap加速生产构建
// productionSourceMap: false
// },
// 关闭文件hash (开发环境)
filenameHashing: process.env.NODE_ENV !== 'production'
}