ソースを参照

commit - m 医美机构商品可见度修改

zhengjinyi 3 年 前
コミット
720ab650de

+ 0 - 2
components/cm-module/activity/activityBean.vue

@@ -75,9 +75,7 @@
 		},
 		methods: {
 			handInitType(type){
-				console.log('type================》',type)
 				this.bgImagePath = `https://static.caimei365.com/app/img/icon/bean-icon-${type}@2x.png`
-				console.log(this.bgImagePath)
 			},
 			handleClick(e) {
 				console.log(e)

+ 0 - 6
components/cm-module/listTemplate/buyagainList.vue

@@ -158,11 +158,6 @@ export default {
 			const userInfo = await this.$api.getStorage()
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			this.userId = clubInfo.userId ? clubInfo.userId : 0
-			if (userInfo.userIdentity == 1) {
-				this.actasFlag = userInfo.userIdentity
-			} else {
-				this.actasFlag = 2
-			}
 			this.getProductAgainInfo(false)
 		},
 		scrolltolower() {
@@ -184,7 +179,6 @@ export default {
 				this.pageNum += 1
 			}
 			this.ProductService.GetRepeatBuyAgainProductList({
-				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				pageNum: this.pageNum,
 				pageSize: this.pageSize

+ 7 - 8
components/cm-module/listTemplate/productList.vue

@@ -26,7 +26,13 @@
 							>起订量:{{ item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber }}</text
 						>
 						<view class="list-details-price" v-if="item.priceFlag == 1">
-							<view class="list-none"><view class="price-small">未公开价格</view></view>
+							<view class="list-none"><view class="price-small">¥未公开价格</view></view>
+						</view>
+						<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-none"><view class="price-small">¥仅医美机构可见</view></view>
 						</view>
 						<view class="list-details-price" v-else>
 							<view class="list-shop">
@@ -131,7 +137,6 @@ export default {
 			showSkeleton: true,
 			isShowEmpty: false,
 			userId: 0,
-			actasFlag: 0,
 			scrollHeight: '',
 			productList: [],
 			showLoading: false,
@@ -165,11 +170,6 @@ export default {
 			// 初始化
 			const userInfo = await this.$api.getStorage()
 			this.userId = userInfo.userId ? userInfo.userId : 0
-			if (userInfo.userIdentity == 1) {
-				this.actasFlag = userInfo.userIdentity
-			} else {
-				this.actasFlag = 2
-			}
 			this.getProductAgainInfo()
 			this.GetUserCartNumber()
 		},
@@ -192,7 +192,6 @@ export default {
 				this.pageNum += 1
 			}
 			this.ProductService.GetRepeatBuyAgainProductList({
-				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				identity: this.identity,
 				pageNum: this.pageNum,

+ 21 - 0
components/cm-module/pageTemplate/templatePrice.vue

@@ -51,6 +51,9 @@
 				<view class="title-none" v-if="goods.priceFlag === 2">
 					<text class="p big">¥价格仅会员可见</text>
 				</view>
+				<view class="title-none" v-if="goods.priceFlag === 3">
+					<text class="p big">¥仅医美机构可见</text>
+				</view>
 				<view
 					class="price tui-skeleton-rect"
 					v-if="goods.priceFlag === 0"
@@ -64,6 +67,24 @@
 					}}</text>
 				</view>
 			</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">
+					<text class="p big">¥仅医美机构可见</text>
+				</view>
+				<view
+					class="price tui-skeleton-rect"
+					v-else
+					:class="PromotionsFormat(goods.promotions) || goods.svipProductFlag == 1 ? 'none' : ''"
+				>
+					<text class="p sm">¥</text>
+					<text class="p big">{{
+						(PromotionsFormat(goods.promotions) || goods.svipProductFlag == 1
+							? goods.originalPrice
+							: goods.price) | NumFormat
+					}}</text>
+				</view>
+			</template>
 			<!-- 协销和会员机构查看价格 -->
 			<template v-else>
 				<view class="title-none" v-if="goods.priceFlag === 1"> <text class="p big">¥未公开价格</text> </view>

+ 7 - 0
components/cm-module/productDetails/cm-price.vue

@@ -75,6 +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
 						class="p-price tui-skeleton-fillet"
@@ -179,6 +180,12 @@
 						<view class="btn" @click.stop="goUpgradeApply">升级会员查看价格</view>
 					</view>
 				</template>
+				<template v-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">
 					<view class="wrap-main-item">
 						<view

+ 14 - 26
pages/goods/goods-active.vue

@@ -54,11 +54,13 @@ export default {
 		return {
 			isRepuest: false,
 			userId: 0,
-			actasFlag:2,
-			promotionsId: 0,
+			listQuery:{
+				promotionsId: 0,
+				pageSize: 10,
+				pageNum: 1,
+				identity:0
+			},
 			productList: [],
-			pageSize: 10,
-			pageNum: 1,
 			modal: false,
 			promotionsInfo: {},
 			loadding: false,
@@ -72,7 +74,7 @@ export default {
 		...mapState(['identity'])
 	},
 	onLoad(option) {
-		this.promotionsId = option.id
+		this.listQuery.promotionsId = option.id
 		this.initGetStotage()
 	},
 	filters: {
@@ -84,18 +86,14 @@ export default {
 	methods: {
 		async initGetStotage() {// 初始化
 			const userInfo = await this.$api.getStorage()
-			this.userId = userInfo.clubId ? userInfo.clubId : 0
-			if(userInfo.userIdentity == 1){
-				this.actasFlag = userInfo.userIdentity
-			}else{
-				this.actasFlag = 2
-			}
+			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.listQuery.identity = this.identity
 			this.initSsoMemberCollectionList()
 		},
 		initSsoMemberCollectionList() {
 			//凑单初始化
 			this.ProductService.queryProductPromotionInfo({
-				promotionsId: this.promotionsId
+				promotionsId: this.listQuery.promotionsId
 			})
 				.then(response => {
 					let data = response.data
@@ -108,12 +106,7 @@ export default {
 		},
 		queryProductPromotionList() {
 			//查询凑单商品列表
-			this.ProductService.queryProductPromotionList({
-				identity: this.identity,
-				pageNum: this.pageNum,
-				pageSize: this.pageSize,
-				promotionsId: this.promotionsId
-			})
+			this.ProductService.queryProductPromotionList(this.listQuery)
 				.then(response => {
 					let data = response.data
 					if (data.list && data.list.length > 0) {
@@ -145,12 +138,8 @@ export default {
 		},
 		getOnReachBottomData() {
 			//上滑加载
-			this.pageNum += 1
-			this.ProductService.queryProductPromotionList({
-				pageNum: this.pageNum,
-				pageSize: this.pageSize,
-				promotionsId: this.promotionsId
-			})
+			this.listQuery.pageNum += 1
+			this.ProductService.queryProductPromotionList(this.listQuery)
 				.then(response => {
 					let data = response.data
 					if (data.list && data.list.length > 0) {
@@ -184,7 +173,6 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: productIds,
 				source: 2
@@ -221,7 +209,7 @@ export default {
 	},
 	onPullDownRefresh() {
 		//下拉刷新
-		this.pageNum = 1
+		this.listQuery.pageNum = 1
 		this.queryProductPromotionList()
 		uni.stopPullDownRefresh()
 	},

+ 8 - 7
pages/goods/goods-classify.vue

@@ -194,6 +194,9 @@
 											<view class="price-larger" v-if="pros.priceFlag == 2">
 												<text class="txt">¥价格仅会员可见</text>
 											</view>
+											<view class="price-larger" v-if="pros.priceFlag == 3">
+												<text class="txt">¥仅医美机构可见</text>
+											</view>
 											<text
 												v-else
 												class="price-larger"
@@ -248,7 +251,11 @@
 										</view>
 										<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
 										<template v-else>
+											<view class="price-larger" v-if="pros.priceFlag == 3">
+												<text class="txt">¥仅医美机构可见</text>
+											</view>
 											<text
+												v-else
 												class="price-larger"
 												:class="
 													PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
@@ -387,7 +394,6 @@ export default {
 			userId: 0,
 			vipFlag: 0,
 			userIdentity: 0,
-			actasFlag: 2,
 			listData: [],
 			brandLists: [],
 			checkedBrandList: [],
@@ -456,11 +462,7 @@ export default {
 			this.shopId = userInfo.shopId ? userInfo.shopId : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
-			if (this.userIdentity == 1) {
-				this.actasFlag = this.userIdentity
-			} else {
-				this.actasFlag = 2
-			}
+
 			this.isRequest = true
 			this.GetProductListInfo()
 			this.GetProductOneClassly()
@@ -583,7 +585,6 @@ export default {
 			this.priceLoading = true
 			this.productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: this.productIds,
 				source: 2

+ 6 - 1
pages/goods/goods-supporting.vue

@@ -43,6 +43,11 @@
 												><view class="price-small">¥价格仅会员可见</view></view
 											>
 										</view>
+										<view class="list-details-price" v-else-if="pros.priceFlag == 3">
+											<view class="list-none"
+												><view class="price-small">¥仅医美机构可见</view></view
+											>
+										</view>
 										<template v-else>
 											<view class="list-details-price">
 												<view class="list-price">
@@ -63,7 +68,7 @@
 														}}
 													</text>
 												</view>
-												<view class="add-cart-btn">
+												<view class="add-cart-btn" v-if="!disabledChecked(pros)">
 													<view class="number-box">
 														<view
 															class="iconfont icon-jianhao"

+ 24 - 16
pages/search/search-supplier.vue

@@ -72,11 +72,11 @@
 </template>
 
 <script>
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import authorize from '@/common/config/authorize.js'	
-	import wxLogin from "@/common/config/wxLogin.js"
+	import wxLogin from '@/common/config/wxLogin.js'
 	import { mapState } from 'vuex'
 	
 	export default {
@@ -103,22 +103,30 @@
 				listQuery:{
 					keyword: '',
 					pageSize: 10,
-					pageNum: 1
+					pageNum: 1,
+					identity: 0
 				},
 				total:0
 			}
 		},
 		onLoad(option){
-			if(option.type =='share'){
-				wxLogin.wxLoginAuthorize()
-			}
-			if(option.keyWord){
-				console.log(option.keyWord)
-				this.listQuery.keyword = option.keyWord
-				this.GetSearchSupplierList();
-			}
+			this.initGetStotage(option)
+		},
+		computed: {
+			...mapState(['identity'])
 		},
 		methods: {
+			initGetStotage(option) {
+				this.listQuery.identity = this.identity
+				if(option.type =='share'){
+					wxLogin.wxLoginAuthorize()
+				}
+				if(option.keyWord){
+					console.log(option.keyWord)
+					this.listQuery.keyword = option.keyWord
+					this.GetSearchSupplierList()
+				}
+			},	
 			searchsupplierList(){//搜索
 				this.listQuery.pageNum=1
 				this.GetSearchSupplierList()
@@ -140,8 +148,8 @@
 					if(dataList && dataList.length > 0){
 						this.isEmpty = false
 						this.supplierList = dataList
-						this.pullFlag = false;
-						setTimeout(()=>{this.pullFlag = true;},500)
+						this.pullFlag = false
+						setTimeout(()=>{this.pullFlag = true},500)
 						if(this.total>this.supplierList.length){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
@@ -159,7 +167,7 @@
 			},	
 			GetSearchSupplierListBottomData(){//上滑加载
 				this.listQuery.pageNum+=1
-				this.ShopService.GetSupplierHomeProductList(this.listQuery).then(response =>{
+				this.ShopService.GetSearchSupplierList(this.listQuery).then(response =>{
 					let data = JSON.parse(response.data)
 					console.log(data)
 					this.total = data.total
@@ -217,7 +225,7 @@
 		      // 来自页面内转发按钮
 		    }
 			return {
-			  title: `采美正品供应商,质量有保证!`,
+			  title: '采美正品供应商,质量有保证!',
 			  path: `pages/search/search-supplier?type=share&keyWord=${this.listQuery.keyword}`
 			}
 		},

+ 24 - 19
pages/search/search.vue

@@ -254,6 +254,7 @@
 								</view>
 							</template>
 							<view v-if="hasLogin" class="list-price">
+								<!-- 协销 -->
 								<template v-if="userIdentity == 1">
 									<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
 									<text
@@ -269,6 +270,7 @@
 										}}
 									</text>
 								</template>
+								<!-- 普通机构且不是超级会员 -->
 								<template v-if="userIdentity == 4 && vipFlag != 1">
 									<view class="price-larger" v-if="pros.priceFlag == 1">
 										<text class="txt">¥未公开价格</text>
@@ -278,6 +280,9 @@
 										<view class="price-larger" v-if="pros.priceFlag == 2">
 											<text class="txt">¥价格仅会员可见</text>
 										</view>
+										<view class="price-larger" v-if="pros.priceFlag == 3">
+											<text class="txt">¥仅医美机构可见</text>
+										</view>
 										<text
 											v-else
 											class="price-larger"
@@ -294,6 +299,7 @@
 										</text>
 									</template>
 								</template>
+								<!-- 供应商 -->
 								<template v-if="userIdentity == 3">
 									<template v-if="pros.supplierId == shopId">
 										<view class="price-larger" v-if="pros.priceFlag == 1">
@@ -322,23 +328,29 @@
 										</view>
 									</template>
 								</template>
+								<!-- 会员机构 && 普通机构且是超级会员 -->
 								<template v-if="userIdentity == 2 || (userIdentity == 4 && vipFlag == 1)">
 									<view class="price-larger" v-if="pros.priceFlag == 1">
 										<text class="txt">¥未公开价格</text>
 									</view>
 									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
-									<text
-										v-else
-										class="price-larger"
-										:class="
-											PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1 ? 'none' : ''
-										"
-									>
-										¥{{
-											(PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)
-												| NumFormat
-										}}
-									</text>
+									<template v-else>
+										<view class="price-larger" v-if="pros.priceFlag == 3">
+											<text class="txt">¥仅医美机构可见</text>
+										</view>
+										<text
+											v-else
+											class="price-larger"
+											:class="
+												PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1 ? 'none' : ''
+											"
+										>
+											¥{{
+												(PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)
+													| NumFormat
+											}}
+										</text>
+									</template>
 								</template>
 							</view>
 							<view v-else class="list-login-now">
@@ -451,7 +463,6 @@ export default {
 			showBubblePopup: false,
 			vipFlag: 0,
 			userIdentity: 0,
-			actasFlag: 2,
 			searchKeyType: 1,
 			tabIndex: 0,
 			rightDrawer: false,
@@ -535,11 +546,6 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.listQuery.identity = this.identity
-			if (this.userIdentity == 1) {
-				this.actasFlag = this.userIdentity
-			} else {
-				this.actasFlag = 2
-			}
 			if (option.keyWord) {
 				this.listQuery.keyword = option.keyWord
 				this.setSearchHistoryAdd()
@@ -704,7 +710,6 @@ export default {
 			this.priceLoading = true
 			this.productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: this.productIds,
 				source: 2 // 来源 1 WWW 2 小程序

+ 47 - 8
pages/supplier/user/my-shop.vue

@@ -160,6 +160,9 @@
 									<view class="title-none" v-if="prop.priceFlag === 2">
 										<text class="p big">¥价格仅会员可见</text>
 									</view>
+									<view class="title-none" v-if="prop.priceFlag === 3">
+										<text class="p big">¥仅医美机构可见</text>
+									</view>
 									<view
 										class="price tui-skeleton-rect"
 										v-if="prop.priceFlag === 0"
@@ -172,6 +175,25 @@
 										}}</text>
 									</view>
 								</template>
+								<template v-else-if="userIdentity === 2">
+									<view class="title-none" v-if="prop.priceFlag === 1">
+										<text class="p big">¥未公开价格</text>
+									</view>
+									<view class="title-none" v-if="prop.priceFlag === 3">
+										<text class="p big">¥仅医美机构可见</text>
+									</view>
+									<view
+										class="price tui-skeleton-rect"
+										v-else
+										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+									>
+										<text class="p sm">¥</text>
+										<text class="p big">{{
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? prop.originalPrice : prop.price)
+												| NumFormat
+										}}</text>
+									</view>
+								</template>
 								<template v-else>
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
@@ -311,6 +333,9 @@
 									<view class="title-none" v-if="prop.priceFlag === 2">
 										<text class="p big">¥价格仅会员可见</text>
 									</view>
+									<view class="title-none" v-if="prop.priceFlag === 3">
+										<text class="p big">¥仅医美机构可见</text>
+									</view>
 									<view
 										class="price tui-skeleton-rect"
 										v-if="prop.priceFlag === 0"
@@ -323,6 +348,25 @@
 										}}</text>
 									</view>
 								</template>
+								<template v-else-if="userIdentity === 2">
+									<view class="title-none" v-if="prop.priceFlag === 1">
+										<text class="p big">¥未公开价格</text>
+									</view>
+									<view class="title-none" v-if="prop.priceFlag === 3">
+										<text class="p big">¥仅医美机构可见</text>
+									</view>
+									<view
+										class="price tui-skeleton-rect"
+										v-else
+										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+									>
+										<text class="p sm">¥</text>
+										<text class="p big">{{
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? prop.originalPrice : prop.price)
+												| NumFormat
+										}}</text>
+									</view>
+								</template>
 								<template v-else>
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
@@ -389,12 +433,12 @@ export default {
 			recommendList: [],
 			productList: [],
 			userIdentity: 0,
-			actasFlag:2,
 			listQuery: {
 				keyword: '',
 				pageSize: 10,
 				pageNum: 1,
-				id: 0
+				id: 0,
+				identity:0
 			},
 			isHomeProduct: false,
 			total: 0
@@ -422,13 +466,9 @@ export default {
 			const userInfo = await this.$api.getStorage()
 			this.shopId = userInfo.shopId ? userInfo.shopId : 0
 			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.listQuery.identity = this.identity
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
-			if(this.userIdentity == 1){
-				this.actasFlag = this.userIdentity
-			}else{
-				this.actasFlag = 2
-			}
 			//初始化请求数据
 			this.GetSupplierHomeBanner()
 			this.GetSupplierHomeDeatils()
@@ -520,7 +560,6 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: productIds,
 				source: 2

+ 3 - 0
pages/user/collection/collection.vue

@@ -49,6 +49,9 @@
 									<view class="list-details-price" v-else-if="pros.priceFlag == 2">
 										<view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
 									</view>
+									<view class="list-details-price" v-else-if="pros.priceFlag == 3">
+										<view class="list-none"><view class="price-small">¥仅医美机构可见</view></view>
+									</view>
 									<template v-else>
 										<view class="list-details-price">
 											<view class="list-price">

+ 2 - 2
services/config.env.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    // URL_CONFIG = 'https://core-b.caimei365.com'
-    URL_CONFIG = 'https://core.caimei365.com'
+    URL_CONFIG = 'https://core-b.caimei365.com'
+    // URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'

+ 4 - 2
store/index.js

@@ -52,9 +52,11 @@ const store = new Vuex.Store({
             if (state.userInfo) {
                 if (provider.userIdentity) {
                     state.identity = provider.userIdentity
-                } else if (provider.userID == 5261 || provider.userID == 10947 || provider.userID == 11579) {
+                } else if (provider.userId == 5261 || provider.userId == 10947 || provider.userId == 11579) {
                     state.identity = 1
-                } else {
+                } else if(provider.firstClubType == 1) {
+                    state.identity = 5
+                }else{
                     state.identity = 0
                 }
             }