Browse Source

Merge branch 'feature/v4.7.31' into master

lianbingjie 2 years ago
parent
commit
3395279a9c
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/web/staticres/common-module/history-push/js/historypush.js

+ 5 - 3
src/web/staticres/common-module/history-push/js/historypush.js

@@ -514,7 +514,7 @@ var vm = new Vue({
       _this.getUserRoot()
   },
     // 会员切换
-    switchVip: function(name) {
+    switchVip: function(name, type) {
       let _this = this
       let param = {}
       if(name) {
@@ -545,7 +545,8 @@ var vm = new Vue({
             // @tip 多角色身份用户返回需清除缓存
             var oldType = sessionStorage.getItem('save-user-type-' + goTemplateData.params.userId)
             sessionStorage.setItem('save-user-type-' + goTemplateData.params.userId, res.data.vt)
-            if (res.data.vt != oldType) {
+
+            if (type !== 'push' && res.data.vt != oldType) {
               removeSessionStorage()
               sessionStorage.setItem('need-clear-' + + goTemplateData.params.userId, 'true')
               location.reload()
@@ -776,7 +777,8 @@ var vm = new Vue({
                   if (canSelectMember) {
                     setUserType = 'm'
                   }
-                  _this.switchVip(setUserType)
+                  sessionStorage.removeItem('history-set-user-type')
+                  _this.switchVip(setUserType, 'push')
                 } else {
                   _this.switchVip()
                 }