Browse Source

refactor: 优化会员认证相关页面逻辑与样式

1.  移除vipPending页面自定义导航栏配置,调整页面布局样式
2.  注释掉repository页面的van-tabs组件
3.  修改我的页面用药提醒跳转逻辑,简化跳转校验
4.  移除首页的routerVipTo方法,统一会员跳转逻辑到我的页面
5.  更新vipCert页面文案、上传图标与样式,移除扫码认证入口
6.  调整项目调试配置项,更新页面快捷启动路径
7.  适配DRUG主题的页面样式配色
master
kola-web 5 hours ago
parent
commit
0a7ba9ab98
  1. 46
      project.private.config.json
  2. 127
      src/gift/pages/vipCert/index.scss
  3. 110
      src/gift/pages/vipCert/index.ts
  4. 15
      src/gift/pages/vipCert/index.wxml
  5. 1
      src/gift/pages/vipPending/index.json
  6. 109
      src/gift/pages/vipPending/index.scss
  7. 18
      src/gift/pages/vipPending/index.wxml
  8. 25
      src/pages/index/index.ts
  9. 19
      src/pages/my/index.ts
  10. 2
      src/pages/my/index.wxml
  11. 4
      src/pages/repository/index.wxml

46
project.private.config.json

@ -22,11 +22,32 @@ @@ -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 @@ @@ -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 @@ @@ -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 @@ @@ -190,13 +197,6 @@
"scene": null
},
{
"name": "患者-知识库",
"pathName": "pages/repository/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者-录入个人信息",
"pathName": "pages/enterInfo/index",
"query": "",

127
src/gift/pages/vipCert/index.scss

@ -2,29 +2,34 @@ @@ -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,22 +38,16 @@ @@ -33,22 +38,16 @@
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-top: 24rpx;
font-size: 30rpx;
color: #666666;
text-align: center;
margin: 0 -0.5em;
color: #0eb66d;
}
}
.upload {
margin-top: 46rpx;
@ -56,20 +55,20 @@ @@ -56,20 +55,20 @@
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 @@ @@ -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 @@ @@ -123,7 +122,7 @@
color: #fff;
white-space: pre-line;
text-align: center;
background-color: #bb232c;
background-color: #0eb66d;
}
}
}
@ -137,31 +136,14 @@ @@ -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 @@ @@ -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);
}
}
}

110
src/gift/pages/vipCert/index.ts

@ -1,91 +1,97 @@ @@ -1,91 +1,97 @@
const app = getApp<IAppOption>();
const app = getApp<IAppOption>()
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({ @@ -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()
},
});
})

15
src/gift/pages/vipCert/index.wxml

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<image class="bg" mode="widthFix" src="{{imageUrl}}1/login-bg.png?t={{Timestamp}}"></image>
<view class="page-container">
<navBar title="专属服务用户进入" back="{{true}}" bind:back="handleBack"></navBar>
<view class="page-title">专属身份认证</view>
<view class="sub-title">诊断证明审核通过后,即可享受平台全部服务</view>
<view class="page-title">需先认证用药身份</view>
<view class="sub-title">处方证明审核通过后,即可享受平台全部服务</view>
<view class="content">
<view class="c-title">
请上传有<text class="blod">「艾加莫德」</text>字样的
请上传有
<text class="c-link">“伊奈利珠单抗注射液”</text>
字样的处方单或购药发票
</view>
<view class="c-link">处方单或购药发票</view>
<view class="upload">
<uploadFile
fileTypes="{{['image']}}"
@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
upload="{{!diagnoseImg}}"
>
<view class="upload-container">
<image class="icon" wx:if="{{!diagnoseImg}}" src="{{imageUrl}}1/upload-cert.png?t={{Timestamp}}"></image>
<image class="icon" wx:if="{{!diagnoseImg}}" src="{{imageUrl}}icon48.png?t={{Timestamp}}"></image>
<view class="name" wx:if="{{!diagnoseImg}}">点击上传</view>
</view>
</uploadFile>
@ -37,9 +37,6 @@ @@ -37,9 +37,6 @@
<view class="btn1" bind:tap="handleSubmit">提交人工审核</view>
<view class="btn2" bind:tap="handleReset">重新提交</view>
</block>
<block wx:else>
<view class="msg" bind:tap="handleVipScan">您也可通过扫药盒码认证></view>
</block>
</view>
</view>
</view>

