zhengjinyi 1 год назад
Родитель
Сommit
8abe8cb6bc

+ 12 - 12
components/cm-module/cm-ross/cm-ross-popup.vue

@@ -74,7 +74,7 @@ export default {
 			type: Boolean,
 			default: true
 		},
-		advertisement:{
+		advertisInfo:{
 			type: Object,
 			default: {}
 		}
@@ -84,7 +84,7 @@ export default {
 			userId: 0, // 用户Id
 			consultParams: {
 				ip:'',
-				shopId:'',
+				shopProductId:'',
 				createTime:'',
 				consultMobile: '',
 				consultName: '',
@@ -95,7 +95,7 @@ export default {
 		}
 	},
 	created() {
-		this.initData(this.advertisement)
+		this.initData(this.advertisInfo)
 	},
 	computed: {
 		...mapState(['hasLogin'])
@@ -105,7 +105,7 @@ export default {
 			const userInfo = await this.$api.getStorage()
 			this.userId = userInfo.userId ? userInfo.userId : 0
 			this.advertData = data
-			this.consultParams.shopId = data.shopId
+			this.consultParams.shopProductId = data.shopProductId
 		},
 		handleInputName(e) {
 			this.consultParams.name = e.detail.value
@@ -134,15 +134,15 @@ export default {
 			}
 			this.userInformationInsertRoos(this.consultParams)
 		},
-		userInformationInsertRoos(params){
+		async userInformationInsertRoos(params){
 			// 游客关闭广告弹窗
-			this.UserService.userInformationInsertRoos(params)
-				.then(response => {
-					this.$parent.showRossHtml = false
-				})
-				.catch(error => {
-					console.log('游客关闭广告弹窗失败~')
-				})
+			try{
+				await this.UserService.userInformationInsertRoos(params)
+				this.$parent.showRossHtml = false
+			}catch(e){
+				//TODO handle the exception
+				console.log('游客关闭广告弹窗失败~')
+			}
 		},
 		hidePopup() {
 			this.userInformationInsertRoos(this.consultParams)

+ 15 - 7
components/cm-module/homeIndex/customer.vue

@@ -37,7 +37,7 @@
 			<view class="swiper-banner-nav">
 				<scroll-view class="scroll-view_H" scroll-x="true">
 					<view class="tui-goods__item active">首页</view>
-					<view class="tui-goods__item" v-for="(navs, index) in navBarsList" @click="NavToDetailPage(navs)">
+					<view class="tui-goods__item" v-for="(navs, index) in navBarsList" @click="NavToDetailPage(navs,index)">
 						{{ navs.name }}
 					</view>
 				</scroll-view>
@@ -50,6 +50,7 @@
 		<tui-top-dropdown
 			backgroundColor="#FFFFFF"
 			:show="dropScreenShow"
+			:height="320"
 			:paddingbtm="10"
 			:translatey="dropScreenH"
 			@close="btnCloseDrop"
@@ -62,7 +63,7 @@
 						class="tui-drop-item tui-icon-middle"
 						v-for="(item, index) in navBarsList"
 						:key="index"
-						@tap.stop="NavToDetailPage(item)"
+						@tap.stop="NavToDetailPage(item,index)"
 						:data-index="index"
 					>
 						{{ item.name }}
@@ -148,12 +149,19 @@ export default {
                 url: '/pages/tabBar/home/index'
             })
         },
-		NavToDetailPage(item) {
-			//跳转
-			this.$api.FlooryNavigateTo(item)
+		NavToDetailPage(item,index) {//跳转
+			if(index === 3){
+				let linkPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2023/activity_02.html'
+				this.$api.navigateTo(`/pages/h5/activity/activity?link=${linkPath}&linkId=382`)
+			}else{
+				/**
+				 * 页面跳转
+				 **/
+				this.$api.FlooryNavigateTo(item)
+			}
 		},
 		showDropScreenShow(){
-			this.dropScreenShow = true
+			this.dropScreenShow = !this.dropScreenShow
 		},
 		btnCloseDrop(){
 			this.dropScreenShow = false
@@ -347,7 +355,7 @@ export default {
 	padding: 24rpx;
 	.tui-drop-item {
 		padding: 0 20rpx;
-		height: 56rpx;
+		height: 56rpx; 
 		float: left;
 		line-height: 56rpx;
 		background: #f5f5f5;

+ 4 - 50
components/cm-module/homeIndex/navbars.vue

@@ -81,13 +81,13 @@ export default {
 		float: left;
 		margin-bottom: 30rpx;
 		.icon {
-			width: 110rpx;
-			height: 110rpx;
+			width: 100rpx;
+			height: 100rpx;
 			margin: 0 auto;
 			position: relative;
 			.icon-image {
-				width: 110rpx;
-				height: 110rpx;
+				width: 100rpx;
+				height: 100rpx;
 				display: block;
 			}
 			.icon-new {
@@ -107,52 +107,6 @@ export default {
 			font-size: $font-size-26;
 			color: #666666;
 		}
-		.nav-cell-main {
-			width: 100%;
-			height: auto;
-			position: absolute;
-			right: 0;
-			.nav-cell {
-				width: 164rpx;
-				height: auto;
-				float: left;
-				margin-bottom: 30rpx;
-				margin-right: 15.3rpx;
-				&:nth-child(4) {
-					margin-right: 0;
-				}
-				&:nth-child(8) {
-					margin-right: 0;
-				}
-				.icon {
-					width: 130rpx;
-					height: 130rpx;
-					margin: 0 auto;
-					position: relative;
-					.icon-image {
-						width: 130rpx;
-						height: 130rpx;
-						display: block;
-					}
-					.icon-new {
-						width: 44rpx;
-						height: 22rpx;
-						display: block;
-						position: absolute;
-						right: 0;
-						top: 20rpx;
-					}
-				}
-				.name {
-					width: 100%;
-					height: 40rpx;
-					line-height: 40rpx;
-					text-align: center;
-					font-size: $font-size-28;
-					color: #666666;
-				}
-			}
-		}
 	}
 }
 </style>

+ 1 - 1
pages/goods/product.vue

@@ -597,7 +597,7 @@
 			:firstClubType="firstClubType"
 		/>
 		<!-- 供应商收集用户信息弹窗 -->
-		<cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisement="advertisement" />
+		<cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisInfo="advertisement" />
 
 		<!-- 分享弹窗 -->
 		<cm-share-popup ref="sharePopup" :data="posterData" type="product" />

+ 3 - 3
pages/search/search-supplier.vue

@@ -63,13 +63,13 @@
 						</view>
 					</view>
 					<!--加载loadding-->
-					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-					<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText'></tui-nomore>
+					<tui-loadmore :visible="loadding" :index="3" type="black" />
+					<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText' />
 					<!--加载loadding-->
 			</view>
 		</view>
         <!-- 供应商收集用户信息弹窗 -->
-        <cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisement="advertisement" />
+        <cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisInfo="advertisement" />
 	</view>  
 </template>
 

+ 2 - 2
pages/search/search.vue

@@ -481,9 +481,9 @@
 			</view>
 		</tui-drawer>
 		<!-- 供应商收集用户信息弹窗 -->
-		<cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisement="advertisement" />
+		<cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisInfo="advertisement" />
 		<!-- 透明模态层 -->
-		<modal-layer v-if="isModallayer"></modal-layer>
+		<modal-layer v-if="isModallayer" />
 	</view>
 </template>
 

+ 2 - 3
pages/seller/cart/immediately.vue

@@ -9,15 +9,14 @@
 			:tabBars="tabBars"
 			:tabIndex="tabIndex"
 			@changetab="hanldChangeTab"
-		>
-		</immediately-list>
+		/>
 		<!-- 单品规格弹窗 -->
 		<cm-unit-popup
 			v-if="popupShow"
 			:popupShow="popupShow"
 			:skuProduct="handleData"
 			@skuClick="handleSkuClick"
-		></cm-unit-popup>
+		/>
 		<!-- 组合加入购物车 -->
 		<view class="popup spec zuhe" :class="specClasszuhe" @touchmove.stop.prevent="discard" @tap="hideSpecs">
 			<!-- 遮罩层 -->

+ 100 - 84
pages/supplier/components/banner.vue

@@ -1,106 +1,122 @@
 <template>
 	<view>
-		<view class="swiper-banner-box" >
-			<swiper v-if="list.length>0"  class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500"  @change="swiperChange" :circular="true">
-				<swiper-item v-for="(item,index) in list" :key="index">
-					<image  :src="item.image" class="tui-slide-image" mode="scaleToFill"/>
+		<view class="swiper-banner-box">
+			<swiper
+				v-if="list.length > 0"
+				class="tui-banner-swiper tui-banner tui-skeleton-fillet"
+				:autoplay="true"
+				:interval="5000"
+				:duration="500"
+				@change="swiperChange"
+				:circular="true"
+			>
+				<swiper-item v-for="(item, index) in list" :key="index">
+					<image :src="item.image" class="tui-slide-image" mode="scaleToFill" />
 				</swiper-item>
 			</swiper>
-			<swiper v-else  class="tui-banner-swiper tui-banner tui-skeleton-fillet" :autoplay="true" :interval="5000" :duration="500"  @change="swiperChange" :circular="true">
-				<swiper-item >
-					<image :src="defaultbanner" class="tui-slide-image" mode="scaleToFill"/>
-				</swiper-item>
+			<swiper
+				v-else
+				class="tui-banner-swiper tui-banner tui-skeleton-fillet"
+				:autoplay="true"
+				:interval="5000"
+				:duration="500"
+				@change="swiperChange"
+				:circular="true"
+			>
+				<swiper-item> <image :src="defaultbanner" class="tui-slide-image" mode="scaleToFill" /> </swiper-item>
 			</swiper>
 			<view class="swiper__dots-box" v-if="list.length > 1">
-				<view v-for="(item,idx) in list" 
-					  :key="idx" 
-					  :class="[idx===current?'swiper__dots-long':'none']" 
-					  :data-index="current" class="swiper__dots-item">
-				</view>	  
+				<view
+					v-for="(item, idx) in list"
+					:key="idx"
+					:class="[idx === current ? 'swiper__dots-long' : 'none']"
+					:data-index="current"
+					class="swiper__dots-item"
+				>
+				</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'address',
-		props:{
-			list:{
-				type:Array
-			}
-		},
-		data() {
-			return{
-				current:0,
-				defaultbanner:'https://static.caimei365.com/app/img/bg/icon-defaultbanner.png'
-			}
-		},
-		created(){
-			console.log(this.list)
-		},
-		computed: {
-	
-		},
-		methods:{
-			swiperChange(e) {//轮播图切换
-				const index = e.detail.current
-				this.current = index
-			},
+export default {
+	name: 'address',
+	props: {
+		list: {
+			type: Array
+		}
+	},
+	data() {
+		return {
+			current: 0,
+			defaultbanner: 'https://static.caimei365.com/app/img/bg/icon-defaultbanner.png'
+		}
+	},
+	created() {
+		console.log(this.list)
+	},
+	computed: {},
+	methods: {
+		swiperChange(e) {
+			//轮播图切换
+			const index = e.detail.current
+			this.current = index
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.swiper-banner-box{
+.swiper-banner-box {
+	width: 100%;
+	height: 240rpx;
+	background: #ffffff;
+	position: relative;
+	background-size: cover;
+}
+.tui-banner-swiper {
+	width: 700rpx;
+	margin: 0 auto;
+	height: 240rpx;
+	border-radius: 16rpx;
+	overflow: hidden;
+	transform: translateY(0);
+	margin-top: 16rpx;
+	.banner-item {
+		border-radius: 16rpx;
+	}
+	.tui-slide-image {
 		width: 100%;
 		height: 240rpx;
-		background:#FFFFFF;
-		position: relative;
-		background-size: cover;
-	}	
-	.tui-banner-swiper {
-		width: 700rpx;
-		margin: 0 auto;
-		height: 240rpx;
-		border-radius: 16rpx;
-		overflow: hidden;
-		transform: translateY(0);
-		margin-top: 16rpx;
-		.banner-item{
-			border-radius: 16rpx;
-		}
-		.tui-slide-image {
-			width: 100%;
-			height: 240rpx;
-			display: block;
-		}
+		display: block;
 	}
-	.swiper__dots-box{
-		position: absolute;
-		bottom: 30rpx;
-		left: 0;
-		right: 0;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		.swiper__dots-item{
-			width: 8rpx;
-			height: 8rpx;
-			border-radius: 100%;
-			margin-left: 6px;
-			background-color:rgba(255,255,255,.7);
-		}
-		.swiper__dots-long{
-			width: 35rpx;
-			height: 8rpx;
-			border-radius: 4rpx;
-			background-color: #ffff;
-			transition: all 0.4s;
-		}
+}
+.swiper__dots-box {
+	position: absolute;
+	bottom: 30rpx;
+	left: 0;
+	right: 0;
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	flex: 1;
+	flex-direction: row;
+	justify-content: center;
+	align-items: center;
+	.swiper__dots-item {
+		width: 8rpx;
+		height: 8rpx;
+		border-radius: 100%;
+		margin-left: 6px;
+		background-color: rgba(255, 255, 255, 0.7);
+	}
+	.swiper__dots-long {
+		width: 35rpx;
+		height: 8rpx;
+		border-radius: 4rpx;
+		background-color: #ffff;
+		transition: all 0.4s;
 	}
+}
 </style>

+ 11 - 14
pages/supplier/components/home.vue

@@ -1,15 +1,13 @@
 <template>
 	<view class="container home clearfix" :style="{paddingTop:CustomBar+'px'}">
-		<customer ref="customer" :isScroll="isScroll" :navbar-data='nvabarData'></customer>
-		<!-- 主页内容 -->
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5" />
+		<customer ref="customer" :isScroll="isScroll" :navbar-data="nvabarData" :navBarsList="navBarsList" v-if="isNavRequest" />
+		<!-- 主页内容 -->
 		<view class="container-home tui-skeleton">
 			<!-- 轮播 -->
 			<banner :list="bannerImageList" v-if="isNavRequest" />
 			<!-- 金刚区菜单 -->
-			<navbars :list="navBarsList" v-if="isNavRequest" />
-            <!-- 快捷运营 -->
-            <quick-opera :list="shortcutList" v-if="isNavRequest && shortcutList.length > 0"/>
+			<navbars :list="shortcutList" v-if="isNavRequest" />
 			<!-- 直播 -->
 			<page-special :templateData="templateData" v-if="isLiveRequest" />
 			<!-- 新品橱窗 -->
@@ -39,7 +37,6 @@
 	import Certificate from '@/components/cm-module/homeIndex/certificate.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-    import quickOpera from '@/components/cm-module/homeIndex/quickOperation.vue'
 	import { mapState,mapMutations} from 'vuex'
 	export default {
 		components:{
@@ -50,18 +47,18 @@
 			pageFloor,
 			Certificate,
 			pageSpecial,
-			supplierList,
-            quickOpera
+			supplierList
 		},
 		data() {
 			return {
-				nvabarData: {//顶部自定义导航
+				nvabarData: {
+					// 顶部自定义导航
 					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
 					title: '采美采购商城', // 导航栏 中间的标题
-					haveBack:false,
-					textLeft:this.$store.state.isIphone,
-					textColor:'#FFFFFF'
+					haveBack: false,
+					textLeft: this.$store.state.isIphone,
+					textColor: '#333333'
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				userID:0,
@@ -184,8 +181,8 @@
 </script>
 
 <style lang="scss">
-	page{
-		background-color: #ff5b00;
+	.home{
+		background-color: #FFFFFF;
 	}
 	.container-section{
 		width: 100%;

+ 166 - 146
pages/supplier/user/my-shop.vue

@@ -6,8 +6,7 @@
 			:headerBtnPosi="headerBtnPosi"
 			:headerColor="headerColor"
 			:page="backPage"
-		>
-		</custom>
+		/>
 		<!-- 主页内容 -->
 		<tui-skeleton
 			v-if="skeletonShow"
@@ -15,7 +14,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template v-else>
 			<view class="shop-search-main">
 				<view class="shop-search">
@@ -63,9 +62,9 @@
 					</view>
 					<view class="right"><text class="iconfont icon-xiayibu"></text></view>
 				</view>
-				<banner :list="bannerImageList"></banner>
+				<banner :list="bannerImageList" />
 			</view>
-			<view class="container-section tui-skeleton" v-if="recommendList.length>0">
+			<view class="container-section tui-skeleton" v-if="recommendList.length > 0">
 				<view class="tab-title">主推商品</view>
 				<view class="section-product clearfix">
 					<view class="floor-item-none" v-if="isHomeProduct">
@@ -144,12 +143,17 @@
 										<view
 											class="price tui-skeleton-rect"
 											v-else
-											:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+											: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
+												(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+													? prop.originalPrice
+													: prop.price) | NumFormat
 											}}</text>
 										</view>
 									</template>
@@ -162,7 +166,7 @@
 										</view>
 									</template>
 								</template>
-								<template v-else-if="userIdentity === 4 && vipFlag !=1">
+								<template v-else-if="userIdentity === 4 && vipFlag != 1">
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
@@ -175,12 +179,15 @@
 									<view
 										class="price tui-skeleton-rect"
 										v-if="prop.priceFlag === 0"
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -188,18 +195,21 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
+									<view class="title-none" v-else-if="prop.priceFlag === 3 && firstClubType != 1">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
 										class="price tui-skeleton-rect"
 										v-else
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -210,12 +220,15 @@
 									<view
 										class="price tui-skeleton-rect"
 										v-else
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -318,12 +331,17 @@
 										<view
 											class="price tui-skeleton-rect"
 											v-else
-											:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+											: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
+												(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+													? prop.originalPrice
+													: prop.price) | NumFormat
 											}}</text>
 										</view>
 									</template>
@@ -349,12 +367,15 @@
 									<view
 										class="price tui-skeleton-rect"
 										v-if="prop.priceFlag === 0"
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -362,18 +383,21 @@
 									<view class="title-none" v-if="prop.priceFlag === 1">
 										<text class="p big">¥未公开价格</text>
 									</view>
-									<view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
+									<view class="title-none" v-else-if="prop.priceFlag === 3 && firstClubType != 1">
 										<text class="p big">¥仅医美机构可见</text>
 									</view>
 									<view
 										class="price tui-skeleton-rect"
 										v-else
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -384,12 +408,15 @@
 									<view
 										class="price tui-skeleton-rect"
 										v-else
-										:class="PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1 ? 'none' : ''"
+										: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
+											(PromotionsFormat(prop.promotions) || prop.svipProductFlag == 1
+												? prop.originalPrice
+												: prop.price) | NumFormat
 										}}</text>
 									</view>
 								</template>
@@ -405,10 +432,10 @@
 				</view>
 			</view>
 		</template>
-        <!-- 供应商收集用户信息弹窗 -->
-        <cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisement="advertisement" />
+		<!-- 供应商收集用户信息弹窗 -->
+		<cmRossPopup v-if="showRossHtml" :popupShow="showRossHtml" :advertisInfo="advertisement" />
 		<!-- 侧边 -->
-		<scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
+		<scroll-top :isScrollTop="isScrollTop" :bottom="200" />
 	</view>
 </template>
 
@@ -431,7 +458,7 @@ export default {
 	mixins: [cmSrsMixins],
 	data() {
 		return {
-			CustomBar:this.CustomBar,
+			CustomBar: this.CustomBar,
 			headerBtnPosi: this.setHeaderBtnPosi(), // 获取设备顶部胶囊高度
 			systeminfo: this.setSysteminfo(), // 获取设备信息
 			headerColor: false,
@@ -455,13 +482,13 @@ export default {
 			recommendList: [],
 			productList: [],
 			userIdentity: 0,
-			firstClubType:0,
+			firstClubType: 0,
 			listQuery: {
 				keyword: '',
 				pageSize: 10,
 				pageNum: 1,
 				id: 0,
-				identity:0
+				identity: 0
 			},
 			isHomeProduct: false,
 			total: 0
@@ -509,127 +536,119 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.firstClubType = this.clubType
 			//初始化请求数据
-			this.GetSupplierHomeBanner()
 			this.GetSupplierHomeDeatils()
 			this.GetSupplierHomeProduct()
 			this.GetSupplierHomeProductList()
 			this.checkedIsRossSet()
 			this.skeletonShow = false
 		},
-		GetSupplierHomeBanner() {
-			//轮播图
-			this.ShopService.GetSupplierHomeBanner({ shopId: this.supplierId })
-				.then(response => {
-					this.bannerImageList = response.data
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		GetSupplierHomeDeatils() {
+		async GetSupplierHomeDeatils() {
 			//商铺详情
-			this.ShopService.GetSupplierHomeDeatils({ shopId: this.supplierId })
-				.then(response => {
-					let data = response.data
-					this.normalNum = data.normalNum
-					this.shopName = data.name
-					this.shopLogo = data.logo
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+			try {
+				const res = await this.ShopService.GetSupplierHomeDeatils({ shopId: this.supplierId })
+				const data = res.data
+				this.normalNum = data.normalNum
+				this.shopName = data.name
+				this.shopLogo = data.logo
+				this.bannerImageList = data.shopHomeImages
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取供应商信息异常~')
+			}
 		},
-		GetSupplierHomeProduct() {
+		async GetSupplierHomeProduct() {
 			//主推商品
-			this.ShopService.GetSupplierHomeProduct({ shopId: this.supplierId, identity: this.identity })
-				.then(response => {
-					let data = response.data
-					if (data.length > 0) {
-						this.isHomeProduct = false
-						this.QueryProductPrice(data)
-					} else {
-						this.isHomeProduct = true
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+			try {
+				const res = await this.ShopService.GetSupplierHomeProduct({
+					shopId: this.supplierId,
+					identity: this.identity
 				})
+				const data = res.data
+				console.log('111111', data)
+				if (data.length > 0) {
+					console.log('2222222', data)
+					this.isHomeProduct = false
+					this.QueryProductPrice(data)
+				}
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取主推商品异常~')
+			}
 		},
-		GetSupplierHomeProductList() {
+		async GetSupplierHomeProductList() {
 			//全部商品
-			this.ShopService.GetSupplierHomeProductList(this.listQuery)
-				.then(response => {
-					let data = JSON.parse(response.data)
-					console.log('全部商品', data)
-					let dataList = data.items
+			try {
+				const res = this.ShopService.GetSupplierHomeProductList(this.listQuery)
+				if (res.data) {
+					const data = JSON.parse(res.data)
+					this.isEmpty = false
 					this.total = data.total
-					if (this.total > 0) {
-						this.isEmpty = false
-						this.productList = dataList
-						this.QueryProductPrice1(this.productList)
-					} else {
-						this.isEmpty = true
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+					this.productList = data.items
+					this.QueryProductPrice1(this.productList)
+				} else {
+					this.isEmpty = true
+				}
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取全部商品异常~')
+			}
 		},
-		GetMoreSupplierHomeProductList() {
+		async GetMoreSupplierHomeProductList() {
 			//加载分页
-			this.listQuery.pageNum += 1
-			this.ShopService.GetSupplierHomeProductList(this.listQuery)
-				.then(response => {
-					let data = JSON.parse(response.data)
-					this.total = data.total
-					this.productList = this.productList.concat(data.items)
-					this.QueryProductPrice1(this.productList)
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+			try {
+				this.listQuery.pageNum += 1
+				const res = this.ShopService.GetSupplierHomeProductList(this.listQuery)
+				const data = JSON.parse(res.data)
+				this.total = data.total
+				this.productList = this.productList.concat(data.items)
+				this.QueryProductPrice1(this.productList)
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取供应商全部商品异常~')
+			}
 		},
-		QueryProductPrice(data) {
+		async QueryProductPrice(data) {
 			//处理主推商品商品或者活动价格
-			let productIdArr = []
-			let productIds = ''
-			data.map(item => {
-				// 0公开价格 1不公开价格 2仅对资质机构公开
-				productIdArr.push(item.productId)
-			})
-			productIds = productIdArr.join(',')
-			this.ProductService.querySearchProductPrice({
-				userId: this.userId,
-				productIds: productIds,
-				source: 2
-			})
-				.then(response => {
-					this.recommendList = this.ReturnNewProducts(data, response.data)
+			try {
+				let productIdArr = []
+				let productIds = ''
+				data.map(item => {
+					// 0公开价格 1不公开价格 2仅对资质机构公开
+					productIdArr.push(item.productId)
 				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+				productIds = productIdArr.join(',')
+				const res = await this.ProductService.querySearchProductPrice({
+					userId: this.userId,
+					productIds: productIds,
+					source: 2
 				})
+				this.recommendList = this.ReturnNewProducts(data, res.data)
+				console.log('recommendList', this.recommendList)
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取供应商全部商品价格异常~')
+			}
 		},
-		QueryProductPrice1(data) {
-			//获取商品或者活动价格
-			let productIdArr = []
-			let productIds = ''
-			data.map(item => {
-				// 0公开价格 1不公开价格 2仅对资质机构公开
-				productIdArr.push(item.productId)
-			})
-			productIds = productIdArr.join(',')
-			this.ProductService.querySearchProductPrice({
-				userId: this.userId,
-				productIds: productIds,
-				source: 2
-			})
-				.then(response => {
-					this.productList = this.ReturnNewProducts(data, response.data)
+		async QueryProductPrice1(data) {
+			//处理主推商品商品或者活动价格
+			try {
+				let productIdArr = []
+				let productIds = ''
+				data.map(item => {
+					// 0公开价格 1不公开价格 2仅对资质机构公开
+					productIdArr.push(item.productId)
 				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+				productIds = productIdArr.join(',')
+				const res = await this.ProductService.querySearchProductPrice({
+					userId: this.userId,
+					productIds: productIds,
+					source: 2
 				})
+				this.productList = this.ReturnNewProducts(data, res.data)
+			} catch (e) {
+				//TODO handle the exception
+				console.log('获取供应商全部商品价格异常~')
+			}
 		},
 		ReturnNewProducts(listA, listB) {
 			let NewArray = []
@@ -708,18 +727,19 @@ export default {
 			 * 		priceFlag !== 1 ||
 			 * 		超级会员
 			 * 			商品priceFlag === 3 && 是否是医美机构
-			*/
+			 */
 			// 未登录 || 非会员
-			if(!this.hasLogin || !this.vipFlag === 1) return false
+			if (!this.hasLogin || !this.vipFlag === 1) return false
 			// 商品所有机构可见
-			if(pros.priceFlag === 0 ) return true
+			if (pros.priceFlag === 0) return true
 			// 商品价格仅资质机构可见
-			if((pros.priceFlag === 2 && this.userIdentity === 2) || this.userIdentity === 1) 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
+			if ((pros.priceFlag === 3 && this.userIdentity === 2 && this.firstClubType == 1) || this.userIdentity === 1)
+				return true
 			// 其它
 			return false
-		},
+		}
 	},
 	onPageScroll(e) {
 		//实时获取到滚动的值
@@ -931,16 +951,16 @@ page {
 			&:nth-child(2n) {
 				margin-right: 0;
 			}
-			.floor-item-type{
+			.floor-item-type {
 				width: 64rpx;
 				height: 64rpx;
 				text-align: justify;
 				box-sizing: border-box;
 				padding: 10rpx;
 				border-radius: 0 0 8rpx 8rpx;
-				background-color: #33CCBF;
+				background-color: #33ccbf;
 				font-size: $font-size-22;
-				color: #FFFFFF;
+				color: #ffffff;
 				line-height: 25rpx;
 				position: absolute;
 				top: 0;

+ 10 - 11
utils/cmSrsMixins.js

@@ -76,17 +76,16 @@ const cmSrsMixins = {
             this.userRecordStatistics(sysParams)
             console.log('---用户行为轨迹记录成功---')
         },
-        userRecordStatistics(params) {
+        async userRecordStatistics(params) {
             // 上送
-            this.UserService.userRecordStatistics(params)
-                .then(response => {
-                    console.log('---用户行为轨迹记录成功---')
-                    uni.removeStorageSync('pageLabel')
-                    uni.removeStorageSync('behaviorType')
-                })
-                .catch(error => {
-                    console.log('---用户行为轨迹记录失败---')
-                })
+            try{
+                await  this.UserService.userRecordStatistics(params)
+                console.log('---用户行为轨迹记录成功---')
+                uni.removeStorageSync('pageLabel')
+                uni.removeStorageSync('behaviorType')
+            }catch(e){
+				 console.log('---用户行为轨迹记录失败---')
+            }
         },
         async userInformationIsClick() {
             // 查看用户是否有过弹框游客当天是否有过弹框
@@ -108,7 +107,7 @@ const cmSrsMixins = {
 		        const res = await this.UserService.getUserPopUpInfo(this.popUpParams)
                 const data = res.data
 		        this.advertisement = data
-                this.consultParams.shopId = data.shopId
+                this.consultParams.shopProductId = data.shopProductId
 		    } catch (error) {
 		        console.log('获取失败~')
 		    }