jf il y a 5 ans
Parent
commit
e321cad784

+ 4 - 2
ghsApp/src/components/module/dorpdownSelect.vue

@@ -2,7 +2,8 @@
     <view class="select-bg_bx">
 
         <view v-if="isShowTit" @click="switchCut" :class="['select-title',dropdownShow?'select_corlor':'']">
-            {{menuObjActive?menuObjActive:menuObj.title}}
+            {{menuObjActive?menuObjActive:getMyShopInfo.shopName}}
+<!--            {{getMyShopInfo?getMyShopInfo.shopName:menuObj.title}}-->
             <i v-if="isShowMore" class="iconfont iconsanjiao_xia"></i>
         </view>
          <view
@@ -49,6 +50,7 @@
     import DropdownList from "@/components/plugin/dropdown-list";
     import AppDatePicker from "@/components/app-date-picker";
 				import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
+				import {mapGetters} from "vuex";
     export default {
         name:'DorpdownSelect',
         components:{
@@ -93,6 +95,7 @@
             }
         },
         computed:{
+									...mapGetters(["getMyShopInfo"]),
             formatSelect(){
                 if(!this.$util.isEmpty(this.selectItemId)&&
                 this.$util.isString(this.selectItemId)&&
@@ -107,7 +110,6 @@
 
         },
 							onLoad(){
-
 							},
         methods:{
             switchCut(){

+ 8 - 3
ghsApp/src/pagesStatistics/business.vue

@@ -175,12 +175,16 @@
 import {getMainProfile} from '@/api/statistics'
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import { selectShop } from '@/mixins'
+import {mapGetters} from "vuex";
 export default {
 	name:'Business',
 	components:{
 		DorpdownSelect
 	},
 	mixins:[selectShop],
+	computed:{
+		...mapGetters(["getMyShopInfo"]),
+	},
 	data() {
 		return {
 			curTabIndex: 0,
@@ -207,8 +211,9 @@ export default {
 		};
 	},
 	methods:{
-		async init(){
-				this.shopId = this.userInfo.id
+		async init(id){
+				// this.shopId = this.userInfo.id
+				this.shopId = id?id:this.getMyShopInfo.id
 				uni.showLoading({
 					title: '加载中'
 				});
@@ -227,7 +232,7 @@ export default {
 		},
 		selectSussess(val){
 			this.shopId = val.selectItem.id;
-			this.init();
+			this.init(val.selectItem.id);
 		}
 	},
 };