精简页面初始化代码
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { base } from '@/utils/config';
|
||||
import { checkSesskey, loginStatus, post } from '@/utils/https';
|
||||
import { checkSesskey, loginStatusPage, post } from '@/utils/https';
|
||||
import { getStorage, toObject } from '@/utils/util';
|
||||
|
||||
Page({
|
||||
@@ -45,17 +45,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
this.setData({ loading: true });
|
||||
loginStatus()
|
||||
.then(() => {
|
||||
console.log('ssss');
|
||||
this.setData({ isLogin: true, loading: false });
|
||||
this.init();
|
||||
})
|
||||
.catch((err) => {
|
||||
this.setData({ isLogin: false, loading: false });
|
||||
console.log('调用登录状态请求失败', err);
|
||||
});
|
||||
loginStatusPage(this);
|
||||
},
|
||||
loginOut() {
|
||||
wx.showModal({
|
||||
|
||||
Reference in New Issue
Block a user