Browse Source

分类商品列表筛选修复

zhengjinyi 3 years ago
parent
commit
534b11eb13

+ 2 - 1
components/cm-module/cart-components/index.vue

@@ -1352,7 +1352,8 @@ export default {
 					4: '商品已售罄',
 					5: '价格仅会员可见,您不能购买',
 					6: '未公开价格',
-					7: '库存不足'
+					7: '库存不足',
+					8: '价格仅医美机构可见'
 				}
 			Object.keys(stateTextObject).forEach(key => {
 				if (key == state) {

+ 34 - 5
components/cm-module/listTemplate/productList.vue

@@ -31,7 +31,7 @@
 						<view class="list-details-price" v-else-if="item.priceFlag == 2">
 							<view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
 						</view>
-						<view class="list-details-price" v-else-if="item.priceFlag == 3">
+						<view class="list-details-price" v-else-if="item.priceFlag == 3 && (firstClubType!=1)">
 							<view class="list-none"><view class="price-small">¥仅医美机构可见</view></view>
 						</view>
 						<view class="list-details-price" v-else>
@@ -67,8 +67,8 @@
 								</template>
 								<template v-if="item.svipProductFlag == 1">
 									<view class="svip-tags">
-										<view class="tags">SVIP</view>
-										<view class="price">{{ item.svipPriceTag }}</view>
+										<view class="tags" :class="{ none: !isShowVipFlag(item) }">SVIP</view>
+										<view class="price" v-if="isShowVipFlag(item)">{{ item.svipPriceTag }}</view>
 									</view>
 								</template>
 							</view>
@@ -149,7 +149,9 @@ export default {
 			fromRegularPurchasePage: false,
 			cartQuantity: 0,
 			showRegularBtn: false,
-			isPrecedence: false
+			isPrecedence: false,
+			vipFlag:0,
+			firstClubType:0
 		}
 	},
 	created() {
@@ -163,13 +165,15 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo', 'identity'])
+		...mapState(['hasLogin', 'userInfo', 'identity','clubType'])
 	},
 	methods: {
 		async initGetStotage() {
 			// 初始化
 			const userInfo = await this.$api.getStorage()
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.firstClubType = this.clubType
 			this.getProductAgainInfo()
 			this.GetUserCartNumber()
 		},
@@ -282,6 +286,31 @@ export default {
 			}
 			return false
 		},
+		isShowVipFlag(pros) {
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
+		},
 		btnClick() {
 			this.$api.navigateTo('/pages/goods/cart')
 		},

+ 11 - 13
components/cm-module/pageTemplate/templatePrice.vue

@@ -3,6 +3,9 @@
 	<view>
 		<template v-if="vipFlag == 1">
 			<view class="title-none" v-if="goods.priceFlag === 1"> <text class="p big">¥未公开价格</text> </view>
+			<view class="title-none" v-else-if="goods.priceFlag === 3 && (firstClubType != 1)">
+				<text class="p big">¥仅医美机构可见</text>
+			</view>
 			<view
 				class="price tui-skeleton-rect"
 				v-else
@@ -48,7 +51,7 @@
 			<!-- 个人机构查看价格 -->
 			<template v-else-if="userIdentity === 4">
 				<view class="title-none" v-if="goods.priceFlag === 1"> <text class="p big">¥未公开价格</text> </view>
-				<view class="title-none" v-if="goods.priceFlag === 2">
+				<view class="title-none" v-else-if="goods.priceFlag === 2">
 					<text class="p big">¥价格仅会员可见</text>
 				</view>
 				<view class="title-none" v-if="goods.priceFlag === 3">
@@ -69,7 +72,7 @@
 			</template>
 			<template v-else-if="userIdentity === 2">
 				<view class="title-none" v-if="goods.priceFlag === 1"> <text class="p big">¥未公开价格</text> </view>
-				<view class="title-none" v-if="goods.priceFlag === 3">
+				<view class="title-none" v-else-if="goods.priceFlag === 3 && (firstClubType != 1)">
 					<text class="p big">¥仅医美机构可见</text>
 				</view>
 				<view
@@ -123,7 +126,8 @@ export default {
 			vipFlag: 0, // 是否是超级会员 0否 1是
 			shopId: 0, // 是否是供应商
 			userIdentity: 0, // 用户类型
-			goods: {}
+			goods: {},
+			firstClubType:0,
 		}
 	},
 	filters: {
@@ -136,7 +140,7 @@ export default {
 		this.initData(this.product)
 	},
 	computed: {
-		...mapState(['hasLogin', 'isWxAuthorize'])
+		...mapState(['hasLogin', 'isWxAuthorize','clubType'])
 	},
 	watch: {
 		pageData: {
@@ -155,15 +159,9 @@ export default {
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.goods = data
-		},
-		isShowVipFlag(pros) {
-			if (pros.priceFlag != 1) {
-				if (this.userIdentity == 4 && this.vipFlag == 1) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
+			this.firstClubType = this.clubType
+			console.log('userIdentity',this.userIdentity)
+			console.log('firstClubType',this.firstClubType)
 		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理

+ 46 - 10
components/cm-module/pageTemplate/templateTags.vue

@@ -2,6 +2,7 @@
 	<!-- 促销优惠VIP标签 -->
 	<view class="floor-item-act">
 		<view class="coupon-tags" v-if="goods.couponsLogo">优惠券</view>
+		<!-- 供应商 -->
 		<template v-if="userIdentity === 3">
 			<template v-if="goods.actStatus == 1">
 				<view class="floor-tags" v-if="PromotionsFormat(goods.promotions)">
@@ -15,11 +16,14 @@
 			<template v-if="goods.svipProductFlag == 1">
 				<view class="svip-tags" v-if="goods.shopId == shopId">
 					<view class="tags">SVIP</view>
-					<view class="price" v-if="goods.priceFlag != 1 && userIdentity == 2">{{ goods.svipPriceTag }}</view>
+					<view class="price" v-if="goods.priceFlag != 1 && goods.shopId == shopId">{{
+						goods.svipPriceTag
+					}}</view>
 				</view>
 				<view class="svip-tags" v-else> <view class="tags none">SVIP</view> </view>
 			</template>
 		</template>
+		<!-- 协销 -->
 		<template v-if="userIdentity === 1">
 			<template v-if="goods.actStatus == 1">
 				<view class="floor-tags" v-if="PromotionsFormat(goods.promotions)">
@@ -31,6 +35,20 @@
 				<view class="svip-tags"> <view class="tags none">SVIP</view> </view>
 			</template>
 		</template>
+		<!-- 个人机构 -->
+		<template v-if="userIdentity === 4">
+			<template v-if="goods.actStatus == 1">
+				<view class="floor-tags" v-if="PromotionsFormat(goods.promotions)"> {{ goods.promotions.name }} </view>
+				<view class="floor-tags" v-else>{{ goods.promotions.name }}</view>
+			</template>
+			<template v-if="goods.svipProductFlag == 1">
+				<view class="svip-tags">
+					<view class="tags" :class="{ none: !isShowVipFlag(goods) }">SVIP</view>
+					<view class="price" v-if="isShowVipFlag(goods)">{{ goods.svipPriceTag }}</view>
+				</view>
+			</template>
+		</template>
+		<!-- 会员机构 -->
 		<template v-else>
 			<template v-if="goods.actStatus == 1">
 				<view class="floor-tags" v-if="PromotionsFormat(goods.promotions)">
@@ -41,7 +59,7 @@
 			</template>
 			<template v-if="goods.svipProductFlag == 1">
 				<view class="svip-tags">
-					<view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
+					<view class="tags" :class="{ none: !isShowVipFlag(goods) }">SVIP</view>
 					<view class="price" v-if="isShowVipFlag(goods)">{{ goods.svipPriceTag }}</view>
 				</view>
 			</template>
@@ -64,6 +82,7 @@ export default {
 			vipFlag: 0, // 是否是超级会员 0否 1是
 			shopId: 0, // 是否是供应商
 			userIdentity: 0, // 用户类型
+			firstClubType: 0, // 机构类型 1 医美 2 生美
 			goods: {}
 		}
 	},
@@ -77,7 +96,7 @@ export default {
 		this.initData(this.product)
 	},
 	computed: {
-		...mapState(['hasLogin', 'isWxAuthorize'])
+		...mapState(['hasLogin', 'clubType'])
 	},
 	watch: {
 		pageData: {
@@ -95,16 +114,33 @@ export default {
 			this.shopId = userInfo.shopId ? userInfo.shopId : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+			this.firstClubType = this.clubType
 			this.goods = data
 		},
 		isShowVipFlag(pros) {
-			if (pros.priceFlag != 1) {
-				if (this.userIdentity == 4 && this.vipFlag == 1) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
 		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理

+ 37 - 10
components/cm-module/productDetails/cm-price.vue

@@ -75,7 +75,7 @@
 			<template v-if="userIdentity == 2 || (userIdentity == 4 && vipFlag == 1)">
 				<view class="wrap-main-item">
 					<view v-if="product.priceFlag == 1" class="wrap-main-text">¥未公开价格</view>
-					<view v-if="product.priceFlag == 3" class="wrap-main-text">¥仅医美机构可见</view>
+					<view v-else-if="product.priceFlag == 3 && (firstClubType!=1)" class="wrap-main-text">¥仅医美机构可见</view>
 					<view
 						v-else
 						class="p-price tui-skeleton-fillet"
@@ -106,8 +106,8 @@
 						</template>
 						<template v-if="product.svipProductFlag == 1">
 							<view class="svip-tags">
-								<view class="tags">SVIP</view> 
-								<view class="price" v-if="product.priceFlag != 1">{{ product.svipPriceTag }}</view>
+								<view class="tags" :class="{ none: !isShowVipFlag(product) }">SVIP</view> 
+								<view class="price" v-if="isShowVipFlag(product)">{{ product.svipPriceTag }}</view>
 							</view>
 						</template>
 					</view>
@@ -174,19 +174,19 @@
 				<template v-if="product.priceFlag == 1">
 					<text class="wrap-main-text">¥未公开价格</text>
 				</template>
-				<template v-if="product.priceFlag == 2">
+				<template v-else-if="product.priceFlag == 2">
 					<text class="wrap-main-text">¥价格仅会员可见</text>
 					<view class="floor-item-btn">
 						<view class="btn" @click.stop="goUpgradeApply">升级会员查看价格</view>
 					</view>
 				</template>
-				<template v-if="product.priceFlag == 3">
+				<template v-else-if="product.priceFlag == 3">
 					<text class="wrap-main-text">¥仅医美机构可见</text>
 					<view class="floor-item-btn">
 						<view class="btn" @click.stop="goUpgradeApply">成为医美机构查看价格</view>
 					</view>
 				</template>
-				<template v-if="product.priceFlag == 0">
+				<template v-else>
 					<view class="wrap-main-item">
 						<view
 							class="p-price tui-skeleton-fillet"
@@ -217,8 +217,8 @@
 							</template>
 							<template v-if="product.svipProductFlag == 1">
 								<view class="svip-tags">
-									<view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view> 
-									<view class="price" v-if="vipFlag == 1">{{ product.svipPriceTag }}</view>
+									<view class="tags" :class="{ none: !isShowVipFlag(product) }">SVIP</view> 
+									<view class="price" v-if="isShowVipFlag(product)">{{ product.svipPriceTag }}</view>
 								</view>
 							</template>
 						</view>
@@ -340,7 +340,8 @@ export default {
 			vipFlag: 0, // 是否是超级会员 0否 1是
 			popupShow: false,
 			promotionsType: 0,
-			isIphoneX: this.$store.state.isIphoneX
+			isIphoneX: this.$store.state.isIphoneX,
+			firstClubType:0
 		}
 	},
 	filters: {
@@ -353,12 +354,13 @@ export default {
 		this.initData()
 	},
 	computed: {
-		...mapState(['hasLogin', 'isWxAuthorize']),
+		...mapState(['hasLogin', 'clubType']),
 	},
 	methods: {
 		async initData(data) {
 			const userInfo = await this.$api.getStorage()
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+			this.firstClubType = this.clubType
 		},
 		clickPopupShow(type) {
 			this.popupShow = true
@@ -378,6 +380,31 @@ export default {
 			}
 			return false
 		},
+		isShowVipFlag(pros) {
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
+		},
 		goUpgradeApply() {
 			// 友盟埋点升级查看价格点击事件
 			if (process.env.NODE_ENV != 'development') {

+ 32 - 4
pages/goods/goods-active.vue

@@ -25,9 +25,31 @@
 							<view class="title"
 								><text class="mclap">{{ item.name }}</text></view
 							>
-							<view class="price">
-								<text class="p sm">¥</text> <text class="p big">{{ item.price | NumFormat }}</text>
-							</view>
+							<template v-if="userIdentity == 2 || (userIdentity == 4 && vipFlag == 1)">
+								<view class="price" v-if="item.priceFlag == 1">
+									<text class="p sm">¥</text> <text class="p big">未公开价格</text>
+								</view>
+								<view class="price" v-else-if="item.priceFlag == 3 && (firstClubType!=1)">
+									<text class="p sm">¥</text> <text class="p big">仅医美机构可见</text>
+								</view>
+								<view class="price" v-else>
+									<text class="p sm">¥</text> <text class="p big">{{ item.price | NumFormat }}</text>
+								</view>
+							</template>
+							<template v-if="userIdentity == 4">
+								<view class="price" v-if="item.priceFlag == 1">
+									<text class="p sm">¥</text> <text class="p big">未公开价格</text>
+								</view>
+								<view class="price" v-else-if="item.priceFlag == 2">
+									<text class="p sm">¥</text> <text class="p big">价格仅会员可见</text>
+								</view>
+								<view class="price" v-else-if="item.priceFlag == 3 && (firstClubType!=1)">
+									<text class="p sm">¥</text> <text class="p big">仅医美机构可见</text>
+								</view>
+								<view class="price" v-else>
+									<text class="p sm">¥</text> <text class="p big">{{ item.price | NumFormat }}</text>
+								</view>
+							</template>
 						</view>
 					</view>
 				</view>
@@ -54,6 +76,9 @@ export default {
 		return {
 			isRepuest: false,
 			userId: 0,
+			userIdentity:0,
+			firstClubType:0,
+			vipFlag:0,
 			listQuery:{
 				promotionsId: 0,
 				pageSize: 10,
@@ -71,7 +96,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['identity'])
+		...mapState(['identity','clubType'])
 	},
 	onLoad(option) {
 		this.listQuery.promotionsId = option.id
@@ -87,7 +112,10 @@ export default {
 		async initGetStotage() {// 初始化
 			const userInfo = await this.$api.getStorage()
 			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.listQuery.identity = this.identity
+			this.userIdentity = this.identity
+			this.firstClubType = this.clubType
 			this.initSsoMemberCollectionList()
 		},
 		initSsoMemberCollectionList() {

+ 29 - 12
pages/goods/goods-classify.vue

@@ -157,7 +157,7 @@
 										</template>
 										<template v-if="pros.svipProductFlag == 1">
 											<view class="svip-tags">
-												<view class="tags" :class="{ none: vipFlag == 0 }">SVIP</view>
+												<view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
 												<view class="price" v-if="isShowVipFlag(pros)">{{
 													pros.svipPriceTag
 												}}</view>
@@ -194,7 +194,7 @@
 											<view class="price-larger" v-if="pros.priceFlag == 2">
 												<text class="txt">¥价格仅会员可见</text>
 											</view>
-											<view class="price-larger" v-if="pros.priceFlag == 3">
+											<view class="price-larger" v-else-if="pros.priceFlag == 3">
 												<text class="txt">¥仅医美机构可见</text>
 											</view>
 											<text
@@ -251,7 +251,7 @@
 										</view>
 										<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
 										<template v-else>
-											<view class="price-larger" v-if="pros.priceFlag == 3">
+											<view class="price-larger" v-if="pros.priceFlag == 3 && (firstClubType!=1)">
 												<text class="txt">¥仅医美机构可见</text>
 											</view>
 											<text
@@ -401,6 +401,7 @@ export default {
 			windowHeight: '',
 			scrollHeight: '',
 			pathQueryId:0,
+			firstClubType:0,
 			listQuery: {
 				id: 0,
 				identity: 0,
@@ -434,7 +435,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo', 'identity', 'isWxAuthorize'])
+		...mapState(['hasLogin', 'userInfo', 'identity', 'clubType'])
 	},
 	onLoad(option) {
 		console.log(option)
@@ -454,6 +455,7 @@ export default {
 	methods: {
 		async initGetStotage(option) {
 			const userInfo = await this.$api.getStorage()
+			this.firstClubType = this.clubType
 			this.listQuery.id = this.pathQueryId = this.brandParam.id = option.id
 			this.listQuery.identity = this.identity
 			this.listQuery.idType = this.classifyType = this.brandParam.idType = Number(option.classType)
@@ -693,14 +695,29 @@ export default {
 			return false
 		},
 		isShowVipFlag(pros) {
-			// 超级会员价格显示控制
-			if (this.hasLogin && pros.priceFlag != 1) {
-				if (this.userIdentity == 4 && this.vipFlag == 1) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
 		},
 		showAllBrands() {
 			// 显示全部品牌

+ 36 - 14
pages/goods/goods-supporting.vue

@@ -114,7 +114,7 @@
 													</template>
 													<template v-if="pros.svipProductFlag == 1">
 														<view class="svip-tags">
-															<view class="tags" :class="{ none: vipFlag == 0 }"
+															<view class="tags" :class="{ none: !isShowVipFlag(pros) }"
 																>SVIP</view
 															>
 															<view class="price" v-if="isShowVipFlag(pros)">{{
@@ -130,6 +130,9 @@
 										<view class="list-details-price" v-if="pros.priceFlag == 1">
 											<view class="list-none"><view class="price-small">¥未公开价格</view></view>
 										</view>
+										<view class="list-details-price" v-else-if="pros.priceFlag == 3 && (firstClubType!=1)">
+											<view class="list-none"><view class="price-small">¥仅医美机构可见</view></view>
+										</view>
 										<template v-else>
 											<view class="list-details-price">
 												<view class="list-price">
@@ -323,6 +326,7 @@ export default {
 			nomoreText: '上拉显示更多',
 			vipFlag: 0,
 			userIdentity: 0,
+			firstClubType:0,
 			isStock: false
 		}
 	},
@@ -339,7 +343,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo']),
+		...mapState(['hasLogin', 'userInfo','clubType']),
 	},
 	methods: {
 		...mapMutations(['login', 'logout']),
@@ -348,6 +352,7 @@ export default {
 			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.firstClubType = this.clubType
 			this.getCommodityCombinationList()
 		},
 		getCommodityCombinationList() {
@@ -500,8 +505,12 @@ export default {
 		disabledChecked(pros){
 			if(pros.priceFlag ==1){// 为公开价格返回 true 禁用按钮
 				return true
-			}else{
-				if(this.userIdentity == 4 && pros.priceFlag ==2){// 普通机构且商品价格仅会员可见 禁用按钮
+			}else if(this.userIdentity == 4){// 普通机构且商品价格仅会员可见 || 商品价格仅医美机构可见  禁用按钮
+				if( pros.priceFlag ==2 || pros.priceFlag ==3){
+					return true
+				}
+			}else if(this.userIdentity == 2){// 资质机构下 商品价格仅医美机构可见 且本机构不为医美机构  禁用按钮
+				if( pros.priceFlag ==3 && this.firstClubType !=1 ){
 					return true
 				}
 			}
@@ -588,16 +597,29 @@ export default {
 			}
 		},
 		isShowVipFlag(pros) {
-			// 超级会员价格显示控制
-			if (this.hasLogin) {
-				if (pros.priceFlag != 1) {
-					if (this.userIdentity == 4 && this.vipFlag == 1) {
-						return true
-					} else if (this.userIdentity == 2) {
-						return true
-					}
-				}
-			}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
 		},
 		navToDetailPage(id) {
 			this.isModallayer = true

+ 31 - 7
pages/goods/product.vue

@@ -250,12 +250,22 @@
 					<view class="product-details product-details0">
 						<view class="title"> <view class="title-tab">商品详情</view> </view>
 						<view class="content tui-banner product-rich-text tui-skeleton-rect">
-							<parser
-								:html="html"
-								:img-mode="widthFix"
-								v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo"
-							></parser>
-							<view class="product-rich-text-none" v-else>暂无商品信息</view>
+							<template v-if="hasLogin && userIdentity == 2">
+								<template v-if="!goodsData.isNoneDisabled && product.productDetail.detailInfo">
+									<parser
+										:html="html"
+										:img-mode="widthFix"
+									></parser>
+								</template>
+								<view class="product-rich-text-none" v-else>暂无商品信息</view>
+							</template>
+							<template v-else>
+								<view class="product-rich-text-none">请点击右下角客服按钮或电话联系客服咨询商品详细信息。</view>
+								<view class="product-rich-text-none bold">请大家提高紧惕,防范虚假产品宣传。</view>
+								<view class="product-rich-text-none">客服电话:</view>
+								<view class="product-rich-text-none">0755-22907771</view>
+								<view class="product-rich-text-none">15338851365</view>
+							</template>
 						</view>
 					</view>
 					<!-- 服务项目 -->
@@ -629,6 +639,7 @@ export default {
 			shopId: 0,
 			shopID: 0,
 			vipFlag: 0,
+			firstClubType:0,
 			productId: 0,
 			userIdentity: 0, // 用户类型
 			goodsData: {}, // 自定义数据
@@ -687,7 +698,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'isWxAuthorize', 'identity', 'isIphoneX'])
+		...mapState(['hasLogin', 'clubType', 'identity', 'isIphoneX'])
 	},
 	filters: {
 		TypeFormat(value) {
@@ -756,6 +767,7 @@ export default {
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.shopID = userInfo.shopId ? userInfo.shopId : 0
+			this.firstClubType = this.clubType
 			if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
 				this.isShowButton = true
 			} else {
@@ -836,6 +848,14 @@ export default {
 						} else {
 							this.disabled = false
 						}
+					} else if(this.product.priceFlag == 3){
+						if (this.userIdentity == 4) {
+							this.disabled = true
+						} else if(this.userIdentity == 2 && this.firstClubType != 1){
+							this.disabled = true
+						} else {
+							this.disabled = false
+						}
 					} else {
 						this.disabled = false
 					}
@@ -1948,6 +1968,10 @@ page {
 		font-size: 24rpx;
 		color: #999999;
 		line-height: 60rpx;
+		&.bold{
+			font-weight: bold;
+			color: #333333;
+		}
 	}
 	.content-none {
 		width: 100%;

+ 29 - 12
pages/search/search.vue

@@ -245,7 +245,7 @@
 									</template>
 									<template v-if="pros.svipProductFlag == 1">
 										<view class="svip-tags">
-											<view class="tags" :class="{ none: vipFlag == 0 }">SVIP</view>
+											<view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
 											<view class="price" v-if="isShowVipFlag(pros)">{{
 												pros.svipPriceTag
 											}}</view>
@@ -280,7 +280,7 @@
 										<view class="price-larger" v-if="pros.priceFlag == 2">
 											<text class="txt">¥价格仅会员可见</text>
 										</view>
-										<view class="price-larger" v-if="pros.priceFlag == 3">
+										<view class="price-larger" v-else-if="pros.priceFlag == 3">
 											<text class="txt">¥仅医美机构可见</text>
 										</view>
 										<text
@@ -335,7 +335,7 @@
 									</view>
 									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
 									<template v-else>
-										<view class="price-larger" v-if="pros.priceFlag == 3">
+										<view class="price-larger" v-if="pros.priceFlag == 3 && (firstClubType!=1)">
 											<text class="txt">¥仅医美机构可见</text>
 										</view>
 										<text
@@ -463,6 +463,7 @@ export default {
 			showBubblePopup: false,
 			vipFlag: 0,
 			userIdentity: 0,
+			firstClubType:0,
 			searchKeyType: 1,
 			tabIndex: 0,
 			rightDrawer: false,
@@ -523,7 +524,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo', 'isWxAuthorize', 'hasLogin', 'userInfo', 'identity'])
+		...mapState(['hasLogin', 'userInfo', 'clubType', 'identity'])
 	},
 	onLoad(option) {
 		console.log(option)
@@ -546,6 +547,7 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.listQuery.identity = this.identity
+			this.firstClubType = this.clubType
 			if (option.keyWord) {
 				this.listQuery.keyword = option.keyWord
 				this.setSearchHistoryAdd()
@@ -810,14 +812,29 @@ export default {
 			return false
 		},
 		isShowVipFlag(pros) {
-			// 超级会员价格显示控制
-			if (this.hasLogin && pros.priceFlag != 1) {
-				if (this.userIdentity == 4 && this.vipFlag == 1) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
 		},
 		onShowClose() {
 			//输入框输入时触发

+ 35 - 18
pages/supplier/user/my-shop.vue

@@ -118,7 +118,7 @@
 									</template>
 									<template v-if="prop.svipProductFlag == 1">
 										<view class="svip-tags">
-											<view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
+											<view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
 											<view class="price" v-if="isShowVipFlag(pros)">{{
 												pros.svipPriceTag
 											}}</view>
@@ -157,10 +157,10 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 2">
+									<view class="title-none" v-else-if="prop.priceFlag === 2">
 										<text class="p big">¥价格仅会员可见</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 3">
+									<view class="title-none" v-else-if="prop.priceFlag === 3">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
@@ -179,7 +179,7 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 3">
+									<view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
@@ -291,7 +291,7 @@
 									</template>
 									<template v-if="prop.svipProductFlag == 1">
 										<view class="svip-tags">
-											<view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
+											<view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
 											<view class="price" v-if="isShowVipFlag(pros)">{{
 												pros.svipPriceTag
 											}}</view>
@@ -330,10 +330,10 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 2">
+									<view class="title-none" v-else-if="prop.priceFlag === 2">
 										<text class="p big">¥价格仅会员可见</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 3">
+									<view class="title-none" v-else-if="prop.priceFlag === 3">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
@@ -352,7 +352,7 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-if="prop.priceFlag === 3">
+									<view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
@@ -433,6 +433,7 @@ export default {
 			recommendList: [],
 			productList: [],
 			userIdentity: 0,
+			firstClubType:0,
 			listQuery: {
 				keyword: '',
 				pageSize: 10,
@@ -445,7 +446,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo', 'isActivity', 'identity', 'isWxAuthorize'])
+		...mapState(['hasLogin', 'userInfo', 'isActivity', 'identity', 'clubType'])
 	},
 	onLoad(option) {
 		if (option.type == 'share') {
@@ -469,6 +470,7 @@ export default {
 			this.listQuery.identity = this.identity
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+			this.firstClubType = this.clubType
 			//初始化请求数据
 			this.GetSupplierHomeBanner()
 			this.GetSupplierHomeDeatils()
@@ -658,15 +660,30 @@ export default {
 			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 		},
 		isShowVipFlag(pros) {
-			// 超级会员价格显示控制
-			if (this.hasLogin && pros.priceFlag != 1) {
-				if (this.userIdentity == 1 || (this.userIdentity == 4 && this.vipFlag == 1)) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
-		}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if((pros.priceFlag === 2 && this.userIdentity === 2) || this.userIdentity === 1) return true
+			// 商品价格仅医美机构可见
+			if((pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) || this.userIdentity === 1) return true
+			// 其它
+			return false
+		},
 	},
 	onPageScroll(e) {
 		//实时获取到滚动的值

+ 30 - 10
pages/user/collection/collection.vue

@@ -101,6 +101,9 @@
 									<view class="list-details-price" v-if="pros.priceFlag == 1">
 										<view class="list-none"><view class="price-small">¥未公开价格</view></view>
 									</view>
+									<view class="list-details-price" v-else-if="pros.priceFlag == 3 && (firstClubType!=1)">
+										<view class="list-none"><view class="price-small">¥仅医美机构可见</view></view>
+									</view>
 									<template v-else>
 										<view class="list-details-price">
 											<view class="list-price">
@@ -135,7 +138,7 @@
 												</template>
 												<template v-if="pros.svipProductFlag == 1">
 													<view class="svip-tags">
-														<view class="tags" :class="{ none: vipFlag == 0 }">SVIP</view>
+														<view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
 														<view class="price" v-if="isShowVipFlag(pros)">{{
 															pros.svipPriceTag
 														}}</view>
@@ -306,6 +309,7 @@ export default {
 			modal: false,
 			vipFlag:0,
 			userIdentity:0,
+			firstClubType:0
 		}
 	},
 	onLoad() {
@@ -320,7 +324,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo'])
+		...mapState(['hasLogin', 'userInfo','clubType'])
 	},
 	methods: {
 		...mapMutations(['login', 'logout']),
@@ -329,6 +333,7 @@ export default {
 			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.firstClubType = this.clubType
 			this.GetProductListInfo()
 			this.ProductCartNumber()
 		},
@@ -609,14 +614,29 @@ export default {
 			}
 		},
 		isShowVipFlag(pros) {
-			// 超级会员价格显示控制
-			if (this.hasLogin && pros.priceFlag != 1) {
-				if (this.userIdentity == 4 && this.vipFlag == 1) {
-					return true
-				} else if (this.userIdentity == 2) {
-					return true
-				}
-			}
+			/**
+			 *显示SVIP和超级会员价格:
+			 * 	个人机构(不是超级会员,但价格所有机构可见),
+			 *	资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
+			 * 	超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
+			 *商品价格是否可见:priceFlag  0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
+			 *	普通机构
+			 * 		超级会员 && priceFlag === 0
+			 * 	资质机构
+			 * 		priceFlag !== 1 ||
+			 * 		超级会员
+			 * 			商品priceFlag === 3 && 是否是医美机构
+			*/
+			// 未登录 || 非会员
+			if(!this.hasLogin || !this.vipFlag === 1) return false
+			// 商品所有机构可见
+			if(pros.priceFlag === 0 ) return true
+			// 商品价格仅资质机构可见
+			if(pros.priceFlag === 2 && this.userIdentity === 2) return true
+			// 商品价格仅医美机构可见
+			if(pros.priceFlag === 3 && this.userIdentity === 2 &&  this.firstClubType == 1) return true
+			// 其它
+			return false
 		},
 		navToDetailPage(id) {
 			this.isModallayer = true

+ 4 - 2
store/index.js

@@ -10,6 +10,7 @@ const store = new Vuex.Store({
         hasLogin: false,
         userInfo: {},
         identity: 0,
+        clubType: 0, // 1: 医美机构  2:生美机构 (医美、生美机构类型)
         wechatUserInfo: {},
         cartNumber: 0,
         isIphoneX: false,
@@ -50,13 +51,14 @@ const store = new Vuex.Store({
             console.log(`${TIME}`, provider)
             state.userInfo = provider
             if (state.userInfo) {
+                state.clubType = provider.firstClubType
                 if (provider.userIdentity) {
                     state.identity = provider.userIdentity
                 } else if (provider.userId == 5261 || provider.userId == 10947 || provider.userId == 11579) {
                     state.identity = 1
-                } else if(provider.firstClubType == 1) {
+                } else if (provider.firstClubType == 1) {
                     state.identity = 5
-                }else{
+                } else {
                     state.identity = 0
                 }
             }