Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev4.6.2.1' into dev4.6.2.1

wangkaiyue 3 жил өмнө
parent
commit
d451d1c189

+ 6 - 2
src/jfw/modules/app/src/web/templates/commonPay/checkout.html

@@ -317,11 +317,15 @@
                                         if (bigmemberBid==="1"){
                                         if (bigmemberBid==="1"){
                                            href = "/jyapp/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&pay_way=" + res.pay_way + "&price=" + res.price + "&t={{.T.t}}"
                                            href = "/jyapp/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&pay_way=" + res.pay_way + "&price=" + res.price + "&t={{.T.t}}"
                                         }
                                         }
+
+                                        if (res.filter) {
+                                            href += ('&filter=' + encodeURIComponent(res.filter))
+                                        }
+
                                         // 数据流量包定制
                                         // 数据流量包定制
                                         if (productType === 'dataPack') {
                                         if (productType === 'dataPack') {
-                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                            href = href + '&header=充值数据流量包'
                                         }
                                         }
-
                                         var docsId=checkout.getUrlParam("docId");
                                         var docsId=checkout.getUrlParam("docId");
                                         if (docsId!=null){
                                         if (docsId!=null){
                                           href +="&docsId="+docsId
                                           href +="&docsId="+docsId

+ 39 - 3
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -95,9 +95,9 @@
                     继续浏览
                     继续浏览
                 </button>
                 </button>
             </div>
             </div>
-        {{else if eq .T.doType "dataPack"}}
+        {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
             <div class="bottom_button j-button-group">
             <div class="bottom_button j-button-group">
-                <button id ="order" class="j-button-confirm" onclick="window.location.href = '/jyapp/common/dataPack/orderDetail?order_code={{.T.orderCode}}'">
+                <button id ="order" class="j-button-confirm" onclick="window.location.href = '/jyapp/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                     查看订单
                     查看订单
                 </button>
                 </button>
             </div>
             </div>
@@ -136,6 +136,36 @@
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                 }
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
+            } else if (productType === 'areaPack') {
+                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+                // {
+                //     num: 0, // 购买的数量 -1全国
+                //     ordertype: 1, // 1正常购买 2升级 3续费
+                //     cycleunit: 0, // 日期单位 1月 2季 3年
+                //     OldNum: 0, // 升级前购买的省份数量
+                // }
+                var titleMap = {
+                    1: '购买',
+                    2: '升级',
+                    3: '续费'
+                }
+                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+                var cycleType = ' 个月'
+                if (orderFilter.cycleunit == 2) {
+                    cycleType = ' 季'
+                } else if (orderFilter.cycleunit == 3) {
+                    cycleType = ' 年'
+                }
+
+                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+                html += `订阅周期:`
+                if (orderFilter.ordertype == 2) {
+                    html += `不延期`
+                } else {
+                    html += `<span class="highlight-text">1</span>${ cycleType }`
+                }
+                $('.info-box .info-item').html(html)
             }
             }
         }
         }
 
 
@@ -168,6 +198,12 @@
         }
         }
     })
     })
 
 
+    function setHeaderTitle (title) {
+        if (!title) return
+        document.title = title
+        $('.header-title').text(title)
+    }
+
     function formatMoney(s, n) {
     function formatMoney(s, n) {
         s = s / 100
         s = s / 100
         if (n === undefined) {
         if (n === undefined) {
@@ -207,7 +243,7 @@
         var money = t.split('').reverse().join('') + point + right;
         var money = t.split('').reverse().join('') + point + right;
         return money;
         return money;
     }
     }
-      //获取url参数
+    //获取url参数
     function getParam(name) {
     function getParam(name) {
         var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
         var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
         var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
         var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配

+ 0 - 0
src/web/templates/areaPack/pc/page_test.html


+ 5 - 1
src/web/templates/weixin/commonPay/checkout.html

@@ -320,9 +320,13 @@
                                           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.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
                                         }
                                         }
 
 
+                                        if (res.filter) {
+                                            href += ('&filter=' + encodeURIComponent(res.filter))
+                                        }
+
                                         // 数据流量包定制
                                         // 数据流量包定制
                                         if (productType === 'dataPack') {
                                         if (productType === 'dataPack') {
-                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                            href = href + '&header=充值数据流量包'
                                         }
                                         }
 
 
                                         var docsId=checkout.getUrlParam("docId")
                                         var docsId=checkout.getUrlParam("docId")

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

@@ -79,9 +79,9 @@
             继续浏览
             继续浏览
         </button>
         </button>
     </div>
     </div>
-    {{else if eq .T.doType "dataPack"}}
+    {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
         <div class="bottom_button j-button-group">
         <div class="bottom_button j-button-group">
-            <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/dataPack/orderDetail?order_code={{.T.orderCode}}'">
+            <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                 查看订单
                 查看订单
             </button>
             </button>
         </div>
         </div>
@@ -109,6 +109,36 @@
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                 }
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
+            } else if (productType === 'areaPack') {
+                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+                // {
+                //     num: 0, // 购买的数量 -1全国
+                //     ordertype: 1, // 1正常购买 2升级 3续费
+                //     cycleunit: 0, // 日期单位 1月 2季 3年
+                //     OldNum: 0, // 升级前购买的省份数量
+                // }
+                var titleMap = {
+                    1: '购买',
+                    2: '升级',
+                    3: '续费'
+                }
+                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+                var cycleType = ' 个月'
+                if (orderFilter.cycleunit == 2) {
+                    cycleType = ' 季'
+                } else if (orderFilter.cycleunit == 3) {
+                    cycleType = ' 年'
+                }
+
+                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+                html += `订阅周期:`
+                if (orderFilter.ordertype == 2) {
+                    html += `不延期`
+                } else {
+                    html += `<span class="highlight-text">1</span>${ cycleType }`
+                }
+                $('.info-box .info-item').html(html)
             }
             }
         }
         }
 
 
@@ -134,6 +164,11 @@
         }
         }
     })
     })
 
 
+    function setHeaderTitle (title) {
+        if (!title) return
+        document.title = title
+    }
+
     function formatMoney(s, n) {
     function formatMoney(s, n) {
         s = s / 100
         s = s / 100
         if (n === undefined) {
         if (n === undefined) {