Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/developerD' into developer

zhengjinyi 3 gadi atpakaļ
vecāks
revīzija
41fdef1728
30 mainītis faili ar 565 papildinājumiem un 190 dzēšanām
  1. 8 0
      src/main/resources/static/css/pay/caimei-paycash.css
  2. 6 4
      src/main/resources/static/css/product/detail.h5.css
  3. 6 4
      src/main/resources/static/css/product/detail.pc.css
  4. 17 14
      src/main/resources/static/css/shopping/shopping.css
  5. 12 8
      src/main/resources/static/css/user-center/account/coupon-collection.css
  6. 4 4
      src/main/resources/static/css/user-center/account/coupon.css
  7. BIN
      src/main/resources/static/img/account/icon-coupon-none@2x.png
  8. BIN
      src/main/resources/static/img/account/icon-coupon-none@h52x.png
  9. BIN
      src/main/resources/static/img/account/icon-coupon-received@2x.png
  10. BIN
      src/main/resources/static/img/account/icon-coupon-received@h52x.png
  11. BIN
      src/main/resources/static/img/account/icon-coupon-uesb@2x.png
  12. BIN
      src/main/resources/static/img/account/icon-coupon-uesb@h52x.png
  13. 36 0
      src/main/resources/static/js/common/serviceapi/pay.service.js
  14. 16 0
      src/main/resources/static/js/common/serviceapi/product.service.js
  15. 256 131
      src/main/resources/static/js/pay/caimei-paycash.js
  16. 19 2
      src/main/resources/static/js/pay/caimei-paymobile.js
  17. 9 0
      src/main/resources/static/js/pay/caimei-success.js
  18. 40 1
      src/main/resources/static/js/pay/caimei-wechatpay.js
  19. 3 0
      src/main/resources/static/js/product/detail.js
  20. 3 0
      src/main/resources/static/js/shopping/cart.js
  21. 3 0
      src/main/resources/static/js/user-center/account/coupon-collection.js
  22. 2 0
      src/main/resources/static/js/utils.js
  23. 13 4
      src/main/resources/templates/pay/caimei-paycash.html
  24. 2 2
      src/main/resources/templates/pay/caimei-paymobile.html
  25. 3 3
      src/main/resources/templates/product/beautytopic.html
  26. 25 3
      src/main/resources/templates/product/detail.html
  27. 29 4
      src/main/resources/templates/shopping/cart.html
  28. 7 1
      src/main/resources/templates/shopping/confirm.html
  29. 25 3
      src/main/resources/templates/user-center/account/coupon-collection.html
  30. 21 2
      src/main/resources/templates/user-center/account/coupon.html

+ 8 - 0
src/main/resources/static/css/pay/caimei-paycash.css

