Files
quinn-wx/pages/myself/index.js
2022-12-13 16:53:09 +08:00

47 lines
1.0 KiB
JavaScript

// pages/myself/index.js
Page({
/**
* 页面的初始数据
*/
data: {
aIconList: ['check-rectangle','star','notification','info-circle-filled'],
hasUserAttar: false,
userInfo: {},
},
fetchWXAttar(){
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserAttar: true
})
},
fail: (e) => {
console.log(e);
}
})
},
viewMyMessage(){
wx.navigateTo({
url: '/pages/myself/notify/index'
});
},
viewQuestion(){
wx.navigateTo({
url: '/pages/myself/question/index'
});
},
viewAboutUs(){
wx.navigateTo({
url: '/pages/myself/about/index'
});
}
})