优化页面

This commit is contained in:
haomingming
2023-03-17 10:13:35 +08:00
parent dea1555b9b
commit 589c2cf823
81 changed files with 894 additions and 524 deletions
+48 -2
View File
@@ -11,7 +11,11 @@ Page({
height: app.globalData.height,
id_card_front: [],
id_card_back: [],
sign_image: ""
sign_image: "",
btn_txt: "提交",
multi_point_status: "",
btn_disabled: true
},
onLoad(){
@@ -20,6 +24,29 @@ Page({
//获得多点执业信息
api.getDoctorAuthMulti().then(response => {
console.log("getDoctorAuthMulti: ",response);
let multi_point_status = Number(response.data.multi_point_status);
let btn_txt = this.data.btn_txt;
let btn_disabled = this.data.btn_disabled;
switch (multi_point_status) {
case 0:
btn_txt = "提交";
btn_disabled = false;
break;
case 1:
btn_txt = "审核通过";
break;
case 2:
btn_txt = "审核中";
break;
case 3:
btn_txt = "认证失败,再次提交";
btn_disabled = false;
break;
default:
btn_txt = "提交";
btn_disabled = false;
break;
}
if(response.data.id_card_front){
let id_card_front_img = {};
id_card_front_img.url = response.data.id_card_front;
@@ -44,8 +71,9 @@ Page({
this.setData({
id_card_front: this.data.id_card_front,
id_card_back: this.data.id_card_back,
btn_disabled: btn_disabled,
btn_txt: btn_txt
})
}).catch(errors => {
console.error(errors);
@@ -187,6 +215,13 @@ Page({
})
},
doDeleteFile(event){
if(this.data.btn_disabled){
wx.showToast({
title: '不能修改',
icon: "error"
})
return;
}
console.log(event);
let url = event.detail.file.url;
let file_name = event.currentTarget.dataset.field_name;
@@ -200,5 +235,16 @@ Page({
},
onshowIdCardBackNote(){
console.log("onshowIdCardBackNote");
},
go(e){
// if(this.data.btn_disabled){
// wx.showToast({
// title: '不能修改',
// icon: "error"
// })
// return;
// }
let url = e.currentTarget.dataset.url;
app.go(url)
}
})
+34 -37
View File
@@ -1,37 +1,37 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<m-upload-cell
upload_cell_name="上传身份证正面照片"
t_icon_name="view-module"
bind:showNote="onshowIdCardFrontNote"
upload_cell_desc=""
upload_cell_note="查看示例"
fileList="{{ id_card_front }}"
max_count="1"
data-scene="2"
data-field_name="id_card_front"
data-file_multiple="true"
bindUploadFile="doUploadFile"
bindDeleteFile="doDeleteFile"
/>
upload_cell_name="上传身份证正面照片"
t_icon_name="view-module"
bind:showNote="onshowIdCardFrontNote"
upload_cell_desc=""
upload_cell_note="查看示例"
fileList="{{ id_card_front }}"
max_count="1"
data-scene="2"
data-field_name="id_card_front"
data-file_multiple="true"
bindUploadFile="doUploadFile"
bindDeleteFile="doDeleteFile"
/>
<m-upload-cell
upload_cell_name="上传身份证反面照片"
t_icon_name="view-module"
bind:showNote="onshowIdCardBackNote"
upload_cell_desc=""
upload_cell_note="查看示例"
fileList="{{ id_card_back }}"
max_count="1"
data-scene="2"
data-field_name="id_card_back"
data-file_multiple="true"
bindUploadFile="doUploadFile"
bindDeleteFile="doDeleteFile"
/>
upload_cell_name="上传身份证反面照片"
t_icon_name="view-module"
bind:showNote="onshowIdCardBackNote"
upload_cell_desc=""
upload_cell_note="查看示例"
fileList="{{ id_card_back }}"
max_count="1"
data-scene="2"
data-field_name="id_card_back"
data-file_multiple="true"
bindUploadFile="doUploadFile"
bindDeleteFile="doDeleteFile"
/>
<van-cell-group border="{{ false }}">
<van-cell
<van-cell size="large"
url="/Pages/yishi/manual/index"
title="多点执业认证流程"
border="{{ false }}"
@@ -44,20 +44,17 @@
<view class="sign_box">
<view class="sign_title">医生手写签名 *</view>
<view class="sign" wx:if="{{sign_image == ''}}">
<navigator url="/Pages/yishi/signcanvas/index" open-type="navigate" hover-class="other-navigator-hover">
<van-button custom-style="height:130rpx;margin-top:20rpx;border-radius: 20rpx;border: 1px dashed #999;width:100%;font-size:30rpx;background-color: #fff;color: #3CC7C0;" icon="edit">点击签名</van-button>
</navigator>
<view class="sign" wx:if="{{sign_image == ''}}" data-url="/Pages/yishi/signcanvas/index" bindtap="go">
<van-button custom-style="height:130rpx;margin-top:20rpx;border-radius: 20rpx;border: 1px dashed #999;width:100%;font-size:30rpx;background-color: #fff;color: #3CC7C0;" icon="edit">点击签名</van-button>
</view>
<view class="sign_img" wx:if="{{sign_image != ''}}" data-url="/Pages/yishi/signcanvas/index" bindtap="go">
<image mode="heightFix" style="transform: rotate(-90deg);width: 100%;" src="{{sign_image}}"></image>
</view>
<navigator url="/Pages/yishi/signcanvas/index" open-type="navigate" hover-class="other-navigator-hover">
<view class="sign_img" wx:if="{{sign_image != ''}}">
<image mode="heightFix" style="transform: rotate(-90deg);width: 100%;" src="{{sign_image}}"></image>
</view>
</navigator>
<view class="sign_note">提示:平台会在1~3天内审核您提交的资料,审核结果会第一时间通知您。</view>
<!-- <van-button custom-style="font-size:30rpx; color:#fff; border-radius: 20rpx; background-color: #999" block>资料未填写完</van-button> -->
<van-button bind:click="add" custom-style="font-size:30rpx; color:#fff; border-radius: 20rpx; background-color: #3CC7C0" block>提交</van-button>
<van-button bind:click="add"
custom-style="font-size:30rpx; color:#fff; border-radius: 20rpx; background-color: #3CC7C0" disabled="{{btn_disabled}}" block>{{btn_txt}}</van-button>
</view>
<view style="height: 50rpx;">