From 648a7f2e481a4be9e78f9adf6a18511c8ca696f9 Mon Sep 17 00:00:00 2001 From: xjs Date: Fri, 12 Jun 2026 13:54:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E8=AF=B4=E4=B8=8D=E8=A6=81=E7=9A=84=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/evaluation/index.vue | 37 ++++++++++++++++++++++++++++++---- src/pages/me/me.vue | 5 +++-- src/utils/index.ts | 6 +++--- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/pages/evaluation/index.vue b/src/pages/evaluation/index.vue index 8cec437..c2de13d 100644 --- a/src/pages/evaluation/index.vue +++ b/src/pages/evaluation/index.vue @@ -37,6 +37,38 @@ onLoad(() => { evaluationList.value = resp.result } }) + + const updateManager = uni.getUpdateManager() + updateManager.onCheckForUpdate((res) => { + // 请求完新版本信息的回调 + if (res.hasUpdate) { + uni.showToast({ + title: '更新提示', + content: '新版本已经准备好,将进行更新', + }) + } + }) + + updateManager.onUpdateReady(() => { + uni.showModal({ + title: '更新提示', + content: '新版本已经准备好,是否重启应用?', + success(res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate() + } + }, + }) + }) + + updateManager.onUpdateFailed(() => { + // 新版本下载失败 + uni.showToast({ + title: '更新失败', + icon: 'none', + }) + }) }) @@ -55,10 +87,7 @@ onLoad(() => { - + diff --git a/src/pages/me/me.vue b/src/pages/me/me.vue index 3423d3e..59b63e6 100644 --- a/src/pages/me/me.vue +++ b/src/pages/me/me.vue @@ -29,9 +29,10 @@ const userStore = useUserStore() const { userInfo } = storeToRefs(userStore) const bottomMenuList = [ - { name: '联系客服', img: 'https://lwzk.ycymedu.com/img/qt/wd_kefu.png', url: '/pages-sub/about/onlineCustom' }, - { name: '关于我们', img: 'https://lwzk.ycymedu.com/img/qt/wd_guanyu.png', url: '/pages-sub/about/about' }, + + { name: '我的测评', img: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/liebian_wd_baogao.png', url: '/pages-sub/me/evaluation' }, { name: '直播码注册', img: 'https://lw-zk.oss-cn-hangzhou.aliyuncs.com/liebian/wd_liebian.png', url: '/pages-sub/invite/login' }, + { name: '关于我们', img: 'https://lwzk.ycymedu.com/img/qt/wd_guanyu.png', url: '/pages-sub/about/about' }, ] function navigateToUrl(url: string) { diff --git a/src/utils/index.ts b/src/utils/index.ts index 42762e0..8a25d7d 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -122,9 +122,9 @@ export function getEnvBaseUrl() { // https://liebian.ycymedu.com 智能中专学校的 // https://xqwgy.ycymedu.com/ 深泉外国语学院 // # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。 - const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'https://senior.ycymedu.com' - const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'https://senior.ycymedu.com' - const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'https://senior.ycymedu.com' + const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'https://liebian.ycymedu.com' + const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'https://liebian.ycymedu.com' + const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'https://liebian.ycymedu.com' // 微信小程序端环境区分 if (isMpWeixin) {