精简页面初始化代码
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { loginStatus, post } from '@/utils/https';
|
||||
import { loginStatusPage, post } from '@/utils/https';
|
||||
import { getAuthInfo, toArray } from '@/utils/util';
|
||||
|
||||
Page({
|
||||
@@ -65,16 +65,7 @@ Page({
|
||||
this.data.group_id = `${options.group_id}`;
|
||||
wx.setNavigationBarTitle({ title: `${decodeURIComponent(`${options.name}`)} 权限` });
|
||||
|
||||
this.setData({ loading: true });
|
||||
loginStatus()
|
||||
.then(() => {
|
||||
this.setData({ isLogin: true, loading: false });
|
||||
this.init();
|
||||
})
|
||||
.catch((err) => {
|
||||
this.setData({ isLogin: false, loading: false });
|
||||
console.log('调用登录状态请求失败', err);
|
||||
});
|
||||
loginStatusPage(this);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user