分包医生
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '我的信息', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
card_name: "",
|
||||
card_num_mask: "",
|
||||
doctor_id: "",
|
||||
idcard_status: 0,
|
||||
iden_auth_status: 0,
|
||||
is_bind_bank: 0,
|
||||
user_name: "",
|
||||
brief_introduction: "点击编辑",
|
||||
v_show: false,
|
||||
v_message: "",
|
||||
next_url: "/user/pages/yishi/identity/index"
|
||||
},
|
||||
onLoad(){
|
||||
//获取医生我的账户数据
|
||||
api.getDoctorCenterInfo().then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
doctor_id: response.data.doctor_id,
|
||||
brief_introduction: response.data.brief_introduction==null?this.data.brief_introduction:response.data.brief_introduction,
|
||||
idcard_status:response.data.idcard_status,
|
||||
iden_auth_status:response.data.iden_auth_status,
|
||||
card_name:response.data.card_name,
|
||||
card_num_mask:response.data.card_num_mask,
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onShow(){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let user_id = wx.getStorageSync("user_id_"+usertype);
|
||||
let is_bind_bank = wx.getStorageSync(user_id+'_is_bind_bank');
|
||||
this.setData({
|
||||
is_bind_bank: is_bind_bank
|
||||
})
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
wx.showModal({
|
||||
title: '确认退出登录',
|
||||
content: '退出登录后您需要重新登录',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
app.imLogout();
|
||||
app.globalData.isLogin=false;
|
||||
wx.setStorageSync('usertype','')
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
go(e){
|
||||
console.log(2222)
|
||||
if(this.data.idcard_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行实名认证",
|
||||
next_url: "/user/pages/yishi/identity/index"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.iden_auth_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行医师身份认证",
|
||||
next_url: "/user/pages/yishi/identity/index?selected_tab=1",
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.is_bind_bank != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请您先绑定结算银行卡",
|
||||
next_url: "/user/pages/yishi/bankcard/index",
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go1(e){
|
||||
if(this.data.idcard_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行实名认证",
|
||||
next_url: "/user/pages/yishi/identity/index"
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
go2(e){
|
||||
if(this.data.idcard_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行实名认证",
|
||||
next_url: "/user/pages/yishi/identity/index"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.iden_auth_status != 1){
|
||||
this.setData({
|
||||
v_show: true,
|
||||
v_message: "请先进行医师身份认证",
|
||||
next_url: "/user/pages/yishi/identity/index?selected_tab=1",
|
||||
})
|
||||
return;
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
},
|
||||
goIn(){
|
||||
this.setData({
|
||||
v_show: false
|
||||
})
|
||||
app.go(this.data.next_url)
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
v_show: false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<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" bindtap="go" data-url="/user/pages/yishi/mycard/index" title="我的名片" value="分享名片" is-link />
|
||||
<van-cell size="large" bindtap="go" data-url="/user/pages/yishi/myprofile/index" title="我的简介" value="{{brief_introduction == ''?'点击编辑':brief_introduction}}" is-link />
|
||||
<van-cell size="large" bindtap="go1" data-url="/user/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="go2" data-url="/user/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="/user/pages/yishi/notify/notify" link-type="navigateTo" title="消息通知"
|
||||
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"
|
||||
/> -->
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,22 @@
|
||||
.van-cell__value {
|
||||
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;
|
||||
}
|
||||
.van-cell {
|
||||
padding: 32rpx !important;
|
||||
}
|
||||
Reference in New Issue
Block a user