分包医生
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '个人中心', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
info:{}
|
||||
},
|
||||
onShow() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
}
|
||||
|
||||
api.getPharmacistInfo().then(response => {
|
||||
console.log(response.data);
|
||||
this.setData({
|
||||
info: response.data
|
||||
})
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.showModal({
|
||||
title: '确认退出登录',
|
||||
content: '退出登录后您需要重新登录',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
app.globalData.isLogin=false;
|
||||
wx.setStorageSync('usertype','')
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
go(e){
|
||||
console.log(e)
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index"
|
||||
},
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"backgroundColor": "#eeeeee",
|
||||
"backgroundTextStyle": "light"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<t-avatar class="avatar" size="large" image="{{info.avatar}}" />
|
||||
<text class="name">{{info.user_name}}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="my" bindtap="go" data-url="/Pages/yaoshi/info/info">个人中心</view>
|
||||
<view class="item_list">
|
||||
<view class="item" bindtap="go" data-url="/Pages/yaoshi/authentication/authentication">
|
||||
<van-icon name="user-o" size="50rpx" color="#55B0E5"/>
|
||||
<text class="item_name">实名认证</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-button type="primary" block bindtap="logOut">退出登录</van-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,39 @@
|
||||
.top{
|
||||
width: 100vw;
|
||||
background-color: cornflowerblue;
|
||||
height: 370rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.name{
|
||||
color: white;
|
||||
margin-top: 30rpx;
|
||||
text-align: justify;
|
||||
text-justify: inter-word;
|
||||
text-align-last: justify;
|
||||
font-size: 28rpx;
|
||||
width: 180rpx;
|
||||
}
|
||||
.my{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
/* background-color: teal; */
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
color: black;
|
||||
border-bottom: 1px solid rgb(209, 206, 206);
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
/* background-color: teal; */
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
color: black;
|
||||
}
|
||||
.item_name{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user