From 0a7ba9ab98eaff31e1d3dc9e2d591ad8decebbf9 Mon Sep 17 00:00:00 2001 From: kola-web Date: Mon, 18 May 2026 17:25:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E8=AE=A4=E8=AF=81=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=80=BB=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. 移除vipPending页面自定义导航栏配置,调整页面布局样式 2. 注释掉repository页面的van-tabs组件 3. 修改我的页面用药提醒跳转逻辑,简化跳转校验 4. 移除首页的routerVipTo方法,统一会员跳转逻辑到我的页面 5. 更新vipCert页面文案、上传图标与样式,移除扫码认证入口 6. 调整项目调试配置项,更新页面快捷启动路径 7. 适配DRUG主题的页面样式配色 --- project.private.config.json | 46 ++++++------- src/gift/pages/vipCert/index.scss | 127 ++++++++++++++++++++--------------- src/gift/pages/vipCert/index.ts | 110 ++++++++++++++---------------- src/gift/pages/vipCert/index.wxml | 15 ++--- src/gift/pages/vipPending/index.json | 1 - src/gift/pages/vipPending/index.scss | 121 +++++++++++++++++---------------- src/gift/pages/vipPending/index.wxml | 22 +++--- src/pages/index/index.ts | 25 ------- src/pages/my/index.ts | 31 +++------ src/pages/my/index.wxml | 2 +- src/pages/repository/index.wxml | 4 +- 11 files changed, 238 insertions(+), 266 deletions(-) diff --git a/project.private.config.json b/project.private.config.json index 5cf8cec..2e53d69 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -22,11 +22,32 @@ "miniprogram": { "list": [ { + "name": "患者-审核中", + "pathName": "gift/pages/vipPending/index", + "query": "", + "scene": null, + "launchMode": "default" + }, + { + "name": "患者-认证用药身份", + "pathName": "gift/pages/vipCert/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "患者-知识库", + "pathName": "pages/repository/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { "name": "患者-活动报名成功", "pathName": "pages/liveResult/index", "query": "id=1", - "scene": null, - "launchMode": "default" + "launchMode": "default", + "scene": null }, { "name": "患者-个人信息", @@ -113,13 +134,6 @@ "scene": null }, { - "name": "患者-审核中", - "pathName": "/pages/certPending/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { "name": "患者-认证用药成功", "pathName": "/pages/certReslove/index", "query": "", @@ -127,13 +141,6 @@ "scene": null }, { - "name": "患者-认证用药身份", - "pathName": "pages/uploadCert/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { "name": "患者-医生介绍", "pathName": "pages/doctorDetail/index", "query": "id=12", @@ -190,13 +197,6 @@ "scene": null }, { - "name": "患者-知识库", - "pathName": "pages/repository/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { "name": "患者-录入个人信息", "pathName": "pages/enterInfo/index", "query": "", diff --git a/src/gift/pages/vipCert/index.scss b/src/gift/pages/vipCert/index.scss index 6eadeab..0298681 100644 --- a/src/gift/pages/vipCert/index.scss +++ b/src/gift/pages/vipCert/index.scss @@ -2,29 +2,34 @@ position: relative; box-sizing: border-box; background-color: #fff; - .bg { - width: 100%; - } .page-container { padding-bottom: 80rpx; - position: absolute; - width: 100%; - top: 0; - left: 0; display: flex; flex-direction: column; .page-title { + position: relative; + margin-left: 40rpx; margin-top: 86rpx; font-size: 48rpx; - color: #333333; + color: #222222; font-weight: bold; - text-align: center; + &::before { + position: absolute; + bottom: 0; + left: 94rpx; + display: block; + content: ''; + width: 280rpx; + height: 22rpx; + background: linear-gradient(94deg, #0eb66d 0%, #00d277 100%); + border-radius: 0rpx 0rpx 0rpx 0rpx; + opacity: 0.38; + } } .sub-title { - margin-top: 32rpx; - font-size: 28rpx; - color: #aaaaaa; - text-align: center; + font-size: 40rpx; + color: rgba(34, 34, 34, 0.7); + margin: 24rpx 40rpx 0; } .content { margin: 40rpx auto 0; @@ -33,43 +38,37 @@ box-sizing: border-box; background: #ffffff; box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.09); - border: 2rpx solid rgba(224, 71, 117, 0.25); + border: 2rpx solid #f4f3f3; border-radius: 24rpx; .c-title { - font-size: 30rpx; - color: #666666; + font-size: 40rpx; + color: rgba(34, 34, 34, 0.7); text-align: center; - .blod { - font-weight: bold; - color: #cf5375; + .c-link { + margin: 0 -0.5em; + color: #0eb66d; } } - .c-link { - margin-top: 24rpx; - font-size: 30rpx; - color: #666666; - text-align: center; - } .upload { margin-top: 46rpx; .upload-container { position: relative; width: 510rpx; height: 510rpx; - border: 2rpx dotted #cf5375; + border: 2rpx dotted rgba(14, 182, 109, 0.32); border-radius: 24rpx; - background: rgba(207, 83, 117, 0.06); + background: #f6fffb; .icon { display: block; margin: 148rpx auto 0; - width: 141rpx; - height: 161rpx; + width: 104rpx; + height: 104rpx; } .name { margin-top: 36rpx; - font-size: 28rpx; + font-size: 40rpx; font-weight: bold; - color: #cf5375; + color: #0eb66d; text-align: center; } .diagnose-img { @@ -96,7 +95,7 @@ left: 0; width: 100%; height: 80rpx; - background: linear-gradient(0deg, #ec7095 0%, rgba(236, 112, 177, 0) 100%); + background: linear-gradient(0deg, #0eb66d 0%, rgba(14, 182, 109, 0) 100%); border-radius: 0rpx 0rpx 0rpx 0rpx; opacity: 0.5; animation: 3s ease-in 1s infinite reverse both running slidein; @@ -123,7 +122,7 @@ color: #fff; white-space: pre-line; text-align: center; - background-color: #bb232c; + background-color: #0eb66d; } } } @@ -137,31 +136,14 @@ > image { margin-right: 30rpx; } - .next { - flex: 1; - text-align: center; - height: 88rpx; - line-height: 88rpx; - text-align: center; - border: 2rpx solid #e04775; - border-radius: 24rpx; - font-size: 34rpx; - font-weight: bold; - background-color: #e04775; - color: #fff; - &.active { - background-color: #dddddd; - border-color: #dddddd; - } - } .btn1 { flex: 1; height: 80rpx; border-radius: 24rpx; opacity: 1; - border: 2rpx solid #e04775; + border: 2rpx solid #0eb66d; font-size: 34rpx; - color: #e04775; + color: #0eb66d; text-align: center; line-height: 80rpx; font-weight: bold; @@ -176,14 +158,51 @@ font-size: 34rpx; color: #fff; font-weight: bold; - background-color: #cf5375; + background: linear-gradient(0deg, #0eb66d, #00d277); } .msg { flex: 1; font-size: 28rpx; - color: #e04775; + color: #0eb66d; text-align: center; } } } } + +#drug-page { + .page-title::before { + background: linear-gradient(270deg, #b384f4 0%, #5956e9 100%); + } + .content { + border-color: rgba(89, 86, 233, 0.25); + .c-title .c-link { + color: rgba(89, 86, 233, 1); + } + .upload-container { + border-color: rgba(89, 86, 233, 0.32); + background: rgba(89, 86, 233, 0.06); + .name { + color: rgba(89, 86, 233, 1); + } + .scan { + background: linear-gradient(0deg, #5956e9 0%, rgba(89, 86, 233, 0) 100%); + } + .error { + background-color: rgba(89, 86, 233, 1); + } + } + } + .footer { + .btn1 { + border-color: rgba(89, 86, 233, 1); + color: rgba(89, 86, 233, 1); + } + .btn2 { + background: linear-gradient(270deg, #5956e9 0%, #b384f4 100%); + } + .msg { + color: rgba(89, 86, 233, 1); + } + } +} diff --git a/src/gift/pages/vipCert/index.ts b/src/gift/pages/vipCert/index.ts index 7c1c251..11ab7ad 100644 --- a/src/gift/pages/vipCert/index.ts +++ b/src/gift/pages/vipCert/index.ts @@ -1,91 +1,97 @@ -const app = getApp(); +const app = getApp() Page({ data: { - diagnoseImg: "", + diagnoseImg: '', error: false, - errorText: "", + errorText: '', aiPass: 0, verify: false, audit: false, userInfo: app.globalData.userInfo, - Hash: "", + Hash: '', }, onLoad() { app.waitLogin({}).then(() => { app.getUserInfo(this, true, (userInfo) => { if (userInfo.UserType == 4) { wx.reLaunch({ - url: "/pages/my/index", - }); + url: '/pages/my/index', + }) + return } - app.permissionVerification(3, 0, `/pages/index/index`); - }); - }); + if (userInfo.UseDrugsAuditStatus == 1) { + wx.redirectTo({ + url: '/gift/pages/vipPending/index', + }) + return + } + app.permissionVerification(3, 0, `/pages/index/index`) + }) + }) }, handleSetData(e: WechatMiniprogram.CustomEvent) { - const imgUrl = e.detail[0].imgUrl; + const imgUrl = e.detail[0].imgUrl this.setData({ diagnoseImg: imgUrl, audit: true, - }); - this.handleAiPass(imgUrl); + }) + this.handleAiPass(imgUrl) }, handleAiPass(imgUrl: string) { wx.ajax({ - method: "POST", - url: "?r=igg4/common/medicine-image-verify", + method: 'POST', + url: '?r=igg4/common/medicine-image-verify', data: { ImageUrl: imgUrl, }, }).then((res) => { - const { code, Hash } = res; + const { code, Hash } = res this.setData({ Hash, - }); + }) if (code === 0) { this.setData({ audit: false, verify: true, aiPass: 1, - }); - this.handleSubmit(); + }) + this.handleSubmit() } else { const errorText = { - 1001: "智能审核失败:图片模糊无法识别", - 1002: "智能审核失败:图片模糊无法识别", - 2001: "智能审核失败:疑似提交重复图片", - 2002: '智能审核失败:您提交图片中不包含"艾加莫德"相关字样', - }; + 1001: '智能审核失败:图片模糊无法识别', + 1002: '智能审核失败:图片模糊无法识别', + 2001: '智能审核失败:疑似提交重复图片', + 2002: '智能审核失败:您提交图片中不包含"伊奈利珠单抗注射液"相关字样', + } this.setData({ audit: false, error: true, errorText: errorText[code] || errorText[1001], - }); + }) } - }); + }) }, handleSubmit() { - const { registrationSource, registChannel, regBusinessId } = app.globalData; - const { diagnoseImg, error, userInfo, Hash } = this.data; - let urlKey = ""; + const { registrationSource, registChannel, regBusinessId } = app.globalData + const { diagnoseImg, error, Hash } = this.data + let urlKey = '' if (error) { - urlKey = userInfo.isFollow ? "nopending" : "pending"; + urlKey = 'pending' } else { - urlKey = "reslove"; + urlKey = 'reslove' } const navUrl = { - reslove: "/pages/index/index", - pending: "/gift/pages/vipPending/index", - nopending: "/gift/pages/vimStartPending/index", - }[urlKey] as string; + reslove: '/pages/index/index', + pending: '/gift/pages/vipPending/index', + }[urlKey] as string wx.ajax({ - method: "POST", - url: "?r=igg4/account/upload-use-drugs-audit-img", + method: 'POST', + url: '?r=igg4/account/upload-use-drugs-audit-img', data: { diagnoseImg, aiPass: this.data.aiPass, @@ -99,36 +105,20 @@ Page({ app.getUserInfo(this, true, () => { wx.reLaunch({ url: navUrl, - }); - }); - }); + }) + }) + }) }, handleReset() { this.setData({ - diagnoseImg: "", + diagnoseImg: '', error: false, - errorText: "", + errorText: '', aiPass: 0, verify: false, - }); - }, - handleVisitors() { - app.globalData.anyWhere = true; - wx.reLaunch({ - url: "/pages/index/index", - }); - }, - handleVip() { - wx.navigateTo({ - url: "/pages/vipLogin/index", - }); + }) }, handleBack() { - wx.navigateBack(); - }, - handleVipScan() { - wx.navigateTo({ - url: "/pages/vipLogin/index", - }); + wx.navigateBack() }, -}); +}) diff --git a/src/gift/pages/vipCert/index.wxml b/src/gift/pages/vipCert/index.wxml index bf5ac07..58d1aa2 100644 --- a/src/gift/pages/vipCert/index.wxml +++ b/src/gift/pages/vipCert/index.wxml @@ -1,14 +1,14 @@ - - 专属身份认证 - 诊断证明审核通过后,即可享受平台全部服务 + 需先认证用药身份 + 处方证明审核通过后,即可享受平台全部服务 - 请上传有「艾加莫德」字样的 + 请上传有 + “伊奈利珠单抗注射液” + 字样的处方单或购药发票 - 处方单或购药发票 - + 点击上传 @@ -37,9 +37,6 @@ 提交人工审核 重新提交 - - 您也可通过扫药盒码认证> - diff --git a/src/gift/pages/vipPending/index.json b/src/gift/pages/vipPending/index.json index d54917e..a6f01d4 100644 --- a/src/gift/pages/vipPending/index.json +++ b/src/gift/pages/vipPending/index.json @@ -1,6 +1,5 @@ { "navigationBarTitleText": "", - "navigationStyle": "custom", "disableSwipeBack": true, "usingComponents": { "navBar": "/components/navBar/navBar", diff --git a/src/gift/pages/vipPending/index.scss b/src/gift/pages/vipPending/index.scss index 5a6afb4..3b6d467 100644 --- a/src/gift/pages/vipPending/index.scss +++ b/src/gift/pages/vipPending/index.scss @@ -2,43 +2,20 @@ position: relative; box-sizing: border-box; background-color: #fff; - .bg { - width: 100%; - } .page-container { - padding-bottom: 80rpx; - position: absolute; - width: 100%; - top: 0; - left: 0; display: flex; flex-direction: column; - .navbar { - flex-shrink: 0; - padding: 0 20rpx 0; - display: flex; - align-items: center; - font-size: 40rpx; - color: #cf5375; - font-style: italic; - font-weight: bold; - .icon { - margin-right: 9rpx; - width: 42rpx; - height: 46rpx; - } + .page-icon { + display: block; + margin: 30rpx auto 0; + width: 200rpx; + height: 200rpx; } .page-title { - margin-top: 86rpx; - font-size: 48rpx; - color: #333333; - font-weight: bold; - text-align: center; - } - .sub-title { margin-top: 32rpx; - font-size: 28rpx; - color: #aaaaaa; + font-size: 44rpx; + color: #222222; + font-weight: bold; text-align: center; } .content { @@ -47,30 +24,47 @@ box-sizing: border-box; background: #ffffff; box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.09); - border: 2rpx solid rgba(224, 71, 117, 0.25); + background: linear-gradient(94deg, #0eb66d 0%, #00d277 100%); border-radius: 24rpx; - padding-bottom: 60rpx; + display: flex; + flex-direction: column; + justify-content: space-between; .c-header { + flex-shrink: 0; border-radius: 24rpx 24rpx 0 0; - background-color: #666666; padding: 18rpx 20rpx; text-align: center; - font-size: 28rpx; - color: #fff; - line-height: 42rpx; - } - .code { - margin: 125rpx auto 0; - display: block; - width: 300rpx; - height: 300rpx; + font-size: 36rpx; + color: #ffffff; + line-height: 56rpx; } - .tip{ - margin-top: 87rpx; - font-size: 28rpx; - color: #666666; - text-align: center; - line-height: 48rpx; + .c-container { + margin: 0 1px 1px; + padding-top: 52rpx; + padding-bottom: 50rpx; + background-color: #fff; + border-radius: 24rpx; + .date { + font-size: 36rpx; + color: #222222; + text-align: center; + } + .code { + margin: 38rpx auto 0; + display: block; + width: 300rpx; + height: 300rpx; + } + .tip { + margin-top: 24rpx; + font-size: 36rpx; + color: #222222; + text-align: center; + line-height: 52rpx; + .high { + color: #0eb66d; + } + } } } .footer { @@ -78,23 +72,32 @@ margin: 81rpx 48rpx 0; box-sizing: border-box; display: flex; - > view:not(:last-of-type), - > image { - margin-right: 30rpx; - } + justify-content: center; .next { - flex: 1; text-align: center; - height: 88rpx; - line-height: 88rpx; + width: 216rpx; + height: 94rpx; + line-height: 94rpx; text-align: center; - border: 2rpx solid #e04775; + border: 1px solid #0eb66d; border-radius: 24rpx; font-size: 34rpx; font-weight: bold; - background-color: #e04775; - color: #fff; + color: #0eb66d; } } } } + +#drug-page { + .content { + background: linear-gradient(270deg, #b384f4 0%, #5956e9 100%); + .c-container .tip .high { + color: rgba(89, 86, 233, 1); + } + } + .footer .next { + border-color: rgba(89, 86, 233, 1); + color: rgba(89, 86, 233, 1); + } +} diff --git a/src/gift/pages/vipPending/index.wxml b/src/gift/pages/vipPending/index.wxml index 20fc9d9..35dac15 100644 --- a/src/gift/pages/vipPending/index.wxml +++ b/src/gift/pages/vipPending/index.wxml @@ -1,18 +1,22 @@ - - + 提交成功,审核中 - 诊断证明审核通过后,即可享受平台全部服务 - 人工审核周期24小时~48小时 - + 处方证明审核通过后 + 即可享受平台全部服务 - - - 关注"愈见昕生"公众号 获取审核进度 - 还可以了解更多专业知识 + + 人工审核周期24小时-48小时 + + + + 关注 + 愈见昕生公众号 + + 获取审核进度 + diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index ef39cb3..250b268 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -363,31 +363,6 @@ Page({ }) }) }, - routerVipTo() { - const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.userInfo - if (MedicineAuditSwitch === '0') { - wx.navigateTo({ - url: '/pages/vipLogin/index', - }) - } else if (MedicineAuditSwitch === '1') { - const pendPath = { - 0: '/gift/pages/vipPending/index', - 1: '/gift/pages/vipStartPending/index', - }[isFollow] - const url = { - 1: pendPath, - 2: '/gift/pages/vipReject/index', - }[UseDrugsAuditStatus] - wx.navigateTo({ - url: url || '/gift/pages/vipCert/index', - }) - } else { - wx.showToast({ - icon: 'none', - title: '工程师正在努力建设中,敬请期待!', - }) - } - }, handleToastOk() { const { toastType } = this.data if (toastType === 'dedicatedDoctor' || toastType === 'recommendBindDoctor') { diff --git a/src/pages/my/index.ts b/src/pages/my/index.ts index 7cb7079..134da0e 100644 --- a/src/pages/my/index.ts +++ b/src/pages/my/index.ts @@ -102,29 +102,14 @@ Page({ }) }, routerVipTo() { - const { MedicineAuditSwitch, UseDrugsAuditStatus, isFollow } = this.data.userInfo - if (MedicineAuditSwitch === '0') { - wx.navigateTo({ - url: '/pages/vipLogin/index', - }) - } else if (MedicineAuditSwitch === '1') { - const pendPath = { - 0: '/gift/pages/vipPending/index', - 1: '/gift/pages/vipStartPending/index', - }[isFollow] - const url = { - 1: pendPath, - 2: '/gift/pages/vipReject/index', - }[UseDrugsAuditStatus] - wx.navigateTo({ - url: url || '/gift/pages/vipCert/index', - }) - } else { - wx.showToast({ - icon: 'none', - title: '工程师正在努力建设中,敬请期待!', - }) - } + const { UseDrugsAuditStatus } = this.data.userInfo + const url = { + 1: '/gift/pages/vipPending/index', + 2: '/gift/pages/vipReject/index', + }[UseDrugsAuditStatus] + wx.navigateTo({ + url: url || '/gift/pages/vipCert/index', + }) }, handleMiniDoctor() { diff --git a/src/pages/my/index.wxml b/src/pages/my/index.wxml index 22f5656..170d0d3 100644 --- a/src/pages/my/index.wxml +++ b/src/pages/my/index.wxml @@ -27,7 +27,7 @@ 健康档案 - + 用药提醒 diff --git a/src/pages/repository/index.wxml b/src/pages/repository/index.wxml index 6dbe641..f182d84 100644 --- a/src/pages/repository/index.wxml +++ b/src/pages/repository/index.wxml @@ -1,5 +1,5 @@ - - + -->