This commit is contained in:
2024-04-09 10:43:58 +08:00
parent 417ba1454c
commit ba1817583d
12 changed files with 109 additions and 41 deletions

View File

@@ -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() {