feat:bug修改
This commit is contained in:
1 parent
54fd7e4216
commit
55bc87855b
8 files changed
+40
-19
No files matched your search
+11
-6
@@ -5,7 +5,9 @@ const CHAT_ENV = {};
|
||||
// 开发
|
||||
if (ENV == 'DEV') {
|
||||
CHAT_ENV.BASE_URL = 'http://chatsever.zianxin.com';
|
||||
CHAT_ENV.WS_URL = 'ws://chatapp.zianxin.com/im';
|
||||
// CHAT_ENV.WS_URL = 'ws://chatapp.zianxin.com/im';
|
||||
// CHAT_ENV.BASE_URL = 'http://127.0.0.1:8888';
|
||||
CHAT_ENV.WS_URL = 'ws://127.0.0.1:8876/im'
|
||||
|
||||
// H5 走本地代理解决跨域问题
|
||||
// #ifdef H5
|
||||
@@ -13,10 +15,13 @@ if (ENV == 'DEV') {
|
||||
// #endif
|
||||
}
|
||||
|
||||
// 生产
|
||||
if (ENV == 'PROD') {
|
||||
CHAT_ENV.BASE_URL = 'http://chatsever.zianxin.com';
|
||||
CHAT_ENV.WS_URL = 'ws://chatapp.zianxin.com/im';
|
||||
}
|
||||
console.log("CHAT_ENV:", CHAT_ENV);
|
||||
|
||||
|
||||
// // 生产
|
||||
// if (ENV == 'PROD') {
|
||||
// CHAT_ENV.BASE_URL = 'http://chatsever.zianxin.com';
|
||||
// CHAT_ENV.WS_URL = 'ws://chatapp.zianxin.com/im';
|
||||
// }
|
||||
|
||||
export default CHAT_ENV;
|
||||
@@ -295,7 +295,7 @@ export default defineStore('chatStore', {
|
||||
updateChatFromFriend(friend) {
|
||||
let chat = this.findChatByFriend(friend.id)
|
||||
if (chat && (chat.headImage != friend.headImage ||
|
||||
chat.showName != friend.nickName)) {
|
||||
chat.showName != friend.nickName)) {
|
||||
// 更新会话中的群名和头像
|
||||
chat.headImage = friend.headImage;
|
||||
chat.showName = friend.nickName;
|
||||
@@ -307,7 +307,7 @@ export default defineStore('chatStore', {
|
||||
let chat = this.findChatByFriend(user.id);
|
||||
// 更新会话中的昵称和头像
|
||||
if (chat && (chat.headImage != user.headImageThumb ||
|
||||
chat.showName != user.nickName)) {
|
||||
chat.showName != user.nickName)) {
|
||||
chat.headImage = user.headImageThumb;
|
||||
chat.showName = user.nickName;
|
||||
chat.stored = false;
|
||||
@@ -317,7 +317,7 @@ export default defineStore('chatStore', {
|
||||
updateChatFromGroup(group) {
|
||||
let chat = this.findChatByGroup(group.id);
|
||||
if (chat && (chat.headImage != group.headImageThumb ||
|
||||
chat.showName != group.showGroupName)) {
|
||||
chat.showName != group.showGroupName)) {
|
||||
// 更新会话中的群名称和头像
|
||||
chat.headImage = group.headImageThumb;
|
||||
chat.showName = group.showGroupName;
|
||||
@@ -362,7 +362,7 @@ export default defineStore('chatStore', {
|
||||
// #endif
|
||||
// 记录热数据索引位置
|
||||
chats.forEach(chat => {
|
||||
if(!chat.hotMinIdx || chat.hotMinIdx != chat.messages.length){
|
||||
if (!chat.hotMinIdx || chat.hotMinIdx != chat.messages.length) {
|
||||
chat.hotMinIdx = chat.messages.length;
|
||||
chat.stored = false;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="m-4 flex items-center justify-between my-2 text-base">
|
||||
<text class="text-size-base">动态</text>
|
||||
<view v-if="false" class="flex items-center">
|
||||
<text class="text-size-sm">查看全部</text>
|
||||
<text class="iconfont icon-youjiantou" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isRefreshing" class="flex px-4 py-4">
|
||||
<wd-skeleton :row-col="[{ size: '50px', type: 'circle' }]" animation="flashed" />
|
||||
<wd-skeleton :custom-style="{ width: '100%', marginLeft: '12px' }" animation="flashed" theme="paragraph" />
|
||||
|
||||
@@ -1298,7 +1298,11 @@ export default {
|
||||
onLoad(options) {
|
||||
this.userId = options.memberId
|
||||
// 聊天数据
|
||||
this.chat = this.chatStore.chats[options.chatIdx];
|
||||
if (options.chatIdx == -200) {
|
||||
this.chat = this.chatStore.chats.find((chat) => chat.targetId == this.userId);
|
||||
} else {
|
||||
this.chat = this.chatStore.chats[options.chatIdx];
|
||||
}
|
||||
// 初始状态只显示20条消息
|
||||
let size = this.messageSize;
|
||||
this.showMinIdx = size > 20 ? size - 20 : 0;
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
<scroll-view class="scroll-bar" v-else scroll-with-animation="true" scroll-y="true">
|
||||
<view v-for="(chat, index) in chatStore.chats" :key="index">
|
||||
<!-- <long-press-menu v-if="isShowChat(chat)" :items="menu.items" @select="onSelectMenu($event, index)"> -->
|
||||
<chat-item :user-id="chat.targetId" :chat="chat" :index="index" :active="menu.chatIdx == index"></chat-item>
|
||||
<chat-item v-if="chat.targetId != -200" :user-id="chat.targetId" :chat="chat" :index="index"
|
||||
:active="menu.chatIdx == index"></chat-item>
|
||||
<!-- </long-press-menu> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -130,7 +131,7 @@ export default {
|
||||
unreadCount() {
|
||||
let count = 0;
|
||||
this.chatStore.chats.forEach((chat) => {
|
||||
if (!chat.isDnd && !chat.delete) {
|
||||
if (!chat.isDnd && !chat.delete && chat.targetId != -200) {
|
||||
count += chat.unreadCount;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -281,7 +281,7 @@ const MenuCellList = [
|
||||
{ title: '我的动态', value: '', icon: 'star', to: '/pages/profile/my-moment' },
|
||||
{ title: '我的评价', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation },
|
||||
{ title: '问题反馈', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback },
|
||||
{ title: '客服助手', value: '遇到问题点击这里', icon: 'service', to: '' },
|
||||
{ title: '客服助手', value: '遇到问题点击这里', icon: 'service', to: `/pages/message/chat-box?chatIdx=-200&memberId=-200` },
|
||||
{ title: '关注公众号', value: '领取福利、获取最新下载地址', icon: 'qrcode', to: '', onClick: subOfficial },
|
||||
// { title: '设置', value: '', icon: 'setting1', to: '/pages/profile/setting' },
|
||||
];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 5079650 */
|
||||
src: url('//at.alicdn.com/t/c/font_5079650_ql5o5wq6mdh.woff2?t=1767594984419') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_5079650_ql5o5wq6mdh.woff?t=1767594984419') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_5079650_ql5o5wq6mdh.ttf?t=1767594984419') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_5079650_dlgclk5ww3.woff2?t=1767687032692') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_5079650_dlgclk5ww3.woff?t=1767687032692') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_5079650_dlgclk5ww3.ttf?t=1767687032692') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -13,6 +13,10 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-youjiantou:before {
|
||||
content: "\e744";
|
||||
}
|
||||
|
||||
.icon-a-ziyuan592:before {
|
||||
content: "\e78e";
|
||||
}
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@ export default async (command: 'build' | 'serve', mode: string) => {
|
||||
},
|
||||
// 聊天相关api
|
||||
'/api': {
|
||||
target: 'http://chatsever.zianxin.com',
|
||||
// target: 'http://chatsever.zianxin.com',
|
||||
target: 'http://127.0.0.1:8888',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user