From fc83ac9e063d1b604d21507dfd40705a4a62b3cd Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Mon, 10 Mar 2025 08:52:36 +0800 Subject: [PATCH] =?UTF-8?q?2025.03.09=20=E5=B7=A5=E4=BD=9C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/common/js/config.js | 5 +- jiuyi2/common/js/util.js | 2 +- jiuyi2/components/news/book.vue | 13 +- jiuyi2/components/news/msgList.vue | 600 +++++++++--------- jiuyi2/pages.json | 48 +- jiuyi2/pages/index/durainActivation.vue | 5 +- jiuyi2/pages/index/wallet/wallet.vue | 3 + jiuyi2/pages/mine/homepage.vue | 6 +- jiuyi2/pages/{news => mine}/newAttention.vue | 0 jiuyi2/pages/{news => mine}/newFans.vue | 0 jiuyi2/pages/news/audio-video/audio.nvue | 14 - jiuyi2/pages/news/audio-video/audio.vue | 14 - jiuyi2/pages/news/audio-video/video.nvue | 8 - jiuyi2/pages/news/audio-video/video.vue | 8 - jiuyi2/pages/news/chat/chat.vue | 40 +- .../news/chat/components/news-temp/index.vue | 10 +- jiuyi2/pages/news/chat/jy-plus.vue | 2 +- jiuyi2/pages/news/detail/group.vue | 179 ++++++ jiuyi2/pages/news/goodsList/index.vue | 204 +++--- jiuyi2/pages/news/group-chat-list/index.vue | 34 - jiuyi2/pages/news/group-chat/index.vue | 234 ------- .../{chatGroup.vue => group/chatList.vue} | 0 jiuyi2/pages/news/group/create.vue | 233 +++++++ jiuyi2/pages/news/group/invite.vue | 102 +++ jiuyi2/pages/news/news.vue | 543 ++++++++-------- jiuyi2/pages/news/red-envelope/index.vue | 288 --------- jiuyi2/pages/news/redPacket.vue | 1 + jiuyi2/vite.config.js | 3 +- 28 files changed, 1253 insertions(+), 1346 deletions(-) rename jiuyi2/pages/{news => mine}/newAttention.vue (100%) rename jiuyi2/pages/{news => mine}/newFans.vue (100%) delete mode 100644 jiuyi2/pages/news/audio-video/audio.nvue delete mode 100644 jiuyi2/pages/news/audio-video/audio.vue delete mode 100644 jiuyi2/pages/news/audio-video/video.nvue delete mode 100644 jiuyi2/pages/news/audio-video/video.vue create mode 100644 jiuyi2/pages/news/detail/group.vue delete mode 100644 jiuyi2/pages/news/group-chat-list/index.vue delete mode 100644 jiuyi2/pages/news/group-chat/index.vue rename jiuyi2/pages/news/{chatGroup.vue => group/chatList.vue} (100%) create mode 100644 jiuyi2/pages/news/group/create.vue create mode 100644 jiuyi2/pages/news/group/invite.vue delete mode 100644 jiuyi2/pages/news/red-envelope/index.vue diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index 86abfcfe..7bba64c9 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,11 +6,10 @@ const config = { // host: 'h5api', // #endif // #ifndef H5 - // host: 'http://91f.xyz:8080', - host: 'http://27380b6d.r24.cpolar.top', + host: 'http://91f.xyz:8080', // #endif // 是否vivo显示 - showVivo: true, + showVivo: false, // 支付方式配置 payType: { score: { diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 2a3fd18c..4f512616 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -213,7 +213,7 @@ const util = { responseType: params.responseType || 'text', // 请求成功返回 success: res => { - console.log('request success', url, res, params.data ? params.data : '') + // console.log('request success', url, res, params.data ? params.data : '') // 关闭加载效果 if (params.load) { uni.hideLoading() diff --git a/jiuyi2/components/news/book.vue b/jiuyi2/components/news/book.vue index d03f1e35..7784a013 100644 --- a/jiuyi2/components/news/book.vue +++ b/jiuyi2/components/news/book.vue @@ -218,17 +218,6 @@ function removelistener() { // 获取朋友列表 function getFriendList() { - // 验证sdk是否准备完毕 - let isReady = uni.$chat.isReady(); - console.log('getFriendList', isReady) - - if (!isReady) { - setTimeout(function () { - getFriendList() - }, 500); - return - } - // api.news.getFriendList().then(rs => { if (rs.code == 200) { @@ -440,7 +429,7 @@ function link(url) { - + 群聊列表 diff --git a/jiuyi2/components/news/msgList.vue b/jiuyi2/components/news/msgList.vue index d7df26a0..afda702e 100644 --- a/jiuyi2/components/news/msgList.vue +++ b/jiuyi2/components/news/msgList.vue @@ -1,302 +1,299 @@ \ No newline at end of file diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index 30f79110..56971c7d 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -73,13 +73,7 @@ } }, { - "path": "pages/news/group-chat-list/index", - "style": { - "navigationBarTitleText": "群聊列表" - } - }, - { - "path": "pages/news/group-chat/index", + "path": "pages/news/group/create", "style": { "navigationBarTitleText": "创建群聊", "navigationBarBackgroundColor": "#fff" @@ -88,16 +82,10 @@ { "path": "pages/news/chat/chat", "style": { - "navigationBarTitleText": "", + "navigationBarTitleText": "聊天", "navigationStyle": "custom" } }, - { - "path": "pages/news/red-envelope/index", - "style": { - "navigationBarTitleText": "红包详情" - } - }, { "path": "pages/news/goodsList/index", "style": { @@ -362,14 +350,14 @@ } }, { - "path": "pages/news/newAttention", + "path": "pages/mine/newAttention", "style": { "navigationBarTitleText": "新的关注", "navigationBarBackgroundColor": "#fff" } }, { - "path": "pages/news/newFans", + "path": "pages/mine/newFans", "style": { "navigationBarTitleText": "新的粉丝", "navigationBarBackgroundColor": "#fff" @@ -408,18 +396,6 @@ "navigationBarTitleText": "红包" } }, - { - "path": "pages/news/audio-video/audio", - "style": { - "navigationBarTitleText": "语音" - } - }, - { - "path": "pages/news/audio-video/video", - "style": { - "navigationBarTitleText": "视频" - } - }, { "path": "pages/index/integralDetail", "style": { @@ -687,7 +663,7 @@ } }, { - "path": "pages/news/chatGroup", + "path": "pages/news/group/chatList", "style": { "navigationBarTitleText": "群聊列表", "navigationBarBackgroundColor": "#fff" @@ -786,6 +762,20 @@ { "navigationBarTitleText" : "关于九亿" } + }, + { + "path" : "pages/news/detail/group", + "style" : + { + "navigationBarTitleText" : "群聊详情" + } + }, + { + "path" : "pages/news/group/invite", + "style" : + { + "navigationBarTitleText" : "邀请加群" + } } ], diff --git a/jiuyi2/pages/index/durainActivation.vue b/jiuyi2/pages/index/durainActivation.vue index 17f15797..416d90bf 100644 --- a/jiuyi2/pages/index/durainActivation.vue +++ b/jiuyi2/pages/index/durainActivation.vue @@ -107,9 +107,10 @@ 每日可释放:{{item.releasableDaily}} 剩余可释放:{{item.remainFruitCount}} 当前级别:{{item.treeName}} - - 哈希值: {{item.formatHash}} + + 哈希值: {{item.formatHash}} + diff --git a/jiuyi2/pages/index/wallet/wallet.vue b/jiuyi2/pages/index/wallet/wallet.vue index 23f8394b..a4bfc61e 100644 --- a/jiuyi2/pages/index/wallet/wallet.vue +++ b/jiuyi2/pages/index/wallet/wallet.vue @@ -53,6 +53,9 @@ }, { type: 2, name: '已入账', + }, { + type: 3, + name: '已取消', }]) // 收益类型列表索引 const getTypeListIndex = ref(0) diff --git a/jiuyi2/pages/mine/homepage.vue b/jiuyi2/pages/mine/homepage.vue index f5e5ab2e..0bc74a16 100644 --- a/jiuyi2/pages/mine/homepage.vue +++ b/jiuyi2/pages/mine/homepage.vue @@ -297,12 +297,12 @@ 隐私赞 - + {{userinfo.userAttention}} 关注 - + {{userinfo.userFans}} 粉丝 @@ -416,7 +416,7 @@ - \ No newline at end of file diff --git a/jiuyi2/pages/news/audio-video/audio.vue b/jiuyi2/pages/news/audio-video/audio.vue deleted file mode 100644 index b6f0cd32..00000000 --- a/jiuyi2/pages/news/audio-video/audio.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jiuyi2/pages/news/audio-video/video.nvue b/jiuyi2/pages/news/audio-video/video.nvue deleted file mode 100644 index 48d48ea8..00000000 --- a/jiuyi2/pages/news/audio-video/video.nvue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/jiuyi2/pages/news/audio-video/video.vue b/jiuyi2/pages/news/audio-video/video.vue deleted file mode 100644 index 48d48ea8..00000000 --- a/jiuyi2/pages/news/audio-video/video.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/jiuyi2/pages/news/chat/chat.vue b/jiuyi2/pages/news/chat/chat.vue index 29d79320..b2906a02 100644 --- a/jiuyi2/pages/news/chat/chat.vue +++ b/jiuyi2/pages/news/chat/chat.vue @@ -93,16 +93,18 @@ onLoad(option => { // 标题 let title = '' - // 聊天类型 - if (option.type) msg.type = option.type // 标题 if (option.name) title = option.name - // 用户id + // 聊天对象id if (option.msgId) msg.id = option.msgId - // 如果是群组 - if (option.type == 'GROUP') { - msg.num = option.num - title = `(${option.num})${option.name}` + // 聊天类型 + if (option.type) { + msg.type = option.type + // 如果是群组 + if (option.type == 'GROUP') { + msg.num = option.num + title = `(${option.num})${option.name}` + } } // 标题 if (title) pageTitle.value = title @@ -157,9 +159,7 @@ }, 200) } - // #ifdef APP uni.$chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived); - // #endif } // 监听内容滚动 @@ -214,10 +214,10 @@ data: param.data, }).then((rs) => { if (rs.code == 200) { - getHistory({ - msgId: '', - limit: 1, - }) + // getHistory({ + // msgId: '', + // limit: 1, + // }) param.success ? param.success() : '' return } @@ -261,7 +261,6 @@ // 红包过期 // if (redPacket.isStale == 1) return - // 抢红包 api.news.getRedPacket({ query: { @@ -458,6 +457,19 @@ * @param {Object} ev */ function handleMore(ev) { + // 配置 + const url = { + 'GROUP': util.setUrl('/pages/news/detail/group',{ + groupId: msg.id, + }), + 'C2C': util.setUrl('/') + } [msg.type] + + // 跳转详情 + uni.navigateTo({ + url, + }) + return const config = [{ name: '举报', callback: rs => { diff --git a/jiuyi2/pages/news/chat/components/news-temp/index.vue b/jiuyi2/pages/news/chat/components/news-temp/index.vue index 1fa85aab..45e3898a 100644 --- a/jiuyi2/pages/news/chat/components/news-temp/index.vue +++ b/jiuyi2/pages/news/chat/components/news-temp/index.vue @@ -17,7 +17,7 @@ item: { type: Object, default: () => { - {} + return {} } }, msg: { @@ -138,15 +138,15 @@ diff --git a/jiuyi2/pages/news/chat/jy-plus.vue b/jiuyi2/pages/news/chat/jy-plus.vue index ba0030bc..da65d5f9 100644 --- a/jiuyi2/pages/news/chat/jy-plus.vue +++ b/jiuyi2/pages/news/chat/jy-plus.vue @@ -40,7 +40,7 @@ const plusList = computed(() => { label: '拍摄', value: 'takePhoto', }, { - type: 'red-envelope.png', + type: 'pages/news/group/create.png', label: '红包', value: 'redEnvelope', } diff --git a/jiuyi2/pages/news/detail/group.vue b/jiuyi2/pages/news/detail/group.vue new file mode 100644 index 00000000..eedd3ccb --- /dev/null +++ b/jiuyi2/pages/news/detail/group.vue @@ -0,0 +1,179 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/news/goodsList/index.vue b/jiuyi2/pages/news/goodsList/index.vue index 3413b648..14848d73 100644 --- a/jiuyi2/pages/news/goodsList/index.vue +++ b/jiuyi2/pages/news/goodsList/index.vue @@ -1,122 +1,120 @@ \ No newline at end of file diff --git a/jiuyi2/pages/news/group-chat-list/index.vue b/jiuyi2/pages/news/group-chat-list/index.vue deleted file mode 100644 index ddd1c9d8..00000000 --- a/jiuyi2/pages/news/group-chat-list/index.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jiuyi2/pages/news/group-chat/index.vue b/jiuyi2/pages/news/group-chat/index.vue deleted file mode 100644 index e692657e..00000000 --- a/jiuyi2/pages/news/group-chat/index.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jiuyi2/pages/news/chatGroup.vue b/jiuyi2/pages/news/group/chatList.vue similarity index 100% rename from jiuyi2/pages/news/chatGroup.vue rename to jiuyi2/pages/news/group/chatList.vue diff --git a/jiuyi2/pages/news/group/create.vue b/jiuyi2/pages/news/group/create.vue new file mode 100644 index 00000000..8db27136 --- /dev/null +++ b/jiuyi2/pages/news/group/create.vue @@ -0,0 +1,233 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/news/group/invite.vue b/jiuyi2/pages/news/group/invite.vue new file mode 100644 index 00000000..87d73709 --- /dev/null +++ b/jiuyi2/pages/news/group/invite.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/news/news.vue b/jiuyi2/pages/news/news.vue index 5577c3db..b3158db3 100644 --- a/jiuyi2/pages/news/news.vue +++ b/jiuyi2/pages/news/news.vue @@ -1,316 +1,319 @@ + + - - - - + + + + + - - - - - {{ item.name }} + + + + {{ item.name }} + - - - - - - - 正在加载 - + + + + + + 正在加载 + - - - - 正在加载 - + + + + 正在加载 + - - - - 正在加载 - + + + + 正在加载 + - - - - - + + + + + + + + + - - - \ No newline at end of file diff --git a/jiuyi2/pages/news/red-envelope/index.vue b/jiuyi2/pages/news/red-envelope/index.vue deleted file mode 100644 index 4ee2d727..00000000 --- a/jiuyi2/pages/news/red-envelope/index.vue +++ /dev/null @@ -1,288 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jiuyi2/pages/news/redPacket.vue b/jiuyi2/pages/news/redPacket.vue index c9050801..266a42cb 100644 --- a/jiuyi2/pages/news/redPacket.vue +++ b/jiuyi2/pages/news/redPacket.vue @@ -1,4 +1,5 @@