shish 4 лет назад
Родитель
Сommit
147b2e4aad
3 измененных файлов с 19 добавлено и 13 удалено
  1. 10 8
      ghsApp/src/admin/home/me.vue
  2. 8 5
      ghsApp/src/admin/shop/sk.vue
  3. 1 0
      ghsApp/src/admin/shopAdmin/bind.vue

+ 10 - 8
ghsApp/src/admin/home/me.vue

@@ -233,14 +233,16 @@ export default {
         title: "加载中",
       });
       try {
-        let { data } = await toggleShop({ shopId: this.shopId });
-        this.$store.commit("setLoginInfo", {
-          ...this.getLoginInfo,
-          shopId: data.shopId, // 门店id
-          shopAdminId: data.id, //员工id
-        });
-        getUser(true);
-        this.init();
+        await toggleShop({ shopId: this.shopId })
+
+        //这个切换得更彻底
+        this.$store.commit("setLoginInfo", {})
+        this.$util.pageTo({url: "/admin/home/me",type: 3})
+
+        // this.$store.commit("setLoginInfo", {...this.getLoginInfo,shopId: data.shopId,shopAdminId: data.id})
+        // getUser(true)
+        // this.init()
+
       } finally {
         uni.hideLoading();
       }

+ 8 - 5
ghsApp/src/admin/shop/sk.vue

@@ -63,12 +63,15 @@ export default {
             that.$msg(res.msg)
             setTimeout(function(){
 
-              let pages = getCurrentPages()
-              let prevPage = pages[ pages.length - 2 ]
-              prevPage.$vm.skCustomId = that.form.customId
-              uni.navigateBack({})
+              // let pages = getCurrentPages()
+              // let prevPage = pages[ pages.length - 2 ]
+              // prevPage.$vm.skCustomId = that.form.customId
+              // uni.navigateBack({})
 
-            },1500)
+              that.$store.commit("setLoginInfo", {})
+              that.$util.pageTo({url: "/admin/home/workbench",type: 3})
+
+            },1000)
           }
       })
     }

+ 1 - 0
ghsApp/src/admin/shopAdmin/bind.vue

@@ -192,6 +192,7 @@ export default {
 			});
     },
     redirectToCenter() {
+      this.$store.commit("setLoginInfo", {})
       this.$util.pageTo({
         url: "/admin/home/workbench",
         type: 3