52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
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('用户点击取消')
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
}) |