Browse Source

促销活动标签对协销可见度控制

zhengjinyi 3 years ago
parent
commit
f0bc8320f1

+ 6 - 6
components/cm-module/creatOrder/sellerClubVisible.vue

@@ -43,15 +43,14 @@ export default {
 			isIphoneX: this.$store.state.isIphoneX,
 			popupShow: false,
 			orderVisibleText: '可见',
-			orderVisibleValue: 1,
+			orderVisibleValue: '1',
 			items: [
 				{
-					value: 1,
+					value: '1',
 					name: '可见',
-					checked: 'true'
 				},
 				{
-					value: 2,
+					value: '2',
 					name: '不可见'
 				}
 			],
@@ -63,13 +62,14 @@ export default {
 		showPopup() {
 			this.popupShow = true
 		},
-		radioChange: function(evt) {
+		radioChange(evt) {
+			console.log('radioChange',evt)
 			for (let i = 0; i < this.items.length; i++) {
 				if (this.items[i].value === evt.detail.value) {
 					this.current = i
 					this.orderVisibleText = this.items[i].name
 					this.orderVisibleValue = Number(this.items[i].value)
-					break
+					console.log('orderVisibleText',this.orderVisibleText)
 				}
 			}
 		},

+ 15 - 4
components/cm-module/listTemplate/buyagainList.vue

@@ -142,10 +142,7 @@ export default {
 	created() {
 		this.setScrollHeight()
 		this.$parent.getClubProductNum()
-		this.$api.getComStorage('orderUserInfo').then(resolve => {
-			this.userId = resolve.userId
-			this.getProductAgainInfo(false)
-		})
+		this.initGetStotage()
 	},
 	filters: {
 		NumFormat: function(text) {
@@ -157,6 +154,19 @@ export default {
 		...mapState(['hasLogin', 'userInfo'])
 	},
 	methods: {
+		async initGetStotage() {
+			// 初始化
+			const userInfo = await this.$api.getStorage()
+			const clubInfo = await this.$api.getComStorage('orderUserInfo')
+			this.userId = clubInfo.userId ? userInfo.userId : 0
+			if (userInfo.userIdentity == 1) {
+				this.actasFlag = userInfo.userIdentity
+			} else {
+				this.actasFlag = 2
+			}
+			console.log('actasFlag', this.actasFlag)
+			this.getProductAgainInfo(false)
+		},
 		scrolltolower() {
 			if (this.hasNextPage && this.pullFlag) {
 				this.getProductAgainInfo(true)
@@ -176,6 +186,7 @@ export default {
 				this.pageNum += 1
 			}
 			this.ProductService.GetRepeatBuyAgainProductList({
+				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				pageNum: this.pageNum,
 				pageSize: this.pageSize

+ 10 - 15
components/cm-module/listTemplate/immediatelyList.vue

@@ -280,7 +280,7 @@ export default {
 			isShowEmpty: false,
 			isShowEmptyText: '搜索相关商品',
 			clubUserId: '',
-			identity: '',
+			identity: 0,
 			isFocus: false,
 			scrollHeight: '',
 			listData: [],
@@ -308,20 +308,7 @@ export default {
 	},
 	created() {
 		this.setScrollHeight()
-		this.$api
-			.getComStorage('userInfo')
-			.then(resolve => {
-				if (resolve.userIdentity == 1) {
-					this.identity = 1
-				}
-			})
-			.catch(error => {
-				console.log(error)
-			})
-		this.$api.getComStorage('orderUserInfo').then(resolve => {
-			this.clubUserId = resolve.userId
-		})
-		this.getProductAgainInfo()
+		this.initGetStotage()	
 		this.isFocus = true
 	},
 	filters: {
@@ -334,6 +321,13 @@ export default {
 		...mapState(['hasLogin', 'userInfo'])
 	},
 	methods: {
+		async initGetStotage() {// 初始化
+			const userInfo = await this.$api.getStorage()
+			const clubInfo = await this.$api.getComStorage('orderUserInfo')
+			this.identity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.clubUserId = clubInfo.clubId ? clubInfo.clubId : 0
+			this.getProductAgainInfo()
+		},
 		scrolltolower(tabIndex) {
 			if (tabIndex == 0) {
 				if (this.totalPage > this.listData.length && this.pullFlag) {
@@ -415,6 +409,7 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
+				flag:this.identity, //查询促销标记 1协销 2机构 3供应商
 				userId: this.clubUserId,
 				productIds: productIds,
 				source: 2

+ 351 - 302
components/cm-module/listTemplate/productList.vue

@@ -1,26 +1,50 @@
 <template>
-	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
-		<list-skeleton v-if="showSkeleton" :listType='0'></list-skeleton>
+	<view
+		class="container commodity-list-wrapper"
+		:style="{ overflow: showSkeleton ? 'hidden' : 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
+	>
+		<list-skeleton v-if="showSkeleton" :listType="0"></list-skeleton>
 		<view class="product-container" v-if="!isShowEmpty">
-			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="productList.length > 0">
-				<view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productId)">
-					<image mode='widthFix' :src="item.image"  class="list-img" alt="list-img"></image>
+			<scroll-view
+				:style="{ height: scrollHeight + 'px' }"
+				@scrolltolower="scrolltolower"
+				scroll-y
+				v-if="productList.length > 0"
+			>
+				<view
+					v-for="(item, index) in productList"
+					:key="index"
+					:id="item.id"
+					class="all-type-list-content commodity-list"
+					@click.stop="navToDetailPage(item.productId)"
+				>
+					<image mode="widthFix" :src="item.image" class="list-img" alt="list-img"></image>
 					<view class="list-details-info">
-						<text class="list-details-title">{{item.name}}</text>
-						<text class="list-details-specs">规格:{{item.unit !=null ? item.unit : ''}}</text>
-						<text class="list-details-miniQuantity">起订量:{{ item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
+						<text class="list-details-title">{{ item.name }}</text>
+						<text class="list-details-specs">规格:{{ item.unit != null ? item.unit : '' }}</text>
+						<text class="list-details-miniQuantity"
+							>起订量:{{ 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>
 						<view class="list-details-price" v-else>
 							<view class="list-shop">
 								<view class="list-price-none" v-if="item.repurchaseFlag == 1">
-									<text class="price-none">¥{{item.originalPrice}}</text>
+									<text class="price-none">¥{{ item.originalPrice }}</text>
 									<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
 								</view>
 								<view class="list-price" v-else>
-									<text class="price-larger" :class="PromotionsFormat(item.promotions) || item.svipProductFlag == 1 ? 'none' : ''">
-										¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat }}
+									<text
+										class="price-larger"
+										:class="
+											PromotionsFormat(item.promotions) || item.svipProductFlag == 1 ? 'none' : ''
+										"
+									>
+										¥{{
+											(PromotionsFormat(item.promotions) ? item.originalPrice : item.price)
+												| NumFormat
+										}}
 									</text>
 								</view>
 							</view>
@@ -29,380 +53,405 @@
 						<view class="list-details-price">
 							<view class="floor-item-act">
 								<view class="coupon-tags" v-if="item.couponsLogo">优惠券</view>
-								<template v-if="item.actStatus==1">
+								<template v-if="item.actStatus == 1">
 									<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
-										{{item.promotions.name}}<text>:¥{{ item.price | NumFormat }}</text>
+										{{ item.promotions.name }}<text>:¥{{ item.price | NumFormat }}</text>
 									</view>
-									<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+									<view class="floor-tags" v-else>{{ item.promotions.name }}</view>
 								</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">SVIP</view>
+										<view class="price">{{ item.svipPriceTag }}</view>
 									</view>
 								</template>
 							</view>
-						</view>	
+						</view>
 					</view>
 				</view>
 				<button class="show-more-btn" v-if="showRegularBtn" @click="getListFromServer(true)">查看更多</button>
 				<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
-					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
-					<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
+					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
+						>{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
+					>
+					<view class="loading-wrapper loading-wrapper-btm" v-else
+						>———<text class="btm-text">已至底部</text>———</view
+					>
 				</view>
 			</scroll-view>
 		</view>
 		<view class="empty-container" v-else>
-			<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
+			<image
+				class="empty-container-image"
+				src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png"
+				mode="aspectFit"
+			></image>
 			<text class="error-text">您还没有购买过任何商品哟~</text>
 			<button class="submit-btn toIndexPage" @click="toIndexPage">去逛逛</button>
 		</view>
 		<!-- 可拖动悬浮按钮 -->
-		<cm-drag v-if="!isShowEmpty"
-				 :cartNum="cartQuantity" 
-				 :isDock="true"
-				 :existTabBar="true" 
-				 @btnClick="btnClick" 
-				 @btnTouchstart="btnTouchstart" 
-				 @btnTouchend="btnTouchend">
-		</cm-drag>		
+		<cm-drag
+			v-if="!isShowEmpty"
+			:cartNum="cartQuantity"
+			:isDock="true"
+			:existTabBar="true"
+			@btnClick="btnClick"
+			@btnTouchstart="btnTouchstart"
+			@btnTouchend="btnTouchend"
+		>
+		</cm-drag>
 		<!-- 透明模态层 -->
-		<modal-layer v-if='isModallayer'></modal-layer>
+		<modal-layer v-if="isModallayer"></modal-layer>
 	</view>
 </template>
 
 <script>
-	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
-	import modalLayer from '@/components/modal-layer'
-	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import cmDrag from '@/components/cm-custom/cm-drag.vue'
-	import { mapState,mapMutations } from 'vuex'
-	export default{
-		name:'productList',
-		components:{
-			listSkeleton,
-			modalLayer,
-			uniStars,
-			cmDrag
-		},
-		props: {
-			emptyText: {
-				type: String
-			},
-		},
-		data(){
-			return{
-				isModallayer:false,
-				windowHeight: '',
-				showSkeleton: true,
-				isShowEmpty: false,
-				userId: '',
-				scrollHeight: '',
-				productList: [],
-				showLoading: false,
-				loadingNow: true,
-				loadingText: '上拉加载更多',
-				pageSize: 10,
-				pageNum: 1,
-				hasNextPage: false,
-				pullFlag: true,
-				fromRegularPurchasePage: false,
-				cartQuantity: 0,
-				showRegularBtn: false,
-				isPrecedence:false
+import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
+import modalLayer from '@/components/modal-layer'
+import uniStars from '@/components/uni-stars/uni-stars.vue'
+import cmDrag from '@/components/cm-custom/cm-drag.vue'
+import { mapState, mapMutations } from 'vuex'
+export default {
+	name: 'productList',
+	components: {
+		listSkeleton,
+		modalLayer,
+		uniStars,
+		cmDrag
+	},
+	props: {
+		emptyText: {
+			type: String
+		}
+	},
+	data() {
+		return {
+			isModallayer: false,
+			windowHeight: '',
+			showSkeleton: true,
+			isShowEmpty: false,
+			userId: 0,
+			actasFlag: 0,
+			scrollHeight: '',
+			productList: [],
+			showLoading: false,
+			loadingNow: true,
+			loadingText: '上拉加载更多',
+			pageSize: 10,
+			pageNum: 1,
+			hasNextPage: false,
+			pullFlag: true,
+			fromRegularPurchasePage: false,
+			cartQuantity: 0,
+			showRegularBtn: false,
+			isPrecedence: false
+		}
+	},
+	created() {
+		this.setScrollHeight()
+		this.initGetStotage()
+	},
+	filters: {
+		NumFormat: function(text) {
+			//处理金额
+			return Number(text).toFixed(2)
+		}
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity'])
+	},
+	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.getProductAgainInfo()
+			this.GetUserCartNumber()
 		},
-		created() {
-			this.setScrollHeight()		
-			this.$api.getStorage().then((resolve) =>{
-				this.userId = resolve.userId ? resolve.userId : 0
-				this.getProductAgainInfo()
-				this.GetUserCartNumber()
-			})
-		},
-		filters: {
-			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2)
-			},
+		scrolltolower() {
+			if (this.hasNextPage && this.pullFlag) {
+				this.getProductAgainInfo(true)
+			}
 		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity'])
+		setScrollHeight() {
+			const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
+			this.windowHeight = windowHeight - 1
+			this.scrollHeight = windowHeight - 1
 		},
-		methods:{
-			scrolltolower() {
-				if(this.hasNextPage && this.pullFlag) {
-					this.getProductAgainInfo(true)
-				}
-			},
-			setScrollHeight() {
-				const {windowHeight, pixelRatio} = wx.getSystemInfoSync()
-				this.windowHeight = windowHeight - 1
-				this.scrollHeight = windowHeight - 1
-			},
-			getProductAgainInfo(loadMore) {
-				this.showLoading = true
-				this.loadingNow = true
-				this.loadingText = '加载中'
-				this.isShowEmpty = false				
-				if(loadMore) {this.pageNum += 1}
-				this.ProductService.GetRepeatBuyAgainProductList(
-					{
-						userId:this.userId,
-						identity:this.identity,
-						pageNum:this.pageNum,
-						pageSize:this.pageSize,
-					}
-				)
-				.then(response =>{
+		getProductAgainInfo(loadMore) {
+			this.showLoading = true
+			this.loadingNow = true
+			this.loadingText = '加载中'
+			this.isShowEmpty = false
+			if (loadMore) {
+				this.pageNum += 1
+			}
+			this.ProductService.GetRepeatBuyAgainProductList({
+				flag: this.actasFlag, //查询促销标记 1协销 2机构 3供应商
+				userId: this.userId,
+				identity: this.identity,
+				pageNum: this.pageNum,
+				pageSize: this.pageSize
+			})
+				.then(response => {
 					this.isShowWrapper = true
 					this.cartQuantity = response.data.cartQuantity
 					const listData = response.data.results
-					if(listData && listData.length > 0){
+					if (listData && listData.length > 0) {
 						this.hasNextPage = response.data.hasNextPage
 						this.isShowEmpty = false
-						if(loadMore) {
-							this.productList = [...this.productList,...listData]
+						if (loadMore) {
+							this.productList = [...this.productList, ...listData]
 						} else {
 							this.productList = listData
 							this.showSkeleton = false
 						}
 						//价格显示处理
-						let isActFlg,newProductList=[]
-						this.productList.map((item, index)=> {
-							if(item.actStatus == 1){
+						let isActFlg,
+							newProductList = []
+						this.productList.map((item, index) => {
+							if (item.actStatus == 1) {
 								isActFlg = true
-							}else if(item.actStatus == 1 && item.ladderPriceFlag == '1'){
+							} else if (item.actStatus == 1 && item.ladderPriceFlag == '1') {
 								isActFlg = true
-							}else{
+							} else {
 								isActFlg = false
 							}
-							newProductList.push(Object.assign({},item,{isShowActFlg:isActFlg}))
+							newProductList.push(Object.assign({}, item, { isShowActFlg: isActFlg }))
 						})
 						this.productList = newProductList
 						// 防上拉暴滑
 						this.pullFlag = false
-						setTimeout(()=>{
+						setTimeout(() => {
 							this.pullFlag = true
-						},500)
+						}, 500)
 						// 底部提示文案
-						if(this.hasNextPage) {
+						if (this.hasNextPage) {
 							this.loadingText = '上拉加载更多'
 						} else {
 							this.showLoading = true
 							this.loadingNow = false
 						}
 					} else {
-						if(!loadMore) {
+						if (!loadMore) {
 							this.isShowEmpty = true
 						}
 					}
-				}).catch(response =>{
-					this.$util.msg(response.msg,2000)
 				})
-			},
-			GetUserCartNumber() {
-				this.UserService.GetUserCartNumber({ userId: this.userId })
-					.then(response => {
-						this.cartQuantity = response.data.length
-					})
-					.catch(error => {
-						console.log('查询用户购物车数量失败')
-					})
-			},
-			operationHanld(prop){
-				this.$emit('operationConfim',prop)
-			},
-			navToDetailPage(id) {
-				this.isModallayer = true
-				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
-				this.isModallayer = false
-			},
-			toIndexPage() {
-				uni.switchTab({
-					url: '/pages/tabBar/home/index' 
+				.catch(response => {
+					this.$util.msg(response.msg, 2000)
 				})
-			},
-			repurchModel(){
-				this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
-			},
-			PromotionsFormat(promo){//促销活动类型数据处理
-				if(promo!=null){
-					if(promo.type == 1 && promo.mode == 1){
-						return true
-					}else{
-						return false
-					}
+		},
+		GetUserCartNumber() {
+			this.OrderService.ShoppingCartCount({ userId: this.userId })
+				.then(response => {
+					this.cartQuantity = response.data
+				})
+				.catch(error => {
+					console.log('查询用户购物车数量失败')
+				})
+		},
+		operationHanld(prop) {
+			this.$emit('operationConfim', prop)
+		},
+		navToDetailPage(id) {
+			this.isModallayer = true
+			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			this.isModallayer = false
+		},
+		toIndexPage() {
+			uni.switchTab({
+				url: '/pages/tabBar/home/index'
+			})
+		},
+		repurchModel() {
+			this.$util.modal('', '此商品的价格有变化,原来的购买价已不适用', '知道了', '', false, () => {})
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
 				}
-				return false
-			},
-			btnClick() {
-				this.$api.navigateTo('/pages/goods/cart')
-			},
-			btnTouchstart() {
-				// console.log('btnTouchstart');
-			},
-			btnTouchend() {
-				// console.log('btnTouchend');
 			}
+			return false
+		},
+		btnClick() {
+			this.$api.navigateTo('/pages/goods/cart')
+		},
+		btnTouchstart() {
+			// console.log('btnTouchstart');
+		},
+		btnTouchend() {
+			// console.log('btnTouchend');
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.commodity-list-wrapper {
-		scroll-view {
-			height: 100%;
-			border-top: 2rpx solid rgba(0,0,0,0.07);
-		}
-		.empty-container-image {
-			margin-top: -300rpx;
-		}
-		.toIndexPage {
-			bottom: 390rpx;
-		}
-		.show-more-btn {
-			width: 276rpx;
-			height: 52rpx;
-			line-height: 52rpx;
-			border: 2rpx solid #D8D8D8;
-			background: #F7F7F7;
-			font-size: 26rpx;
-			margin: 26rpx 0;
-			position: absolute;
-			left: 50%;
-			margin-left: -138rpx;
-		}
+.commodity-list-wrapper {
+	scroll-view {
+		height: 100%;
+		border-top: 2rpx solid rgba(0, 0, 0, 0.07);
 	}
-	.all-type-list-content {
-		height: auto;
-		padding: 24rpx;
-		background: #fff;
-		margin-bottom: 2rpx;
-		display: flex;
-		flex-direction: row;
-		box-sizing: content-box;
-		.list-img {
-			width: 240rpx;
-			height: 240rpx !important;
-			margin-right: 26rpx;
-			border-radius: 10rpx;
-			border: 2rpx solid #f3f3f3;
-		}
+	.empty-container-image {
+		margin-top: -300rpx;
+	}
+	.toIndexPage {
+		bottom: 390rpx;
 	}
-	.list-details-info {
-		width: 442rpx;
-		flex-direction: column;
+	.show-more-btn {
+		width: 276rpx;
+		height: 52rpx;
+		line-height: 52rpx;
+		border: 2rpx solid #d8d8d8;
+		background: #f7f7f7;
 		font-size: 26rpx;
-		position: relative;
-		.list-details-title {
-			line-height: 38rpx;
-			text-overflow: ellipsis;
-			overflow: hidden;
-			display: -webkit-box;
-			-webkit-line-clamp: 2;
-			line-clamp: 2;
-			-webkit-box-orient: vertical;
-		}
-		.list-details-specs {
-			width: 100%;
-			display: inline-block;
-			margin-top: 8rpx;
-			color: #999999;
-		}
-		.list-details-miniQuantity {
-			width: 100%;
-			display: inline-block;
-			margin-top: 7rpx;
-		}
+		margin: 26rpx 0;
+		position: absolute;
+		left: 50%;
+		margin-left: -138rpx;
+	}
+}
+.all-type-list-content {
+	height: auto;
+	padding: 24rpx;
+	background: #fff;
+	margin-bottom: 2rpx;
+	display: flex;
+	flex-direction: row;
+	box-sizing: content-box;
+	.list-img {
+		width: 240rpx;
+		height: 240rpx !important;
+		margin-right: 26rpx;
+		border-radius: 10rpx;
+		border: 2rpx solid #f3f3f3;
+	}
+}
+.list-details-info {
+	width: 442rpx;
+	flex-direction: column;
+	font-size: 26rpx;
+	position: relative;
+	.list-details-title {
+		line-height: 38rpx;
+		text-overflow: ellipsis;
+		overflow: hidden;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		line-clamp: 2;
+		-webkit-box-orient: vertical;
 	}
-	.list-details-price {
+	.list-details-specs {
 		width: 100%;
-		line-height: 54rpx;
+		display: inline-block;
+		margin-top: 8rpx;
+		color: #999999;
+	}
+	.list-details-miniQuantity {
+		width: 100%;
+		display: inline-block;
+		margin-top: 7rpx;
+	}
+}
+.list-details-price {
+	width: 100%;
+	line-height: 54rpx;
+	float: left;
+	.floor-item-act {
+		height: 54rpx;
+		text-align: center;
+		box-sizing: border-box;
 		float: left;
-		.floor-item-act{
-			height: 54rpx;
-			text-align: center;
-			box-sizing: border-box;
+		padding: 11rpx 0;
+	}
+	.price-icon {
+		width: 22rpx;
+		height: 28rpx;
+		vertical-align: middle;
+		margin-right: 10rpx;
+	}
+	.price-icon + text {
+		font-size: 25rpx;
+		vertical-align: middle;
+	}
+	.list-login-now {
+		width: 375rpx;
+		color: #f8c499;
+		position: absolute;
+		bottom: 0;
+		.p-no {
 			float: left;
-			padding: 11rpx 0;
-		}
-		.price-icon {
-			width: 22rpx;
-			height: 28rpx;
-			vertical-align: middle;
+			font-size: $font-size-24;
+			color: $color-system;
 			margin-right: 10rpx;
 		}
-		.price-icon + text {
-			font-size: 25rpx;
-			vertical-align: middle;
-		}
-		.list-login-now {
-			width: 375rpx;
-			color: #F8C499;
-			position: absolute;
-			bottom: 0;
-			.p-no{
-				float: left;
-				font-size: $font-size-24;
-				color: $color-system;
-				margin-right: 10rpx;
-			}
-		}
-		.login-now {
-			padding: 10rpx 10rpx 10rpx 0;
-		}
-		.list-none{
-			margin-top: 30rpx;
-			.price-small{
-				font-size:$font-size-24;
-				line-height: 40rpx;
-				color: #FF2A2A;
-			}
+	}
+	.login-now {
+		padding: 10rpx 10rpx 10rpx 0;
+	}
+	.list-none {
+		margin-top: 30rpx;
+		.price-small {
+			font-size: $font-size-24;
+			line-height: 40rpx;
+			color: #ff2a2a;
 		}
-		.list-shop{
-			height: auto;
+	}
+	.list-shop {
+		height: auto;
+		float: left;
+		.list-price {
+			width: 100%;
+			color: #ff2a2a;
 			float: left;
-			.list-price {
-				width: 100%;
-				color: #FF2A2A;
-				float: left;
-				line-height:54rpx ;
-				align-items: center;
-				justify-content: center;
-				.price-larger {
-					font-size: $font-size-30;
-					display: inline-block;
-					&.none{
-						text-decoration: line-through;
-						color: #999999;
-					}
-				}
-			}
-			.list-price-none{
-				width: 100%;
-				.price-none{
+			line-height: 54rpx;
+			align-items: center;
+			justify-content: center;
+			.price-larger {
+				font-size: $font-size-30;
+				display: inline-block;
+				&.none {
 					text-decoration: line-through;
 					color: #999999;
-					display: inline-block;
-				}
-				.icon-wenhao{
-					font-size: $font-size-32;
-					color: #0091FF;
-					margin-left: 6rpx;
 				}
 			}
 		}
-		.add-cart-btn {
-			float: right;
-			width: 140rpx;
-			height: 54rpx;
-			line-height: 54rpx;
-			border-radius: 27rpx;
-			color: #fff;
-			font-size: 24rpx;
-			margin-right: 0;
-			background:#FFFFFF;
-			border: 1px solid #C9C9C9;
-			color: $text-color;
+		.list-price-none {
+			width: 100%;
+			.price-none {
+				text-decoration: line-through;
+				color: #999999;
+				display: inline-block;
+			}
+			.icon-wenhao {
+				font-size: $font-size-32;
+				color: #0091ff;
+				margin-left: 6rpx;
+			}
 		}
 	}
+	.add-cart-btn {
+		float: right;
+		width: 140rpx;
+		height: 54rpx;
+		line-height: 54rpx;
+		border-radius: 27rpx;
+		color: #fff;
+		font-size: 24rpx;
+		margin-right: 0;
+		background: #ffffff;
+		border: 1px solid #c9c9c9;
+		color: $text-color;
+	}
+}
 </style>

+ 3 - 3
pages/goods/good-floor-temp.vue

@@ -51,7 +51,7 @@ export default {
 	},
 	data() {
 		return {
-			userID: 0,
+			userId: 0,
 			shopId: 0,
 			userIdentity: 0,
 			skeletonShow: true,
@@ -83,7 +83,7 @@ export default {
 		this.$api
 			.getComStorage('userInfo')
 			.then(resolve => {
-				this.userID = resolve.userId ? resolve.userId : 0
+				this.userId = resolve.userId ? resolve.userId : 0
 				this.shopId = resolve.shopId ? resolve.shopId : 0
 				this.userIdentity = resolve.userIdentity
 				this.GetInstrumentPageData()
@@ -103,7 +103,7 @@ export default {
 			//获取楼层数据
 			this.CommonService.GetInstrumentPageData({
 				pageId: this.pageId,
-				userId: this.userID,
+				userId: this.userId,
 				source: 2
 			})
 				.then(response => {

+ 135 - 129
pages/goods/good-floorMore.vue

@@ -1,171 +1,177 @@
 <template>
 	<view class="container floor clearfix">
-		<view class='navbar-wrap'> 
+		<view class="navbar-wrap">
 			<view class="gosearch-btn" @click="this.$api.navigateTo(clickPath)">
-				<view class="search-icon">
-					<text class="iconfont icon-iconfonticonfontsousuo1"></text>
-				</view>
-				<view class="search-text">{{hotSearchText}}</view>
+				<view class="search-icon"> <text class="iconfont icon-iconfonticonfontsousuo1"></text> </view>
+				<view class="search-text">{{ hotSearchText }}</view>
 			</view>
 		</view>
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
 		<!-- 楼层 -->
 		<view class="container-section tui-skeleton">
 			<template v-if="pageData.floorContent.templateType == '1'">
 				<templateA :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateA>
-			</template>	 
+			</template>
 			<template v-if="pageData.floorContent.templateType == '2'">
 				<templateB :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateB>
-			</template>	 
+			</template>
 			<template v-if="pageData.floorContent.templateType == '3'">
 				<templateC :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateC>
-			</template>	 
+			</template>
 			<template v-if="pageData.floorContent.templateType == '4'">
 				<templateD :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateD>
-			</template>	 
+			</template>
 			<template v-if="pageData.floorContent.templateType == '5' || pageData.floorContent.templateType == '6'">
 				<templateE :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateE>
-			</template>	 
+			</template>
 			<template v-if="pageData.floorContent.templateType == '7'">
 				<templateF :pageData="pageData" :userIdentity="userIdentity" v-if="isRequest"></templateF>
-			</template>	 
+			</template>
 		</view>
 	</view>
 </template>
 
 <script>
-	import { mapState,mapMutations} from 'vuex';
-	import templateA from '@/components/cm-module/pageFloorTemplate/templateA.vue'
-	import templateB from '@/components/cm-module/pageFloorTemplate/templateB.vue'
-	import templateC from '@/components/cm-module/pageFloorTemplate/templateC.vue'
-	import templateD from '@/components/cm-module/pageFloorTemplate/templateD.vue'
-	import templateE from '@/components/cm-module/pageFloorTemplate/templateE.vue'
-	import templateF from '@/components/cm-module/pageFloorTemplate/templateF.vue'
-	export default{
-		components:{
-			templateA,
-			templateB,
-			templateC,
-			templateD,
-			templateE,
-			templateF
-		},
-		data(){
-			return{
-				clickPath:'/pages/search/search',
-				hotSearchText:'搜索商品/项目仪器',	
-				userIdentity:0,
-				skeletonShow:true,
-				isRequest:false,
-				navBarsList:[],
-				pageData:{},//楼层
-				floorId:null,
-				pageType:null
-			}
-		},
-		onLoad(option) {
-			this.pageType = option.pageType
-			this.floorId = Number(option.floorId)
-			uni.setNavigationBarTitle({title:option.title});
-			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userId ? resolve.userId : 0;
-				this.shopId = resolve.shopId ? resolve.shopId : 0;
-				this.userIdentity = resolve.userIdentity
-				this.GetHomeFloorContentDetails(this.pageType);
-			}).catch(error =>{
-				this.GetHomeFloorContentDetails(this.pageType);
-			})
-		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity'])
+import { mapState, mapMutations } from 'vuex'
+import templateA from '@/components/cm-module/pageFloorTemplate/templateA.vue'
+import templateB from '@/components/cm-module/pageFloorTemplate/templateB.vue'
+import templateC from '@/components/cm-module/pageFloorTemplate/templateC.vue'
+import templateD from '@/components/cm-module/pageFloorTemplate/templateD.vue'
+import templateE from '@/components/cm-module/pageFloorTemplate/templateE.vue'
+import templateF from '@/components/cm-module/pageFloorTemplate/templateF.vue'
+export default {
+	components: {
+		templateA,
+		templateB,
+		templateC,
+		templateD,
+		templateE,
+		templateF
+	},
+	data() {
+		return {
+			userId: 0,
+			clickPath: '/pages/search/search',
+			hotSearchText: '搜索商品/项目仪器',
+			userIdentity: 0,
+			skeletonShow: true,
+			isRequest: false,
+			navBarsList: [],
+			pageData: {}, //楼层
+			floorId: null,
+			pageType: null
+		}
+	},
+	onLoad(option) {
+		this.floorId = Number(option.floorId)
+		uni.setNavigationBarTitle({ title: option.title })
+		this.initGetStotage(option.pageType)
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity'])
+	},
+	methods: {
+		async initGetStotage(pageType) {
+			// 初始化
+			const userInfo = await this.$api.getStorage()
+			this.userId = userInfo.userId ? userInfo.userId : 0
+			this.shopId = userInfo.shopId ? userInfo.shopId : 0
+			this.userIdentity = userInfo.userIdentity
+			this.GetHomeFloorContentDetails(pageType)
 		},
-		methods:{
-			GetHomeFloorContentDetails(pageType){//楼层查看更多
-				if(pageType == '1'){
-					this.CommonService.GetHomeFloorContentDetails({userId:this.userID,floorId:this.floorId,source:2}).then(response =>{
+		GetHomeFloorContentDetails(pageType) {
+			//楼层查看更多
+			if (pageType == '1') {
+				this.CommonService.GetHomeFloorContentDetails({ userId: this.userId, floorId: this.floorId, source: 2 })
+					.then(response => {
 						this.pageData = response.data
 						this.skeletonShow = false
 						this.isRequest = true
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
 					})
-				}else{
-					this.CommonService.GePageFloorContentDetails({userId:this.userID,centreId:this.floorId,source:2}).then(response =>{
+					.catch(error => {
+						this.$util.msg(error.msg, 2000)
+					})
+			} else {
+				this.CommonService.GePageFloorContentDetails({ userId: this.userId, centreId: this.floorId, source: 2 })
+					.then(response => {
 						this.pageData = response.data
 						this.skeletonShow = false
 						this.isRequest = true
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
 					})
-				}
+					.catch(error => {
+						this.$util.msg(error.msg, 2000)
+					})
 			}
-		},
-		onPullDownRefresh() {
-			setTimeout(() => {
-				this.GetHomeFloorContentDetails(this.pageType);
-				uni.stopPullDownRefresh()
-			}, 200)
-		},
-		onShow() {
-			
 		}
-	}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.GetHomeFloorContentDetails(this.pageType)
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShow() {}
+}
 </script>
 
 <style lang="scss">
-	page{
-		background-color: #FFFFFF;
-	}
-	.container-home{
-		width: 100%;
-		height: auto;
-	}
-	.container-section{
+page {
+	background-color: #ffffff;
+}
+.container-home {
+	width: 100%;
+	height: auto;
+}
+.container-section {
+	width: 100%;
+	height: auto;
+	background-color: #f7f7f7;
+	box-sizing: border-box;
+	padding: 24rpx;
+}
+.navbar-wrap {
+	width: 100%;
+	height: 116rpx;
+	box-sizing: border-box;
+	background: #ffffff;
+	padding: 25rpx 24rpx;
+	.gosearch-btn {
 		width: 100%;
-		height: auto;
-		background-color: #F7F7F7;
+		height: 100%;
+		border-radius: 40rpx;
+		font-size: 28rpx;
+		line-height: 66rpx;
+		color: #8a8a8a;
+		background: #f7f7f7;
+		position: relative;
 		box-sizing: border-box;
-		padding:24rpx;
-	}
-	.navbar-wrap {
-		 width: 100%;
-		 height: 116rpx;
-		 box-sizing: border-box;
-		 background: #FFFFFF;
-		 padding: 25rpx 24rpx;
-		 .gosearch-btn{
-		 	width: 100%;
-		 	height: 100%;
-		 	border-radius: 40rpx;
-		 	font-size: 28rpx;
-		 	line-height: 66rpx;
-		 	color: #8A8A8A;
-		 	background: #f7f7f7;
-		 	position: relative;
-		 	box-sizing: border-box;
-		 	padding-left: 66rpx;
-		 	.search-icon{
-		 		width: 66rpx;
-		 		height: 66rpx;
-		 		position:absolute ;
-		 		left: 0;
-		 		top: 2rpx;
-		 		text-align: center;
-		 		line-height: 66rpx;
-		 		.icon-iconfonticonfontsousuo1{
-		 			margin:0 6rpx;
-		 			font-size: $font-size-34;
-		 			color: #8A8A8A;
-		 			z-index: 10;
-		 		}
-		 	}
-		 	.search-text{
-		 		font-size: $font-size-24;
-		 		line-height: 66rpx;
-		 		color: #8A8A8A;
-		 	}
-		 }
+		padding-left: 66rpx;
+		.search-icon {
+			width: 66rpx;
+			height: 66rpx;
+			position: absolute;
+			left: 0;
+			top: 2rpx;
+			text-align: center;
+			line-height: 66rpx;
+			.icon-iconfonticonfontsousuo1 {
+				margin: 0 6rpx;
+				font-size: $font-size-34;
+				color: #8a8a8a;
+				z-index: 10;
+			}
+		}
+		.search-text {
+			font-size: $font-size-24;
+			line-height: 66rpx;
+			color: #8a8a8a;
+		}
 	}
+}
 </style>
-                               

+ 17 - 15
pages/goods/goods-active.vue

@@ -53,13 +53,12 @@ export default {
 	data() {
 		return {
 			isRepuest: false,
-			userID: 0,
+			userId: 0,
+			actasFlag:2,
 			promotionsId: 0,
 			productList: [],
 			pageSize: 10,
 			pageNum: 1,
-			loadding: false,
-			pullUpOn: true,
 			modal: false,
 			promotionsInfo: {},
 			loadding: false,
@@ -74,15 +73,7 @@ export default {
 	},
 	onLoad(option) {
 		this.promotionsId = option.id
-		this.$api
-			.getComStorage('userInfo')
-			.then(resolve => {
-				this.userID = resolve.userId ? resolve.userId : 0
-				this.initSsoMemberCollectionList()
-			})
-			.catch(error => {
-				this.initSsoMemberCollectionList()
-			})
+		this.initGetStotage()
 	},
 	filters: {
 		NumFormat: function(text) {
@@ -91,7 +82,17 @@ export default {
 		}
 	},
 	methods: {
-		initSsoMemberCollectionList(id) {
+		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.initSsoMemberCollectionList()
+		},
+		initSsoMemberCollectionList() {
 			//凑单初始化
 			this.ProductService.queryProductPromotionInfo({
 				promotionsId: this.promotionsId
@@ -105,7 +106,7 @@ export default {
 					this.$util.msg(error.message, 2000)
 				})
 		},
-		queryProductPromotionList(id) {
+		queryProductPromotionList() {
 			//查询凑单商品列表
 			this.ProductService.queryProductPromotionList({
 				identity: this.identity,
@@ -183,7 +184,8 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				userId: this.userID,
+				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
+				userId: this.userId,
 				productIds: productIds,
 				source: 2
 			})

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

@@ -433,6 +433,7 @@ export default {
 			userId: 0,
 			vipFlag: 0,
 			userIdentity: 0,
+			actasFlag:2,
 			listData: [],
 			brandLists: [
 				{ name: '斯蒂芬斯', isChecked: false },
@@ -516,6 +517,11 @@ 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()
@@ -616,6 +622,7 @@ 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

+ 24 - 27
pages/goods/product.vue

@@ -752,6 +752,24 @@ export default {
 		console.log('是iPhoneX', this.isIphoneX)
 	},
 	methods: {
+		async initGetStotage() {// 初始化
+			const userInfo = await this.$api.getStorage()
+			this.userId = this.couponParam.userId = userInfo.userId ? userInfo.userId : 0
+			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+			this.shopID = userInfo.shopId ? userInfo.shopId : 0
+			if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
+				this.isShowButton = true
+			} else {
+				this.isShowButton = false
+			}
+			if (isPreviewImg) {
+				isPreviewImg = false
+				return
+			} else {
+				this.initData()
+			}
+		},
 		initData() {
 			// 初始化商品详情查询
 			this.ProductService.QueryProductDetils({
@@ -838,8 +856,8 @@ export default {
 					// setTimeout(() => {
 					//     this.getSectionProps()
 					// }, 2000)
-					if (this.hasLogin) {
-						this.shoppingHeaderCartNumber()
+					if (this.hasLogin && this.userIdentity == 2 || this.userIdentity == 4) {
+						this.ProductCartNumber()
 					}
 					this.queryProductDetilsCoupons()
 					this.getCommodityCombinationList()
@@ -900,11 +918,11 @@ export default {
 					console.log('获取优惠券列表失败')
 				})
 		},
-		shoppingHeaderCartNumber() {
+		ProductCartNumber() {
 			// 获取用户购物车储量
-			this.ProductService.shoppingHeaderCartNumber({ userId: this.userId })
+			this.ProductService.ProductCartNumber({ userId: this.userId })
 				.then(response => {
-					this.bottomCartNumber = response.data.length
+					this.bottomCartNumber = response.data
 				})
 				.catch(error => {
 					console.log('获取购物车数量失败')
@@ -1356,28 +1374,7 @@ export default {
 	onShow() {
 		// 是否开启图片预览 true 不刷新调用接口 false刷新调用接口
 		if (!this.isPreviewImage) {
-			this.$api
-				.getStorage()
-				.then(resolve => {
-					this.userId = this.couponParam.userId = resolve.userId ? resolve.userId : ''
-					this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 0
-					this.vipFlag = resolve.vipFlag ? resolve.vipFlag : 0
-					this.shopID = resolve.shopId ? resolve.shopId : ''
-					if (this.userIdentity == 0 || this.userIdentity == 2 || this.userIdentity == 4) {
-						this.isShowButton = true
-					} else {
-						this.isShowButton = false
-					}
-					if (isPreviewImg) {
-						isPreviewImg = false
-						return
-					} else {
-						this.initData()
-					}
-				})
-				.catch(error => {
-					this.initData()
-				})
+			this.initGetStotage()
 		}
 		this.isPreviewImage = false
 	},

+ 11 - 13
pages/h5/activity/activity-floorMore.vue

@@ -117,29 +117,27 @@
 				pageData:{},//楼层
 				floorId:null,
 				pageType:null,
-				userID:'',
+				userId:0,
 				noSearch:['3','4','6','8','10'],
 				showSearch:true
 			}
 		},
 		onLoad(option) {
-			this.pageType = option.pageType
 			this.floorId = Number(option.floorId)
 			uni.setNavigationBarTitle({title:option.title})
-			this.$api.getComStorage('userInfo').then((resolve) =>{
-				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userId ? resolve.userId : 0
-				this.shopId = resolve.shopId ? resolve.shopId : 0
-				this.userIdentity = resolve.userIdentity
-				this.GetHomeFloorContentDetails(this.pageType)
-			}).catch(error =>{
-				this.GetHomeFloorContentDetails(this.pageType)
-			})
+			this.initGetStotage(option.pageType)
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo','identity'])
 		},
 		methods:{
+			async initGetStotage(pageType) {// 初始化
+				const userInfo = await this.$api.getStorage()
+				this.userId = userInfo.userId ? userInfo.userId : 0
+				this.shopId = userInfo.shopId ? userInfo.shopId : 0
+				this.userIdentity = userInfo.userIdentity
+				this.GetHomeFloorContentDetails(pageType)
+			},
 			checkShowSearch(templateType){
 				const result = this.noSearch.indexOf(templateType)
 				if(result !== -1){
@@ -150,7 +148,7 @@
 			},
 			GetHomeFloorContentDetails(pageType){//楼层查看更多
 				if(pageType == '1'){ //首页
-					this.CommonService.GetHomeFloorContentDetails({userId:this.userID,floorId:this.floorId,source:2}).then(response =>{
+					this.CommonService.GetHomeFloorContentDetails({userId:this.userId,floorId:this.floorId,source:2}).then(response =>{
 						this.pageData = response.data
 						this.skeletonShow = false
 						this.isRequest = true
@@ -158,7 +156,7 @@
 						this.$util.msg(error.msg,2000)
 					})
 				}else{  //二级页面楼层数据
-					this.CommonService.GePageFloorContentDetails({userId:this.userID,centreId:this.floorId,source:2}).then(response =>{
+					this.CommonService.GePageFloorContentDetails({userId:this.userId,centreId:this.floorId,source:2}).then(response =>{
 						this.pageData = response.data
 						this.skeletonShow = false
 						this.isRequest = true

+ 7 - 0
pages/search/search.vue

@@ -442,6 +442,7 @@ export default {
 			show: false,
 			vipFlag: 0,
 			userIdentity: 0,
+			actasFlag:2,
 			searchKeyType: 1,
 			tabIndex: 0,
 			rightDrawer: false,
@@ -523,6 +524,11 @@ 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()
@@ -657,6 +663,7 @@ export default {
 			})
 			this.productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
+				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
 				userId: this.userId,
 				productIds: this.productIds,
 				source: 2 // 来源 1 WWW 2 小程序

+ 1 - 1
pages/seller/order/create-order.vue

@@ -399,7 +399,7 @@
 			},
 			handleClubVisibleData(data){// 订单对机构是否可见
 				console.log('对机构是否可见',data)
-				this.confirmParam.orderSeen = data
+				this.confirmParam.orderSeen = Number(data) 
 			},
 			checkedBalabce(){//勾选使用余额
 				if(this.rebatecheck){

+ 1 - 1
pages/seller/order/order-details.vue

@@ -10,7 +10,7 @@
 		<view class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
 			<view class="status-text">
 				<view class="view-type">{{ information.status | TextFormat }}</view>
-				<view class="status-visible">订单对机构可见</view>
+				<view class="status-visible"> {{ information.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }} </view>
 				<view class="Rebate " v-if="information.rebateFlag == 1">返佣</view>
 				<text class="bage-buss btn" v-if="information.orderSubmitType == 3 || information.orderSubmitType == 4"
 					>协销</text

+ 12 - 5
pages/supplier/user/my-shop.vue

@@ -370,7 +370,7 @@ export default {
 	},
 	data() {
 		return {
-			userID: 0,
+			userId: 0,
 			supplierId: 0,
 			shopId: 0,
 			iconClass: 'icon-aixin',
@@ -388,7 +388,8 @@ export default {
 			bannerImageList: [],
 			recommendList: [],
 			productList: [],
-			userIdentity: '',
+			userIdentity: 0,
+			actasFlag:2,
 			listQuery: {
 				keyword: '',
 				pageSize: 10,
@@ -420,9 +421,14 @@ export default {
 		async initGetStotage(option) {
 			const userInfo = await this.$api.getStorage()
 			this.shopId = userInfo.shopId ? userInfo.shopId : 0
-			this.userID = userInfo.userId ? userInfo.userId : 0
+			this.userId = userInfo.userId ? userInfo.userId : 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.GetSupplierHomeBanner()
 			this.GetSupplierHomeDeatils()
@@ -514,7 +520,8 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				userId: this.userID,
+				flag:this.actasFlag, //查询促销标记 1协销 2机构 3供应商
+				userId: this.userId,
 				productIds: productIds,
 				source: 2
 			})
@@ -535,7 +542,7 @@ export default {
 			})
 			productIds = productIdArr.join(',')
 			this.ProductService.querySearchProductPrice({
-				userId: this.userID,
+				userId: this.userId,
 				productIds: productIds,
 				source: 2
 			})

+ 2 - 2
pages/user/regularPurchase/regularPurchase.vue

@@ -183,9 +183,9 @@ export default {
 				})
 		},
 		GetUserCartNumber() {
-			this.UserService.GetUserCartNumber({ userId: this.userId })
+			this.OrderService.ShoppingCartCount({ userId: this.userId })
 				.then(response => {
-					this.$refs.productList.cartQuantity = response.data.length
+					this.$refs.productList.cartQuantity = response.data
 				})
 				.catch(error => {
 					console.log('查询用户购物车数量失败')

+ 2 - 2
services/config.env.js

@@ -1,9 +1,9 @@
 let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-    // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
+    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 = 'http://192.168.2.75:18002'	 //超超联调地址
     // URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core.caimei365.com'
 }else{

+ 8 - 4
services/product.service.js

@@ -103,7 +103,11 @@ export default class ProductService {
 	 * @param:productIds 商品ID
 	 */
     queryProductDetilsRelevant (data = {}) {
-        return this.AjaxService.get({ url:'/product/detail/recommend', data, isLoading: false })
+        return this.AjaxService.get({ 
+            url:'/commodity/detail/recommend', 
+            data, 
+            isLoading: false ,
+        })
     }
 	
     /**
@@ -130,16 +134,16 @@ export default class ProductService {
             url:'/order/club/cart/add/bulk',
             data,
             isLoading: true ,
-			isHost:true
+            isHost:true
         })
     }
     /**
 	 * @查询购物车数量
 	 * @param:userId 用户ID(必填)
 	 */
-    shoppingHeaderCartNumber (data = {}) {
+    ProductCartNumber (data = {}) {
         return this.AjaxService.get({
-            url:'/shoppingCart/header/cart',
+            url:'/order/club/cart/count',
             data,
             isLoading: false ,
         })

+ 0 - 8
services/user.service.js

@@ -271,14 +271,6 @@ export default class UserService {
             isHost:true
         })
     }
-    /* 机构购物车简单列表*/
-    GetUserCartNumber (data = {}) {
-        return this.AjaxService.get({ 
-            url:'/shoppingCart/header/cart', 
-            data, 
-            isLoading: true ,
-        })
-    }
     /**
 	 *@协销帮机构注册 待注册列表
 	 *@param userId	协销用户userId