Browse Source

fix 注销

wzh 4 tháng trước cách đây
mục cha
commit
b4122446a8
2 tập tin đã thay đổi với 10 bổ sung4 xóa
  1. 5 2
      pages/hexiao/jxs/my.vue
  2. 5 2
      pages/hexiao/ywy/my.vue

+ 5 - 2
pages/hexiao/jxs/my.vue

@@ -80,13 +80,15 @@ export default {
         shopCount: 0
       },
       appVersion: '1.0',
-      supportPhone: '40012547856'
+      supportPhone: '40012547856',
+      tenantId :0,
     };
   },
   onLoad(){
     let info = getAdminInfo();
     this.userInfo.phone = info.phone;
     this.userInfo.role = info.roleName;
+    this.tenantId = info.tenant.tenantId
   },
   onShow(){
     getAdminUserInfo().then(res=>{
@@ -135,6 +137,7 @@ export default {
 
     // 退出登录
     logout() {
+      let self = this;
       uni.showModal({
         title: '提示',
         content: '您确定要退出登录吗?',
@@ -144,7 +147,7 @@ export default {
             clearAdminToken();
             // 跳转到登录页
             uni.reLaunch({
-              url: '/pages/hexiao/login' // 请替换为您的登录页路径
+              url: '/pages/hexiao/login'+self.tenantId // 请替换为您的登录页路径
             });
           }
         }

+ 5 - 2
pages/hexiao/ywy/my.vue

@@ -80,13 +80,15 @@ export default {
         shopCount: 0
       },
       appVersion: '1.0',
-      supportPhone: '40012547856'
+      supportPhone: '40012547856',
+      tenantId :0,
     };
   },
   onLoad(){
     let info = getAdminInfo();
     this.userInfo.phone = info.phone;
     this.userInfo.role = info.roleName;
+    this.tenantId = info.tenant.tenantId
   },
   onShow(){
     getAdminUserInfo().then(res=>{
@@ -135,6 +137,7 @@ export default {
 
     // 退出登录
     logout() {
+      let self = this;
       uni.showModal({
         title: '提示',
         content: '您确定要退出登录吗?',
@@ -144,7 +147,7 @@ export default {
             clearAdminToken();
             // 跳转到登录页
             uni.reLaunch({
-              url: '/pages/hexiao/login' // 请替换为您的登录页路径
+              url: '/pages/hexiao/login?uid='+self.tenantId // 请替换为您的登录页路径
             });
           }
         }