Browse Source

运营活动页

zhengjinyi 4 years ago
parent
commit
85ee8d8cc6
2 changed files with 16 additions and 2 deletions
  1. 7 1
      components/cm-module/productDetails/cm-price.vue
  2. 9 1
      pages/goods/product.vue

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

@@ -12,6 +12,7 @@
 						<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>
 				<view class="wrap-ladder" v-else>
@@ -48,6 +49,7 @@
 						<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>
 				<view class="wrap-ladder" v-else>
@@ -80,6 +82,7 @@
 						<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>
 				<view class="wrap-ladder" v-else>
@@ -138,7 +141,10 @@
 		methods:{
 			goUpgradeApply(){
 				this.$api.navigateTo('/pages/login/apply')
-			}
+			},
+			toFixedFn(text){//处理小数点后两位数
+				return Number(text).toFixed(2);
+			},
 		},
 		
 	}

+ 9 - 1
pages/goods/product.vue

@@ -710,7 +710,6 @@
 				height: 44rpx;
 				line-height: 44rpx;
 				float: left;
-				
 				.txt{
 					color: #FF2A2A;
 					margin:0 2rpx;
@@ -722,6 +721,15 @@
 					font-size: $font-size-32;
 				}
 			}
+			.p-price-none{
+				height: 44rpx;
+				line-height: 44rpx;
+				float: left;
+				font-size: $font-size-24;
+				color: #666;
+				text-decoration: line-through;
+				margin-left: 10rpx;
+			}
 			.p-minBuy{
 				height: 44rpx;
 				line-height: 44rpx;