优化
This commit is contained in:
@@ -7,14 +7,17 @@ Page({
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '我的信息', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
height: app.globalData.height,
|
||||
card_name: "",
|
||||
card_num_mask: "",
|
||||
doctor_id: "",
|
||||
idcard_status: 0,
|
||||
iden_auth_status: 0,
|
||||
user_name: "",
|
||||
brief_introduction: "我的简介"
|
||||
brief_introduction: "我的简介",
|
||||
v_show: false,
|
||||
v_message: "",
|
||||
next_url: "/Pages/yishi/identity/index"
|
||||
},
|
||||
onLoad(){
|
||||
//获取医生我的账户数据
|
||||
@@ -32,13 +35,14 @@ Page({
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.showModal({
|
||||
title: '确认退出登录',
|
||||
content: '退出登录后您需要重新登录',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN', "");
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id', "");
|
||||
wx.setStorageSync('client_user_id', "");
|
||||
app.go("/Pages/index/index");
|
||||
@@ -47,6 +51,50 @@ Page({
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
go(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,
|
||||
v_message: "请先进行医师身份认证",
|
||||
next_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go1(e){
|
||||
if(this.data.idcard_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行实名认证",
|
||||
next_url: "/Pages/yishi/identity/index"
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go2(e){
|
||||
if(this.data.iden_auth_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行医师身份认证",
|
||||
next_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
goIn(){
|
||||
app.go(this.data.next_url)
|
||||
}
|
||||
|
||||
})
|
||||
@@ -4,6 +4,7 @@
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,22 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<van-cell-group>
|
||||
<van-cell size="large" url="/Pages/yishi/mycard/index" title="我的名片" value="分享名片" is-link />
|
||||
<van-cell size="large" url="/Pages/yishi/myprofile/index" title="我的简介" value="{{brief_introduction}}" is-link />
|
||||
<van-cell size="large" 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" 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 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="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="医师认证"
|
||||
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
|
||||
title="温馨提示"
|
||||
message="{{v_message}}"
|
||||
show="{{ v_show }}"
|
||||
show-cancel-button
|
||||
confirm-button-color="#3CC7C0"
|
||||
bind:confirm="goIn"
|
||||
/>
|
||||
</view>
|
||||
@@ -0,0 +1,5 @@
|
||||
.van-cell__value {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
Reference in New Issue
Block a user