diff --git a/components/orderCoupon.vue b/components/orderCoupon.vue
new file mode 100644
index 0000000..2994f5b
--- /dev/null
+++ b/components/orderCoupon.vue
@@ -0,0 +1,255 @@
+
+
+
+
+
+ 请选择优惠券
+
+
+
+ ¥
+ {{item.couponEntity.couponAmount}}
+ 满{{item.couponEntity.useLevel}}元可用
+
+
+
+ {{item.couponEntity.couponName}}
+ {{item.couponEntity.couponRange | couponType}}
+
+ 到期时间:{{item.effectType == 0 ? '永久有效' : item.endTime}}
+ 说明:{{item.couponEntity.remark}}
+
+
+
+
+ 不可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 411f79d..6e4ed79 100644
--- a/pages.json
+++ b/pages.json
@@ -741,6 +741,13 @@
{
"navigationBarTitleText" : "我的证书"
}
+ },
+ {
+ "path" : "pages/mine/wallet/couponList",
+ "style" :
+ {
+ "navigationBarTitleText" : "用户优惠券列表"
+ }
}
],
"globalStyle": {
diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue
index b6a2e31..adb2d91 100644
--- a/pages/bookShop/orderLCont.vue
+++ b/pages/bookShop/orderLCont.vue
@@ -215,8 +215,14 @@
运费 :
- ¥{{ orderContet.shippingMoney }}
+ ¥{{ orderContet.shippingMoney }}
+
+ 优惠券 :
+
+ - ¥{{ orderContet.couponAmount }}
+
积分 :
@@ -888,11 +894,33 @@ export default {
orderTabCLi(e) {
this.orderListTab = e;
},
+ async getCouponDetail(id){
+ await this.$http
+ .request({
+ url: "common/coupon/getCouponHistoryInfo",
+ method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
+ data: {
+ id
+ },
+ header: {
+ //默认 无 说明:请求头
+ "Content-Type": "application/json",
+ },
+ })
+ .then(async (res) => {
+ if(res.code != 0) return this.$commonJS.showToast(res.errMsg);
+ this.orderContet.couponAmount = res.couponHistory.couponEntity.couponAmount
+
+ }).catch(e => {
+ console.log(e);
+ this.$commonJS.showToast(e.errMsg);
+ })
+ },
// 获取订单详情
- getOrderList() {
+ async getOrderList() {
console.log("this.orderType", this.orderType);
- this.$http
+ await this.$http
.request({
url: "common/buyOrder/commonOrderDetail",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
@@ -904,12 +932,16 @@ export default {
"Content-Type": "application/json",
},
})
- .then((res) => {
+ .then(async (res) => {
this.customButton = [];
console.log("订单详情", res);
this.orderContet = res.data.buyOrder;
this.goodsList = res.data.productInfo;
this.consigneeShow = true;
+ // 存在优惠券信息,就查询优惠券集体金额
+ if(this.orderContet.couponId && this.orderContet.couponId != null){
+ await this.getCouponDetail(this.orderContet.couponId)
+ }
if (
this.orderContet.orderStatus == 2 &&
this.sheetList.length > 0 &&
diff --git a/pages/goods/order/index.vue b/pages/goods/order/index.vue
index f2ba75e..37ea29e 100644
--- a/pages/goods/order/index.vue
+++ b/pages/goods/order/index.vue
@@ -133,7 +133,7 @@
- {{ v.text }}
+ {{ v.text }}
(全部积分:{{ initData.user.jf }})
@@ -147,12 +147,29 @@
}}
+
+
+ 可用({{couponHistoryList.length}})张
+ 选择优惠券
+
+
+ 暂无可用优惠券
+
+
+
+
+ - ¥ {{curCoupon.couponEntity.couponAmount}}
+ 重新选择
+
+
+
+
-¥{{ jfNumberShow }}
-
+
可用积分({{ jfNumberMax }}分)
@@ -360,12 +377,14 @@
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy" />
-
+
+