浏览代码

Merge branch 'dev/v4.9.79_tsz' of qmx/jy into feature/v4.9.79

汤世哲 8 月之前
父节点
当前提交
6b52a4c4c5
共有 1 个文件被更改,包括 5 次插入40 次删除
  1. 5 40
      src/web/templates/common/returnMoney/wxReturnMoney.html

+ 5 - 40
src/web/templates/common/returnMoney/wxReturnMoney.html

@@ -128,11 +128,6 @@
 <script>
     $(function () {
         var checkout = {
-            data: {
-                token: '',
-                noLogin: false, // 是否免登陆支付
-                orderPrice: ''
-            },
             modeMap: {
                 'weixin': 'wx_js',
             },
@@ -142,31 +137,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 +218,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,11 +238,10 @@
                                     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.orderCode + "&payTime=" + res.pay_time + "&price=" + checkout.formatMoney({{.T.data.return_money}} / 100) + "&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}}"
@@ -277,15 +251,6 @@
                                             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