Просмотр исходного кода

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

wangkaiyue 4 лет назад
Родитель
Сommit
0ad2838f19

+ 13 - 1
src/jfw/modules/app/src/web/staticres/jyapp/commonPay/css/paySuccess.css

@@ -30,7 +30,7 @@ body{
   justify-content: space-between;
   align-items: center;
   width: 100%;
-  height: .94rem;
+  min-height: .94rem;
   position: fixed;
   bottom: 0;
 }
@@ -317,3 +317,15 @@ body{
   color: #9B9CA3;
   font-size: .28rem;
 }
+
+.info-box {
+  padding-bottom: .8rem;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  background-color: #fff;
+  color: #5f5e64;
+  font-size: .26rem;
+  line-height: .4rem;
+}
+.info-box .info-item {}

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

@@ -298,7 +298,6 @@
                         data: {
                             code: checkout.orderInfo.ordercode
                         },
-                        contentType: 'application/x-www-form-urlencoded',
                         success: function (res) {
                             if (res.success) {
                                 // 直到找到支付完成订单,关闭定时器
@@ -310,12 +309,19 @@
                                     duration: 1500,
                                     callback: function () {
                                         // 埋点请求
-                                        _this.buryingPoint()
+                                        var productType = checkout.orderInfo.productType
+                                        checkout.buryingPoint()
                                         var  bigmemberBid = checkout.getUrlParam("b");
                                         var href="/jyapp/{{.T.doType}}/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&pay_way=" + res.pay_way + "&price=" + res.price + "&t={{.T.t}}"
+
                                         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}}"
                                         }
+                                        // 数据流量包定制
+                                        if (productType === 'dataPack') {
+                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                        }
+
                                         var docsId=checkout.getUrlParam("docId");
                                         if (docsId!=null){
                                           href +="&docsId="+docsId
@@ -380,6 +386,7 @@
             }
         }
         checkout.init()
+        window.checkout = checkout
     })
 </script>
 {{include "/common/baiducc.html"}}

+ 26 - 1
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -11,6 +11,7 @@
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.css">
     <link rel="stylesheet" type="text/css"
           href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/commonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/commonPay/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" type="text/css"
           href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/commonPay/css/paySuccess.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css"/>
@@ -20,7 +21,7 @@
 <body>
 <div class="app-layout-header jy-app-header">
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
-    {{.T.title}}
+    <span class="header-title">{{.T.title}}</span>
     <span></span></div>
 <div class="app-layout-content-b">
     <div class="vip_pay_success layout_top-bottom">
@@ -33,6 +34,9 @@
                     <em></em>
                 </p>
             </div>
+            <div class="info-box">
+                <div class="info-item"></div>
+            </div>
             <div class="info_box">
                 <div class="pay_mode">
                     <span>支付方式</span>
@@ -91,6 +95,12 @@
                     继续浏览
                 </button>
             </div>
+        {{else if eq .T.doType "dataPack"}}
+            <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>
+            </div>
         {{end}}
     </div>
 </div>
@@ -109,6 +119,21 @@
         var payTime = {{.T.payTime}}
         var price ={{.T.price}}
         var payway ={{.T.pay_way}}
+        var productType = {{.T.doType}}
+
+        var headerTitle = decodeURIComponent(vTools.getParam('header'))
+        var orderFilter = decodeURIComponent(vTools.getParam('filter'))
+        if (headerTitle) {
+          document.title = headerTitle
+          $('.header-title').text(headerTitle)
+        }
+        if (orderFilter) {
+            orderFilter = JSON.parse(orderFilter)
+            // 数据包展示
+            if (productType === 'dataPack') {
+                $('.info-box .info-item').text('数据流量包:+' + orderFilter.pNum)
+            }
+        }
 
         var payData = ""
         if (payTime) {

+ 34 - 32
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -114,7 +114,7 @@
                     <i class="icon iconfont tips-icon" data-id="dialog">&#xe63b;</i>
                 </div>
             </div>
-            <div class="select-data-pack-group" style="margin-top: 0.16rem" v-show="payType == '数据流量包'">
+            <div class="select-data-pack-group" style="margin-top: 0.16rem" v-show="payType == '数据流量包' && getPackDataList.length > 1">
                 <div class="select-data-pack-item" @click="togglePackData(item, index)" v-for="(item, index) in getPackDataList" :key="index">
                     <div class="click-icon-box">
                         <i class="icon-tick-circle" v-if="payMap['数据流量包'].selectIndex != index"></i>
@@ -1403,7 +1403,6 @@
             },
         })
     }
