优化
This commit is contained in:
@@ -13,8 +13,9 @@ Page({
|
||||
doctor_id: "",
|
||||
idcard_status: 0,
|
||||
iden_auth_status: 0,
|
||||
is_bind_bank: 0,
|
||||
user_name: "",
|
||||
brief_introduction: "我的简介",
|
||||
brief_introduction: "点击编辑",
|
||||
v_show: false,
|
||||
v_message: "",
|
||||
next_url: "/Pages/yishi/identity/index"
|
||||
@@ -33,6 +34,13 @@ Page({
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onShow(){
|
||||
let user_id = wx.getStorageSync("user_id");
|
||||
let is_bind_bank = wx.getStorageSync(user_id+'_is_bind_bank');
|
||||
this.setData({
|
||||
is_bind_bank: is_bind_bank
|
||||
})
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
@@ -69,6 +77,14 @@ Page({
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.is_bind_bank != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请您先绑定结算银行卡",
|
||||
next_url: "/Pages/yishi/bankcard/index",
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go1(e){
|
||||
@@ -83,6 +99,14 @@ Page({
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go2(e){
|
||||
if(this.data.idcard_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行实名认证",
|
||||
next_url: "/Pages/yishi/identity/index"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.iden_auth_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
@@ -94,7 +118,15 @@ Page({
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
goIn(){
|
||||
this.setData({
|
||||
v_show: false
|
||||
})
|
||||
app.go(this.data.next_url)
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
v_show: false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -5,6 +5,6 @@
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
@@ -2,21 +2,35 @@
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<van-cell-group>
|
||||
<van-cell size="large" bindtap="go" data-url="/Pages/yishi/mycard/index" title="我的名片" value="分享名片" is-link />
|
||||
<van-cell size="large" bindtap="go" data-url="/Pages/yishi/myprofile/index" title="我的简介" value="{{brief_introduction}}" is-link />
|
||||
<van-cell size="large" bindtap="go" data-url="/Pages/yishi/myprofile/index" title="我的简介" value="{{brief_introduction == ''?'点击编辑':brief_introduction}}" is-link />
|
||||
<van-cell size="large" bindtap="go1" data-url="/Pages/yishi/attestation/index?card_name={{card_name}}&card_num_mask={{card_num_mask}}" link-type="navigateTo" title="实名认证"
|
||||
value="{{idcard_status==0?'未认证':idcard_status==1?'已认证':'认证失败'}}" is-link />
|
||||
<van-cell size="large" bindtap="go" data-url="/Pages/yishi/practicing/index" link-type="navigateTo" title="医师认证"
|
||||
<van-cell size="large" bindtap="go2" data-url="/Pages/yishi/practicing/index" link-type="navigateTo" title="医师认证"
|
||||
value="{{iden_auth_status==0?'未认证':iden_auth_status==1?'已认证':iden_auth_status==2?'审核中':'认证失败'}}" is-link />
|
||||
</van-cell-group>
|
||||
|
||||
<van-button bind:click="logOut" custom-style="width: 92vw;margin: 50rpx auto;border-radius: 10rpx;" type="primary" color="#3CC7C0" block>退出登录</van-button>
|
||||
|
||||
<van-dialog
|
||||
<!-- <van-dialog
|
||||
title="温馨提示"
|
||||
message="{{v_message}}"
|
||||
show="{{ v_show }}"
|
||||
show-cancel-button
|
||||
confirm-button-color="#3CC7C0"
|
||||
bind:confirm="goIn"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<t-dialog
|
||||
visible="{{ v_show }}"
|
||||
title="温馨提示"
|
||||
content="{{v_message}}"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="goIn">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
|
||||
</view>
|
||||
@@ -2,4 +2,18 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
Reference in New Issue
Block a user