import { API } from './../../../utils/network/api' const api = new API() const app = getApp() Page({ data: { nbFrontColor: '#000000', nbBackgroundColor: '#ffffff', navbarData: { showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 title: '实名认证', //导航栏 中间的标题 }, height: app.globalData.height, info: {} }, onLoad() { console.log(this.data.height) }, onShow(){ this.setData({ nbLoading: false, }) api.getPharmacistInfo().then(response => { console.log(response.data); this.setData({ info: response.data }) }).catch(errors => { console.error(errors); }) } })