1
src/gift/pages/vipPending/index.json

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"disableSwipeBack": true,
"usingComponents": {
"navBar": "/components/navBar/navBar",

109
src/gift/pages/vipPending/index.scss

@ -2,43 +2,20 @@ @@ -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 @@ @@ -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;
font-size: 36rpx;
color: #ffffff;
line-height: 56rpx;
}
.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: 125rpx auto 0;
margin: 38rpx auto 0;
display: block;
width: 300rpx;
height: 300rpx;
}
.tip{
margin-top: 87rpx;
font-size: 28rpx;
color: #666666;
.tip {
margin-top: 24rpx;
font-size: 36rpx;
color: #222222;
text-align: center;
line-height: 48rpx;
line-height: 52rpx;
.high {
color: #0eb66d;
}
}
}
}
.footer {
@ -78,23 +72,32 @@ @@ -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);
}
}

18
src/gift/pages/vipPending/index.wxml

@ -1,18 +1,22 @@ @@ -1,18 +1,22 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<image class="bg" mode="widthFix" src="{{imageUrl}}1/login-bg.png?t={{Timestamp}}"></image>
<view class="page-container">
<navBar title="" back="{{true}}" bind:back="handleBack"></navBar>
<image class="page-icon" src="{{imageUrl}}icon49.png?t={{Timestamp}}"></image>
<view class="page-title">提交成功,审核中</view>
<view class="sub-title">诊断证明审核通过后,即可享受平台全部服务</view>
<view class="content">
<view class="c-header">
<view>人工审核周期24小时~48小时</view>
<!-- <view>若有疑问请联系 400-3920-3049</view> -->
<view>处方证明审核通过后</view>
<view>即可享受平台全部服务</view>
</view>
<view class="c-container">
<view class="date">人工审核周期24小时-48小时</view>
<image class="code" src="{{qrCode}}" show-menu-by-longpress></image>
<view class="tip">
<view>关注"愈见昕生"公众号 获取审核进度</view>
<view>还可以了解更多专业知识</view>
<view>
关注
<text class="high">愈见昕生公众号</text>
</view>
<view>获取审核进度</view>
</view>
</view>
</view>
<view class="footer">

25
src/pages/index/index.ts

@ -363,31 +363,6 @@ Page({ @@ -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') {

19
src/pages/my/index.ts

@ -102,29 +102,14 @@ Page({ @@ -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 { UseDrugsAuditStatus } = this.data.userInfo
const url = {
1: pendPath,
1: '/gift/pages/vipPending/index',
2: '/gift/pages/vipReject/index',
}[UseDrugsAuditStatus]
wx.navigateTo({
url: url || '/gift/pages/vipCert/index',
})
} else {
wx.showToast({
icon: 'none',
title: '工程师正在努力建设中,敬请期待!',
})
}
},
handleMiniDoctor() {

2
src/pages/my/index.wxml

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon71' : 'icon62'}}.png?t={{Timestamp}}"></image>
<view class="name">健康档案</view>
</view>
<view bind:tap="routerTo" class="item" data-url="/pages/uploadCert/index">
<view bind:tap="routerVipTo" class="item">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon72' : 'icon63'}}.png?t={{Timestamp}}"></image>
<view class="name">用药提醒</view>
</view>

4
src/pages/repository/index.wxml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<van-tabs
<!-- <van-tabs
class="navbar"
active="{{ active }}"
bind:change="tabChange"
@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
>
<van-tab title="知识库"></van-tab>
<van-tab title="患者故事"></van-tab>
</van-tabs>
</van-tabs> -->
<view class="search" wx:if="{{active==0}}">
<image class="icon" src="{{imageUrl}}icon67.png?t={{Timestamp}}"></image>
<input

Loading…
Cancel
Save