shish 3 년 전
부모
커밋
3b84346257
2개의 변경된 파일45개의 추가작업 그리고 25개의 파일을 삭제
  1. 8 18
      hdApp/src/pagesPurchase/components/person.vue
  2. 37 7
      hdApp/src/pagesPurchase/ghsProduct.vue

+ 8 - 18
hdApp/src/pagesPurchase/components/person.vue

@@ -1,28 +1,18 @@
 <template>
-  <view class="model" v-if="show">
+  <view class="model" v-if="isHd == 0">
     <view style="color:white;font-size:35upx;">此为花店进货渠道</view>
     <view style="color:white;font-size:35upx;margin-top:40upx;">个人请点下方去商城买花哦</view>
-    <view class="freegoToMall" @click="goToMall">打开商城</view>
+    <view class="open-mall" @click="goToMall">打开商城</view>
   </view>
 </template>
 <script>
 export default {
   props: {
-    show: {
-      type: Boolean,
-      default: true,
-    },
-    title: {
-      type: String,
-      default: '',
-    },
-    authShow: {
-      type: Boolean,
-      default: false,
+    isHd: {
+      type: Number,
+      default: 1,
     }
   },
-  watch: {
-  },
   data() {
     return {
       constant: this.$constant,
@@ -31,7 +21,7 @@ export default {
   },
   methods: {
     goToMall() {
-
+      this.$emit('goToMall')
     }
   },
 };
@@ -45,7 +35,7 @@ export default {
   left: 0;
   width: 100vw;
   height: 100vh;
-  background: rgba(0, 0, 0, 0.6);
+  background: rgba(0, 0, 0, 0.8);
   color: #fff;
   overflow: hidden;
   text-align: center;
@@ -61,7 +51,7 @@ export default {
     text-align: center;
     margin: 50upx 0;
   }
-  & > .freegoToMall {
+  & > .open-mall {
     width: 280upx;
     height: 110upx;
     line-height:110upx;

+ 37 - 7
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -111,6 +111,7 @@
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
+		<personComponent :isHd.sync="isHd" @goToMall="goToMall()"></personComponent>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
@@ -181,12 +182,14 @@ import PxClassCommondity from "@/components/module/app-pxClass-commodity";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
 import wangCg from "./components/wangCg";
+import personComponent from "./components/person";
 import allMoreSelectInput from "@/components/module/allMoreSelectInput";
 import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import { COMMODITY_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/cgProduct";
-import { getGhsDataApi, ghsInfo,visitMall,getClassRemind,hasClassRemind } from "@/api/ghs/index";
+import { getGhsDataApi, ghsInfo,visitMall,getClassRemind,hasClassRemind } from "@/api/ghs";
 import SelPopup from "@/components/sel-popup.vue";
+import { getWeixinId } from "@/api/invite";
 import AppActivilyCoupon from "@/components/module/app-activily-coupon";
 import { mapGetters } from "vuex";
 export default {
@@ -197,7 +200,12 @@ export default {
 		AppWrapperEmpty,
 		Commondity,
 		ModalModule,
-		FooterCart,allMoreSelectInput,PxClassCommondity,wangCg,SelPopup,AppActivilyCoupon
+		FooterCart,
+		allMoreSelectInput,
+		PxClassCommondity,
+		wangCg,SelPopup,
+		AppActivilyCoupon,
+		personComponent
 	},
 	props: {
 		ghsShopAdminId:{
@@ -244,7 +252,9 @@ export default {
 			tjFl:0,
 			cartItemShow:false,
 			showClassRemind:false,
-			buyNotice:0
+			buyNotice:0,
+			isHd:1,
+			getappIdList: {}
 		};
 	},
 	onPullDownRefresh() {
@@ -495,6 +505,7 @@ export default {
 					let id = res.data.id
 					this.ghsId = id
 					this.buyNotice = res.data.buyNotice
+					this.isHd = Number(res.data.isHd)
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}
@@ -522,10 +533,10 @@ export default {
 					this.ghsInfo = res.data
 					this.shopId = res.data.shopId
 					this.buyNotice = res.data.buyNotice
+					this.isHd = Number(res.data.isHd)
 					if(this.buyNotice == 1){
 						this.myClass = 'fadeIn'
 					}
-
 					this.visitMall(this.option.id)
 					uni.setNavigationBarTitle({title: this.ghsInfo.name})
 					//不是新人或者已经下过单的或者活动没有开启不显示新人红
@@ -550,6 +561,10 @@ export default {
 				}
 			})
 
+			getWeixinId().then(res => {
+				this.getappIdList = res.data
+			})
+
 		},
 		visitMall(ghsId){
 			//访客记录
@@ -585,14 +600,29 @@ export default {
 
 			})
 		},
+		goToMall(){
+			// #ifdef MP-WEIXIN
+			let self = this
+			let url = 'pages/home/category'
+			uni.navigateToMiniProgram({
+				appId: this.getappIdList.mall.miniAppId,
+				path: url + '?account=' + self.loginInfo.shopId,
+				//develop 开发版 trial 体验版 release 正式版
+				envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+				extraData: { 'hdShopAdminId': self.loginInfo.shopAdminId },
+				success (res) {}
+			})
+			// #endif
+			// #ifdef APP-PLUS
+			this.$msg('开发中...')
+			// #endif
+		},
 		goToCg() {
 			this.$util.pageTo({ url: "/pagesClient/official/apply",query:{ghsShopAdminId:this.ghsShopAdminId,hdShopAdminId:this.hdShopAdminId,fromGhsId:this.fromGhsId},type:2})
 		},
 		// 拨打电话  wangn  2021-5-6
 		toPhone(phone){
-			uni.makePhoneCall({
-				phoneNumber: phone
-			});
+			uni.makePhoneCall({ phoneNumber: phone })
 		},
 		modalCancel() {
 			this.isModel = false;