修改分页组件在部分场景中存在缓存问题导致部分数据无法查看的问题

This commit is contained in:
2024-08-08 10:30:55 +08:00
parent cf7756dd5c
commit b9e1b06d29
33 changed files with 56 additions and 886 deletions

View File

@@ -1,3 +1,4 @@
// pages/login/index.js
import { getPrivaciList, login } from "../../service/user";
import { alertError, alertInfo, alertSuccess, loadingFunc, wxLogin } from "../../utils/index";
import request from "../../utils/request";
@@ -5,7 +6,6 @@ import { getUserInfo } from "../../service/user"
import Dialog from '@vant/weapp/dialog/dialog';
const { OK } = request;
// pages/login/index.js
Page({
/**
@@ -29,21 +29,9 @@ Page({
this.setData({ user: result.data })
wx.setStorageSync('user', result.data)
// const user = wx.getStorageSync('user')
// this.setData({ user: user })
},
onLoad() {
this.getPrivacy();
// this.setUser();
// if (user.status === 0 || user.status === 2) {
// wx.redirectTo({
// url: '/pages/waitApprove/index',
// })
// return
// }
// wx.switchTab({
// url: '/pages/home/index',
// })
},
async getPrivacy() {
const { code, message, data } = await getPrivaciList()
@@ -53,18 +41,6 @@ Page({
}
this.setData({ privacyList: data })
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onClose() {
// wx.exitMiniProgram()
},
onConfirm() {
// this.handleLogin()
},
async handleLogin(phoneCode) {
loadingFunc(async () => {
const wxLoginCode = await wxLogin()
@@ -134,51 +110,4 @@ Page({
url: '/childPackage/pages/agreements/index?url=' + url,
})
},
jumpToLoginAgreement() {
},
jumpToSecret() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})