@@ -37,6 +37,7 @@ input::-webkit-outer-spin-button {
     .pay-title .pay-input .input-text{font-size: 18px;color: #333333;}
     .pay-title .pay-input .input-text span{font-size: 14px;}
     .pay-title .pay-input .input{width: 215px;height: 34px;display: inline-block;font-size: 14px;line-height: 34px;padding: 0 10px;border: 1px solid #EBEBEB;border-radius: 5px;}
+    /*超级会员*/
     .pay-svip{margin-top:24px}
     .pay-svip+.pay-method .method-title{background:#F5F5F5 !important}
     .pay-svip .pay-svip-title{padding:0 0 16px 16px;font-size:16px;font-weight:400;color:#2D3036}
@@ -46,6 +47,13 @@ input::-webkit-outer-spin-button {
     .pay-svip .pay-svip-detail .pay-amount{margin-left:18px;font-size:28px;font-weight:bold;color:#4E4539}
     .pay-svip .pay-svip-detail .pay-amount > span{font-size:12px;vertical-align:0}
     .pay-svip .svip-indent{padding-top:24px;font-size:16px;font-weight:bold;color:#4E4539}
+    /*优惠券*/
+    .pay-coupontitle{line-height: 72px;font-size: 24px;width: 100%;box-sizing: border-box;padding: 0 16px;font-weight: bold;}
+    .pay-coupon{width: 100%;height: 118px;box-sizing: border-box;padding: 16px;background: #FFFFFF;}
+    .pay-coupon .pay-coupon-title{width: 100%;line-height: 24px;font-size: 18px;color: #333333;margin-bottom: 16px;}
+    .pay-coupon .pay-coupon-title span{color: #E15621;}
+    .pay-coupon .pay-coupon-content{font-size: 24px;color: #333333;line-height: 32px;}
+    .pay-coupon .pay-coupon-content span{color: #F94B4B;font-weight: bold;}
     .pay-ment{width: 100%;height: auto;float: left;background: #FFFFFF;margin-top: 7px;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);}
     .pay-ment .pay-record{width: 100%;height: auto;float: left;background: #FFFFFF;padding: 10px 0;box-sizing:border-box;}
     .pay-ment .pay-record .record-title{width: 100%;padding: 0 20px;background: #FFFFFF;line-height: 44px;font-size: 16px;color: #333333;text-align: left;box-sizing:border-box;}

+ 6 - 4
src/main/resources/static/css/product/detail.h5.css

@@ -125,15 +125,17 @@ li{list-style:none}
 .coupon-popup .coupon-popup-content .empty .msg{color: #999;font-size: 3vw;}
 .coupon-popup .coupon-popup-scroll{width:100%;height:100%;box-sizing:border-box;float:left;overflow:hidden;overflow-y:auto}
 .coupon-popup .coupon-list-cell{width: 93.1vw;height: 33vw;float: left;margin: 0 0 2.4vw 0;position: relative;border-radius: 1vw;}
-.coupon-popup .coupon-list-cell .coupon-list-le{width: 77.6vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
+.coupon-popup .coupon-list-cell .coupon-list-le{width: 70.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
 .coupon-popup .coupon-list-cell .coupon-list-money{width: 100%;height:10vw;line-height: 10vw;color: #f94b4b;font-size: 3vw;text-align: left; }
 .coupon-popup .coupon-list-cell .coupon-list-money .maxMoney{font-size: 7.2vw;margin-right: 2.4vw;}
 .coupon-popup .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
 .coupon-popup .coupon-list-cell .coupon-list-name{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #333333;font-size: 3.4vw;text-align: left;margin-top: 4vw;}
 .coupon-popup .coupon-list-cell .coupon-list-time{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #999999;font-size: 2.4vw;text-align: left;}
-.coupon-popup .coupon-list-cell .coupon-list-ri{width: 15.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
-.coupon-popup .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 6vw;}
-.coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 6vw;}
+.coupon-popup .coupon-list-cell .coupon-list-ri{width: 22.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
+.coupon-popup .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 12vw 0 0 0;text-align: center;}
+.coupon-popup .coupon-list-cell .coupon-list-ri .buy p{font-size: 3.4vw;}
+.coupon-popup .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 9.5vw;}
+.coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 9.5vw;}
 .coupon-popup .coupon-list-cell .coupon-tags{height: 4.8vw;line-height: 4.8vw;text-align: center;background-color: #f94b4b;color: #FFF;border-radius: 1.6vw 0 1.6vw 0;position: absolute;top: 0;left: 0;padding: 0 1.5vw;font-size: 3vw;}
 .coupon-popup .coupon-list-cell{background: url("/img/account/icon-coupon-uesb@h52x.png") no-repeat;background-size: cover;}
 .coupon-popup .coupon-list-cell.none{background: url("/img/account/icon-coupon-received@h52x.png") no-repeat;background-size: cover;}

+ 6 - 4
src/main/resources/static/css/product/detail.pc.css

@@ -236,14 +236,16 @@ input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appear
 .coupon-popup .coupon-popup-scroll{width:100%;height:100%;box-sizing:border-box;padding:0 45px;float:left;overflow:hidden;overflow-y:auto}
 .coupon-popup .coupon-list-cell{width: 369px;height: 148px;float: left;margin-bottom:24px;position: relative;background: url("/img/account/icon-coupon-uesb@2x.png") no-repeat;background-size: cover;}
 .coupon-popup .coupon-list-cell.none{background: url("/img/account/icon-coupon-received@2x.png") no-repeat;background-size: cover;}
-.coupon-popup .coupon-list-cell .coupon-list-le{width: 299px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
+.coupon-popup .coupon-list-cell .coupon-list-le{width: 260px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
 .coupon-popup .coupon-list-cell .coupon-list-money{width: 100%;height: 56px;line-height: 56px;color: #f94b4b;font-size: 14px;text-align: left;}
 .coupon-popup .coupon-list-cell .coupon-list-money .maxMoney{font-size: 40px;margin-right: 8px;}
 .coupon-popup .coupon-list-cell .coupon-list-name{width: 100%;height: 22px;line-height: 22px;color: #333333;font-size: 14px;text-align: left;margin-top: 13px;}
 .coupon-popup .coupon-list-cell .coupon-list-time{width: 100%;height: 22px;line-height: 22px;color: #999999;font-size: 12px;text-align: left;}
-.coupon-popup .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
-.coupon-popup .coupon-list-cell .coupon-list-ri span{display:block;padding: 45px 27px;color: #FFFFFF;}
-.coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 54px 27px;color: #FFFFFF;}
+.coupon-popup .coupon-list-cell .coupon-list-ri{width: 109px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
+.coupon-popup .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 58px 0 0 0;text-align: center;}
+.coupon-popup .coupon-list-cell .coupon-list-ri .buy p{font-size: 16px;}
+.coupon-popup .coupon-list-cell .coupon-list-ri span{display:block;padding: 45px 47px;color: #FFFFFF;}
+.coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 54px 47px;color: #FFFFFF;}
 .coupon-popup .coupon-list-cell .coupon-tags{height: 24px;line-height: 24px;text-align: center;border-radius: 8px 0 8px 0;position: absolute;top: 0;left: 0;padding: 0 10px;background-color: #f94b4b;color: #FFF;}
 
 /*资料样式*/

+ 17 - 14
src/main/resources/static/css/shopping/shopping.css

@@ -83,15 +83,15 @@ li{list-style:none}
     /*优惠券选择*/
     .couponWrap{width: 100%;min-height: 200px;box-sizing: border-box;padding: 32px 16px 10px 16px;background: #FFF;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);margin-bottom: 32px;float: left;}
     .couponWrap .coupon-list-cell{width: 369px;height: 148px;float: left;cursor: pointer;margin-bottom:24px;margin-right: 15px;position: relative;background: url("/img/account/icon-coupon-uesb@2x.png") no-repeat;background-size: cover;}
-    .couponWrap .coupon-list-cell .coupon-list-le{width: 299px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;position: relative;}
+    .couponWrap .coupon-list-cell .coupon-list-le{width: 260px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;position: relative;}
     .couponWrap .coupon-list-cell .coupon-list-le .coupon-list-checked{position: absolute;right: 16px;top: 16px;width: 16px;height: 16px;background: url("/img/cart/icon_weigouxuan@2x.png") no-repeat;background-size: cover;}
     .couponWrap .coupon-list-cell .coupon-list-le .coupon-list-checked.checked{background: url("/img/cart/icon_yixuanze@2x.png") no-repeat;background-size: cover;}
     .couponWrap .coupon-list-cell .coupon-list-money{width: 100%;height: 56px;line-height: 56px;color: #f94b4b;font-size: 14px;text-align: left;}
     .couponWrap .coupon-list-cell .coupon-list-money .maxMoney{font-size: 40px;margin-right: 8px;}
     .couponWrap .coupon-list-cell .coupon-list-name{width: 100%;height: 22px;line-height: 22px;color: #333333;font-size: 14px;text-align: left;margin-top: 13px;}
     .couponWrap .coupon-list-cell .coupon-list-time{width: 100%;height: 22px;line-height: 22px;color: #999999;font-size: 12px;text-align: left;}
-    .couponWrap .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;padding: 54px 27px;font-size: 16px;color: #FFF;cursor: pointer;}
-    .couponWrap .coupon-list-cell .coupon-list-ri.none{padding: 45px 27px;}
+    .couponWrap .coupon-list-cell .coupon-list-ri{width: 109px;height: 148px;float: left;box-sizing: border-box;padding: 54px 47px;font-size: 16px;color: #FFF;cursor: pointer;}
+    .couponWrap .coupon-list-cell .coupon-list-ri.none{padding: 45px 47px;}
     .couponWrap .coupon-list-cell .coupon-tags{height: 24px;line-height: 24px;text-align: center;border-radius: 8px 0 8px 0;position: absolute;top: 0;left: 0;padding: 0 10px;background-color: #f94b4b;color: #FFF;}
 
     /* 底部结算 */
@@ -225,13 +225,16 @@ li{list-style:none}
     .coupon-popup .coupon-popup-scroll{width:100%;height:100%;box-sizing:border-box;padding:0 45px;float:left;overflow:hidden;overflow-y:auto}
     .coupon-popup .coupon-list-cell{width: 369px;height: 148px;float: left;margin-bottom:24px;position: relative;background: url("/img/account/icon-coupon-uesb@2x.png") no-repeat;background-size: cover;}
     .coupon-popup .coupon-list-cell.none{background: url("/img/account/icon-coupon-received@2x.png") no-repeat;background-size: cover;}
-    .coupon-popup .coupon-list-cell .coupon-list-le{width: 299px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
+    .coupon-popup .coupon-list-cell .coupon-list-le{width: 260px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
     .coupon-popup .coupon-list-cell .coupon-list-money{width: 100%;height: 56px;line-height: 56px;color: #f94b4b;font-size: 14px;text-align: left;}
     .coupon-popup .coupon-list-cell .coupon-list-money .maxMoney{font-size: 40px;margin-right: 8px;}
     .coupon-popup .coupon-list-cell .coupon-list-name{width: 100%;height: 22px;line-height: 22px;color: #333333;font-size: 14px;text-align: left;margin-top: 13px;}
     .coupon-popup .coupon-list-cell .coupon-list-time{width: 100%;height: 22px;line-height: 22px;color: #999999;font-size: 12px;text-align: left;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;padding: 54px 27px;font-size: 16px;color: #FFF;cursor: pointer;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri.none{padding: 45px 27px;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri{width: 109px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 58px 0 0 0;text-align: center;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri .buy p{font-size: 16px;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 45px 47px;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 45px 47px;}
     .coupon-popup .coupon-list-cell .coupon-tags{height: 24px;line-height: 24px;text-align: center;border-radius: 8px 0 8px 0;position: absolute;top: 0;left: 0;padding: 0 10px;background-color: #f94b4b;color: #FFF;}
     /*会员标签*/
     .listWrap .cartItem .priceTag .svip-tag{width:100%;height:22px;letter-spacing:0}
@@ -327,7 +330,7 @@ li{list-style:none}
     /*优惠券*/
     .couponWrap{width: 100%;box-sizing: border-box;padding: 4.8vw 3.2vw 2vw 3.2vw;background: #FFF;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);margin-bottom: 4.8vw;float: left;}
     .couponWrap .coupon-list-cell{width: 93.1vw;height: 33vw;float: left;margin: 0 0 2.4vw 0;position: relative;border-radius: 1vw;}
-    .couponWrap .coupon-list-cell .coupon-list-le{width: 77.6vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;position: relative;}
+    .couponWrap .coupon-list-cell .coupon-list-le{width: 70.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;position: relative;}
     .couponWrap .coupon-list-cell .coupon-list-le .coupon-list-checked{position: absolute;right: 4vw;top: 4vw;width: 3.6vw;height: 3.6vw;background: url("/img/cart/icon_weigouxuan@2x.png") no-repeat;background-size: cover;}
     .couponWrap .coupon-list-cell .coupon-list-le .coupon-list-checked.checked{background: url("/img/cart/icon_yixuanze@2x.png") no-repeat;background-size: cover;}
     .couponWrap .coupon-list-cell .coupon-list-money{width: 100%;height:10vw;line-height: 10vw;color: #f94b4b;font-size: 3vw;text-align: left; }
@@ -335,9 +338,7 @@ li{list-style:none}
     .couponWrap .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
     .couponWrap .coupon-list-cell .coupon-list-name{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #333333;font-size: 3.4vw;text-align: left;margin-top: 4vw;}
     .couponWrap .coupon-list-cell .coupon-list-time{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #999999;font-size: 2.4vw;text-align: left;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri span{display:block;padding: 45px 27px;color: #FFFFFF;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 54px 27px;color: #FFFFFF;}
+    .couponWrap .coupon-list-cell .coupon-list-ri{width: 22.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;padding: 9.5vw 9.5vw;}
     .couponWrap .coupon-list-cell .coupon-tags{height: 4.8vw;line-height: 4.8vw;text-align: center;background-color: #f94b4b;color: #FFF;border-radius: 1.6vw 0 1.6vw 0;position: absolute;top: 0;left: 0;padding: 0 1.5vw;font-size: 3vw;}
     .couponWrap .coupon-list-cell{background: url("/img/account/icon-coupon-uesb@h52x.png") no-repeat;background-size: cover;}
 
@@ -435,15 +436,17 @@ li{list-style:none}
     .coupon-popup .coupon-popup-content .empty .msg{color: #999;font-size: 3vw;}
     .coupon-popup .coupon-popup-scroll{width:100%;height:100%;box-sizing:border-box;float:left;overflow:hidden;overflow-y:auto}
     .coupon-popup .coupon-list-cell{width: 93.1vw;height: 33vw;float: left;margin: 0 0 2.4vw 0;position: relative;border-radius: 1vw;}
-    .coupon-popup .coupon-list-cell .coupon-list-le{width: 77.6vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
+    .coupon-popup .coupon-list-cell .coupon-list-le{width: 70.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
     .coupon-popup .coupon-list-cell .coupon-list-money{width: 100%;height:10vw;line-height: 10vw;color: #f94b4b;font-size: 3vw;text-align: left; }
     .coupon-popup .coupon-list-cell .coupon-list-money .maxMoney{font-size: 7.2vw;margin-right: 2.4vw;}
     .coupon-popup .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
     .coupon-popup .coupon-list-cell .coupon-list-name{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #333333;font-size: 3.4vw;text-align: left;margin-top: 4vw;}
     .coupon-popup .coupon-list-cell .coupon-list-time{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #999999;font-size: 2.4vw;text-align: left;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri{width: 15.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 6vw;}
-    .coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 6vw;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri{width: 22.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 12vw 0 0 0;text-align: center;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri .buy p{font-size: 3.4vw;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 9.5vw;}
+    .coupon-popup .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 9.5vw;}
     .coupon-popup .coupon-list-cell .coupon-tags{height: 4.8vw;line-height: 4.8vw;text-align: center;background-color: #f94b4b;color: #FFF;border-radius: 1.6vw 0 1.6vw 0;position: absolute;top: 0;left: 0;padding: 0 1.5vw;font-size: 3vw;}
     .coupon-popup .coupon-list-cell{background: url("/img/account/icon-coupon-uesb@h52x.png") no-repeat;background-size: cover;}
     .coupon-popup .coupon-list-cell.none{background: url("/img/account/icon-coupon-received@h52x.png") no-repeat;background-size: cover;}

+ 12 - 8
src/main/resources/static/css/user-center/account/coupon-collection.css

@@ -14,14 +14,16 @@ li{list-style:none}
     .coupon-content-list{width: 100%;height: auto;box-sizing: border-box;padding:24px 13px 7px 13px;}
     .coupon-list-cell{width: 369px;height: 148px;float: left;margin: 0 24px 17px 0;position: relative;background: url("/img/account/icon-coupon-uesb@2x.png") no-repeat;background-size: cover;}
     .coupon-list-cell:nth-child(3n){margin-right: 0;}
-    .coupon-list-cell .coupon-list-le{width: 299px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
+    .coupon-list-cell .coupon-list-le{width: 260px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
     .coupon-list-cell .coupon-list-money{width: 100%;height: 56px;line-height: 56px;color: #f94b4b;font-size: 14px;text-align: left;}
     .coupon-list-cell .coupon-list-money .maxMoney{font-size: 40px;margin-right: 8px;}
     .coupon-list-cell .coupon-list-name{width: 100%;height: 22px;line-height: 22px;color: #333333;font-size: 14px;text-align: left;margin-top: 13px;}
     .coupon-list-cell .coupon-list-time{width: 100%;height: 22px;line-height: 22px;color: #999999;font-size: 12px;text-align: left;}
-    .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
-    .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 45px 27px;}
-    .coupon-list-cell .coupon-list-ri span.none{padding: 54px 27px;}
+    .coupon-list-cell .coupon-list-ri{width: 109px;height: 148px;float: left;box-sizing: border-box;font-size: 16px;color: #FFF;cursor: pointer;}
+    .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 58px 0 0 0;text-align: center;}
+    .coupon-list-cell .coupon-list-ri .buy p{font-size: 16px;}
+    .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 45px 47px;}
+    .coupon-list-cell .coupon-list-ri span.none{padding: 54px 47px;}
     .coupon-list-cell .coupon-tags{height: 24px;line-height: 24px;text-align: center;border-radius: 8px 0 8px 0;position: absolute;top: 0;left: 0;padding: 0 10px;background-color: #f94b4b;color: #FFF;}
     .empty{width: 100%;float: left;}
     .empty img{width: 180px;height: 180px;}
@@ -37,15 +39,17 @@ li{list-style:none}
     .coupon-container{width: 100%;min-height: 500px;background-color: #FFFFFF;}
     .coupon-content-list{width: 100%;height: auto;box-sizing: border-box;padding:3.45vw;}
     .coupon-list-cell{width: 93.1vw;height: 33vw;float: left;margin: 0 0 2.4vw 0;position: relative;border-radius: 1vw;}
-    .coupon-list-cell .coupon-list-le{width: 77.6vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
+    .coupon-list-cell .coupon-list-le{width: 70.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
     .coupon-list-cell .coupon-list-money{width: 100%;height:10vw;line-height: 10vw;color: #f94b4b;font-size: 3vw;text-align: left; }
     .coupon-list-cell .coupon-list-money .maxMoney{font-size: 7.2vw;margin-right: 2.4vw;}
     .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
     .coupon-list-cell .coupon-list-name{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #333333;font-size: 3.4vw;text-align: left;margin-top: 4vw;}
     .coupon-list-cell .coupon-list-time{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #999999;font-size: 2.4vw;text-align: left;}
-    .coupon-list-cell .coupon-list-ri{width: 15.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
-    .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 6vw;}
-    .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 6vw;}
+    .coupon-list-cell .coupon-list-ri{width: 22.5vw;height: 33vw;float: left;box-sizing: border-box;font-size:3.4vw;color: #FFF;cursor: pointer;}
+    .coupon-list-cell .coupon-list-ri .buy{width: 100%;height: 100%;box-sizing: border-box;padding: 12vw 0 0 0;text-align: center;}
+    .coupon-list-cell .coupon-list-ri .buy p{font-size: 3.4vw;}
+    .coupon-list-cell .coupon-list-ri span{display: block;width: 100%;height: 100%;box-sizing: border-box;padding: 9.5vw 9.5vw;font-size: 4vw;}
+    .coupon-list-cell .coupon-list-ri span.none{padding: 11.8vw 9.5vw;}
     .coupon-list-cell .coupon-tags{height: 4.8vw;line-height: 4.8vw;text-align: center;background-color: #f94b4b;color: #FFF;border-radius: 1.6vw 0 1.6vw 0;position: absolute;top: 0;left: 0;padding: 0 1.5vw;font-size: 3vw;}
     .coupon-list-cell{background: url("/img/account/icon-coupon-uesb@h52x.png") no-repeat;background-size: cover;}
     .empty{width: 100%;float: left;}

+ 4 - 4
src/main/resources/static/css/user-center/account/coupon.css

@@ -19,13 +19,13 @@ li{list-style:none}
     .coupon-content-tabs .time-btn a:hover{color: #E15621;}
     .coupon-content-list{width: 100%;height: auto;box-sizing: border-box;padding:24px 147px 24px 24px;}
     .coupon-list-cell{width: 369px;height: 148px;float: left;margin: 0 24px 24px 0;position: relative;}
-    .coupon-list-cell .coupon-list-le{width: 299px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
+    .coupon-list-cell .coupon-list-le{width: 260px;height: 148px;float: left;box-sizing: border-box;padding: 24px 14px 12px 14px;}
     .coupon-list-cell .coupon-list-money{width: 100%;height: 56px;line-height: 56px;color: #f94b4b;font-size: 14px;text-align: left;}
     .coupon-list-cell .coupon-list-money .maxMoney{font-size: 40px;margin-right: 8px;}
     .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
     .coupon-list-cell .coupon-list-name{width: 100%;height: 22px;line-height: 22px;color: #333333;font-size: 14px;text-align: left;margin-top: 13px;}
     .coupon-list-cell .coupon-list-time{width: 100%;height: 22px;line-height: 22px;color: #999999;font-size: 12px;text-align: left;}
-    .coupon-list-cell .coupon-list-ri{width: 70px;height: 148px;float: left;box-sizing: border-box;padding: 45px 27px;font-size: 16px;color: #FFF;cursor: pointer;}
+    .coupon-list-cell .coupon-list-ri{width: 109px;height: 148px;float: left;box-sizing: border-box;padding: 45px 47px;font-size: 16px;color: #FFF;cursor: pointer;}
     .coupon-list-cell .coupon-list-ri.none{cursor: default;}
     .coupon-list-cell .coupon-tags{height: 24px;line-height: 24px;text-align: center;border-radius: 8px 0 8px 0;position: absolute;top: 0;left: 0;padding: 0 10px;}
     .coupon-list-cell .coupon-tags.used{background-color: #f94b4b;color: #FFF;}
@@ -53,13 +53,13 @@ li{list-style:none}
     .coupon-content-tabs .time-btn a:hover{color: #E15621;}
     .coupon-content-list{width: 100%;height: auto;box-sizing: border-box;padding:3.45vw;}
     .coupon-list-cell{width: 93.1vw;height: 33vw;float: left;margin: 0 0 2.4vw 0;position: relative;border-radius: 1vw;}
-    .coupon-list-cell .coupon-list-le{width: 77.6vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
+    .coupon-list-cell .coupon-list-le{width: 70.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 6.8vw 3.7vw 3.3vw 3.7vw;}
     .coupon-list-cell .coupon-list-money{width: 100%;height:10vw;line-height: 10vw;color: #f94b4b;font-size: 3vw;text-align: left; }
     .coupon-list-cell .coupon-list-money .maxMoney{font-size: 7.2vw;margin-right: 2.4vw;}
     .coupon-list-cell .coupon-list-money.none, .coupon-list-cell .coupon-list-name.none, .coupon-list-cell .coupon-list-time.none{color: #FFF;}
     .coupon-list-cell .coupon-list-name{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #333333;font-size: 3.4vw;text-align: left;margin-top: 4vw;}
     .coupon-list-cell .coupon-list-time{width: 100%;height: 4.8vw;line-height: 4.8vw;color: #999999;font-size: 2.4vw;text-align: left;}
-    .coupon-list-cell .coupon-list-ri{width: 15.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 9.5vw 6vw;font-size:3.4vw;color: #FFF;cursor: pointer;}
+    .coupon-list-cell .coupon-list-ri{width: 22.5vw;height: 33vw;float: left;box-sizing: border-box;padding: 9.5vw 9.5vw;font-size:3.4vw;color: #FFF;cursor: pointer;}
     .coupon-list-cell .coupon-list-ri.none{cursor: default;}
     .coupon-list-cell .coupon-tags{height: 4.8vw;line-height: 4.8vw;text-align: center;border-radius: 1.6vw 0 1.6vw 0;position: absolute;top: 0;left: 0;padding: 0 1.5vw;font-size: 3vw;}
     .coupon-list-cell .coupon-tags.used{background-color: #f94b4b;color: #FFF;}

BIN
src/main/resources/static/img/account/icon-coupon-none@2x.png


BIN
src/main/resources/static/img/account/icon-coupon-none@h52x.png


BIN
src/main/resources/static/img/account/icon-coupon-received@2x.png


BIN
src/main/resources/static/img/account/icon-coupon-received@h52x.png


BIN
src/main/resources/static/img/account/icon-coupon-uesb@2x.png


BIN
src/main/resources/static/img/account/icon-coupon-uesb@h52x.png


+ 36 - 0
src/main/resources/static/js/common/serviceapi/pay.service.js

@@ -189,6 +189,42 @@ var PayApi = {
                 callback(res);
             });
         },
+        PayCouponMiniWxPay: function(params, callback){ // 微信购买优惠券
+            Http.AjaxService({
+                url:'/order/pay/coupon/wechat',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        PayCouponMiniAliPay: function(params, callback){ // 支付宝购买优惠券
+            Http.AjaxService({
+                url:'/order/pay/coupon/alipay',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        PayCouponUnionPay: function(params, callback){ // 网银购买优惠券
+            Http.AjaxService({
+                url:'/order/pay/coupon/union',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
         PayGetBankCode: function(params, callback){ // 网银银行列表
             Http.AjaxService({
                 url:'/order/pay/bankcode',

+ 16 - 0
src/main/resources/static/js/common/serviceapi/product.service.js

@@ -345,6 +345,22 @@ var ProductApi = {
                 callback(res);
             });
         },
+        /**
+         * @优惠券-根据优惠券查询优惠券详细信息
+         * @param:couponId 优惠券Id
+         */
+        QueryCouponDetail:function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/coupon/coupon/detail',
+                type:'get',
+                data:params,
+                json:true,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
         /**
          * @商品收藏-操作商品收藏
          * @param:userId 用户userId

+ 256 - 131
src/main/resources/static/js/pay/caimei-paycash.js

@@ -15,6 +15,7 @@ var payContainer = new Vue({
             payUserType:'ENTERPRISE',
             payType:'',
         },
+        couponInfo:{},
         bankListData:[],
         methodTab:['线上支付','转账支付'],
         mobileData:[
@@ -52,6 +53,8 @@ var payContainer = new Vue({
         is_Wechat_bowcr:false,
         comboInfo: null, //选中的svip套餐信息
         vipRecordId: undefined,
+        couponId:undefined,
+        userId:0
     },
     filters: {
         NumFormat:function(value) {
@@ -73,6 +76,19 @@ var payContainer = new Vue({
         }
     },
     methods: {
+        initCouponDetail:function (couponId) {//初始化优惠券数据
+            var _self = this;
+            ProductApi.QueryCouponDetail({ couponId: couponId },function (response) {
+                if(response.code == 0){
+                    _self.couponInfo = response.data
+                    if(globalUserData){
+                        _self.userId = globalUserData.userId;
+                    }
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            })
+        },
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
             PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
@@ -139,116 +155,120 @@ var payContainer = new Vue({
                 CAIMEI.dialog('支付系统遇到点小问题,请稍后重试', false);
                 return;
             }
-            if(_self.onlinePay == 2){
-                _self.layerConfirm();
+            if(_self.pageType === '3'){// 移动支付优惠券
+                _self.PayCouponMiniPayFn();
             }else{
-                if(_self.payInfo.payBankNum == ''){
-                    CAIMEI.dialog('请选择支付方式');
-                    return;
-                }
-                if(_self.payAmount == ''){
-                    CAIMEI.dialog('请输入本次支付金额');
-                    return;
-                }
-                if(_self.payAmount == 0){
-                    CAIMEI.dialog('本次支付金额不能为0');
-                    return;
-                }
-                if(_self.payAmount*100 < 2){
-                    CAIMEI.dialog('本次支付金额必须大于¥0.02');
-                    return;
-                }
-                if(_self.payAmount > _self.paymentIimit){
-                    switch (_self.payInfo.payBankNum) {
-                        case 'WEIXIN':
-                            _self.paymentIimitText = '本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付';
-                            break;
-                        case 'ALIPAY':
-                            _self.paymentIimitText = '本次支付金额已超出支付宝限额,请输入小于5千的金额进行支付';
-                            break;
+                if(_self.onlinePay == 2){
+                    _self.layerConfirm();
+                }else{
+                    if(_self.payInfo.payBankNum == ''){
+                        CAIMEI.dialog('请选择支付方式');
+                        return;
                     }
-                    CAIMEI.Alert(_self.paymentIimitText,'知道了');
-                    return;
-                }
-                if(_self.payInfo.payBankNum == "WEIXIN"){
-                    if(_self.pageType === '1'){
-                        if(!isPC){
-                            var orderInfo = {//二手微信二维码参数
+                    if(_self.payAmount == ''){
+                        CAIMEI.dialog('请输入本次支付金额');
+                        return;
+                    }
+                    if(_self.payAmount == 0){
+                        CAIMEI.dialog('本次支付金额不能为0');
+                        return;
+                    }
+                    if(_self.payAmount*100 < 2){
+                        CAIMEI.dialog('本次支付金额必须大于¥0.02');
+                        return;
+                    }
+                    if(_self.payAmount > _self.paymentIimit){
+                        switch (_self.payInfo.payBankNum) {
+                            case 'WEIXIN':
+                                _self.paymentIimitText = '本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付';
+                                break;
+                            case 'ALIPAY':
+                                _self.paymentIimitText = '本次支付金额已超出支付宝限额,请输入小于5千的金额进行支付';
+                                break;
+                        }
+                        CAIMEI.Alert(_self.paymentIimitText,'知道了');
+                        return;
+                    }
+                    if(_self.payInfo.payBankNum == "WEIXIN"){
+                        if(_self.pageType === '1'){
+                            if(!isPC){
+                                var orderInfo = {//二手微信二维码参数
                                     pageType:1,
                                     productId:_self.productID,
                                     payAmount:_self.payAmount
-                            };
-                            _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
-                            location.href = _self.payInfo.payMobileUrl;
+                                };
+                                _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
+                                location.href = _self.payInfo.payMobileUrl;
+                            }else{
+                                _self.payInfo.payData = {//二手
+                                    type:_self.payInfo.payBankNum,
+                                    productId:_self.productID,
+                                    amount:_self.payAmount,
+                                    url:_self.payInfo.payMobileUrl
+                                };
+                                CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
+                                window.open("/pay/caimei-paymobile.html?pageType=1");
+                                _self.isPayAlert = true;
+                            }
+                        }else if(_self.pageType === '2'){ // 微信支付会员
+                            _self.payVipMiniWxPay();
                         }else{
-                            _self.payInfo.payData = {//二手
-                                type:_self.payInfo.payBankNum,
-                                productId:_self.productID,
-                                amount:_self.payAmount,
-                                url:_self.payInfo.payMobileUrl
-                            };
-                            CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
-                            window.open("/pay/caimei-paymobile.html?pageType=1");
-                            _self.isPayAlert = true;
-                        }
-                    }else if(_self.pageType === '2'){ // 微信支付会员
-                        _self.payVipMiniWxPay();
-                    }else{
-                        if(!isPC){
-                            var orderInfo = {//普通订单微信二维码参数
+                            if(!isPC){
+                                var orderInfo = {//普通订单微信二维码参数
                                     pageType:0,
                                     orderID:_self.payInfo.payOrderId,
                                     payAmount:_self.payAmount
+                                };
+                                _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
+                                location.href = _self.payInfo.payMobileUrl;
+                            }else{
+                                _self.payInfo.payData = {//正常订单
+                                    type:_self.payInfo.payBankNum,
+                                    orderid:_self.payInfo.payOrderId,
+                                    amount:_self.payAmount,
+                                    url:_self.payInfo.payMobileUrl
+                                };
+                                CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
+                                window.open("/pay/caimei-paymobile.html?pageType=0");
+                                _self.isPayAlert = true;
+                            }
+                        }
+                    }else if(_self.payInfo.payBankNum == "ALIPAY"){//支付宝支付
+                        if(_self.pageType === '1'){// 二手
+                            var params = {//二手
+                                returnUrl:'https://www.caimei365.com/',
+                                productId:_self.productID,
                             };
-                            _self.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
-                            location.href = _self.payInfo.payMobileUrl;
+                            _self.PayOrdersecondAliPay(params);
+                        }else if(_self.pageType === '2'){ // 支付宝支付会员
+                            _self.payVipAliPay();
                         }else{
-                            _self.payInfo.payData = {//正常订单
-                                type:_self.payInfo.payBankNum,
-                                orderid:_self.payInfo.payOrderId,
-                                amount:_self.payAmount,
-                                url:_self.payInfo.payMobileUrl
+                            var params = {//正常订单
+                                payAmount:Math.round(_self.payAmount*100),
+                                returnUrl:'https://www.caimei365.com/',
+                                orderId:_self.payInfo.payOrderId
                             };
-                            CAIMEI.Storage.setItem('payData',JSON.stringify(_self.payInfo.payData));
-                            window.open("/pay/caimei-paymobile.html?pageType=0");
-                            _self.isPayAlert = true;
+                            _self.PayOrderPcMallAlipay(params);
                         }
-                    }
-                }else if(_self.payInfo.payBankNum == "ALIPAY"){//支付宝支付
-                    if(_self.pageType === '1'){// 二手
-                        var params = {//二手
+                    }else{// 网银支付
+                        if(_self.pageType === '1'){
+                            var params = {//二手
+                                payWay:_self.payInfo.payBankNum,
                                 returnUrl:'https://www.caimei365.com/',
                                 productId:_self.productID,
                             };
-                        _self.PayOrdersecondAliPay(params);
-                    }else if(_self.pageType === '2'){ // 支付宝支付会员
-                        _self.payVipAliPay();
-                    }else{
-                        var params = {//正常订单
+                            _self.PayOrdersecondUnion(params,_self.payInfo.payBankNum);
+                        }else if(_self.pageType === '2'){ // 网银支付会员
+                            console.log('网银支付会员');
+                        }else{
+                            var params = {//正常订单
+                                payWay:_self.payInfo.payBankNum,
                                 payAmount:Math.round(_self.payAmount*100),
                                 returnUrl:'https://www.caimei365.com/',
                                 orderId:_self.payInfo.payOrderId
                             };
-                        _self.PayOrderPcMallAlipay(params);
-                    }
-                }else{// 网银支付
-                    if(_self.pageType === '1'){
-                        var params = {//二手
-                            payWay:_self.payInfo.payBankNum,
-                            returnUrl:'https://www.caimei365.com/',
-                            productId:_self.productID,
-                        };
-                        _self.PayOrdersecondUnion(params,_self.payInfo.payBankNum);
-                    }else if(_self.pageType === '2'){ // 网银支付会员
-                        console.log('网银支付会员');
-                    }else{
-                        var params = {//正常订单
-                            payWay:_self.payInfo.payBankNum,
-                            payAmount:Math.round(_self.payAmount*100),
-                            returnUrl:'https://www.caimei365.com/',
-                            orderId:_self.payInfo.payOrderId
-                        };
-                        _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
+                            _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
+                        }
                     }
                 }
             }
@@ -259,36 +279,40 @@ var payContainer = new Vue({
                 CAIMEI.dialog('支付系统遇到点小问题,请稍后重试', false);
                 return;
             }
-            if(_self.onlinePay == 2){
-                _self.layerConfirm();
+            if(_self.pageType === '3'){// 移动支付优惠券
+                _self.PayCouponUnionPayFn();
             }else{
-                if(_self.payInfo.payBankNum == ''){
-                    CAIMEI.dialog('请选择银行!');
-                    return;
-                }
-                if(_self.payAmount <= 10){
-                    CAIMEI.dialog('网银支付的金额必须大于¥10.00');
-                    return;
-                }
-                if(_self.pageType === '1'){
-                    var params = {//二手
+                if(_self.onlinePay == 2){
+                    _self.layerConfirm();
+                }else{
+                    if(_self.payInfo.payBankNum == ''){
+                        CAIMEI.dialog('请选择银行!');
+                        return;
+                    }
+                    if(_self.payAmount <= 10){
+                        CAIMEI.dialog('网银支付的金额必须大于¥10.00');
+                        return;
+                    }
+                    if(_self.pageType === '1'){
+                        var params = {//二手
                             bankCode:_self.payInfo.payBankNum,
                             returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
                             productId:_self.productID,
                             userType:_self.payInfo.payUserType,
-                    };
-                    _self.PayOrdersecondUnion(params);
-                } else if (_self.pageType === '2') { // 网银付会员
-                    _self.payVipPcMallPay();
-                } else {
-                    var params = {//正常订单
+                        };
+                        _self.PayOrdersecondUnion(params);
+                    } else if (_self.pageType === '2') { // 网银付会员
+                        _self.payVipPcMallPay();
+                    } else {
+                        var params = {//正常订单
                             payAmount:Math.round(_self.payAmount*100),
                             bankCode:_self.payInfo.payBankNum,
                             returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount,
                             orderId:_self.payInfo.payOrderId,
                             userType:_self.payInfo.payUserType
-                    };
-                    _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
+                        };
+                        _self.PayOrderPcMallPay(params,_self.payInfo.payBankNum);
+                    }
                 }
             }
         },
@@ -537,6 +561,8 @@ var payContainer = new Vue({
                 window.location.href = '/pay/success.html?pageType=second&type='+state+'&payAmount='+_self.payAmount;
             }else if(_self.pageType === '2'){
                 window.location.href = '/pay/success.html?pageType=vip&type='+state+'&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '3') {
+                window.location.href = '/pay/success.html?pageType=coupon&type=' + state + '&payAmount=' + _self.couponInfo.moneyCouponPrice;
             }else{
                 window.location.href = '/pay/success.html?pageType=www&type='+state+'&payAmount='+_self.payAmount;
             }
@@ -628,7 +654,7 @@ var payContainer = new Vue({
         payVipMiniWxPay: function(){
             if (!isPC) {
                 var orderInfo = {//普通订单微信二维码参数
-                    pageType: 2,
+                    couponId: 2,
                     vipId: this.comboInfo.id,
                     vipRecordId: this.vipRecordId,
                     payAmount: this.payAmount
@@ -648,35 +674,134 @@ var payContainer = new Vue({
                 this.isPayAlert = true;
             }
         },
+        // 网银支付购买优惠券
+        PayCouponUnionPayFn:function () {
+            console.log('网银支付购买优惠券');
+            var _self = this;
+            var params = {
+                bankCode: this.payInfo.payBankNum,
+                returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_self.couponInfo.moneyCouponPrice,
+                userType: _self.payInfo.payUserType,
+                couponId: _self.couponId,
+                userId:_self.userId,
+                source:2 //支付来源 1 小程序 2 WWW
+            };
+            PayApi.PayCouponUnionPay(params, function (response) {
+                if (response.code == 0) {
+                    _self.isPayAlert = true;
+                    _self.isSubMitStatus = false;
+                    _self.mbOrderId = response.data.data.mbOrderId;
+                    window.open(response.data.data.payUrl);
+                } else {
+                    _self.isSubMitStatus = false;
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            });
+        },
+        // 移动支付购买优惠券
+        PayCouponMiniPayFn:function () {
+            var _self = this;
+            if(_self.payInfo.payBankNum == "WEIXIN"){
+                _self.payCouponMiniWxPay();
+            }else if(_self.payInfo.payBankNum == "ALIPAY"){//支付宝支付
+                _self.payCouponAliPay();
+            }
+        },
+        // 微信支付优惠券
+        payCouponMiniWxPay: function(){
+            console.log('微信支付优惠券');
+            if (!isPC) {
+                var orderInfo = {//普通订单微信二维码参数
+                    pageType: 3,
+                    vipId: this.comboInfo.id,
+                    vipRecordId: this.vipRecordId,
+                    payAmount: this.payAmount
+                };
+                this.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state=" + JSON.stringify(orderInfo) + "#wechat_redirect";
+                location.href = this.payInfo.payMobileUrl;
+            } else {
+                this.payInfo.payData = {
+                    type: this.payInfo.payBankNum,
+                    amount: this.couponInfo.moneyCouponPrice,
+                    url: this.payInfo.payMobileUrl,
+                    couponId:this.couponId,
+                    userId:this.userId
+                };
+                CAIMEI.Storage.setItem('payData', JSON.stringify(this.payInfo.payData));
+                window.open("/pay/caimei-paymobile.html?pageType=3");
+                this.isPayAlert = true;
+            }
+        },
+        // 支付宝支付优惠券
+        payCouponAliPay: function(){
+            var _self = this;
+            console.log('支付宝支付优惠券');
+            var params = {
+                returnUrl: 'https://www.caimei365.com/',
+                couponId: _self.couponInfo.couponId,
+                userId:_self.userId,
+                source:2 //支付来源 1 小程序 2 WWW
+            };
+            PayApi.PayCouponMiniAliPay(params, function(response){
+                console.log(response);
+                if (response.code === 0) {
+                    _self.isPayAlert = true;
+                    _self.mbOrderId = response.data.data.mbOrderId;
+                    _self.payInfo.payMobileUrl = response.data.data.payUrl;
+                    _self.payInfo.payData = {
+                        type: _self.payInfo.payBankNum,
+                        mbOrderId: _self.mbOrderId,
+                        amount: _self.couponInfo.moneyCouponPrice,
+                        url: _self.payInfo.payMobileUrl,
+                        couponId:_self.couponId,
+                        userId:_self.userId
+                    };
+                    CAIMEI.Storage.setItem('payData', JSON.stringify(_self.payInfo.payData));
+                    if (!isPC) {
+                        location.href = _self.payInfo.payMobileUrl;
+                    } else {
+                        window.open("/pay/caimei-paymobile.html?pageType=3");
+                    }
+                } else {
+                    CAIMEI.Alert(response.msg, '确定', false);
+                    _self.isSubMitStatus = false;
+                }
+            });
+        },
     },
     mounted: function () {
         var _self = this;
         // 判断当前支付是订单支付
-        _self.pageType = CAIMEI.getUrlParam('pageType');
-        _self.vipRecordId = parseInt(CAIMEI.getUrlParam('vipRecordId'));
-        if (_self.pageType === '1') {//二手
-            _self.productID = CAIMEI.getUrlParam('productID');
-            _self.payAmount = _self.toFixedFn(100);
-            _self.isRequest = true;
-            _self.payStatusText = '';
-        } else if (_self.pageType === '2') { // 支付会员
+        this.pageType = CAIMEI.getUrlParam('pageType');
+        if (this.pageType === '1') {//二手
+            this.productID = CAIMEI.getUrlParam('productID');
+            this.payAmount = _self.toFixedFn(100);
+            this.isRequest = true;
+            this.payStatusText = '';
+        } else if (this.pageType === '2') { // 支付会员
+            this.vipRecordId = parseInt(CAIMEI.getUrlParam('vipRecordId'));
             this.PayOrderOnLineSwitch();
             // 从本地获取选中的svip套餐信息后删除本地信息
             this.comboInfo = JSON.parse(CAIMEI.Storage.getItem('comboInfo'));
             // CAIMEI.Storage.removeItem('comboInfo');
             // 设置支付金额
-            this.payAmount = _self.toFixedFn(this.comboInfo.price);
+            this.payAmount = this.toFixedFn(this.comboInfo.price);
             // 获取银行列表
             this.getBankList();
-        } else {
+        } else if(this.pageType === '3') {// 支付优惠券
+            this.couponId = parseInt(CAIMEI.getUrlParam('couponId'));
+            this.initCouponDetail(this.couponId);
+            this.PayOrderOnLineSwitch();
+            this.getBankList();
+        }else{
             var HrefType = CAIMEI.getUrlParam('type');
             if (HrefType == 'payfirm') {
-                _self.payInfo.payOrderId = CAIMEI.getUrlParam('orderId');
-                _self.orderIdentificationId = '#' + _self.payInfo.payOrderId + '#';
+                this.payInfo.payOrderId = CAIMEI.getUrlParam('orderId');
+                this.orderIdentificationId = '#' + this.payInfo.payOrderId + '#';
             } else {
                 var data = JSON.parse(localStorage.getItem("confirmOrderInfo"));
-                _self.payInfo.payOrderId = data.data.orderId;
-                _self.orderIdentificationId = '#' + _self.payInfo.payOrderId + '#';
+                this.payInfo.payOrderId = data.data.orderId;
+                this.orderIdentificationId = '#' + this.payInfo.payOrderId + '#';
             }
             // 获取银行列表
             this.getBankList();
@@ -685,13 +810,13 @@ var payContainer = new Vue({
         }
         var viewer = window.navigator.userAgent.toLowerCase();
         if(viewer.match(/MicroMessenger/i) == 'micromessenger'){
-            _self.is_Wechat_bowcr = true;
-            _self.payInfo.payBankNum = 'WEIXIN';
-            _self.mobileTabIndex = 1;
+            this.is_Wechat_bowcr = true;
+            this.payInfo.payBankNum = 'WEIXIN';
+            this.mobileTabIndex = 1;
         }else{
-            _self.is_Wechat_bowcr = false;
-            _self.payInfo.payBankNum = 'ALIPAY';
-            _self.mobileTabIndex = 0;
+            this.is_Wechat_bowcr = false;
+            this.payInfo.payBankNum = 'ALIPAY';
+            this.mobileTabIndex = 0;
         }
     }
 });

+ 19 - 2
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -29,7 +29,9 @@ var payContainer = new Vue({
         productID:'',//商品ID
         duration: 0, // 购买的会员期限
         vipId: null, // vip套餐id
-        vipRecordId: undefined
+        vipRecordId: undefined,
+        couponId:0,
+        userId:0
     },
     filters: {
         NumFormat:function(value) {
@@ -53,7 +55,7 @@ var payContainer = new Vue({
     methods: {
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
-            if( _self.pageType === '1' || _self.pageType === '2'){
+            if( _self.pageType === '1' || _self.pageType === '2' || _self.pageType === '3'){
                 setTimeout(function(){
                     switch (_self.payInfo.payType) {
                         case 'WEIXIN':
@@ -126,6 +128,14 @@ var payContainer = new Vue({
                     vipId: _self.vipId,
                     vipRecordId: _self.vipRecordId
                 };
+            } else if (_self.pageType === '3') { // 微信支付优惠券
+                console.log('微信支付优惠券');
+                orderInfo = {
+                    pageType: 3,
+                    payAmount: _self.payAmount,
+                    couponId: _self.couponId,
+                    userId : _self.userId
+                };
             } else {
                 orderInfo = {//普通订单微信二维码参数
                     pageType:0,
@@ -221,6 +231,13 @@ var payContainer = new Vue({
             if(!_self.duration) { // 微信支付获取会员开通月份
                 _self.duration = payData.duration;
             }
+        }else if(_self.pageType === '3'){
+            _self.payInfo.payType = payData.type;
+            _self.payAmount = _self.payableAmount = payData.amount;
+            _self.mbOrderId = payData.mbOrderId;
+            _self.payInfo.payMobileUrl = payData.url;
+            _self.couponId = payData.couponId;
+            _self.userId = payData.userId;
         }else{
             console.log('订单支付');
             _self.payInfo.payType = payData.type;

+ 9 - 0
src/main/resources/static/js/pay/caimei-success.js

@@ -60,6 +60,15 @@ var payContainer = new Vue({
                         _self.openLink = '/user/member.html';
                     }
                     break;
+                case 'coupon':
+                    if (_self.payFlag) {
+                        _self.linkText = '采美商城首页';
+                        _self.openLink = '/index.html';
+                    } else {
+                        _self.linkText = '优惠券列表';
+                        _self.openLink = '/user/coupon.html';
+                    }
+                    break;
                 default:
                     _self.linkText = '采美商城首页';
                     _self.openLink = '/index.html';

+ 40 - 1
src/main/resources/static/js/pay/caimei-wechatpay.js

@@ -12,7 +12,9 @@ var payContainer = new Vue({
         isRequest:false,
         productId:'',//二手商品ID
         vipId: null, // vip套餐id
-        vipRecordId: undefined
+        vipRecordId: undefined,
+        couponId: undefined,//优惠券Id
+        userId : undefined //购买优惠券的用户Id
     },
     computed: {
 
@@ -30,6 +32,9 @@ var payContainer = new Vue({
             }else if(_this.pageType == 2){
                 _this.vipId = _this.state.vipId;
                 _this.vipRecordId = _this.state.vipRecordId;
+            }else if(_this.pageType == 3){
+                _this.couponId = _this.state.couponId;
+                _this.userId = _this.state.userId;
             }else{
                 _this.orderID = _this.state.orderID;
             }
@@ -39,6 +44,8 @@ var payContainer = new Vue({
                 this.WxRequestsecondHandPay();
             } else if (this.pageType == 2) {
                 this.WxRequestPaymentVipFn();
+            } if (this.pageType == 2) {
+                this.WxRequestPaymentCouponFn();
             } else {
                 this.WxRequestPaymentFn();
             }
@@ -74,6 +81,38 @@ var payContainer = new Vue({
                 }
             });
         },
+        // 优惠券支付
+        WxRequestPaymentCouponFn: function(){
+            var _this = this;
+            var params = {
+                code: _this.wechatcode,
+                state: _this.rand(1000, 9999),
+                userId: _this.userId,
+                couponId: _this.couponId,
+                returnUrl: 'https://www.caimei365.com/',
+                source:2 //支付来源 1 小程序 2 WWW
+            };
+            PayApi.PayCouponMiniWxPay(params,function(response){
+                if(response.code == 0){
+                    var PayInfo = JSON.parse(response.data.data.payInfo);
+                    if (typeof WeixinJSBridge == "undefined"){
+                        if( document.addEventListener ){
+                            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
+                        }else if (document.attachEvent){
+                            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
+                            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
+                        }
+                    }else{
+                        _this.onBridgeReady(PayInfo);
+                    }
+                }else{
+                    CAIMEI.dialog("支付链接已失效,请重新扫码支付");
+                    setTimeout(function(){
+                        WeixinJSBridge.call('closeWindow');
+                    },3000);
+                }
+            });
+        },
         WxRequestsecondHandPay:function(){ // 二手商品支付
             var _this = this;
             var params = {

+ 3 - 0
src/main/resources/static/js/product/detail.js

@@ -680,6 +680,9 @@ var productDetail = new Vue({
             CAIMEI.Storage.setItem('KEY_SUPPORE', JSON.stringify(checkedList));
             window.location.href = '/shopping/confirm.html?type=3';
         },
+        toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
+            window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId;
+        },
         showSupportingMore:function () {
             var _self = this;
             _self.isShowMoreButton = false;

+ 3 - 0
src/main/resources/static/js/shopping/cart.js

@@ -532,6 +532,9 @@ var shoppingCart = new Vue({
                 }
             })
         },
+        toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
+            window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId;
+        },
         queryCouponTabs:function (value){
             var _self = this;
             _self.currentTab = _self.couponParam.status = value;

+ 3 - 0
src/main/resources/static/js/user-center/account/coupon-collection.js

@@ -102,6 +102,9 @@ var orderPage = new Vue({
                 }
             })
         },
+        toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
+            window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId;
+        },
         receiveCoupon:function(coupon){// 点击领取按钮事件处理
             var  _self = this;
             console.log(coupon)

+ 2 - 0
src/main/resources/static/js/utils.js

@@ -173,6 +173,7 @@ CAIMEI.Popup = function(params,confirmCallback, cancelCallback){
  * @auth zhjy
  */
 CAIMEI.Alert = function(content,confitmText,flg,callback){
+    document.body.style.overflow = 'hidden';
     $.confirm({
         boxWidth: (isPC?'300px':'70%'),
         title:'提示',
@@ -187,6 +188,7 @@ CAIMEI.Alert = function(content,confitmText,flg,callback){
                 text: confitmText,
                 btnClass: 'btn-confirm',
                 action:function () {
+                    document.body.style.overflow = 'auto';
                     if(flg){
                         callback();
                     }

+ 13 - 4
src/main/resources/templates/pay/caimei-paycash.html

@@ -11,7 +11,7 @@
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 <div id="payContainer" class="pay-container clear" v-cloak>
-    <div class="wrap" v-if="pageType !== '2'">
+    <div class="wrap" v-if="pageType !== '2' && pageType !== '3'">
         <div class="pageTitle">
             <div class="step">
                 <span class="prev">我的购物车</span>
@@ -44,6 +44,14 @@
                     </div>
                 </div>
             </template>
+            <!--购买优惠券-->
+            <template v-else-if="pageType === '3'">
+                <div class="pay-coupontitle">收银台</div>
+                <div class="pay-coupon">
+                    <div class="pay-coupon-title">购买优惠券 <span>(满¥{{ couponInfo.touchPrice }}减{{ couponInfo.couponAmount }})</span></div>
+                    <div class="pay-coupon-content">待付金额:<span>¥{{ couponInfo.moneyCouponPrice | NumFormat }}</span></div>
+                </div>
+            </template>
             <!--普通订单-->
             <template v-else>
                 <div class="pay-title">
@@ -66,7 +74,7 @@
                     </div>
                 </div>
             </template>
-            <div class="pay-ment"  v-if="pageType != '1' && pageType != '2'">
+            <div class="pay-ment"  v-if="pageType != '1' && pageType != '2' && pageType != '3'">
                 <div class="pay-record">
                     <div class="record-title">支付记录</div>
                     <div class="record-content clear" id="discernReceipt">
@@ -87,7 +95,7 @@
                 </div>
                 <div class="method-content">
                     <div class="payment" id="mobilePayment" v-if="tabIndex === 0">
-                        <div class="payment-title" v-if="pageType !== '2'">{{payStatusText}}</div>
+                        <div class="payment-title" v-if="pageType !== '2' && pageType != '3'">{{payStatusText}}</div>
                         <div class="pay-bank">
                             <div class="bank-list" id="mobileContent">
                                 <a v-if="!is_Wechat_bowcr" href="javascript:void(0);" class="bank-a mIcon" @click="checkMobilePay(0,'ALIPAY')" :class="{ active: mobileTabIndex === 0 }">
@@ -121,7 +129,7 @@
                                 </a>
                             </div>
                         </div>
-                        <template v-if="pageType != '1'">
+                        <template v-if="pageType != '1' && pageType != '3'">
                             <div class="pay-link" v-if="mobileTabIndex === 2 || mobileTabIndex === 3">
                                 <p v-if="isPC">若您在公司的职位无法直接使用网银付款,请点击右侧“复制支付链接”按钮,将该链接发送给公司财务人员进行网银付款</p>
                                 <a href="javascript:void(0);" id="copyLink" @click="copyLinkPaySubmitFn">复制支付链接</a>
@@ -175,6 +183,7 @@
 <!-- 引入底部 -->
 <template th:replace="components/footer"></template>
 <template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/product.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/pay.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-bank.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/pay/caimei-paycash.js(v=${version})}"></script>

+ 2 - 2
src/main/resources/templates/pay/caimei-paymobile.html

@@ -27,7 +27,7 @@
                         <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
                         <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
-                        <p v-if="pageType!='1' && pageType!='2'">订单号: <span>{{orderNo}}</span> </p>
+                        <p v-if="pageType!='1' && pageType!='2' && pageType!='3'">订单号: <span>{{orderNo}}</span> </p>
                     </div>
                     <div class="pay-amount-icon"><img src="/img/pay/icon-pay@2x.png" alt=""></div>
                 </div>
@@ -55,7 +55,7 @@
                         <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
                         <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
-                        <p v-if="pageType!='1' && pageType!='2'">订单号: <span>{{orderNo}}</span> </p>
+                        <p v-if="pageType!='1' && pageType!='2' && pageType!='3'">订单号: <span>{{orderNo}}</span> </p>
                     </div>
                     <div class="pay-amount-icon"><img src="/img/pay/icon-pay@2x.png" alt=""></div>
                 </div>

+ 3 - 3
src/main/resources/templates/product/beautytopic.html

@@ -115,11 +115,11 @@
 <!--																<p class="couponTag" v-if="pros.couponsLogo">优惠券</p>-->
                                                                 <p class="listTag" v-if="pros.actStatus==1">
                                                                     {{pros.promotions.name}}
-                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.retailPrice | NumFormat}}</span>
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.originalPrice | NumFormat}}</span>
                                                                 </p>
                                                             </div>
                                                             <div class="main_price_show" :class="PromotionsFormat(pros.promotions) ? 'none' : ''">
-                                                                ¥{{ (PromotionsFormat(pros.promotions) ? pros.price : pros.retailPrice ) | NumFormat  }}
+                                                                ¥{{ (PromotionsFormat(pros.promotions) ? pros.price : pros.originalPrice ) | NumFormat  }}
                                                             </div>
                                                         </div>
                                                     </template>
@@ -152,7 +152,7 @@
                                                 </div>
                                                 <div class="main_price_text" v-else>
                                                     <div class="price_text_tag"></div>
-                                                    <div class="main_price_show">¥{{ pros.retailPrice | NumFormat  }}</div>
+                                                    <div class="main_price_show">¥{{ pros.originalPrice | NumFormat  }}</div>
                                                 </div>
                                             </template>
                                         </template>

+ 25 - 3
src/main/resources/templates/product/detail.html

@@ -659,10 +659,32 @@
                                     <div class="coupon-list-time"> {{ coupon.startDate }} - {{ coupon.endDate }}</div>
                                 </div>
                                 <div class="coupon-list-ri">
-                                    <span class="none" v-if="currentTab == 1" @click="receiveCoupon(coupon)">领取</span>
-                                    <span v-if="currentTab == 2">已领取</span>
+                                    <template v-if="coupon.couponBtnType == 0">
+                                        <template v-if="coupon.moneyCouponFlag == 1">
+                                            <div class="buy" @click="toBuyCoupon(coupon)"
+                                                 id="coupon-buy-coupon"
+                                                 onclick="_czc.push(['_trackEvent','商品详情','优惠券购买按钮点击','优惠券购买按钮点击',1,'coupon-buy-coupon'])">
+                                                <p>¥{{ coupon.moneyCouponPrice }}</p>
+                                                <p>购买</p>
+                                            </div>
+                                        </template>
+                                        <template v-else>
+                                            <span class="none"
+                                              @click="receiveCoupon(coupon)"
+                                              id="coupon-receive"
+                                              onclick="_czc.push(['_trackEvent','商品详情','优惠券领取按钮点击','优惠券领取按钮点击',1,'coupon-receive'])">领取
+                                            </span>
+                                        </template>
+                                    </template>
+                                    <span v-if="coupon.couponBtnType == 1">已领取</span>
                                 </div>
-                                <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                                <template v-if="coupon.moneyCouponFlag == 1">
+                                    <div class="coupon-tags" v-if="coupon.moneyCouponType == 1">意向{{ coupon.couponType | TypeFormat }}</div>
+                                    <div class="coupon-tags"  v-else>定向{{ coupon.couponType | TypeFormat }}</div>
+                                </template>
+                                <template v-else>
+                                    <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                                </template>
                             </div>
                         </div>
                     </div>

+ 29 - 4
src/main/resources/templates/shopping/cart.html

@@ -78,7 +78,10 @@
                                 </div>
                             </div>
                         </div>
-                        <div class="couponTag" v-if="supplier.couponsLogo" @click="showPopup(supplier)">领券</div>
+                        <div class="couponTag" v-if="supplier.couponsLogo" @click="showPopup(supplier)"
+                             id="coupon-receive-button"
+                             onclick="_czc.push(['_trackEvent','机构购物车','优惠券领券按钮点击','优惠券领券按钮点击',1,'coupon-receive-button'])">领券
+                        </div>
                     </div>
                 </div>
                 <div class="cartItem clear"  v-for="cart in supplier.cartList" >
@@ -256,10 +259,32 @@
                                 <div class="coupon-list-time"> {{ coupon.startDate }} - {{ coupon.endDate }} </div>
                             </div>
                             <div class="coupon-list-ri">
-                                <span class="none" v-if="currentTab == 1" @click="receiveCoupon(coupon)">领取</span>
-                                <span v-if="currentTab == 2">已领取</span>
+                                <template v-if="coupon.couponBtnType == 0">
+                                    <template v-if="coupon.moneyCouponFlag == 1">
+                                        <div class="buy" @click="toBuyCoupon(coupon)"
+                                             id="coupon-buy-coupon"
+                                             onclick="_czc.push(['_trackEvent','商品详情','优惠券购买按钮点击','优惠券购买按钮点击',1,'coupon-buy-coupon'])">
+                                            <p>¥{{ coupon.moneyCouponPrice }}</p>
+                                            <p>购买</p>
+                                        </div>
+                                    </template>
+                                    <template v-else>
+                                            <span class="none"
+                                                  @click="receiveCoupon(coupon)"
+                                                  id="coupon-receive"
+                                                  onclick="_czc.push(['_trackEvent','商品详情','优惠券领取按钮点击','优惠券领取按钮点击',1,'coupon-receive'])">领取
+                                            </span>
+                                    </template>
+                                </template>
+                                <span v-if="coupon.couponBtnType == 1">已领取</span>
                             </div>
-                            <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                            <template v-if="coupon.moneyCouponFlag == 1">
+                                <div class="coupon-tags" v-if="coupon.moneyCouponType == 1">意向{{ coupon.couponType | TypeFormat }}</div>
+                                <div class="coupon-tags"  v-else>定向{{ coupon.couponType | TypeFormat }}</div>
+                            </template>
+                            <template v-else>
+                                <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                            </template>
                         </div>
                     </div>
                 </div>

+ 7 - 1
src/main/resources/templates/shopping/confirm.html

@@ -326,7 +326,13 @@
                     <span class="coupon-list-checked" :class="[coupon.ischecked ?'checked':'']"></span>
                 </div>
                 <div class="coupon-list-ri"><span>已领取</span></div>
-                <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                <template v-if="coupon.moneyCouponFlag == 1">
+                    <div class="coupon-tags" v-if="coupon.moneyCouponType == 1">意向{{ coupon.couponType | TypeFormat }}</div>
+                    <div class="coupon-tags"  v-else>定向{{ coupon.couponType | TypeFormat }}</div>
+                </template>
+                <template v-else>
+                    <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+                </template>
             </div>
         </div>
         <div class="totalPriceWrap">

+ 25 - 3
src/main/resources/templates/user-center/account/coupon-collection.html

@@ -43,10 +43,32 @@
                 <div class="coupon-list-time"> {{ coupon.startDate }} - {{ coupon.endDate }}</div>
               </div>
               <div class="coupon-list-ri">
-                <span class="none" v-if="coupon.couponBtnType == 0" @click="receiveCoupon(coupon)">领取</span>
-                <span v-if="coupon.couponBtnType == 1" @click="toUseCoupon(coupon)">去使用</span>
+                <template v-if="coupon.moneyCouponFlag == 1">
+                  <div class="buy" @click="toBuyCoupon(coupon)"
+                       id="coupon-buy-coupon"
+                       onclick="_czc.push(['_trackEvent','领券中心','优惠券购买按钮点击','优惠券购买按钮点击',1,'coupon-buy-coupon'])">
+                    <p>¥{{ coupon.moneyCouponPrice }}</p>
+                    <p>购买</p>
+                  </div>
+                </template>
+                <template v-else>
+                  <span class="none" v-if="coupon.couponBtnType == 0"
+                        @click="receiveCoupon(coupon)"
+                        id="coupon-receive"
+                        onclick="_czc.push(['_trackEvent','领券中心','优惠券领取按钮点击','优惠券领取按钮点击',1,'coupon-receive'])">领取</span>
+                  <span v-if="coupon.couponBtnType == 1"
+                        @click="toUseCoupon(coupon)"
+                        id="coupon-use-coupon"
+                        onclick="_czc.push(['_trackEvent','领券中心','优惠券去使用按钮点击','优惠券去使用按钮点击',1,'coupon-use-coupon'])">去使用</span>
+                </template>
               </div>
-              <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+              <template v-if="coupon.moneyCouponFlag == 1">
+                <div class="coupon-tags" v-if="coupon.moneyCouponType == 1">意向{{ coupon.couponType | TypeFormat }}</div>
+                <div class="coupon-tags"  v-else>定向{{ coupon.couponType | TypeFormat }}</div>
+              </template>
+              <template v-else>
+                <div class="coupon-tags">{{ coupon.couponType | TypeFormat }}</div>
+              </template>
             </div>
           </div>
           <div v-else class="empty">

+ 21 - 2
src/main/resources/templates/user-center/account/coupon.html

@@ -68,8 +68,27 @@
                     {{ coupon.startDate }} - {{ coupon.endDate }}
                   </div>
                 </div>
-                <div class="coupon-list-ri" :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'" @click="toUseCoupon(coupon)">{{ coupon.useStatus | TypeBtnFormat }}</div>
-                <div class="coupon-tags" :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'">{{ coupon.couponType | TypeFormat }}</div>
+                <div class="coupon-list-ri" :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'"
+                     id="coupon-use-coupon"
+                     @click="toUseCoupon(coupon)"
+                     onclick="_czc.push(['_trackEvent','机构优惠券列表','优惠券去使用按钮点击','优惠券去使用按钮点击',1,'coupon-use-coupon'])">{{
+                  coupon.useStatus | TypeBtnFormat }}
+                </div>
+                <template v-if="coupon.moneyCouponFlag == 1">
+                  <div v-if="coupon.moneyCouponType == 1" class="coupon-tags"
+                       :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'">意向{{ coupon.couponType
+                    | TypeFormat }}
+                  </div>
+                  <div v-else class="coupon-tags"
+                       :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'">定向{{ coupon.couponType
+                    | TypeFormat }}
+                  </div>
+                </template>
+                <template v-else>
+                  <div class="coupon-tags" :class="coupon.useStatus == 2 || coupon.useStatus == 3 ? 'none' : 'used'">{{
+                    coupon.couponType | TypeFormat }}
+                  </div>
+                </template>
               </div>
           </div>
           <div v-else class="empty">