Browse Source

优惠金额从后台获取

gcz 5 days ago
parent
commit
ea2151a96c
1 changed files with 8 additions and 3 deletions
  1. 8 3
      pages/bookticket.vue

+ 8 - 3
pages/bookticket.vue

@@ -151,8 +151,8 @@
 						<view class="original-price">
 							原价¥{{pageContent.originalPrice}}
 						</view>
-						<view class="bottom-coupon" v-if="coupon.quota">
-							优惠券共减¥{{couponAmount}}
+						<view class="bottom-coupon" v-if="pageContent.preferentialPrice">
+							优惠共减¥{{pageContent.preferentialPrice}}
 						</view>
 					</view>
 				</view>
@@ -233,6 +233,7 @@ import {
 				selectGoodsList:[],
 				currentGoodsIndex: '', // 当前选择的商品ID
 				selectedVisitors: [], // 所有已选择的观影人idcard列表
+				salePrice:undefined,//获取第一次的销售价格
 			}
 		},
 		watch: {
@@ -346,6 +347,9 @@ import {
 				this.$u.api.getSettlementV2(params).then(res => {
 					// console.log('getSettlement',res.data);
 					this.pageContent = res.data;
+					if(!this.salePrice){
+						this.salePrice = this.pageContent.salePrice;
+					}
 					this.getMemberAll();
 				}).catch(err => {
 					console.log('getSettlement', err);
@@ -829,8 +833,9 @@ import {
 			findOrderCoupons() {
 				let goodsId = this.pageContent.goodsList[0].goodsId;
 				// console.log('findOrderCoupons-goodsId',goodsId)
+				console.log('this.salePrice',this.salePrice)
 			    let param = {
-			        salePrice: this.pageContent.salePrice,
+			        salePrice: this.salePrice,
 			        performId: this.performId,
 			        goodsId: goodsId
 			    };