|
@@ -85,7 +85,14 @@
|
|
|
<view class="zp-name">{{ygitem.alias}}</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
-
|
|
|
+ </view>
|
|
|
+ <view class='wrapper'>
|
|
|
+ <view class='item acea-row row-between-wrapper' @tap='couponTap'>
|
|
|
+ <view>优惠券</view>
|
|
|
+ <view class='discount'>{{couponTitle}}
|
|
|
+ <text class='iconfont icon-jiantou'></text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class='moneyList'>
|
|
|
|
|
@@ -156,7 +163,7 @@
|
|
|
import dayjs from '@/plugin/dayjs/dayjs.min.js';
|
|
|
import {
|
|
|
orderConfirm,
|
|
|
- getCouponsOrderPrice,
|
|
|
+ getCouponsServeOrderPrice,
|
|
|
orderCreate,
|
|
|
postOrderComputed,
|
|
|
checkShipping,
|
|
@@ -408,6 +415,21 @@
|
|
|
this.timeranges = arrayNew;
|
|
|
},
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 获取当前金额可用优惠券
|
|
|
+ *
|
|
|
+ */
|
|
|
+ getCouponList: function() {
|
|
|
+ let that = this;
|
|
|
+ let data = {
|
|
|
+ products:that.product_id,
|
|
|
+ store_id:that.system_store.id
|
|
|
+ }
|
|
|
+ getCouponsServeOrderPrice(this.totalPrice, data).then(res => {
|
|
|
+ that.$set(that.coupon, 'list', res.data);
|
|
|
+ that.openType = 1;
|
|
|
+ });
|
|
|
+ },
|
|
|
getUserInfo() {
|
|
|
let that = this
|
|
|
getUserInfo().then(res => {
|
|
@@ -421,7 +443,8 @@
|
|
|
},
|
|
|
computedServe() {
|
|
|
computedServe({
|
|
|
- products: this.product_id
|
|
|
+ products: this.product_id,
|
|
|
+ coupon_id:this.couponId
|
|
|
}).then(ress => {
|
|
|
console.log(ress)
|
|
|
this.payInfo = ress.data
|
|
@@ -774,6 +797,7 @@
|
|
|
store_id: that.system_store.id,
|
|
|
reservation_time: that.yytime,
|
|
|
sale_uid: that.sale_yg.id || 0,
|
|
|
+ coupon_id:this.couponId,
|
|
|
// #ifdef MP-WEIXIN
|
|
|
from: "routine"
|
|
|
// #endif
|
|
@@ -1101,7 +1125,8 @@
|
|
|
this.yg.list = []
|
|
|
this.yg.loadingType = 'more'
|
|
|
this.yg.page = 1
|
|
|
- this.getMen()
|
|
|
+ this.getMen();
|
|
|
+ this.getCouponList();
|
|
|
}).catch(err => {})
|
|
|
},
|
|
|
// 关闭地址弹窗;
|
|
@@ -1121,10 +1146,11 @@
|
|
|
},
|
|
|
changePayType(type) {
|
|
|
this.payType = type
|
|
|
- // this.computedPrice()
|
|
|
+ this.computedPrice()
|
|
|
},
|
|
|
computedPrice: function() {
|
|
|
let shippingType = this.shippingType;
|
|
|
+ console.log(this.priceGroup.couponPrice == 0 ? 0 : this.couponId,'this.priceGroup.couponPrice == 0 ? 0 : this.couponId');
|
|
|
postOrderComputed(this.orderKey, {
|
|
|
addressId: this.addressId,
|
|
|
useIntegral: this.useIntegral ? 1 : 0,
|
|
@@ -1241,7 +1267,9 @@
|
|
|
* 获取当前订单详细信息
|
|
|
*
|
|
|
*/
|
|
|
- getConfirm: function(numType) {},
|
|
|
+ getConfirm: function(numType) {
|
|
|
+ this.computedServe();
|
|
|
+ },
|
|
|
/*
|
|
|
* 获取默认收货地址或者获取某条地址信息
|
|
|
*/
|