zhengjinyi 4 years ago
parent
commit
ccf1c93e06
2 changed files with 32 additions and 18 deletions
  1. 31 18
      components/cm-module/productDetails/cm-price.vue
  2. 1 0
      pages/goods/product.vue

+ 31 - 18
components/cm-module/productDetails/cm-price.vue

@@ -98,9 +98,9 @@
 									<view class="ladder-item-td">起订量</view>
 									<view class="ladder-item-td">价格</view>
 								</view>
-								<view class="ladder-item" v-for="(ladd, index) in 3" :key="index">
-									<view class="ladder-item-td">2~3</view>
-									<view class="ladder-item-td">200.00</view>
+								<view class="ladder-item" v-for="(ladd, index) in product.ladderPriceList" :key="index">
+									<view class="ladder-item-td">{{ ladd.buyNumRangeShow }}</view>
+									<view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
 								</view>
 							</view>
 						</view>	
@@ -109,28 +109,31 @@
 						<view class="tui-scrollview-box">
 							<view class="box-text">
 								<text>促销时间:</text>
-								<text v-if="product.promotions.status==1">不限时</text>
-								<text v-else>{{ product.promotions.beginTime }} ~ {{ product.promotions.endTime }}</text>
+								<text class="txt" v-if="promotions.status == 1">不限时</text>
+								<text class="txt" v-else>{{ promotions.beginTime }} ~ {{ promotions.endTime }}</text>
 							</view>
-							<view class="box-title" v-if="product.promotions.mode==2">
-								{{product.promotions.name+',满 ¥'+ product.promotions.touchPrice  +' 减 ¥'+ product.promotions.reducedPrice }}
+							<view class="box-title" v-show="promotions.mode ==2">
+								<text>购买凑单商品,满</text>
+								<text class="txt">¥{{promotions.touchPrice}}</text>减
+								<text class="txt">¥{{promotions.reducedPrice}}</text>
 							</view>
-							<view class="box-title" v-if="product.promotions.mode==3">
-								{{product.promotions.name+',满 ¥'+ product.promotions.touchPrice +' 赠送商品'}}
+							<view class="box-title" v-show="promotions.mode==3">
+								<text>购买购买凑单商品,满</text>
+								<text class="txt">¥{{promotions.touchPrice}}</text>赠送商品
 							</view>
-							<view class="box-product" v-if="product.promotions.mode==3">
+							<view class="box-product" v-show="promotions.mode==3">
 								<view class="title">赠送商品:</view>
-								<view class="box-product-main"  v-for="(item, index) in product.promotions.giftList" :key="index">
-									<view class="image"><image :src="product.mainImage" mode="widthFix"></image></view>
+								<view class="box-product-main"  v-for="(item, index) in promotions.giftList" :key="index">
+									<view class="image"><image :src="item.image" mode="widthFix"></image></view>
 									<view class="info">
-										<view class="name">{{item.name}}}</view>
-										<view class="num">X{{item.number}}</view>
+										<view class="name">{{ item.name }}</view>
+										<view class="num">X{{ item.number }}</view>
 									</view>
 								</view>
 							</view>
 						</view>
 					</template>
-					<view class="tui-right-flex tui-popup-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
+					<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
 						<view class="tui-flex-1">
 							<view class="tui-button" v-if="product.promotions.type == 2" @click="hidePopup()">更多凑单商品</view>
 							<view class="tui-button" v-else @click="hidePopup()">了解</view>
@@ -156,6 +159,9 @@
 			},
 			ladderPriceList:{
 				type: Array,
+			},
+			promotions:{
+				type:Object,
 			}
 		},
 		data() {
@@ -251,15 +257,22 @@
 		}
 		.box-title{
 			font-size: $font-size-26;
-			color: $color-system;
+			color: $text-color;
 			text-align: left;
 			line-height: 56rpx;
+			.txt{
+				color: $color-system;
+				margin: 0 8rpx;
+			}
 		}
 		.box-text{
 			font-size: $font-size-26;
-			color: rgba(225,86,22,0.6);
+			color: $text-color;
 			text-align: left;
 			line-height: 56rpx;
+			.txt{
+				color: $color-system;
+			}
 		}
 		.box-product{
 			width: 100%;
@@ -267,7 +280,7 @@
 			margin-top: 20rpx;
 			.title{
 				font-size: $font-size-24;
-				color: $color-system;
+				color: $text-color;
 				text-align: left;
 				line-height: 54rpx;
 			}

+ 1 - 0
pages/goods/product.vue

@@ -42,6 +42,7 @@
 							<cm-price v-if="isRequest"
 									  :product="product"
 									  :userIdentity="userIdentity"
+									  :promotions="product.promotions"
 									  :ladderPriceList="ladderPriceList"/>
 						</view>
 					</view>