-    getDataPackInfo()
 
     // 获取去重数据
     function getExportForRepeatInfo (params, type, showLoading) {
@@ -1490,14 +1489,8 @@
                       })
                     })
                 }
-                if (!data.personalPack) {
-                    data.personalPack = {
-                        normalTotal: 0,
-                        seniorTotal: 0
-                    }
-                }
                 if (data.personalPack) {
-                    if (data.personalPack.normalTotal >= 0) {
+                    if (data.personalPack.normalTotal > 0) {
                         tempList.push({
                             title: '线上充值账户(标准字段包)',
                             level: 1,
@@ -1507,7 +1500,7 @@
                             data: data.personalPack.normalTotal
                         })
                     }
-                    if (data.personalPack.seniorTotal >= 0) {
+                    if (data.personalPack.seniorTotal > 0) {
                         tempList.push({
                             title: '线上充值账户(高级字段包)',
                             level: 2,
@@ -1519,31 +1512,38 @@
                     }
                 }
                 if (tempList.length == 0) {
-                    this.payMap['数据流量包'].show = false
-                } else {
-                    this.$set(this, 'packDataList', tempList)
-                    var tempN = {}
-                    var nowIndex = 0
-                    for (var i =0;i < tempList.length;i++) {
-                        if (i === 0) {
-                            tempN = tempList[i]
-                        }
-                        if (tempN.surplus < tempList[i].surplus) {
-                            nowIndex = i
-                            tempN = tempList[i]
-                        }
+                    this.payMap['数据流量包'].show = true
+                    tempList.push({
+                        title: '线上充值账户(标准字段包)',
+                        level: 1,
+                        online: true,
+                        total: 0,
+                        surplus: 0,
+                        data: 0
+                    })
+                }
+                this.$set(this, 'packDataList', tempList)
+                var tempN = {}
+                var nowIndex = 0
+                for (var i =0;i < tempList.length;i++) {
+                    if (i === 0) {
+                        tempN = tempList[i]
                     }
-                    this.payMap['数据流量包'].selectIndex = nowIndex
-                    if (tempN.online) {
-                        getExportForRepeatInfo({
-                            packType: tempN.level == '1' ? 'normal' : 'senior'
-                        }, '数据流量包', false)
-                    } else {
-                        getExportForRepeatInfo({
-                            entId: tempN.data.entId
-                        }, '数据流量包', false)
+                    if (tempN.surplus < tempList[i].surplus) {
+                        nowIndex = i
+                        tempN = tempList[i]
                     }
                 }
+                this.payMap['数据流量包'].selectIndex = nowIndex
+                if (tempN.online) {
+                    getExportForRepeatInfo({
+                        packType: tempN.level == '1' ? 'normal' : 'senior'
+                    }, '数据流量包', false)
+                } else {
+                    getExportForRepeatInfo({
+                        entId: tempN.data.entId
+                    }, '数据流量包', false)
+                }
                 // 单日限量包
                 if (data.dailyPack) {
                     this.payMap['单日限量包'].show = data.dailyPack.limitToday && data.dailyPack.limitToday > 0
@@ -1585,6 +1585,8 @@
             }
         }
     })
+    getDataPackInfo()
+
 </script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}

+ 3 - 2
src/jfw/modules/app/src/web/templates/dataPack/recharge.html

@@ -33,8 +33,8 @@
                   :key="index">
                   <div class="spec-i-label">${ item.label }</div>                    
                   <div class="spec-i-sub">
-                    <div class="spec-i-text del">${ item.price }元/条</div>
-                    <div class="spec-i-text">${ item.price  * charge.discount }元/条</div>
+                    <div class="spec-i-text del">${ item.before }元/条</div>
+                    <div class="spec-i-text">${ item.price }元/条</div>
                   </div>                    
                 </div>
               </div>
@@ -59,6 +59,7 @@
           position="bottom"
           close-icon="clear"
           class="j-popup"
+          @closed="chargeCountPopupClosed"
           :style="{ height: '45%' }">
           <div class="j-container">
             <div class="popup-header header-title">充值条数</div>

+ 2 - 2
src/web/staticres/common-module/data-pack/css/recharge.css

@@ -72,8 +72,8 @@
   position: absolute;
   right: -1px;
   bottom: -1px;
-  width: 0.28rem;
-  height: 0.28rem;
+  width: 0.4rem;
+  height: 0.4rem;
   background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKySURBVHgB7Zg/aNRQHMd/eXfWP6i9omJBhBOXa0W4bK6ni6Murro76Cgu1kF0aysOjnXTyTopLkEcHM8TxIMOHghFQfBAaUtp8/P9Qt+Rpnm99y+XBO6zXJJ7gc83v+S9XwIwZsyY0jIbdB54UFIuBF/mEfFu6QLUX7drR2qVeUC8RfulChDJT7KAbzbFsdIEaLxt19nBSL4eP16KADJ5ovAB9pMnCh1g9n276VVZgAA12RgGBaURdG4OkycKWYGZoHPHQ1hQGVu4CkSrq6I8UagKkDwgzOmcU5gAojUATXIPkGwNdMk1QFproEtuAYYtUKrkEsCVPDHyAC7liZEGUGkNdBnZQqbaGugykgrotAa6ZF4B3dZAlwpkiElrILg2PQVL/nm4ceYE/N3ahu6/jdRxmd1Cpq0BQfKPZs4O9inApY9fU8dWwTGiNUDD1iApT1AAGU4DDFoDRKPWIE2eePb9l/QcZ7eQ7QIlk7//7Qe8+flHep6TAHnJE9azUFJedfYQ2MgTVgGoNWAT7BPfnBbHnl6sw8mJA3C8WoErpyZhdWNTGsJWntM3XshkrQGJxyFBEk3iQJ7oGVWAWgOG8JxvHkr+93tzK7rycZKVcCTPn2B8px1gpzV4IvufJElWFqJx9LAbeU6IuKg1C+m0BrKrnIaJPLHmhVPKFaDWgMvfUx0vq0QSU3l++yyttPxXQ1dim9ZgeUdMVgljeU4I+JB+961A7KvBVTBEVgkbeURY7F5uvqRtaQVcvruKStw+dxqO8Wn28cqquTyfOtdZOCf2Ux9i1y/eriB59MJWt+X3xLE9C1mR5T0vvB6XJ3ZVIIuvBi5Iu/KCQQWy+mpgCz2w617op8kTUQWy/GpgSB8xfIEMFmTiAs/mxdshfX6te9zjM78pPqyx7eVey++rnPgfnLxxiLvERTEAAAAASUVORK5CYII=) no-repeat;
   background-size: contain;
 }

+ 39 - 13
src/web/staticres/common-module/data-pack/js/recharge.js

@@ -76,9 +76,11 @@ var vm = new Vue({
   },
   watch: {
     'charge.count': function () {
+      this.sortPrice()
       this.calcPrice()
     },
     specActive: function () {
+      this.sortPrice()
       this.calcPrice()
     }
   },
@@ -131,7 +133,8 @@ var vm = new Vue({
           loading && loading.clear()
           if (res) {
             Object.assign(_this.priceInfo, res)
-            _this.sortPrice(res)
+            _this.initPageInfo()
+            _this.sortPrice()
             _this.calcPrice()
           }
         },
@@ -140,17 +143,15 @@ var vm = new Vue({
         }
       })
     },
-    sortPrice: function (info) {
-      var discount = info.discount
-      this.charge.discount = discount
-      this.charge.duration = info.packs_validityYear
-      // 标准字段包
-      this.specList[0].before = info.unitPrice_normal // 普通字段包单价,单位元
-      this.specList[0].price = info.unitPrice_normal * discount
-      // 高级字段包
-      this.specList[1].before = info.unitPrice_senior // 高级字段包单价,单位元
-      this.specList[1].price = info.unitPrice_senior * discount
+    // 根据请求返回值初始化页面参数
+    initPageInfo: function () {
+      var info = this.priceInfo
+      // 总折扣
+      this.charge.discount = info.discount
 
+      // 有效时间
+      this.charge.duration = info.packs_validityYear
+      
       var list = []
       if (Array.isArray(info.packs_showList)) {
         info.packs_showList.forEach(function (item) {
@@ -166,8 +167,28 @@ var vm = new Vue({
         this.charge.count = this.chargeCount.value
       }
     },
+    // 计算卡片展示金额
+    sortPrice: function () {
+      var info = this.priceInfo
+      
+      // 获取被选中的条数info
+      var countItem = this.getCountItem()
+
+      // 条数折扣
+      var cDiscount = this.specActive == 1 ? countItem.senior_discount : countItem.normal_discount
+
+      // 普通字段包单价,单位元
+      this.specList[0].before = info.unitPrice_normal
+      this.specList[0].price = info.unitPrice_normal * cDiscount * info.discount
+      // 高级字段包单价,单位元
+      this.specList[1].before = info.unitPrice_senior
+      this.specList[1].price = info.unitPrice_senior * cDiscount * info.discount
+    },
+    // 计算卡片展示金额 和 支付总金额
     calcPrice: function () {
+      // 获取被选中的规格卡片info
       var specItem = this.getSpecItem()
+      // 获取被选中的条数info
       var countItem = this.getCountItem()
       // 数据包折扣
       var discount = this.charge.discount
@@ -183,6 +204,7 @@ var vm = new Vue({
 
       this.updatePrice(this.price.after, this.price.before)
     },
+    // 获取被选中的规格卡片info
     getSpecItem: function () {
       var _this = this
       var t = {}
@@ -195,6 +217,7 @@ var vm = new Vue({
       })
       return t
     },
+    // 获取被选中的条数info
     getCountItem: function () {
       var _this = this
       var t = {}
@@ -207,6 +230,9 @@ var vm = new Vue({
       })
       return t
     },
+    chargeCountPopupClosed: function () {
+      this.chargeCount.value = this.chargeCount.infoList[0].value
+    },
     clickSpec: function (item) {
       this.specActive = item.id
     },
@@ -256,10 +282,10 @@ var vm = new Vue({
           loading && loading.clear()
           if (res.error_code === 0 && res.data) {
             if (utils.isWeiXinBrowser) {
-              history.replaceState({}, '', '/front/wx_dataExport/wxToOrderDetail?orderCode=' + res.data.orderCode);
+              history.replaceState({}, '', '/weixin/common/dataPack/orderDetail?order_code=' + res.data.orderCode);
               location.href = '/weixin/pay/checkout_dataPack?orderCode=' + res.data.orderCode
             } else {
-              history.replaceState({}, '', '/jyapp/front/dataExport/toOrderDetail?orderCode=' + res.data.orderCode);
+              history.replaceState({}, '', '/jyapp/common/dataPack/orderDetail?order_code=' + res.data.orderCode);
               location.href = "/jyapp/pay/checkout_dataPack?orderCode=" + res.data.orderCode + '&from=buy'
             }
           }

+ 14 - 1
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -14,6 +14,18 @@ var vm = new Vue({
       reqOrder: {},
       reqTime: {},
       orderStateMap: {
+        // 默认状态
+        'default': {
+          text: '',
+          bgcColor: '',
+          bgcClassName: '',
+          surplusTimeShow: false,
+          bottomButtonShow: {
+            pay: false,
+            invoke: false,
+            buyAgain: false
+          }
+        },
         0: {
           text: '待付款',
           bgcColor: '',
@@ -75,7 +87,8 @@ var vm = new Vue({
       },
       // 页面内容展示数组
       orderInfo: {
-        state: 0, // 订单状态: 0:待支付 1:已完成 -2:已取消 -3:已退款
+        // 订单状态: 0:待支付 1:已完成 -2:已取消 -3:已退款
+        state: 'default', // 默认default
         surplusTime: 0, // 取消订单倒计时
         headerImg: '', // 头图地址
         payWay: '',

+ 5 - 0
src/web/staticres/common-module/order-list/js/order-list.js

@@ -120,6 +120,11 @@ var vm = new Vue({
   },
   watch: {
     tabActiveName: function () {
+      // 如果页面被resetState(tab)重置过,则切换到该tab后手动调用onLoad
+      if (this.tabState.list.length === 0 && !this.tabState.loaded) {
+        this.onLoad()
+      }
+
       this.setScrollTop(this.tabState.scrollTop)
       this.setUrlQuery()
     }

+ 13 - 1
src/web/staticres/wxCommonPay/css/pay_success.css

@@ -30,7 +30,7 @@ body{
   justify-content: space-between;
   align-items: center;
   width: 100%;
-  height: .94rem;
+  min-height: .94rem;
   position: fixed;
   bottom: 0;
 }
@@ -317,3 +317,15 @@ body{
   color: #9B9CA3;
   font-size: .28rem;
 }
+
+.info-box {
+  padding-bottom: .8rem;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  background-color: #fff;
+  color: #5f5e64;
+  font-size: .26rem;
+  line-height: .4rem;
+}
+.info-box .info-item {}

+ 45 - 24
src/web/templates/pc/createOrderPage.html

@@ -680,18 +680,24 @@
             online: false
         }
 
+        function checkMaxOfSurplus () {
+            return pageDataMap.msgCount <= maxItem.surplus
+        }
+
         // 数据流量包
         if (pageDataMap.dataExportPackInfo) {
             var parentDom = $("#select-ent-datapack .switch-dataType")
             // 数据流量包  线下
             if (pageDataMap.dataExportPackInfo.entPack) {
                 pageDataMap.dataExportPackInfo.entPack.forEach(function (v) {
-                    if (v.surplusToday >= maxItem.surplus) {
-                        maxItem = {
-                            entId:  v.entId,
-                            level: -1,
-                            surplus: v.surplusToday,
-                            online: false
+                    if (!checkMaxOfSurplus()) {
+                        if (v.surplusToday >= maxItem.surplus) {
+                            maxItem = {
+                                entId:  v.entId,
+                                level: -1,
+                                surplus: v.entAllCount >= v.surplusToday ? v.surplusToday : v.entAllCount,
+                                online: false
+                            }
                         }
                     }
                     var tempDom = $("#select-ent-item-template").clone()
@@ -704,27 +710,31 @@
             }
             // 数据流量包  线上
             if (pageDataMap.dataExportPackInfo.personalPack) {
-                if (pageDataMap.dataExportPackInfo.personalPack.normalTotal > 0) {
-                    if (pageDataMap.dataExportPackInfo.personalPack.normalTotal >= maxItem.surplus) {
-                        maxItem = {
-                            entId: -1,
-                            level: 1,
-                            surplus: pageDataMap.dataExportPackInfo.personalPack.normalTotal,
-                            online: true
+                if (pageDataMap.dataExportPackInfo.personalPack.seniorTotal > 0) {
+                    if (!checkMaxOfSurplus()) {
+                        if (pageDataMap.dataExportPackInfo.personalPack.seniorTotal >= maxItem.surplus) {
+                            maxItem = {
+                                entId: -1,
+                                level: 2,
+                                surplus: pageDataMap.dataExportPackInfo.personalPack.seniorTotal,
+                                online: true
+                            }
                         }
                     }
-                    createTempDom(1, parentDom)
+                    createTempDom(2, parentDom)
                 }
-                if (pageDataMap.dataExportPackInfo.personalPack.seniorTotal > 0) {
-                    if (pageDataMap.dataExportPackInfo.personalPack.seniorTotal >= maxItem.surplus) {
-                        maxItem = {
-                            entId: -1,
-                            level: 2,
-                            surplus: pageDataMap.dataExportPackInfo.personalPack.seniorTotal,
-                            online: true
+                if (pageDataMap.dataExportPackInfo.personalPack.normalTotal > 0) {
+                    if (!checkMaxOfSurplus()) {
+                        if (pageDataMap.dataExportPackInfo.personalPack.normalTotal >= maxItem.surplus) {
+                            maxItem = {
+                                entId: -1,
+                                level: 1,
+                                surplus: pageDataMap.dataExportPackInfo.personalPack.normalTotal,
+                                online: true
+                            }
                         }
                     }
-                    createTempDom(2, parentDom)
+                    createTempDom(1, parentDom)
                 }
             }
             // 移除模版
@@ -738,6 +748,17 @@
                 // 默认加载第一项去重数据
                 var attrId =  parentDom.children('.no-select').eq(0).attr('data-id')
                 var attrLevel = parentDom.children('.no-select').eq(0).attr('data-level')
+                // 都不满足时默认选中线下
+                if (!checkMaxOfSurplus() && maxItem.online) {
+                    if (attrId) {
+                        maxItem = {
+                            entId:  attrId,
+                            level: -1,
+                            surplus: 0,
+                            online: false
+                        }
+                    }
+                }
                 if (maxItem.online) {
                     attrLevel = maxItem.level
                     attrId = -1
@@ -747,12 +768,12 @@
                     attrId = maxItem.entId
                     parentDom.children('.no-select[data-id="'+attrId+'"]').addClass('active')
                 }
-                if (attrId) {
+                if (attrId != -1) {
                     pageDataMap.typeMap['数据流量包'].entId = attrId
                     getExportForRepeatInfo({
                         entId: attrId
                     }, false)
-                } else if (attrLevel) {
+                } else if (attrLevel != -1) {
                     pageDataMap.typeMap['数据流量包'].level = attrLevel
                     pageDataMap.typeMap['数据流量包'].online = true
                     getExportForRepeatInfo({

+ 48 - 40
src/web/templates/weixin/commonPay/checkout.html

@@ -209,7 +209,6 @@
                             orderCode: checkout.orderInfo.ordercode,
                             payway: checkout.mode,
                         },
-                        contentType: 'application/x-www-form-urlencoded',
                         success: function (res) {
                             checkout.loading.hide(function () {
                                 checkout.loading = null
@@ -280,6 +279,10 @@
                                     window.location.replace("/front/wxMyOrder/integraldetail/" + orderCode)
                                     break
                                 }
+                                case 'dataPack': {
+                                    window.location.replace("/weixin/common/dataPack/orderDetail?order_code=" + orderCode)
+                                    break
+                                }
                             }
                         } else {
                             EasyAlert.show("系统异常,请稍微再试", "", 3000);
@@ -306,50 +309,22 @@
                                     iconHide: true,
                                     duration: 1500,
                                     callback: function () {
-                                      // 支付成功 判断有没有引流语id,有 需要埋点
-                                      if (checkout.getUrlParam('mid')) {
-                                        try {
-                                          $.ajax({
-                                            type: "POST",
-                                            url: "/publicapply/drainage/bmt/" + checkout.getUrlParam('mid'),
-                                            data: {
-                                              p: 'Paid'
-                                            },
-                                            success: function(r) {
-                                              console.log(r)
-                                            }
-                                          })
-                                        } catch (error) {
-                                          console.log(error)
-                                        }
-                                      }
-                                      // 采购单位画像引流过来的埋点
-                                      if (checkout.getUrlParam('bid')) {
-                                        try {
-                                          var params = {
-                                            mold: 'isPaid'
-                                          }
-                                          $.ajax({
-                                            type: 'POST',
-                                            url: '/publicapply/drainage/buyerunit',
-                                            contentType: "application/json",
-                                            data: JSON.stringify(params),
-                                            success: function (res) {
-                                              console.log(res)
-                                            },
-                                            error: function (error) {
-                                              console.log(error)
-                                            }
-                                          })
-                                        } catch (error) {
-                                          console.log(error)
-                                        }
-                                      }
+                                        // 支付成功 判断有没有引流语id,有 需要埋点
+                                        var productType = checkout.orderInfo.productType
+                                        checkout.buryingPoint()
+
                                         var  bigmemberBid=checkout.getUrlParam("b");
                                         var href ="/weixin/{{.T.doType}}/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&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}}"
                                         }
+
+                                        // 数据流量包定制
+                                        if (productType === 'dataPack') {
+                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                        }
+
                                         var docsId=checkout.getUrlParam("docId")
                                         if (docsId!=null){
                                           href +="&docsId="+docsId
@@ -446,9 +421,42 @@
                 if (r != null)
                     return unescape(r[2]);
                 return null;
+            },
+            // 埋点
+            buryingPoint: function () {
+                if (checkout.getUrlParam('mid')) {
+                    try {
+                        $.ajax({
+                            type: "POST",
+                            url: "/publicapply/drainage/bmt/" + checkout.getUrlParam('mid'),
+                            data: {
+                                p: 'Paid'
+                            }
+                        })
+                    } catch (error) {
+                        console.log(error)
+                    }
+                }
+                    // 采购单位画像引流过来的埋点
+                if (checkout.getUrlParam('bid')) {
+                    try {
+                        var params = {
+                            mold: 'isPaid'
+                        }
+                        $.ajax({
+                            type: 'POST',
+                            url: '/publicapply/drainage/buyerunit',
+                            contentType: "application/json",
+                            data: JSON.stringify(params)
+                        })
+                    } catch (error) {
+                        console.log(error)
+                    }
+                }
             }
         }
         checkout.init()
+        window.checkout = checkout
     })
 </script>
 {{include "/common/baiducc.html"}}

+ 25 - 0
src/web/templates/weixin/commonPay/paySuccess.html

@@ -9,6 +9,7 @@
     <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"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/pay_success.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}">
 </head>
@@ -23,6 +24,9 @@
                 <em></em>
             </p>
         </div>
+        <div class="info-box">
+            <div class="info-item"></div>
+        </div>
         <div class="info_box">
             <div class="pay_mode">
                 <span>支付方式</span>
@@ -75,6 +79,12 @@
             继续浏览
         </button>
     </div>
+    {{else if eq .T.doType "dataPack"}}
+        <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>
+        </div>
     {{end}}
 </div>
 </body>
@@ -83,6 +93,21 @@
     $(function () {
         var payTime = {{.T.payTime}}
         var price ={{.T.price}}
+        var productType = {{.T.doType}}
+
+        var headerTitle = decodeURIComponent(getParam('header'))
+        var orderFilter = decodeURIComponent(getParam('filter'))
+        if (headerTitle) {
+          document.title = headerTitle
+        }
+        if (orderFilter) {
+            orderFilter = JSON.parse(orderFilter)
+            // 数据包展示
+            if (productType === 'dataPack') {
+                $('.info-box .info-item').text('数据流量包:+' + orderFilter.pNum)
+            }
+        }
+
         var payData = ""
         if (payTime) {
             payData = new Date(parseInt(payTime) * 1000)

+ 33 - 31
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -1324,7 +1324,6 @@
             },
         })
     }
-    getDataPackInfo()
 
     // 获取去重数据
     function getExportForRepeatInfo (params, type, showLoading) {
@@ -1411,14 +1410,8 @@
                       })
                     })
                 }
-                if (!data.personalPack) {
-                    data.personalPack = {
-                        normalTotal: 0,
-                        seniorTotal: 0
-                    }
-                }
                 if (data.personalPack) {
-                    if (data.personalPack.normalTotal >= 0) {
+                    if (data.personalPack.normalTotal > 0) {
                         tempList.push({
                             title: '线上充值账户(标准字段包)',
                             level: 1,
@@ -1428,7 +1421,7 @@
                             data: data.personalPack.normalTotal
                         })
                     }
-                    if (data.personalPack.seniorTotal >= 0) {
+                    if (data.personalPack.seniorTotal > 0) {
                         tempList.push({
                             title: '线上充值账户(高级字段包)',
                             level: 2,
@@ -1440,31 +1433,38 @@
                     }
                 }
                 if (tempList.length == 0) {
-                    this.payMap['数据流量包'].show = false
-                } else {
-                    this.$set(this, 'packDataList', tempList)
-                    var tempN = {}
-                    var nowIndex = 0
-                    for (var i =0;i < tempList.length;i++) {
-                        if (i === 0) {
-                            tempN = tempList[i]
-                        }
-                        if (tempN.surplus < tempList[i].surplus) {
-                            nowIndex = i
-                            tempN = tempList[i]
-                        }
+                    this.payMap['数据流量包'].show = true
+                    tempList.push({
+                        title: '线上充值账户(标准字段包)',
+                        level: 1,
+                        online: true,
+                        total: 0,
+                        surplus: 0,
+                        data: 0
+                    })
+                }
+                this.$set(this, 'packDataList', tempList)
+                var tempN = {}
+                var nowIndex = 0
+                for (var i =0;i < tempList.length;i++) {
+                    if (i === 0) {
+                        tempN = tempList[i]
                     }
-                    this.payMap['数据流量包'].selectIndex = nowIndex
-                    if (tempN.online) {
-                        getExportForRepeatInfo({
-                            packType: tempN.level == '1' ? 'normal' : 'senior'
-                        }, '数据流量包', false)
-                    } else {
-                        getExportForRepeatInfo({
-                            entId: tempN.data.entId
-                        }, '数据流量包', false)
+                    if (tempN.surplus < tempList[i].surplus) {
+                        nowIndex = i
+                        tempN = tempList[i]
                     }
                 }
+                this.payMap['数据流量包'].selectIndex = nowIndex
+                if (tempN.online) {
+                    getExportForRepeatInfo({
+                        packType: tempN.level == '1' ? 'normal' : 'senior'
+                    }, '数据流量包', false)
+                } else {
+                    getExportForRepeatInfo({
+                        entId: tempN.data.entId
+                    }, '数据流量包', false)
+                }
                 // 单日限量包
                 if (data.dailyPack) {
                     this.payMap['单日限量包'].show = data.dailyPack.limitToday && data.dailyPack.limitToday > 0
@@ -1506,6 +1506,8 @@
             }
         }
     })
+    getDataPackInfo()
+
 </script>
 {{include "/common/baiducc.html"}}
 </body>

+ 3 - 2
src/web/templates/weixin/dataPack/recharge.html

@@ -44,8 +44,8 @@
                   :key="index">
                   <div class="spec-i-label">${ item.label }</div>                    
                   <div class="spec-i-sub">
-                    <div class="spec-i-text del">${ item.price }元/条</div>
-                    <div class="spec-i-text">${ item.price * charge.discount }元/条</div>
+                    <div class="spec-i-text del">${ item.before }元/条</div>
+                    <div class="spec-i-text">${ item.price }元/条</div>
                   </div>                    
                 </div>
               </div>
@@ -70,6 +70,7 @@
           position="bottom"
           close-icon="clear"
           class="j-popup"
+          @closed="chargeCountPopupClosed"
           :style="{ height: '45%' }">
           <div class="j-container">
             <div class="popup-header header-title">充值条数</div>