Bläddra i källkod

商品详情促销活动

zhengjinyi 4 år sedan
förälder
incheckning
f6e0139e6f

+ 0 - 15
api/product.js

@@ -147,21 +147,6 @@ export function clearSearchHistory(params) {
 		})
 	});
 }
-/**
- * @商品详情
- * @param:productID 商品ID
- */
-export function queryProductDetils(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/product/details",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
 /**
  * @商品相关推荐
  * @param:productID 商品ID

+ 2 - 2
common/config/config.js

@@ -2,8 +2,8 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.2.56:8008'	 //本地IP联调地址
-	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
-	URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
+	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
     // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{

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

@@ -284,8 +284,6 @@
 		.list-login-now {
 			width: 375rpx;
 			color: #F8C499;
-			position: absolute;
-			bottom: 0;
 			.p-no{
 				float: left;
 				font-size: $font-size-24;

+ 80 - 32
components/cm-module/listTemplate/classifyProductList.vue

@@ -1,3 +1,4 @@
+<!-- 金刚区商品模块 -->
 <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>
@@ -9,31 +10,37 @@
 					<text class="list-details-specs">规格:{{item.unit}}</text>
 					<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">商品编码:{{item.productCode}}</view>
 					<view class="list-details-price">
+						<view class="floor-item-act" v-if="item.actStatus==1">
+							<view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{ item.price | NumFormat }}</text></view>
+							<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+						</view>
+						<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+							<view class="floor-tags">阶梯价格</view>	
+						</view>
 						<view v-if="hasLogin" class="list-price">
 							<view v-if="userIdentity == 1">
-								<text>¥<text class="price-larger">{{item.retailPrice ? item.retailPrice.toFixed(2) : '0.00'}}</text></text>
+								<text>¥<text class="price-larger">{{item.retailPrice | NumFormat}}</text></text>
 							</view>	
 							<view v-if="userIdentity == 4">
 								<view class="price-larger" v-if="item.price1TextFlag == '1'">
-									<text class="txt">未公开价格</text>
+									<text class="txt">未公开价格</text>
 								</view>
 								<view v-else>
 									<view class="price-larger" v-if="item.price1TextFlag == '2'">
-										<text class="txt">价格仅会员可见</text>
-										<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
+										<text class="txt">¥价格仅会员可见</text>
 									</view>
-									<text v-else>¥<text class="price-larger">{{item.retailPrice ? item.retailPrice.toFixed(2) :'0.00'}}</text></text>
+									<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{item.retailPrice | NumFormat}}</text>
 								</view>
 							</view>
 							<view v-if="userIdentity == 2">
 								<view class="price-larger" v-if="item.price1TextFlag == '1'">
-									<text class="txt">未公开价格</text>
+									<text class="txt">未公开价格</text>
 								</view>
-								<text>¥<text class="price-larger">{{item.retailPrice ? item.retailPrice.toFixed(2) :'0.00'}}</text></text>
+								<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{item.retailPrice | NumFormat}}</text>
 							</view>
 						</view>	
 						<view  v-else class="list-login-now">
-							<text class="p-no">价格:</text>
+							<text class="p-no"></text>
 							<uni-stars :stars="parseInt(item.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
 						</view>
 					</view>
@@ -84,7 +91,7 @@
 				windowHeight: '',
 				showSkeleton: true,
 				showEmpty: false,
-				userID: '',
+				userID: 0,
 				userIdentity:'',
 				scrollHeight: '',
 				listData: [],
@@ -104,13 +111,18 @@
 			this.setScrollHeight();		
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID : '';
+				this.userID = resolve.userID ? resolve.userID :0;
 				this.userIdentity = resolve.userIdentity
 				this.getListFromServer();
 			}).catch(error =>{
 				this.getListFromServer();
 			})
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},		
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
@@ -146,9 +158,11 @@
 						this.hasNextPage = response.data.hasNextPage;
 						if(loadMore) {
 							this.listData = [...this.listData,...resList];
+							this.getProductPrice()
 							this.showSkeleton = false
 						} else {
 							this.listData = [...resList];
+							this.getProductPrice()
 							this.showSkeleton = false
 						}
 						// 防上拉暴滑
@@ -170,6 +184,32 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
+			getProductPrice(){//获取价格
+				let productIdArr = [];
+				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.productID)
+				})
+				this.productIds = productIdArr.join(",");
+				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
+					if (response.data) {
+						this.listData = this.ReturnNewProducts(this.listData,response.data);
+					}
+					this.priceLoading = false;
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			ReturnNewProducts(Array,list){//处理对应商品ID的商品价格
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.productID == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
 			navToDetailPage(id) {
 				this.isModallayer = true;
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`);
@@ -245,12 +285,30 @@
 	}
 	.list-details-price {
 		width: 100%;
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
+		height: 54rpx;
+		line-height: 54rpx;
 		position: absolute;
-		bottom: 0;
+		bottom: -10rpx;
 		right: 0;
+		.floor-item-act{
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: right;
+			.floor-tags{
+				float: right;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				margin-top: 9rpx;
+				font-size: $font-size-20;
+			}
+		}
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -262,15 +320,13 @@
 			vertical-align: middle;
 		}
 		.list-login-now {
-			width: 375rpx;
 			color: #F8C499;
-			position: absolute;
-			bottom: 0;
+			float: left;
+			line-height: 54rpx;
 			.p-no{
 				float: left;
 				font-size: $font-size-24;
-				color: $color-system;
-				margin-right: 10rpx;
+				color: $text-color;
 			}
 		}
 		.login-now {
@@ -278,12 +334,16 @@
 		}
 		.list-price {
 			color: #FF2A2A;
-			width: 100%;
 			height: 44rpx;
+			float: left;
 			.price-larger {
 				width: 100%;
 				height: 44rpx;
 				font-size: 32rpx;
+				&.none{
+					text-decoration: line-through;
+					color: #999999;
+				}
 				&.small{
 					font-size: $font-size-24;
 				}
@@ -294,18 +354,6 @@
 					text-align: left;
 					float: left;
 				}
-				.btn{
-					width: 112rpx;
-					height: 44rpx;
-					display: inline-block;
-					float: right;
-					background: $btn-confirm;
-					line-height: 44rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size: $font-size-24;
-					border-radius: 22rpx;
-				}
 			}
 		}
 		.add-cart-btn {

+ 69 - 53
components/cm-module/listTemplate/commodityList.vue

@@ -1,3 +1,4 @@
+<!-- 分类商品模块 -->
 <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>
@@ -9,36 +10,43 @@
 					<text class="list-details-specs">规格:{{item.p_unit}}</text>
 					<view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">商品编码:{{item.p_code}}</view>
 					<view class="list-details-price">
+						<view class="floor-item-act" v-if="item.actStatus==1">
+							<view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{ item.price | NumFormat }}</text></view>
+							<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+						</view>
+						<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+							<view class="floor-tags">阶梯价格</view>	
+						</view>
 						<view v-if="hasLogin" class="list-price">
 							<view v-if="userIdentity == 1">
 								<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
-								<text v-else>¥<text class="price-larger">{{item.price?item.price :'0.00'}}</text></text>
+								<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{ item.price | NumFormat }}</text>
 							</view>	
 							<view v-if="userIdentity == 4">
 								<view class="price-larger" v-if="item.p_price_flag == '1'">
-									<text class="txt">未公开价格</text>
+									<text class="txt">未公开价格</text>
 								</view>
 								<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
 								<view v-else>
 									<view class="price-larger" v-if="item.p_price_flag == '2'">
-										<text class="txt">价格仅会员可见</text>
-										<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
+										<text class="txt">¥价格仅会员可见</text>
 									</view>
-									<text v-else>¥<text class="price-larger">{{item.price ? item.price :'0.00'}}</text></text>
+									<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{item.price | NumFormat}}</text>
 								</view>
 							</view>
 							<view v-if="userIdentity == 2">
 								<view class="price-larger" v-if="item.p_price_flag == '1'">
-									<text class="txt">未公开价格</text>
+									<text class="txt">未公开价格</text>
 								</view>
 								<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
-								<text v-else>¥<text class="price-larger">{{item.price ? item.price :'0.00'}}</text></text>
+								<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''" >¥{{item.price | NumFormat}}</text>
 							</view>
 						</view>	
 						<view  v-else class="list-login-now">
-							<text class="p-no">价格:</text>
+							<text class="p-no"></text>
 							<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
 						</view>
+						
 					</view>
 				</view>
 			</view>
@@ -87,7 +95,7 @@
 				windowHeight: '',
 				showSkeleton: true,
 				showEmpty: false,
-				userID: '',
+				userID:0,
 				userIdentity:'',
 				priceLoading:true,
 				scrollHeight: '',
@@ -108,7 +116,7 @@
 			this.setScrollHeight();		
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
-				this.userID = resolve.userID ? resolve.userID : '';
+				this.userID = resolve.userID ? resolve.userID : 0;
 				this.userIdentity = resolve.userIdentity
 				if(this.userIdentity == 1){
 					this.identity = 1
@@ -120,6 +128,11 @@
 				this.getListFromServer();
 			})
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
@@ -158,11 +171,11 @@
 						this.totalPage = resData.total;
 						if(loadMore) {
 							this.listData = [...this.listData,...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 							this.showSkeleton = false
 						} else {
 							this.listData = [...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 							this.showSkeleton = false
 						}
 						// 防上拉暴滑
@@ -183,7 +196,7 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			setProductPrice(){//获取价格
+			getProductPrice(){//获取价格
 				let productIdArr = [];
 				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
 					productIdArr.push(item.p_id)
@@ -191,29 +204,24 @@
 				this.productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
 					if (response.data) {
-						let priceList = response.data
-						this.listData.map(item=>{
-							for (let i = 0; i < priceList.length; i++) {
-								let priceObj ={
-										actStatus:priceList[i].actStatus,
-										costCheckFlag:priceList[i].costCheckFlag,
-										costPrice:priceList[i].costPrice,
-										costProportional:priceList[i].costProportional,
-										ladderPriceFlag:priceList[i].ladderPriceFlag,
-										price:Number(priceList[i].price).toFixed(2),
-										minBuyNumber:priceList[i].minBuyNumber
-									}
-								if( item.p_id == priceList[i].productId ){
-									Object.assign(item,priceObj)
-								}
-							}
-						});
+						this.listData = this.ReturnNewProducts(this.listData,response.data);
 					}
 					this.priceLoading = false;
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+			ReturnNewProducts(Array,list){//处理对应商品ID的商品价格
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.p_id == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
 			navToDetailPage(id) {
 				this.isModallayer = true;
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`);
@@ -271,7 +279,7 @@
 		font-size: 26rpx;
 		position: relative;
 		.list-details-title {
-			line-height: 38rpx;
+			line-height: 36rpx;
 			text-overflow: ellipsis;
 			overflow: hidden;
 			display: -webkit-box;
@@ -289,12 +297,30 @@
 	}
 	.list-details-price {
 		width: 100%;
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
+		height: 54rpx;
+		line-height: 54rpx;
 		position: absolute;
-		bottom: 0;
+		bottom: -10rpx;
 		right: 0;
+		.floor-item-act{
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: right;
+			.floor-tags{
+				float: right;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				margin-top: 9rpx;
+				font-size: $font-size-20;
+			}
+		}
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -306,15 +332,13 @@
 			vertical-align: middle;
 		}
 		.list-login-now {
-			width: 375rpx;
 			color: #F8C499;
-			position: absolute;
-			bottom: 0;
+			float: left;
+			line-height: 54rpx;
 			.p-no{
 				float: left;
 				font-size: $font-size-24;
-				color: $color-system;
-				margin-right: 10rpx;
+				color: $text-color;
 			}
 		}
 		.login-now {
@@ -322,12 +346,16 @@
 		}
 		.list-price {
 			color: #FF2A2A;
-			width: 100%;
 			height: 44rpx;
+			float: left;
 			.price-larger {
 				width: 100%;
 				height: 44rpx;
 				font-size: 32rpx;
+				&.none{
+					text-decoration: line-through;
+					color: #999999;
+				}
 				&.small{
 					font-size: $font-size-24;
 				}
@@ -338,18 +366,6 @@
 					text-align: left;
 					float: left;
 				}
-				.btn{
-					width: 112rpx;
-					height: 44rpx;
-					display: inline-block;
-					float: right;
-					background: $btn-confirm;
-					line-height: 44rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size: $font-size-24;
-					border-radius: 22rpx;
-				}
 			}
 		}
 		.add-cart-btn {

+ 0 - 2
components/cm-module/listTemplate/immediatelyList.vue

@@ -769,8 +769,6 @@
 		.list-login-now {
 			width: 375rpx;
 			color: #F8C499;
-			position: absolute;
-			bottom: 0;
 			.p-no{
 				float: left;
 				font-size: $font-size-24;

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

@@ -1,13 +1,6 @@
 <template name="cm-attributes">
 	<!-- 商品详情价格判断 -->
 	<view class="cm-attributes">
-		<view class="wrap-active" v-if="product.actStatus == 1">
-			<text>活动时间:</text>
-			<text>{{ product.beginTime }} ~ {{ product.endTime }}</text>
-		</view>
-		<view class="wrap-label" v-if="product.tagsList.length>0">
-			<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
-		</view>
 		<view class="wrap-label"  v-if="goodsData.isNoneDisabled">
 			<view class="isLower">此商品已{{goodsData.disabledText}},请浏览以下推荐商品~</view>
 		</view>

+ 74 - 92
components/cm-module/productDetails/cm-price.vue

@@ -1,111 +1,88 @@
 <template name="cm-price">
 	<!-- 商品详情价格判断 -->
 	<view class="wrap-main">
-		<view class="" v-if="userIdentity == 1">
-			<view class="wrap-main-price">
-				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
-					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" :src="iconActive" mode="" ></image>
-					</view>
-					<view class="p-price tui-skeleton-fillet">
-						<text class="txt sm">¥</text>
-						<text class="txt big">{{retailPrice}}</text>
-						<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+		<template v-if="!hasLogin">
+			<view class="p-login grade tui-skeleton-fillet">
+				<text class="p-no">¥</text>
+				<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
+				<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+			</view>
+			<view class="wrap-main-act">
+				<view v-if="product.actStatus==1" class="floor-item-act">
+					<view v-if="product.promotions.type == 1 && product.promotions.mode==1"  class="floor-tags" @click.stop="click">
+						{{product.promotions.name}}<text v-if="hasLogin">:¥{{ product.price | NumFormat }}</text>
 					</view>
-					<view class="p-price-none" v-if="product.actStatus == 1">¥{{product.price1.toFixed(2)}}</view>
-					<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+					<view  v-else  class="floor-tags" @click.stop="click">{{product.promotions.name}}</view>	
 				</view>
-				<view class="wrap-ladder" v-else>
-					<view class="ladder-main tui-skeleton-fillet">
-						<view class="ladder-left">
-							<view class="ladder-b">起订量:</view>
-							<view class="ladder-b">价格:</view>
-						</view>
-						<view class="ladder-right">
-							<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
-								<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-								<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
-							</view>
-						</view>
-					</view>
+				<view v-if="product.actStatus ==0  &&  product.ladderPriceFlag==1" class="floor-item-act">
+					<view class="floor-tags" @click.stop="click">阶梯价格</view>	
+				</view>
+				<view class="floor-item-btn">
+					<view class="btn" @click.stop="loginClick">登录查看价格</view>
 				</view>
-			</view>	
-		</view>
-		<view class="" v-if="userIdentity == 4">
-			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == '1'">
-				<text>未公开价格</text>
-			</view>
-			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == '2'">
-				<text class="wrap-main-text">价格仅会员可见</text>
-				<text class="wrap-main-none" @click.stop="goUpgradeApply">去升级会员查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 			</view>
-			<view class="wrap-main-price" v-if="product.price1TextFlag == '0'">
-				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
-					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" :src="iconActive" mode="" ></image>
-					</view>
+		</template>
+		<template v-else>
+			<view   v-if="userIdentity == 1" class="wrap-main-price">
+				<view class="p-main">
 					<view class="p-price tui-skeleton-fillet">
 						<text class="txt sm">¥</text>
-						<text class="txt big">{{retailPrice}}</text>
-						<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+						<text class="txt big">{{retailPrice | NumFormat}}</text>
 					</view>
-					<view class="p-price-none" v-if="product.actStatus == 1">¥{{product.price1.toFixed(2)}}</view>
 					<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+				</view>				
+			</view>	
+			<view v-if="userIdentity == 4">
+				<view v-if="product.price1TextFlag == '1'" class="wrap-main-pricenone">
+					<text class="wrap-main-text">¥未公开价格</text>
 				</view>
-				<view class="wrap-ladder" v-else>
-					<view class="ladder-main tui-skeleton-fillet">
-						<view class="ladder-left">
-							<view class="ladder-b">起订量:</view>
-							<view class="ladder-b">价格:</view>
-						</view>
-						<view class="ladder-right">
-							<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
-								<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-								<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
-							</view>
+				<view v-if="product.price1TextFlag == '2'" class="wrap-main-pricenone">
+					<text class="wrap-main-text">¥价格仅会员可见</text>
+				</view>
+				<view  v-if="product.price1TextFlag == '0'" class="wrap-main-price">
+					<view class="p-main">
+						<view class="p-price tui-skeleton-fillet">
+							<text class="txt sm">¥</text>
+							<text class="txt big">{{retailPrice | NumFormat}}</text>
 						</view>
 					</view>
-				</view>
-			</view>					
-		</view>
-		<view class="" v-if="userIdentity == 2">
-			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
-				<text>未公开价格</text>
+				</view>		
+				<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
 			</view>
-			<view class="wrap-main-price" v-else>
-				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
-					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" :src="iconActive" mode="" ></image>
-					</view>
-					<view class="p-price tui-skeleton-fillet">
-						<text class="txt sm">¥</text>
-						<text class="txt big">{{retailPrice}}</text>
-						<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
-					</view>
-					<view class="p-price-none" v-if="product.actStatus == 1">¥{{product.price1.toFixed(2)}}</view>
-					<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+			<view v-if="userIdentity == 2">
+				<view v-if="product.price1TextFlag == '1'" class="wrap-main-pricenone">
+					<text class="wrap-main-text">¥未公开价格</text>
 				</view>
-				<view class="wrap-ladder" v-else>
-					<view class="ladder-main tui-skeleton-fillet">
-						<view class="ladder-left">
-							<view class="ladder-b">起订量:</view>
-							<view class="ladder-b">价格:</view>
-						</view>
-						<view class="ladder-right">
-							<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
-								<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-								<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
-							</view>
+				<view v-else class="wrap-main-price">
+					<view class="p-main">
+						<view class="p-price tui-skeleton-fillet">
+							<text class="txt sm">¥</text>
+							<text class="txt big">{{retailPrice | NumFormat}}</text>
 						</view>
 					</view>
+				</view>	
+				<view class="p-minBuy">起订量:<text class="min-text">{{minBuyNumber}}</text></view>
+			</view>
+			<view class="wrap-main-act">
+				<view v-if="product.actStatus==1" class="floor-item-act">
+					<view v-if="product.promotions.type == 1 && product.promotions.mode==1"  class="floor-tags" @click.stop="click">
+						{{product.promotions.name}}<text v-if="hasLogin">:¥{{ product.price | NumFormat }}</text>
+					</view>
+					<view v-else class="floor-tags" @click.stop="click">{{product.promotions.name}}</view>	
 				</view>
-			</view>	
-		</view>
+				<view  v-if="product.actStatus ==0  &&  product.ladderPriceFlag==1" class="floor-item-act">
+					<view class="floor-tags" @click.stop="click">阶梯价格</view>	
+				</view>
+				<view v-if="userIdentity == 4" class="floor-item-btn">
+					<view class="btn" @click.stop="goUpgradeApply">去升级会员查看价格</view>
+				</view>
+			</view>
+		</template>
 	</view>
 </template>
 
 <script>
-	import iconActive from '@/static/temp/icon-active.png'
+	import { mapState,mapMutations } from 'vuex'
 	export default{
 		name:'cm-price',
 		props:{
@@ -122,9 +99,6 @@
 			retailPrice:{
 				type:String,
 			},
-			smallMoney:{
-				type:String,
-			},
 			minBuyNumber:{
 				type: Number,
 				default: 1
@@ -132,19 +106,27 @@
 		},
 		data() {
 			return{
-				iconActive:iconActive
+				
 			}
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
 		created() {
 			
+		},
+		computed: {
+			...mapState(['hasLogin','isWxAuthorize'])
 		},
 		methods:{
 			goUpgradeApply(){
 				this.$api.navigateTo('/pages/login/apply')
 			},
-			toFixedFn(text){//处理小数点后两位数
-				return Number(text).toFixed(2);
-			},
+			loginClick(){
+				this.$api.navigateTo('/pages/login/login')
+			}
 		},
 		
 	}

+ 63 - 104
pages/goods/product.vue

@@ -35,24 +35,16 @@
 						<view class="productRemarks" v-if="product.productRemarks!=''&&product.productRemarks!=null">
 							<view class="">{{product.productRemarks}}</view>
 						</view>
+						<view class="wrap-label" v-if="product.tagsList.length>0">
+							<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
+						</view>
 						<view class="wrap-top-price" v-if="!goodsData.isNoneDisabled">
-							<view v-if="!hasLogin" class="p-login grade  tui-skeleton-fillet">
-								<text class="p-no">价格:</text>
-								<view class="price-left" v-if="linkPath === 'activity'">
-									<text class="none">¥<text>???</text></text>
-								</view>
-								<uni-stars v-else  :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
-								<view class="p-login tui-skeleton-fillet">
-									<text class="p-login-btn" @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
-								</view>
-							</view>
-							<view class="cm-price" v-else>
+							<view class="cm-price">
 								<cm-price v-if="isRequest"
 										  :product="product"
 										  :userIdentity="userIdentity"
 										  :ladderPriceList="ladderPriceList"
 										  :retailPrice="retailPrice"
-										  :smallMoney="smallMoney"
 										  :minBuyNumber="minBuyNumber"/>
 							</view>
 						</view>
@@ -203,7 +195,6 @@
 	import cmParameter from "@/components/cm-module/productDetails/cm-parameter" //相关参数
 	import cmService from "@/components/cm-module/productDetails/cm-service" //服务项目
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { queryProductDetils } from "@/api/product.js" 
 	import { shoppingAddCart } from "@/api/cart.js" 
 	var isPreviewImg;
 	export default{
@@ -294,7 +285,7 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				queryProductDetils({userId:this.userID,productID:this.productID}).then(response =>{	
+				this.ProductService.queryProductDetils({userId:this.userID,productID:this.productID}).then(response =>{	
 					this.skeletonShow = false
 					this.productImage=[];
 					this.shop = response.data.shop
@@ -674,13 +665,51 @@
 				-webkit-box-orient: vertical;
 				-webkit-line-clamp: 2;
 				overflow: hidden;
-				margin-bottom: 16rpx;
+			}
+			.wrap-main-act{
+				width: 100%;
+				height: 56rpx;
+				float: left;
+				margin-top: 14rpx;
+				.floor-item-act{
+					height: 56rpx;
+					text-align: center;
+					box-sizing: border-box;
+					float: left;
+					padding: 0 0 20rpx 0;
+					.floor-tags{
+						float: right;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
+				.floor-item-btn{
+					float: right;
+					height: 56rpx;
+					.btn{
+						line-height: 56rpx;
+						padding: 0 20rpx;
+						height: 56rpx;
+						background: $btn-confirm;
+						color: #FFFFFF;
+						font-size: $font-size-20;
+						border-radius: 4rpx;
+					}
+				}
 			}
 			.wrap-main-pricenone{
 				line-height: 44rpx;
 				color: #FF2A2A;
-				font-size: $font-size-28;
-				font-weight: 600;
+				font-size: $font-size-26;
+				font-weight: normal;
+				float: left;
 			}
 			.wrap-main-text{
 				display: block;
@@ -700,19 +729,6 @@
 				text-align: center;
 				font-size: $font-size-24;
 			}
-			.p-active{
-				width: 130rpx;
-				height: 44rpx;
-				display: flex;
-				align-items: center;
-				flex-direction: row;
-				float: left;
-				.icon-active{
-					width: 124rpx;
-					height: 30rpx;
-					display: block;
-				}
-			}
 			.p-price{
 				height: 44rpx;
 				line-height: 44rpx;
@@ -757,7 +773,6 @@
 				color: $color-system;
 				font-size: $font-size-24;
 				&.grade{
-					margin-bottom: 20rpx;
 					.price-left{
 						float: left;
 						.none{
@@ -779,6 +794,7 @@
 					float: left;
 					margin-right: 5rpx;
 					font-size: $font-size-28;
+					color: $text-color;
 				}
 				.p-login-btn{
 					display: block;
@@ -794,87 +810,30 @@
 				}
 			}
 		}
-		.wrap-active{
-			width: 100%;
-			float: left;
-			height: 80rpx;
-			background: linear-gradient(225deg,rgba(255,143,101,1) 0%,rgba(248,79,57,1) 100%);
-			line-height: 80rpx;
-			font-size: $font-size-26;
-			color: #FFFFFF;
-			text-align: center;
-		}
-		.wrap-ladder{
-			float: left;
-			width: 702rpx;
-			border-bottom: 1px solid #F8F8F8;
-			.ladder-text{
-				height: 34rpx;
-				line-height: 34rpx;
-				margin-bottom: 24rpx;
-				font-size: 24rpx;
-				color: #999999;
-				.ladder-p{
-					font-size: 20rpx;
-				}
-			}
-			.ladder-main{
-				width: 654rpx;
-				height: 102rpx;
-				padding: 24rpx;
-				background: url(https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_WASybTAAI2gyWbunM918.png);
-				background-size: cover;
-				border-radius: 20rpx;
-				display: flex;
-				.ladder-left{
-					flex: 1.5;
-					line-height: 51rpx;
-					font-size: 24rpx;
-					.ladder-b{
-						text-align-last: justify;
-					}
-				}
-				.ladder-right{
-					height: 100%;
-					display: flex;
-					align-items: center;
-					flex: 8.5;
-					.ladder-li{
-						height: 100%;
-						flex: 1;
-						display:flex;
-						flex-flow: column;
-						align-items: center;
-						.ladder-a{
-							flex: 1;
-							height: 51rpx;
-							line-height: 51rpx;
-							font-size: 26rpx;
-							text-align: justify;
-							color: #FA6400;	
-							font-weight: bold;
-						}
-					}
-				}
-			}
-		}
 		.wrap-label{
 			float: left;
-			width: 702rpx;
-			padding: 24rpx 24rpx 0 24rpx;
-			border-bottom: 1px solid #F8F8F8;
+			width: 100%;
+			box-sizing: border-box;
+			margin-top: 10rpx;
 			.label-a{
 				padding: 0 18rpx;
-				line-height: 40rpx;
-				font-size: $font-size-24;
-				color: #FFFFFF;
+				line-height: 32rpx;
+				font-size: $font-size-20;
+				color: #999999;
 				text-align: center;
-				border-radius: 20rpx;
-				background:#A69DFE;
+				border-radius: 16rpx;
+				background:#FFFFFF;
 				margin: 0 22rpx 22rpx 0;
 				display: inline-block;
+				border: 1px solid #EDEDED;
 			}
 		}
+		.wrap-top-price{
+			float: left;
+			width: 100%;
+			box-sizing: border-box;
+			margin-top: 10rpx;
+		}
 		.wrap-info{
 			float: left;
 			width: 702rpx;
@@ -966,7 +925,7 @@
 			display: inline-block;
 			float: left;
 			font-size: $font-size-24;
-			color: #EBEBEB;
+			color: #999999;
 			float: right;
 			padding-right: 48rpx;
 			overflow: hidden;

+ 0 - 1
pages/goods/secondProduct.vue

@@ -96,7 +96,6 @@
 	import secondDeatail from "@/components/cm-module/productDetails/secondDeatail" // 商品信息
 	import secondBrand from "@/components/cm-module/productDetails/secondBrand" // 品牌信息
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { queryProductDetils } from "@/api/product.js" 
 	import { shoppingAddCart } from "@/api/cart.js" 
 	var isPreviewImg;
 	export default{

+ 68 - 52
pages/search/search.vue

@@ -30,34 +30,40 @@
 							<view>商品编码:{{item.p_code}}</view>
 						</view>
 						<view class="list-details-price">
+							<view class="floor-item-act" v-if="item.actStatus==1">
+								<view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{ item.price | NumFormat }}</text></view>
+								<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+							</view>
+							<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+								<view class="floor-tags">阶梯价格</view>	
+							</view>
 							<view v-if="hasLogin"class="list-price">
 								<view v-if="userIdentity == 1">
 									<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
-									<text v-else>¥<text class="price-larger">{{item.price?item.price :'0.00'}}</text></text>
+									<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{ item.price | NumFormat }}</text>
 								</view>	
 								<view v-if="userIdentity == 4">
 									<view class="price-larger" v-if="item.p_price_flag == '1'">
-										<text class="txt">未公开价格</text>
+										<text class="txt">未公开价格</text>
 									</view>
 									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
 									<view v-else>
 										<view class="price-larger" v-if="item.p_price_flag == '2'">
-											<text class="txt">价格仅会员可见</text>
-											<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
+											<text class="txt">¥价格仅会员可见</text>
 										</view>
-										<text v-else>¥<text class="price-larger">{{item.price ?item.price :'0.00'}}</text></text>
+										<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{ item.price | NumFormat }}</text>
 									</view>
 								</view>
 								<view v-if="userIdentity == 2">
 									<view class="price-larger" v-if="item.p_price_flag == '1'">
-										<text class="txt">未公开价格</text>
+										<text class="txt">未公开价格</text>
 									</view>
 									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
-									<text v-else>¥<text class="price-larger">{{item.price ? item.price :'0.00'}}</text></text>
+									<text v-else class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{ item.price | NumFormat }}</text>
 								</view>
 							</view>	
 							<view  v-else class="list-login-now">
-								<text class="p-no">价格:</text>
+								<text class="p-no"></text>
 								<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
 							</view>
 						</view>
@@ -99,7 +105,7 @@
 		},
 		data() {
 			return {
-				userID:'',
+				userID:0,
 				themeClass: 'block',
 				searchInputVal:'',	//搜索关键词
 				userIdentity:'',	
@@ -130,13 +136,18 @@
 			this.isFocus = true
 			this.initGetSerachRecord()			
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
 			initGetSerachRecord(){
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID ? resolve.userID : '';
+					this.userID = resolve.userID ? resolve.userID : 0;
 					this.userIdentity = resolve.userIdentity ? resolve.userIdentity : '';
 					if(this.userIdentity == 1){
 						this.identity = 1
@@ -191,10 +202,10 @@
 						this.showEmpty = false;
 						if(loadMore) {
 							this.listData = [...this.listData,...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 						} else {
 							this.listData = [...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 						}
 						// 防上拉暴滑
 						this.pullFlag = false;
@@ -223,8 +234,7 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			setProductPrice(){//获取价格
-				if (!this.hasLogin) {return false;}
+			getProductPrice(){//获取价格
 				let productIdArr = [];
 				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
 					productIdArr.push(item.p_id)
@@ -232,29 +242,24 @@
 				this.productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
 					if (response.data) {
-						let priceList = response.data
-						this.listData.map(item=>{
-							for (let i = 0; i < priceList.length; i++) {
-								let priceObj ={
-										actStatus:priceList[i].actStatus,
-										costCheckFlag:priceList[i].costCheckFlag,
-										costPrice:priceList[i].costPrice,
-										costProportional:priceList[i].costProportional,
-										ladderPriceFlag:priceList[i].ladderPriceFlag,
-										price:Number(priceList[i].price).toFixed(2),
-										minBuyNumber:priceList[i].minBuyNumber
-								}
-								if( item.p_id == priceList[i].productId ){
-									Object.assign(item,priceObj)
-								}
-							}
-						});
+						this.listData = this.ReturnNewProducts(this.listData,response.data);
 					}
 					this.priceLoading = false;
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+			ReturnNewProducts(Array,list){//处理对应商品ID的商品价格
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.p_id == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
 			onShowClose () {//输入框输入时触发
 				this.inputEmpty(this.searchInputVal)
 			},
@@ -393,7 +398,7 @@
 		
 	}
 	.search-container{
-		padding-top: 106rpx;
+		padding-top: 96rpx;
 	}
 	.s-block{
 		background: #FFFFFF;
@@ -578,11 +583,30 @@
 	}
 	.list-details-price {
 		width: 100%;
-		flex-direction: row;
-		justify-content: space-between;
+		height: 54rpx;
+		line-height: 54rpx;
 		position: absolute;
-		bottom: 0;
+		bottom: -10rpx;
 		right: 0;
+		.floor-item-act{
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: right;
+			.floor-tags{
+				float: right;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				margin-top: 9rpx;
+				font-size: $font-size-20;
+			}
+		}
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -594,15 +618,13 @@
 			vertical-align: middle;
 		}
 		.list-login-now {
-			width: 375rpx;
 			color: #F8C499;
-			position: absolute;
-			bottom: 0;
+			float: left;
+			line-height: 54rpx;
 			.p-no{
 				float: left;
 				font-size: $font-size-24;
-				color: $color-system;
-				margin-right: 10rpx;
+				color: $text-color;
 			}
 		}
 		.login-now {
@@ -610,9 +632,15 @@
 		}
 		.list-price {
 			color: #FF2A2A;
+			height: 44rpx;
+			float: left;
 			.price-larger {
 				width: 100%;
 				font-size: 32rpx;
+				&.none{
+					text-decoration: line-through;
+					color: #999999;
+				}
 				&.small{
 					font-size: $font-size-24;
 				}
@@ -623,18 +651,6 @@
 					text-align: left;
 					float: left;
 				}
-				.btn{
-					width: 112rpx;
-					height: 44rpx;
-					display: inline-block;
-					float: right;
-					background: $btn-confirm;
-					line-height: 44rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size: $font-size-24;
-					border-radius: 22rpx;
-				}
 			}
 		}
 	}

+ 57 - 17
pages/tabBar/home/home.vue

@@ -65,27 +65,34 @@
 								<view class="title tui-skeleton-rect">
 									<text class="mclap">{{item.name}}</text>
 								</view>
+								<view class="floor-item-act" v-if="item.actStatus==1">
+									<view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{item.price | NumFormat}}</text></view>	
+									<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+								</view>
+								<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+									<view class="floor-tags">阶梯价格</view>	
+								</view>
 								<view class="" v-if="hasLogin">
 									<view v-if="userIdentity == 4">
 										<view class="title-none" v-show="item.price1TextFlag == '1'">
-											<text class="p big">未公开价格</text>
+											<text class="p big">未公开价格</text>
 										</view>
 										<view class="title-none" v-show="item.price1TextFlag == '2'">
-											<text class="p big">价格仅会员可见</text>
+											<text class="p big">价格仅会员可见</text>
 											<text class="p btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
 										</view>
 										<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'">
 											<text class="p sm">¥</text>
-											<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
+											<text class="p big">{{ item.price | NumFormat}}</text>
 										</view>
 									</view>
 									<view v-else>
 										<view class="title-none" v-if="item.price1TextFlag == '1'">
 											<text class="p big">未公开价格</text>
 										</view>
-										<view class="price tui-skeleton-rect" v-else>
+										<view class="price tui-skeleton-rect" v-else :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">
 											<text class="p sm">¥</text>
-											<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
+											<text class="p big">{{item.price | NumFormat}}</text>
 										</view>
 									</view>
 								</view>
@@ -95,9 +102,6 @@
 										<uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
 									</view>
 								</view>	
-								<view class="" v-if="item.actStatus==1">
-									
-								</view>
 							</view>
 						</view>
 					</view>
@@ -217,6 +221,11 @@
 		},
 		onLoad() {
 			
+		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isActivity'])
@@ -285,7 +294,6 @@
 				productIds = productIdArr.join(",");
 				this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
 					this.organizeProducts = this.ReturnNewProducts(this.organizeProducts,response.data);
-					console.log(this.organizeProducts);
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -417,8 +425,14 @@
 				if(res == 1){
 					this.getWxAuthorize()
 				}else{
-					this.getHomeInformation()
-					this.getOrganizeProducts()
+					this.$api.getComStorage('userInfo').then((resolve) =>{
+						this.userID = resolve.userID ? resolve.userID :0;
+						this.getHomeInformation()
+						this.getOrganizeProducts()
+					}).catch(error =>{
+						console.log(error)
+					})
+
 				}
 			})			
 		}
@@ -614,7 +628,7 @@
 			border-radius: 20rpx;
 			.floor-item{
 				width: 341rpx;
-				height: 590rpx;
+				height: auto;
 				margin-right: 20rpx;
 				font-size: $font-size-24;
 				color: $text-color;
@@ -623,6 +637,8 @@
 				border-radius: 20rpx;
 				margin-bottom: 20rpx;
 				float: left;
+				box-sizing: border-box;
+				padding-bottom: 16rpx;
 				&:nth-child(2n){
 					margin-right: 0;
 				}
@@ -637,6 +653,26 @@
 					width: 311rpx;
 					padding: 0 15rpx;
 				}
+				.floor-item-act{
+					width: 100%;
+					height: 68rpx;
+					text-align: center;
+					box-sizing: border-box;
+					padding: 16rpx 0;
+					margin-top: 8rpx;
+					.floor-tags{
+						float: left;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
 				.title-none{
 					font-size: $font-size-26;
 					color: #FF2A2A;
@@ -673,8 +709,8 @@
 					}
 				}
 				.no-price{
-					height: 76rpx;
-					line-height: 76rpx;
+					height: 54rpx;
+					line-height: 54rpx;
 					display: flex;
 					box-sizing: border-box;
 					.p-no{
@@ -685,12 +721,16 @@
 					}
 					.p-stars{
 						width: 230rpx;
-						margin: 0 auto;
+						float: left;
 					}
 				}
 				.price{
-					color:#FF2A2A;
-					line-height: 80rpx;
+					color: #FF2A2A;
+					line-height: 44rpx;
+					&.none{
+						text-decoration: line-through;
+						color: #999999;
+					}
 					.sm{
 						font-size: $font-size-24;
 					}

+ 2 - 2
services/ajax.env.js

@@ -2,8 +2,8 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.2.56:8008'	 //俊俊联调地址
-	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
-	URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
+	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
     // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{

+ 9 - 1
services/product.service.js

@@ -19,11 +19,19 @@ export default class ProductService {
 	/**
 	 * @商品列表-查询商品价格
 	 * @param:userId 用户ID(未登录传0或者'')
-	 * @param:productIds 商品ID','符号拼接
+	 * @param:productID 商品ID','符号拼接
 	 */
 	querySearchProductPrice (data = {}) {
 		return this.AjaxService.get({ url:'/product/listPrice', data, isLoading: false })
 	}
+	/**
+	 * @商品详情-查询商品详情
+	 * @param:userId 用户ID(未登录传0或者'')
+	 * @param:productIds 商品ID
+	 */
+	queryProductDetils (data = {}) {
+		return this.AjaxService.get({ url:'/product/details', data, isLoading: false })
+	}
 
 	/* 余额抵扣 orderId 订单ID */
 	OrderBalanceDeduction (data = {}) {