shish 4 年之前
父節點
當前提交
64d4963ea5
共有 2 個文件被更改,包括 25 次插入19 次删除
  1. 12 1
      ghsApp/src/admin/home/me.vue
  2. 13 18
      ghsApp/src/admin/shop/changeShop.vue

+ 12 - 1
ghsApp/src/admin/home/me.vue

@@ -11,7 +11,7 @@
             <view class="name">
             <view class="name">
               {{ infoData.adminName }}
               {{ infoData.adminName }}
             </view>
             </view>
-            <view class="mobile" @click="pageTo({ url: '/admin/shop/changeShop' })">
+            <view class="mobile">
               ID:{{ infoData.shopAdminId }}
               ID:{{ infoData.shopAdminId }}
             </view>
             </view>
           </view>
           </view>
@@ -73,6 +73,16 @@
         <view class="module-com content_box user-open_bx">
         <view class="module-com content_box user-open_bx">
           <view class="input-line-wrap">
           <view class="input-line-wrap">
 
 
+            <tui-list-cell
+              @click="pageTo({ url: '/admin/shop/changeShop' })"
+              class="line-cell"
+              :hover="false"
+              :arrow="true"
+              v-if="infoData.adminId == 2 || infoData.adminId == 497"
+            >
+              <div class="tui-title">切换门店</div>
+            </tui-list-cell>
+
             <tui-list-cell
             <tui-list-cell
               @click="pageTo({ url: '/admin/shopYeChange/list' })"
               @click="pageTo({ url: '/admin/shopYeChange/list' })"
               class="line-cell"
               class="line-cell"
@@ -233,6 +243,7 @@ export default {
         title: "加载中",
         title: "加载中",
       });
       });
       try {
       try {
+
         await toggleShop({ shopId: this.shopId })
         await toggleShop({ shopId: this.shopId })
 
 
         //这个切换得更彻底
         //这个切换得更彻底

+ 13 - 18
ghsApp/src/admin/shop/changeShop.vue

@@ -3,26 +3,16 @@
     <div>
     <div>
       <form @submit="formSubmit" @reset="formReset">
       <form @submit="formSubmit" @reset="formReset">
         <div class="module-com input-line-wrap">
         <div class="module-com input-line-wrap">
-          
-
-<view class="list" v-for="(item, index) in shopList" :key="index">
-
-          <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">门店:</div>
-  
-                
-                    <view>{{item.sjId}}-{{item.shopName}}</view> <view style="margin-left:30px;" @click="changeShop(item.id)">选择</view>
-                
-  
-          </tui-list-cell>
-
-</view>
-
+          <view class="list" v-for="(item, index) in shopList" :key="index">
+            <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">门店:</div>
+                <view>{{item.merchantName}}-{{item.shopName}}</view> 
+                <button class="admin-button-com mini blue" style="margin-left:30rpx;" @click="changeShop(item.id)">选择</button>
+            </tui-list-cell>
+          </view>
         </div>
         </div>
-
       </form>
       </form>
     </div>
     </div>
-
   </div>
   </div>
 </template>
 </template>
 
 
@@ -52,7 +42,12 @@ export default {
       },
       },
       changeShop(id){
       changeShop(id){
         switchGhsShop({shopId:id}).then(res=>{
         switchGhsShop({shopId:id}).then(res=>{
-          this.$msg(res.msg);  
+          this.$msg(res.msg);
+
+          //这个切换得更彻底
+          this.$store.commit("setLoginInfo", {})
+          this.$util.pageTo({url: "/admin/shop/changeShop",type: 3})
+
         })
         })
       }
       }
   },
   },