Sfoglia il codice sorgente

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
获取可用优惠券修改

1004749546@qq.com 4 anni fa
parent
commit
ea5a670fd2
1 ha cambiato i file con 17 aggiunte e 1 eliminazioni
  1. 17 1
      pages/getOrder/getOrder.vue

+ 17 - 1
pages/getOrder/getOrder.vue

@@ -90,6 +90,7 @@
 </template>
 
 <script>
+	import {couponEnable} from '@/api/coupon.js'
 	import uniSteps from '@/components/uni-steps/uni-steps.vue'
 	import {
 		getUserInfo
@@ -283,7 +284,22 @@
 			},
 			// 获取用户可用优惠券
 			getCouponList() {
-
+				let params = {
+					consumAmount: this.amount, //订单金额
+					couponScopeList: [
+						{
+							
+						}
+					],
+					goodsType: 'ORDER'  // 	string消费商品类型 ORDER 工单/ORDER_BUNDLE套餐订单
+				}
+				couponEnable(params).then(res=> {
+					if (res.status == 200) {
+						this.couponList = res.data
+					} else {
+						this.couponList = []
+					}
+				})
 			},
 			// 格式化优惠券数据 获取优惠金额最大的优惠券 couponType 优惠券类型:FULLSUB满减/DISCOUNT折扣券/VOUCHER代金券
 			formatCouponData() {