From c38846f13b1c56e9f56651b6ca1315c9c7eb7f39 Mon Sep 17 00:00:00 2001 From: cansnow Date: Sun, 11 Jan 2026 13:51:16 +0800 Subject: [PATCH] =?UTF-8?q?APP=E7=83=AD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- common/config.js | 3 +- components/videoPlayer.vue | 6 +- pages.json | 3 +- .../components/ChatingFooter/index.vue | 4 +- .../MessageItem/VideoMessageRender.vue | 22 +- pages/conversation/chating/index.vue | 3 +- pages/conversation/conversationList/index.vue | 41 +- .../friend-circle/components/circleItem.vue | 38 +- pages/find/friend-circle/friend-circle.vue | 176 ++-- pages/find/index/index.vue | 26 +- pages/user/about/index.vue | 15 +- static/images/icon_upgrade.png | Bin 0 -> 31432 bytes store/getters.js | 2 +- store/modules/circle.js | 36 +- util/app_update.js | 815 ++++++++++++++++++ 16 files changed, 995 insertions(+), 197 deletions(-) create mode 100644 static/images/icon_upgrade.png create mode 100644 util/app_update.js diff --git a/App.vue b/App.vue index 73e9d22..096aa52 100644 --- a/App.vue +++ b/App.vue @@ -5,7 +5,7 @@ import {getDbDir,toastWithCallback} from "@/util/common.js"; import {getConversationContent,conversationSort,prepareConversationState} from "@/util/imCommon"; import {PageEvents,UpdateMessageTypes} from "@/constant"; - import {checkUpgrade} from "@/api/login.js" + import checkUpgrade from "@/util/app_update.js" export default { onLaunch: function() { // #ifndef APP diff --git a/common/config.js b/common/config.js index b3c669e..801daab 100644 --- a/common/config.js +++ b/common/config.js @@ -21,7 +21,8 @@ const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL; const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL; module.exports = { - cdnUrl:"http://"+BASE_DOMAIN, + //cdnUrl:"http://"+BASE_DOMAIN, + cdnUrl:"https://shunliao.oss-accelerate.aliyuncs.com", version, getRegisterUrl, getApiUrl, diff --git a/components/videoPlayer.vue b/components/videoPlayer.vue index 2d3af76..b88893c 100644 --- a/components/videoPlayer.vue +++ b/components/videoPlayer.vue @@ -4,7 +4,7 @@ :show="previewVideoFlag" opacity="1" :custom-style="customMaskStyle"> - @@ -99,7 +99,7 @@ right: 5%; top: 10%; .icon{ - color: #fff; + color: #f00; font-size: 32px; font-family: uicon-iconfont; } diff --git a/pages.json b/pages.json index 82e0bc9..95e4f4c 100644 --- a/pages.json +++ b/pages.json @@ -300,7 +300,8 @@ { "path": "pages/find/friend-circle/friend-circle", "style": { - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "enablePullDownRefresh": true } }, { diff --git a/pages/conversation/chating/components/ChatingFooter/index.vue b/pages/conversation/chating/components/ChatingFooter/index.vue index 007bad6..dc3224b 100644 --- a/pages/conversation/chating/components/ChatingFooter/index.vue +++ b/pages/conversation/chating/components/ChatingFooter/index.vue @@ -119,8 +119,8 @@ }, }, mounted() { - console.log(this.storeCurrentGroup) - console.log(this.storeCurrentMemberInGroup) + //console.log(this.storeCurrentGroup) + //console.log(this.storeCurrentMemberInGroup) this.setKeyboardListener(); }, beforeDestroy() { diff --git a/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue b/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue index 1b0e5e7..73cfc02 100644 --- a/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue +++ b/pages/conversation/chating/components/MessageItem/VideoMessageRender.vue @@ -117,14 +117,14 @@ methods: { async init(){ const self = this; - //console.log(this.message?.videoElem); + console.log(this.message?.videoElem,this.conversationID); const snapshotUrl = this.message?.videoElem?.snapshotUrl; self.coverDownloading = true; //console.log(snapshotUrl); util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{ self.coverDownloading = false; self.src = fn; - console.log(fn); + //console.log(fn); }); }, clickMediaItem() { @@ -138,20 +138,22 @@ this.loadingWidth = "auto"; }, onOverlayClick() { + const _this = this; // 点击覆盖层:如果视频已缓存则直接播放,否则开始下载 - const url = this.message?.videoElem?.videoUrl || this.message?.videoElem?.videoPath; + const url = _this.message?.videoElem?.videoUrl; if (!url) { uni.showToast({ title: '无可下载的视频' }); return; } - this.videoDownloading = true; - this.videoDownloadProgress = 0; - util.downloadFile(url, `${this.conversationID}`, (prog) => { - //this.videoDownloadProgress = prog; + _this.videoDownloading = true; + _this.videoDownloadProgress = 0; + util.cacheFile(url, `${_this.conversationID}`, (prog) => { + //console.log(prog); + this.videoDownloadProgress = prog; }).then((fn) => { - this.videoDownloading = false; - this.videoExists = true; - this.playVideo(fn); + _this.videoDownloading = false; + _this.videoExists = true; + _this.playVideo(fn); }); }, diff --git a/pages/conversation/chating/index.vue b/pages/conversation/chating/index.vue index e280582..5fee0d3 100644 --- a/pages/conversation/chating/index.vue +++ b/pages/conversation/chating/index.vue @@ -27,6 +27,7 @@ import SelectFooter from "./components/SelectFooter"; import {markConversationAsRead} from "@/util/imCommon"; import IMSDK, {MessageType,GroupMemberRole} from "openim-uniapp-polyfill"; + import util from "@/util/index.js" export default { components: { ChatingHeader, @@ -110,7 +111,7 @@ return item.serverMsgID != data.serverMsgID; }) this.$store.commit('message/SET_HISTORY_MESSAGE_LIST',list); - }) + }); }, onUnload() { IMSDK.unsubscribe(IMSDK.IMEvents.OnMsgDeleted); diff --git a/pages/conversation/conversationList/index.vue b/pages/conversation/conversationList/index.vue index cfc6ea3..d4d616c 100644 --- a/pages/conversation/conversationList/index.vue +++ b/pages/conversation/conversationList/index.vue @@ -4,12 +4,13 @@ { - // uni.switchTab({ - // url:"/pages/user/index/index" - // }) - // uni.navigateTo({ - // url:"/pages/user/vip/vip" - // }); - prepareConversationState(this.storeConversationList[0]); - },1000) + this.freshing = false; + if(process.env.NODE_ENV == 'development'){ + // setTimeout(()=>{ + // // uni.switchTab({ + // // url:"/pages/user/index/index" + // // }) + // // uni.navigateTo({ + // // url:"/pages/user/vip/vip" + // // }); + // //prepareConversationState(this.storeConversationList[1]); + // },1000) + } }, methods: { test(){ @@ -177,23 +178,23 @@ this.old.scrollTop = e.detail.scrollTop; }, onRefresh() { - if (this._freshing) return; - this._freshing = true; + if (this.refreshing) return; + console.log('onRefresh'); + this.refreshing = true; this.queryList(true); }, onRestore() { - this.triggered = "restore"; + this.refreshing = false; console.log("onRestore"); }, scrolltolower() { this.queryList(); }, async queryList(isFirstPage = false) { - //console.log(1); + console.log(1); await this.$store.dispatch("conversation/getConversationList",isFirstPage); - //console.log(2); - this.triggered = false; - this._freshing = false; + console.log(2); + this.refreshing = false; }, closeAllSwipe() { this.$refs.swipeWrapperRef.closeAll(); diff --git a/pages/find/friend-circle/components/circleItem.vue b/pages/find/friend-circle/components/circleItem.vue index ecd333b..61f0a71 100644 --- a/pages/find/friend-circle/components/circleItem.vue +++ b/pages/find/friend-circle/components/circleItem.vue @@ -63,7 +63,7 @@ {{ item.created_at }} - 删除 + 删除 @@ -80,22 +80,29 @@ - - - {{ userInfo.nickame }}{{ pindex != item.likes.length - 1 ? ',' : '' }} + + + {{ ui.nickname }}{{ pindex != item.likes.length - 1 ? ',' : '' }} - {{ comment.user.nickname }} - 回复 - {{ comment.user.nickname }}: + 回复 + + {{ comment.user.nickname }} + + {{ comment.body }} @@ -106,10 +113,10 @@ @@ -533,6 +500,9 @@ } &-imgbox { position: relative; + &.top{ + background: #f4f4f4; + } .bgimg { width: 100%; diff --git a/pages/find/index/index.vue b/pages/find/index/index.vue index a752413..1ec71aa 100644 --- a/pages/find/index/index.vue +++ b/pages/find/index/index.vue @@ -11,9 +11,11 @@ :thumbSize="thumbSize" showArrow to="/pages/find/friend-circle/friend-circle"> - - - + + + + + @@ -31,21 +33,17 @@