diff --git a/src/chat-env.js b/src/chat-env.js index 6cb74667..2498eb3e 100644 --- a/src/chat-env.js +++ b/src/chat-env.js @@ -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; diff --git a/src/chat-store/chatStore.js b/src/chat-store/chatStore.js index 56d8adcc..dda13619 100644 --- a/src/chat-store/chatStore.js +++ b/src/chat-store/chatStore.js @@ -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; } diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue index 1841d262..5713bc6c 100644 --- a/src/pages/home/detail.vue +++ b/src/pages/home/detail.vue @@ -107,7 +107,13 @@ - + + 动态 + + 查看全部 + + + diff --git a/src/pages/message/chat-box.vue b/src/pages/message/chat-box.vue index 4e51845c..1a67c94d 100644 --- a/src/pages/message/chat-box.vue +++ b/src/pages/message/chat-box.vue @@ -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; diff --git a/src/pages/tabbar/message.vue b/src/pages/tabbar/message.vue index d90a94ee..1c88b12f 100644 --- a/src/pages/tabbar/message.vue +++ b/src/pages/tabbar/message.vue @@ -37,7 +37,8 @@ - + @@ -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; } }); diff --git a/src/pages/tabbar/profile.vue b/src/pages/tabbar/profile.vue index f1c9648d..ba8eb54d 100644 --- a/src/pages/tabbar/profile.vue +++ b/src/pages/tabbar/profile.vue @@ -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' }, ]; diff --git a/src/static/icon/self/iconfont.css b/src/static/icon/self/iconfont.css index 90d91034..db1b6d91 100644 --- a/src/static/icon/self/iconfont.css +++ b/src/static/icon/self/iconfont.css @@ -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"; } diff --git a/vite.config.ts b/vite.config.ts index 9320bd2e..932320f2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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/, ''), },