Explorar o código

跨应用进入 先清除数据

xiaohaizhao %!s(int64=2) %!d(string=hai) anos
pai
achega
d7aae4a893
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app.js

+ 3 - 0
app.js

@@ -6,6 +6,9 @@ App({
     onLaunch(options) {
         //小程序跳转进入
         if (options.query.userMsg) {
+            wx.removeStorageSync('userMsg')
+            wx.removeStorageSync('auth')
+            wx.removeStorageSync('userauth');
             wx.setStorageSync('userMsg', JSON.parse(options.query.userMsg))
             wx.setStorageSync('auth', JSON.parse(options.query.auth))
             wx.setStorageSync('siteP', JSON.parse(options.query.site));