提交
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { alertInfo } from "../../utils/index";
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import { getUserInfo } from "../../service/user";
|
||||
import { getDot } from "../../utils/system";
|
||||
import request from "../../utils/request"
|
||||
const { OK } = request;
|
||||
|
||||
@@ -46,15 +47,15 @@ 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() {
|
||||
|
Reference in New Issue
Block a user