瀏覽代碼

缓存bug

xiaohaizhao 3 月之前
父節點
當前提交
074d38e5e7
共有 3 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      app.js
  2. 1 0
      pages/tabbar/mine/index.js
  3. 1 0
      utils/language.js

+ 1 - 0
app.js

@@ -20,6 +20,7 @@ App({
             wx.setStorageSync('siteP', JSON.parse(options.query.site));
             wx.setStorageSync('templetList', JSON.parse(options.query.templetList));
             console.log("options.query.templetList", options.query.templetList)
+            wx.removeStorageSync('languagecode');
             wx.setStorageSync('languagecode', options.query.languagecode);
             //获取用户权限 
             this.globalData.http.basic({

+ 1 - 0
pages/tabbar/mine/index.js

@@ -80,6 +80,7 @@ Page({
 				wx.clearStorageSync();
 				wx.setStorageSync('loginMsg', loginMsg)
 				wx.setStorageSync('isAgree', true)
+				wx.removeStorageSync('languagecode');
 				wx.setStorageSync('languagecode', languagecode)
 				setTimeout(() => {
 					wx.reLaunch({

+ 1 - 0
utils/language.js

@@ -19,6 +19,7 @@ class Language {
 				this.languagePackage = res.data[languagecode] || {};
 				resolve(this.languagePackage)
 				this.languagecode = languagecode;
+				wx.removeStorageSync('languagecode');
 				wx.setStorageSync('languagecode', languagecode)
 			})
 		})