29 lines
820 B
JavaScript
29 lines
820 B
JavaScript
import { API } from './../../../utils/network/api'
|
||
const api = new API()
|
||
const app = getApp()
|
||
Page({
|
||
data: {
|
||
navbarData: {
|
||
showCapsule: 1, //是否显示左上角图标 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);
|
||
})
|
||
}
|
||
}) |