From bc3c1b5648ba0bbca1a57b9180861d4b5928fbaa Mon Sep 17 00:00:00 2001 From: kola-web Date: Mon, 18 May 2026 18:33:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor(vipCert):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E8=AE=A4=E8=AF=81=E9=A1=B5=E9=9D=A2=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=B8=8E=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 调整vipCert页面的跳转目标页从my/index改为certReslove/index 2. 优化vipCert页面的wxml代码格式与scss样式 3. 修复my页面的用户类型校验逻辑,新增主题刷新通用逻辑 --- src/gift/pages/vipCert/index.scss | 1 - src/gift/pages/vipCert/index.ts | 2 +- src/gift/pages/vipCert/index.wxml | 7 ++----- src/pages/my/index.ts | 16 ++++++++++++++-- src/utils/page.ts | 24 ++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/gift/pages/vipCert/index.scss b/src/gift/pages/vipCert/index.scss index 0298681..e943ef7 100644 --- a/src/gift/pages/vipCert/index.scss +++ b/src/gift/pages/vipCert/index.scss @@ -45,7 +45,6 @@ color: rgba(34, 34, 34, 0.7); text-align: center; .c-link { - margin: 0 -0.5em; color: #0eb66d; } } diff --git a/src/gift/pages/vipCert/index.ts b/src/gift/pages/vipCert/index.ts index 11ab7ad..f7b9aff 100644 --- a/src/gift/pages/vipCert/index.ts +++ b/src/gift/pages/vipCert/index.ts @@ -17,7 +17,7 @@ Page({ app.getUserInfo(this, true, (userInfo) => { if (userInfo.UserType == 4) { wx.reLaunch({ - url: '/pages/my/index', + url: '/pages/certReslove/index', }) return } diff --git a/src/gift/pages/vipCert/index.wxml b/src/gift/pages/vipCert/index.wxml index 58d1aa2..af4c4d1 100644 --- a/src/gift/pages/vipCert/index.wxml +++ b/src/gift/pages/vipCert/index.wxml @@ -4,11 +4,8 @@ 需先认证用药身份 处方证明审核通过后,即可享受平台全部服务 - - 请上传有 - “伊奈利珠单抗注射液” - 字样的处方单或购药发票 - + + 请上传有"伊奈利珠单抗注射液"字样的处方单或购药发票 { + this.routerVipTo() + }) + return + } + if (UserType == 4) { + wx.navigateTo({ + url: '/pages/certReslove/index', + }) + return + } const url = { - 1: '/gift/pages/vipPending/index', + 1: '/gift/pages/vipPending/index', 2: '/gift/pages/vipReject/index', }[UseDrugsAuditStatus] wx.navigateTo({ diff --git a/src/utils/page.ts b/src/utils/page.ts index e90d719..153a5ef 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -16,6 +16,15 @@ function page(config: WechatMiniprogram.Page.Instance, +) { + const pages = getCurrentPages(); + const currentPage = pages[pages.length - 1]; + const route = currentPage?.route || ''; + const isDoctorPage = route.includes('doctor/pages'); + if (!isDoctorPage) { + const app = getApp(); + app.getTheme().then((res) => { + currPage.setData({ theme: res }); + }); + } +} + export default page;