shish 4 лет назад
Родитель
Сommit
681edb4b73

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

@@ -11,7 +11,7 @@
             <view class="name">
               {{ infoData.adminName }}
             </view>
-            <view class="mobile">
+            <view class="mobile" @click="pageTo({ url: '/admin/shop/changeShop' })">
               ID:{{ infoData.shopAdminId }}
             </view>
           </view>

+ 95 - 0
ghsApp/src/admin/shop/changeShop.vue

@@ -0,0 +1,95 @@
+<template>
+  <div class="app-content">
+    <div>
+      <form @submit="formSubmit" @reset="formReset">
+        <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>
+
+        </div>
+
+      </form>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import { getPtGhsShop,switchGhsShop } from "@/api/shop";
+export default {
+  name: "changeShop",
+  components: {
+    TuiListCell,
+  },
+  data() {
+    return {
+        shopList:[]
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+  },
+  methods: {
+      init(){
+          getPtGhsShop().then(res=>{
+              this.shopList=res.data.list
+              con
+          })
+      },
+      changeShop(id){
+        switchGhsShop({shopId:id}).then(res=>{
+          this.$msg(res.msg);  
+        })
+      }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20px);
+  padding-top: 20px;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30px;
+  margin-bottom: 30px;
+}
+.module-com {
+  margin-bottom: 20px;
+  .member-wrap {
+    .member-det {
+      font-size: 24px;
+      margin-left: 20px;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240px;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 60px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 8 - 0
ghsApp/src/api/shop/index.js

@@ -54,4 +54,12 @@ export const addCloudPrint = data => {
 //获取云打印机信息
 export const getPrint = data => {
 	return https.get('/shop-ext/get-print', data)
+}
+
+export const getPtGhsShop = data => {
+	return https.get('/shop/get-pt-ghs-shop', data)
+}
+
+export const switchGhsShop = data => {
+	return https.get('/shop/switch-ghs-shop', data)
 }

+ 1 - 1
ghsApp/src/ext.json

@@ -4,7 +4,7 @@
   "directCommit": false,
   "ext": {
     "account": 12362,
-    "apiHost": "https://api.shop.hzghd.com",
+    "apiHost": "http://api.shop.hzghd.com",
     "socketApiHost": "api.shop.hzghd.com",
     "imgHost": "https://img.hzghd.com",
     "name":"花掌柜"

+ 4 - 7
ghsApp/src/mixins/selectShop.js

@@ -17,16 +17,13 @@ export default {
         ...mapGetters({ 
             loginInfo: "getLoginInfo",
             userInfo: 'getUser'
-    })
+        })
     },
-  mounted () {
-        this.menuObj.list = this.userShopAll.map(i=>({
-            ...i,
-            name:i.shopName
-        }));
+    mounted () {
+        this.menuObj.list = this.userShopAll.map(i=>({...i,name:i.shopName}))
     },
 	watch:{
-    userShopAll (val) {
+        userShopAll (val) {
 			if(!this.$util.isEmpty(val)) {
 				this.menuObj.list = val.map(i=>({
 					...i,

+ 2 - 1
ghsApp/src/pages.json

@@ -130,7 +130,8 @@
 			"pages": [
 				{"path": "list","style": {"navigationBarTitleText": "店铺管理"}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
-				{"path": "print","style": {"navigationBarTitleText": "云打印"}}
+				{"path": "print","style": {"navigationBarTitleText": "云打印"}},
+				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}}
 			]
 		},
 		{

+ 0 - 5
hdApp/dist/build/mp-weixin/project.config.json

@@ -9,23 +9,18 @@
   },
   "compileType": "miniprogram",
   "libVersion": "",
-  "appid": "wxe4675bab299a52f7",
   "projectname": "零售",
   "condition": {
     "search": {
-      "current": -1,
       "list": []
     },
     "conversation": {
-      "current": -1,
       "list": []
     },
     "game": {
-      "current": -1,
       "list": []
     },
     "miniprogram": {
-      "current": -1,
       "list": []
     }
   }