This commit is contained in:
SelfRidicule 2024-03-14 08:54:04 +08:00
parent d562019fb2
commit 17225a83a4

View File

@ -6,9 +6,12 @@ import {
callScanUrl callScanUrl
} from "../../api/common/scan.js" } from "../../api/common/scan.js"
import {
userProfile
} from "../../api/user/user.js"
Page({ Page({
onShareAppMessage(res) {},
data: { data: {
// tabBar param // tabBar param
tabBarParam: { tabBarParam: {
@ -154,7 +157,8 @@ Page({
}, { }, {
bg: '/profile/static/index/banner/3.jpg', bg: '/profile/static/index/banner/3.jpg',
url: '' url: ''
}] }],
userDetail: {},
}, },
// 切换tabbar // 切换tabbar
@ -174,7 +178,18 @@ Page({
}, },
onShow() { onShow() {
let _this = this
let userId = wx.getStorageSync('userId');
if (userId) {
userProfile(userId).then(res => {
console.log('userProfile', res);
_this.setData({
userDetail: res.data
})
})
} else {
app.getlogin()
}
}, },
navapply(e) { navapply(e) {