zpj 1 rok temu
rodzic
commit
143b37d57b
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 3 3
      pages/index/order.vue
  2. 2 2
      pages/index/success.vue

+ 3 - 3
pages/index/order.vue

@@ -68,8 +68,7 @@
 					<view class="">
 						<span class="fs-30 fc-3">合计</span>
 						<span class="fs-30 fc-ED301D">¥</span>
-						<span class="fs-40 fc-ED301D fw-600"
-							v-if="discount&&discount>0">{{(totalPrice*discount).toFixed(2)}}</span>
+						<span class="fs-40 fc-ED301D fw-600" v-if="discount&&discount>0">{{(totalPrice*discount).toFixed(2)}}</span>
 						<span class="fs-40 fc-ED301D fw-600" v-else>{{totalPrice}}</span>
 					</view>
 				</view>
@@ -102,7 +101,8 @@
 					<view class="fs-42 fw-b fc-lan text-align-center">请出示{{payType == 1?'微信':'支付宝'}}付款码</view>
 					<view class="text-align-center">
 						<span class="fs-30 fc-9">应付</span>
-						<span class="fs-42 fc-ED301D fw-b">¥{{totalPrice}}</span>
+						<span class="fs-40 fc-ED301D fw-b" v-if="discount&&discount>0">¥{{(totalPrice*discount).toFixed(2)}}</span>
+						<span class="fs-42 fc-ED301D fw-b" v-else>¥{{totalPrice}}</span>
 					</view>
 					<image src="@/static/img/code-1.png" mode="scaleToFill"></image>
 					<view class="fs-30 fc-6 text-align-center">对准下方扫描口</view>

+ 2 - 2
pages/index/success.vue

@@ -27,13 +27,13 @@
 				totalPrice:'',//实付款
 				money:'',//原价
 				discount:'',
-				invite_code:'',
+				invite_code:'',	
 				shop_id:'',
 			}
 		},
 		onLoad(e) {
 			if(e.discount*1 > 0){
-				this.totalPrice = ((e.money*1)*(e.discount*1)).toFixed(2);
+				this.totalPrice = (((e.money*1)*(e.discount*1)*100).toFixed(2)/100).toFixed(2);
 			}else{
 				this.totalPrice = e.money;
 			}