add file
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
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,
|
||||
user_name: "",
|
||||
brief_introduction: "点击编辑"
|
||||
},
|
||||
onLoad(){
|
||||
//获取医生我的账户数据
|
||||
api.getDoctorCenterInfo().then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
doctor_id: response.data.doctor_id,
|
||||
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);})
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
wx.showModal({
|
||||
title: '确认退出登录',
|
||||
content: '退出登录后您需要重新登录',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN', "");
|
||||
wx.setStorageSync('user_id', "");
|
||||
wx.setStorageSync('client_user_id', "");
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<van-cell-group>
|
||||
<van-cell url="/Pages/yishi/mycard/index" title="我的名片" value="分享名片" is-link />
|
||||
<van-cell title="我的简介" value="{{brief_introduction}}" is-link />
|
||||
<van-cell 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 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>
|
||||
</view>
|
||||
Reference in New Issue
Block a user