const app = getApp(), { globalData: { util: { regeneratorRuntime, goLogin, navigate_auth_native, getUserInfo } } } = app; Page({ onLoad() { this.setData({ // topList: [ // { // title: '系统消息', // icon: 'systemMsg', // url: 'message/index', // }, // { // title: '用户信息', // icon: 'material', // url: 'myInfo/index', // }, // { // title: '一键定位', // icon: 'nav', // url: 'localtion/index', // } // ], list: [ { title: '个人信息', icon: 'user-icon', url: '../student/user/user', }, // { // title: '我的预约', // icon: 'yuyue', // url: 'reservation/index', // }, // { // title: '我的排队', // icon: 'paidui', // url: '', // }, // { // title: '我的材料', // icon: 'cailiao', // url: 'myData/myData', // }, // { // title: '我的收藏', // icon: 'shoucang', // url: 'myCollect/index', // }, // { // title: '我的评价', // icon: 'assess', // url: 'assess/assess', // }, // { // title: '我的咨询', // icon: 'zixun', // url: 'advisory/advisory', // }, // { // title: '我的投诉', // icon: 'tousu', // url: 'complaint/complaint', // }, { title: '我的设置', icon: 'setting', url: 'setting/index', } ] }) }, async onShow() { let userInfo = wx.getStorageSync('userInfo') if (!userInfo){ let { viewName = '', photo = '' } = await getUserInfo() this.setData({ photo, viewName }) }else{ this.setData({ photo: userInfo.avatarUrl, viewName: userInfo.nickName }) } }, navigate_auth:function(e){ wx.navigateTo({ url: e.currentTarget.dataset.url, }) }, goLogin, // navigate_auth_native })