修改首页选择园区,,商户,,电表
This commit is contained in:
@@ -46,15 +46,16 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
const user = wx.getStorageSync('user');
|
||||
if (!user || !user.id) {
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
alertInfo("请先登录");
|
||||
return false;
|
||||
}
|
||||
this.init()
|
||||
// const user = wx.getStorageSync('user');
|
||||
// if (!user || !user.id) {
|
||||
// wx.switchTab({
|
||||
// url: '/pages/home/index',
|
||||
// })
|
||||
// alertInfo("请先登录");
|
||||
// return false;
|
||||
// }
|
||||
// this.init()
|
||||
getDot();
|
||||
},
|
||||
async init() {
|
||||
const result = await getUserInfo();
|
||||
|
Reference in New Issue
Block a user