美化了样式
This commit is contained in:
@ -22,11 +22,22 @@ Page({
|
||||
*/
|
||||
onLoad() {
|
||||
let token = wx.getStorageSync('token')
|
||||
if (token) {
|
||||
wx.switchTab({
|
||||
url: '/pages/course/homepage/homepage'
|
||||
})
|
||||
}
|
||||
if (!token) return ;
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/verify/token',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Authorization': token
|
||||
},
|
||||
success: res => {
|
||||
console.log(res.data)
|
||||
if (res.data.code === 1) {
|
||||
wx.switchTab({
|
||||
url: '/pages/course/homepage/homepage'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user