Sfoglia il codice sorgente

Merge branch 'master' of git.huaml.com:zhh/front-end

zhengxin 5 anni fa
parent
commit
bef5e76694

+ 44 - 23
ghs/src/admin/home/me.vue

@@ -19,25 +19,28 @@
                 <view class="me-shop_content content_box">
                     <view class="me-shop_top">
                         <view class="shop-top_left">
-                        <app-avatar-module src="https://imgm.gmw.cn/attachement/jpg/site215/20210129/3570070943574738873.jpg" :width="100"/> 
-                        <view class="top-info_box">
-                                <view >
-                                    {{infoData.sjName}}
-                                </view>
-                                <view>
-                                    {{infoData.shopName}}
-                                </view>
+                            <app-avatar-module src="https://imgm.gmw.cn/attachement/jpg/site215/20210129/3570070943574738873.jpg" :width="100"/> 
+                            <view class="top-info_box">
+                                    <view >
+                                        {{infoData.sjName}}
+                                    </view>
+                                    <view>
+                                        {{infoData.shopName}}
+                                    </view>
+                            </view>
                         </view>
-                        </view>
-                        <view 
+                        <button 
+                            v-if="loginInfo.super"
+                            @click="changeShop"
+                            class="admin-button-com default chang-shop_btn">
+                            <i class="iconfont iconqiehuan1"></i>
+                            切换店铺
+                        </button>
+                         <!-- <view 
                             v-if="loginInfo.super"
                             class="chang-shop_btn">
-                            <DorpdownSelect 
-							:menuObj.sync="menuObj"  
-							top="200px"
-							:selectItemId.sync="shopId"
-							@selectSussess="selectSussess"></DorpdownSelect>
-                        </view>
+                            切换店铺
+                        </view> -->
                     </view>
                     <view 
                         @click=" pageTo({
@@ -91,6 +94,7 @@
     import DorpdownSelect from "@/components/module/dorpdownSelect";
     import { selectShop } from '@/mixins'
     import { getUser } from '@/utils/auth'
+    import { mapGetters } from 'vuex'
     export default { // 我的
         name:"Me",
         components:{
@@ -99,6 +103,9 @@
             DorpdownSelect
         },
         mixins:[selectShop],
+        computed: {
+		...mapGetters(["getLoginInfo"])
+	},
         data(){
             return {
                 constant: this.$constant,
@@ -114,18 +121,33 @@
 
                 }
             },
-            async selectSussess(val){
+            async selectSussess(shopId){
                 uni.showLoading({
                     title: '加载中'
                 });
               try {
-                  let res = await toggleShop({ shopId: this.shopId});
+                  let {data} = await toggleShop({ shopId});
+                  this.$store.commit('setLoginInfo', {
+                        ...this.getLoginInfo,
+                        shopId: data.shopId, // 门店id
+                        shopAdminId: data.id //员工id
+					})
                   getUser(true)
                   this.init()
               } finally {
                  uni.hideLoading(); 
               }
               
+            },
+            changeShop(){
+              let idx = this.userShopAll.findIndex(i=>i.id == this.getLoginInfo.shopId)
+              let shopId = null
+              if(idx === this.userShopAll.length - 1) {
+                  shopId = this.userShopAll[0].id
+              }else{
+                  shopId = this.userShopAll[idx+1].id
+              }
+              this.selectSussess(shopId)
             }
         }
     }
