Răsfoiți Sursa

Merge remote-tracking branch 'origin/feature/v4.9.79' into feature/v4.9.79

wkyuer 7 luni în urmă
părinte
comite
1f48a38cd0

+ 6 - 44
src/web/templates/common/returnMoney/wxReturnMoney.html

@@ -123,16 +123,9 @@
 <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/appPay/js/popup.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/appPay/js/appPay.js?v={{Msg "seo" "version"}}'></script>
-<script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script>
-<script>new VConsole()</script>
 <script>
     $(function () {
         var checkout = {
-            data: {
-                token: '',
-                noLogin: false, // 是否免登陆支付
-                orderPrice: ''
-            },
             modeMap: {
                 'weixin': 'wx_js',
             },
@@ -142,31 +135,12 @@
                 1: '操作成功'
             },
             mode: 'wx_js',
-            orderInfo: {
-                ordercode: {{.T.orderCode}},
-                productType:{{.T.doType}}
-            },
             loading: null,
             init: function () {
-              this.getParams()
               this.show()
               this.clickEventsWithPayMode()
               this.confirmPayEvent()
             },
-            getParams: function () {
-                var orderPrice = utils.getParam('order_price')
-                var noLogin= utils.getParam('no_login')
-                var token= utils.getParam('token')
-                if (orderPrice) {
-                    this.data.orderPrice = orderPrice
-                }
-                if (noLogin) {
-                    this.data.noLogin = noLogin
-                }
-                if (token) {
-                    this.data.token = token
-                }
-            },
             show: function () {
               $(".price-container .price").text(checkout.formatMoney({{.T.data.return_money}} / 100));
             },
@@ -242,16 +216,15 @@
             },
             checkPaySuccessTimer: null,
             checkIsPaySuccess: function () {
-                var noLogin = checkout.data.noLogin
                 checkout.checkPaySuccessTimer = setInterval(function () {
                     $.ajax({
-                        url: noLogin ? '/jypay/free/seller/isPaySuccess' : '/jypay/isPaySuccess',
+                        url: '/jypay/free/common/getReturnResult',
                         type: 'POST',
                         data: {
-                            code: checkout.orderInfo.ordercode,
-                            token: checkout.data.token,
+                            token: {{.T.token}},
                         },
-                        success: function (res) {
+                        success: function (response) {
+                            var res = response.data
                             if (res.success) {
                                 // 清除购买页面的缓存
                                 // 直到找到支付完成订单,关闭加载动画
@@ -263,35 +236,24 @@
                                     duration: 1500,
                                     callback: function () {
                                         // 支付成功 判断有没有引流语id,有 需要埋点
-                                        var productType = checkout.orderInfo.productType
                                         checkout.buryingPoint()
 
                                         var  bigmemberBid=checkout.getUrlParam("b");
-                                        var href ="/weixin/backend/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
+                                        var href ="/weixin/backend/paySuccess?orderCode=" + res.order_code + "&payTime=" + res.pay_time + "&price=" + res.return_money + "&t={{.T.t}}"
 
                                         if(bigmemberBid==="1"){
-                                          href="/weixin/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
+                                          href="/weixin/aiForecastPack/paySuccess?orderCode=" + res.order_code + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
                                         }
 
                                         if (res.filter) {
                                             href += ('&filter=' + encodeURIComponent(res.filter))
                                         }
 
-                                        // 数据流量包定制
-                                        if (productType === 'dataPack') {
-                                            href = href + '&header=充值数据流量包'
-                                        }
-
-                                        if (noLogin) {
-                                            href = href + '&noLogin=1'
-                                        }
-
                                         var docsId=checkout.getUrlParam("docId")
                                         if (docsId!=null){
                                           href +="&docsId="+docsId
                                         }
                                         setTimeout(function() {
-                                          alert('href', href)
                                           location.replace(href);
                                         }, 300)
                                     }

+ 8 - 2
src/web/templates/weixin/commonPay/paySuccess.html

@@ -4,7 +4,13 @@
     <meta charset="utf-8">
     <meta name="viewport"
           content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
-    <title>{{.T.title}}</title>
+    <title>
+      {{ if eq .T.doType "backend" }}
+        剑鱼标讯
+      {{else}}
+        {{.T.title}}
+      {{end}}
+    </title>
     <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/base.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/weui.min.css?v={{Msg "seo" "version"}}">
@@ -100,7 +106,7 @@
             </div>
         </div>
     </div>
-    {{ if ne .T.doType "member" }}
+    {{ if and (ne .T.doType "member") (ne .T.doType "backend") }}
     <p class="invoce-tip-text">如需发票,可点击【查看订单】前往开票</p>
     {{end}}
     {{if eq .T.doType "onlineCourse"}}