浏览代码

微信H5 支付

zhengjinyi 3 年之前
父节点
当前提交
8e601ec184

+ 17 - 6
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -184,9 +184,8 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
-
                     }else{
                         timer = setTimeout(function(){
                             _self.setTimerWechatPay()
@@ -200,7 +199,7 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
                     }else{
                         timer = setTimeout(function(){
@@ -215,7 +214,7 @@ var payContainer = new Vue({
                         CAIMEI.dialog('支付成功');
                         clearTimeout(timer); //清理定时任务
                         setTimeout(function(){
-                            window.location.href = '/index.html';
+                            _self.windowLocationHref()
                         },2000);
 
                     }else{
@@ -235,8 +234,8 @@ var payContainer = new Vue({
                     CAIMEI.dialog('支付成功');
                     clearTimeout(timer); //清理定时任务
                     setTimeout(function(){
-                        window.location.href = '/index.html';
-                    },3000);
+                        _self.windowLocationHref()
+                    },2000);
                 }else{
                     timer = setTimeout(function(){
                         _self.setTimerAliPay()
@@ -244,6 +243,18 @@ var payContainer = new Vue({
                 }
             });
         },
+        windowLocationHref:function(){
+            var _self = this;
+            if( _self.pageType === '1'){
+                window.location.href = '/pay/success.html?pageType=second&type=success&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '2'){
+                window.location.href = '/pay/success.html?pageType=vip&type=success&payAmount='+_self.payAmount;
+            }else if(_self.pageType === '3') {
+                window.location.href = '/pay/success.html?pageType=coupon&type=success&payAmount=' + _self.payAmount;
+            }else{
+                window.location.href = '/pay/success.html?pageType=www&type=success&payAmount='+_self.payAmount;
+            }
+        },
         hidePayAlert:function(){//隐藏已支付弹窗
             var _self = this;
             _self.isPayAlert = false;

+ 3 - 3
src/main/resources/templates/user-center/order/detail.html

@@ -66,9 +66,9 @@
                                     <p>待付金额:<span class="red">¥{{orderInfo.pendingPayments | NumFormat}}</span> </p>
                                 </div>
                                 <div class="order-item">
-                                    <p v-if="orderInfo.freePostFlag == '0'">运费:<span class="none">包邮</span> </p>
-                                    <p v-if="orderInfo.freePostFlag == '-1'">运费:<span class="none">到付</span> </p>
-                                    <p v-if="orderInfo.freePostFlag == '1'">运费:<span class="none">¥{{orderInfo.freight | NumFormat}}</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '0'">运费:<span class="none">包邮</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '-1'">运费:<span class="none">到付</span> </p>
+                                    <p v-if="orderInfo.postageFlag == '1'">运费:<span class="none">¥{{orderInfo.postage | NumFormat}}</span> </p>
                                     <p v-if="orderInfo.userBeans>0">采美豆抵用运费:<span class="none" >{{orderInfo.userBeans }}</span> </p>
                                     <p v-if="orderInfo.discountFee>0">经理折扣:<span class="none">¥{{orderInfo.discountFee | NumFormat}}</span> </p>
                                     <p v-if="orderInfo.promotionFullReduction>0">促销满减:<span class="red">¥{{orderInfo.promotionFullReduction | NumFormat}}</span> </p>