@@ -202,16 +224,15 @@
                     }
                     & .chang-shop_btn {
                         // padding: 20upx 13upx;
-                        width: 176upx;
-                        height: 50upx;
-                        border: 1px solid #DDDDDD;
+                        // width: 176upx;
+                        // height: 50upx;
+                        // border: 1px solid #DDDDDD;
                         border-radius: 25px;
                         color: #666666;
                         position: absolute;
                         right: 20upx;
                         top: 40upx;
-                        text-align: center;
-                        line-height: 50upx;
+                        // text-align: center;
                         & .iconqiehuan1 {
                             margin-right: 10upx;
                         }

+ 4 - 2
ghs/src/admin/home/member.vue

@@ -3,10 +3,8 @@
     <app-tabs
       :tabs="tabs"
       :isFixed="true"
-      :isAdd="true"
       :currentTab="tabIndex"
       :height="100"
-      @add="pageTo('/pagesClient/member/add')"
       @change="change"
       itemWidth="50%"
     />
@@ -63,6 +61,10 @@
     <block v-else>
       <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
     </block>
+    <div class="app-footer open_btn">
+			<!-- <div class="admin-button-com middle blue" @click="pageTo('/admin/shop/add')">添加门店</div> -->
+			<div @click="pageTo('/pagesClient/member/add')" class="admin-button-com middle blue">添加门店</div>
+		</div>
   </div>
 </template>
 

+ 1 - 1
ghs/src/admin/home/order.vue

@@ -15,7 +15,7 @@
 		<app-tabs
 			:tabs="tabs"
 			:isFixed="true"
-			:top="42"
+			:top="55"
 			:currentTab="tabIndex"
 			:height="100"
 			@change="change"

+ 1 - 1
ghs/src/pagesClient/official/apply.vue

@@ -193,7 +193,7 @@ export default {
   methods: {
     //图片地址
     resultData(val){
-      this.form.license = val.smallUrl
+      this.form.license = val.shortUrl
     },
     changeMain(val){
       this.form.main = val

+ 1 - 1
ghs/src/pagesInvite/list.vue

@@ -183,7 +183,7 @@ export default {
 				title: "更懂您的花卉宝",
 				desc: "",
 				imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
-				path: `/pagesClient/official/index?introMerchantId=${this.userInfo.id}&form=2&style=1`
+				path: `/pagesClient/official/apply?introMerchantId=${this.userInfo.id}&form=2&style=1`
 			};
 		} else {
 			return {};

+ 4 - 2
ghs/src/pagesStorehouse/allot/allotEx.vue

@@ -7,8 +7,6 @@
 				:currentTab="tabIndex"
 				@change="changeTabEvent"
 				@add="addEvent"
-				isAdd
-				addText="新增"
 			></Tabs>
 		</view>
 		<scroll-view scroll-y class="allot-list">
@@ -52,6 +50,10 @@
 				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 			</block>
 		</scroll-view>
+		<div class="app-footer open_btn">
+			<!-- <div class="admin-button-com middle blue" @click="pageTo('/admin/shop/add')">添加门店</div> -->
+			<div @click="addEvent" class="admin-button-com middle blue">新增</div>
+		</div>
 	</view>
 </template>
 <script>

+ 4 - 2
ghs/src/pagesStorehouse/allot/allotPut.vue

@@ -7,8 +7,6 @@
 				:currentTab="tabIndex"
 				@change="changeTabEvent"
 				@add="addEvent"
-				isAdd
-				addText="新增"
 			></Tabs>
 		</view>
 		<scroll-view scroll-y class="allot-list">
@@ -52,6 +50,10 @@
 				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 			</block>
 		</scroll-view>
+		<div class="app-footer open_btn">
+			<!-- <div class="admin-button-com middle blue" @click="pageTo('/admin/shop/add')">添加门店</div> -->
+			<div @click="addEvent" class="admin-button-com middle blue">新增</div>
+		</div>
 	</view>
 </template>
 <script>

+ 4 - 2
ghs/src/pagesStorehouse/inventory/list.vue

@@ -6,8 +6,6 @@
 				:currentTab="tabIndex"
 				@change="changeTabEvent"
 				@add="addEvent"
-				isAdd
-				addText="新增"
 				:itemWidth="'33.33%'"
 			></Tabs>
 		</view>
@@ -48,6 +46,10 @@
 				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 			</block>
 		</scroll-view>
+		<div class="app-footer open_btn">
+			<!-- <div class="admin-button-com middle blue" @click="pageTo('/admin/shop/add')">添加门店</div> -->
+			<div @click="addEvent" class="admin-button-com middle blue">新增</div>
+		</div>
 	</view>
 </template>
 <script>

+ 6 - 3
ghs/src/static/css/common.scss

@@ -431,17 +431,20 @@ body {
     background: white;
     box-shadow: -4px -4px 6px #eee;
     z-index: 100;
-    // font-size: 32px;
-    // line-height: 90px;
     display: flex;
     justify-content: center;
     align-items: center;
-    // letter-spacing: 3px;
     & .add {
         width: 38px;
         height: 38px;
         margin-right: 20px;
     }
+    &.open_btn {
+        justify-content: flex-end;
+        .admin-button-com {
+            margin-right: 30px;
+        }
+    }  
 }
 
 .noMore {

+ 4 - 1
ghs/src/utils/auth.js

@@ -98,7 +98,10 @@ export async function wxLoginFn(update) {
 
 					uni.setStorageSync('token', subRes.data.token)
 					uni.setStorageSync('shopId', subRes.data.admin.currentShopId)
-					store.commit('setLoginInfo', subRes.data.admin)
+					store.commit('setLoginInfo', {
+						...subRes.data.admin,
+						...subRes.data
+					})
 
 					//启动更新逻辑 shish 2020.5.18
 					if (subRes.data.update == 1) {

+ 6 - 6
saas/src/constant/constant.js

@@ -83,24 +83,24 @@ const _CONST_MAP = {
 	// 后台审核账号
 	SAAS_APPLY_STATUS: [
 		{
-			label: '审核',
-			value: 0
+			label: '审核',
+			value: 1
 		},
 		{
 			label: '审核通过',
-			value: 1
+			value: 2
 		},
 		{
 			label: '审核未通过',
-			value: 2
+			value: 3
 		},
 		{
 			label: '已付费',
-			value: 3
+			value: 4
 		},
 		{
 			label: '过期',
-			value: 4
+			value: 5
 		}
 	],
 	// 后台小程序状态

+ 1 - 1
saas/src/saas/shop/apply.vue

@@ -11,7 +11,7 @@
 
 			<!-- 审核 -->
 			<template #slot-apply="{scope}">
-				<template v-if="scope.row.status == 0 || scope.row.status == 2">
+				<template v-if="scope.row.status == 1 || scope.row.status == 3">
 					<el-button type="text" @click="showModalFn(scope.row)">审核</el-button>
 				</template>
 			</template>

+ 1 - 1
store/src/admin/home/workbench.vue

@@ -54,7 +54,7 @@
           <span>{{ item.title }}</span>
         </div>
         <div class="news-right">
-          <span>立即授权绑定</span>
+          <span>{{ item.action }}</span>
           <i class="iconfont iconxiangyou"></i>
         </div>
       </div>