瀏覽代碼

缓存清理

kk.shi 3 年之前
父節點
當前提交
962a23f02b
共有 2 個文件被更改,包括 9 次插入9 次删除
  1. 7 8
      pages/welfareMall/activityInfo/activityInfo.js
  2. 2 1
      pages/welfareMall/index/index.js

+ 7 - 8
pages/welfareMall/activityInfo/activityInfo.js

@@ -30,12 +30,6 @@ Page({
    */
   onLoad: async function (options) {
     console.log(options)
-    wx.setStorageSync('configinfo',null);
-    let info =  await getColor();
-    this.setData({
-      config:info.config,
-      valueImgList: info.valueImgList,
-    })
     let  userMobile = await Activity.getMobileCache();
     if (userMobile.length !== 0) {
       this.setData({
@@ -70,8 +64,13 @@ Page({
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
-
+  onShow: async function () {
+    wx.setStorageSync('configinfo',null);
+    let info =  await getColor();
+    this.setData({
+      config:info.config,
+      valueImgList: info.valueImgList,
+    })
   },
 
   /**

+ 2 - 1
pages/welfareMall/index/index.js

@@ -28,7 +28,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    wx.setStorageSync('configinfo',null);
+    
   },
 
   /**
@@ -42,6 +42,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
+    wx.setStorageSync('configinfo',null);
     this.getIndexList()
   },