Преглед изворни кода

Merge branch 'dev2.10.9' of ssh://192.168.3.207:10022/qmx/jy into dev2.10.9

wangchuanjin пре 5 година
родитељ
комит
8fe461351c
35 измењених фајлова са 1377 додато и 1154 уклоњено
  1. 4 0
      src/jfw/front/dataExport.go
  2. 1 1
      src/jfw/modules/app/src/app/active/active_zb.go
  3. 3 3
      src/jfw/modules/app/src/seo.json
  4. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/.DS_Store
  5. 2 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css
  6. 261 33
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css
  7. 10 7
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js
  8. 755 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js
  9. 14 13
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_renew.js
  10. 5 0
      src/jfw/modules/app/src/web/templates/active/livePage/online.html
  11. 42 23
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html
  12. 16 7
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html
  13. 28 985
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_order_detail.html
  14. 7 4
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  15. 2 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html
  16. 2 1
      src/jfw/modules/subscribepay/src/config.json
  17. 3 0
      src/jfw/modules/subscribepay/src/config/config.go
  18. 5 0
      src/jfw/modules/subscribepay/src/entity/subscribeVip.go
  19. 8 0
      src/jfw/modules/subscribepay/src/message.json
  20. 25 4
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  21. 2 1
      src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go
  22. 2 1
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  23. 6 5
      src/jfw/modules/subscribepay/src/util/liveActiveMsgRemind.go
  24. 3 0
      src/jfw/modules/subscribepay/src/util/vrew.go
  25. 12 9
      src/jfw/modules/weixin/src/wx/wx.go
  26. 2 1
      src/seo.json
  27. 2 0
      src/web/staticres/vipsubscribe/css/vip_index_new.css
  28. 13 11
      src/web/staticres/vipsubscribe/js/vip_index_new.js
  29. 30 5
      src/web/templates/pc/billing_list.html
  30. 10 2
      src/web/templates/pc/myOrder.html
  31. 36 16
      src/web/templates/weixin/dataExport/dataExport_toMyOrder.html
  32. 10 2
      src/web/templates/weixin/vipsubscribe/vip_index_new.html
  33. 36 7
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  34. 11 7
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  35. 9 5
      src/web/templates/weixin/vipsubscribe/vip_renew.html

+ 4 - 0
src/jfw/front/dataExport.go

@@ -271,6 +271,10 @@ func (d *DataExport) QueryOrder() error {
 				if create_time.Unix() >= liveActiveStartTime && create_time.Unix() < liveActiveEndTime {
 					v["isLiveActive"] = true
 				}
+				activeData := public.Mysql.FindOne("prefer_active", map[string]interface{}{"order_code": v["order_code"], "user_id": v["user_id"]}, "active_code", "")
+				if activeData != nil {
+					v["isUsedActiveCode"] = true
+				}
 			}
 		}
 	}

+ 1 - 1
src/jfw/modules/app/src/app/active/active_zb.go

@@ -66,7 +66,7 @@ func (this *active_zb) LivePage() error {
 		isVip := false
 		r, _ := public.MQFW.FindById("user", userid, `{"i_vip_status":1}`)
 		if r != nil && len(*r) != 0 {
-			if util.IntAll((*r)["i_vip_status"]) > 0 {
+			if util.IntAll((*r)["i_vip_status"]) == 2 {
 				isVip = true
 			}
 		}

+ 3 - 3
src/jfw/modules/app/src/seo.json

@@ -1,8 +1,7 @@
 {	
-	"cdn":"http://web-jydev-wss.jianyu360.cn",
+	"cdn":"http://web-jydev-xzh.jianyu360.cn",
 	"cdns":{
-	 "app2-jytest.jianyu360.cn":"res://app2-jytest.jianyu360.cn",
-	 "web-jydev-wss.jianyu360.cn":"http://web-jydev-wss.jianyu360.cn"
+	 	"web-jydev-xzh.jianyu360.cn":""
 	},
     "qfw": {
         "swordfish": {
@@ -84,6 +83,7 @@
 	"ZBADDRESS":"https://res.jianyu360.com",
 	"liveActiveStartTime": "1592755200",
 	"liveActiveEndTime": "1594051200",
+	"activeDiscount": "0.6",
 	"IosExam":{
 		"flag":false,
 		"phone":"18613717801",

BIN
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/.DS_Store


+ 2 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css

@@ -565,6 +565,7 @@
 }
 
 .jy-alert .weui-dialog__bd {
+  margin: 0;
   padding: 0 0.4rem 0.48rem;
   font-size: 0.28rem;
   color: #686868;
@@ -998,6 +999,7 @@
   justify-content: flex-end;
   padding: 0 .32rem;
   color: #9B9CA3;
+  margin-bottom: .2rem;
 }
 
 .origin-price .price-num {

+ 261 - 33
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css

@@ -1,27 +1,45 @@
-   .j-header {
-  position: fixed;
+html, body {
+  height: 100%;
+}
+
+.j-header {
+  position: absolute;
   width: 100%;
+  justify-content: flex-start;
   background-color: transparent;
-  z-index: 99;
+  color: #fff;
 }
-   .j-header.jy-app-header {
-     background-color: transparent;
-   }
 
-   .j-header:after {
+.j-header:after {
   display: none;
 }
 
-   .j-header .header-left {
-  color: #fff;
+.j-header .header-left {
+  color: inherit;
 }
 
-   .j-header .left-title {
+.j-header .header-title {
+  left: 0;
   font-size: .4rem;
   padding-left: .16rem;
+  color: inherit;
+}
+
+.j-header.bgc-f {
+  justify-content: space-between;
+  background-color: #fff;
+  color: inherit;
+}
+.j-header.bgc-f .header-left {
+  color: inherit;
+}
+.j-header.bgc-f .header-title {
+  font-weight: 400;
+  font-size: .36rem;
 }
 
-   .j-body .bg {
+
+.j-body .bg {
   display: flex;
   flex-direction: column;
   align-items: center;
@@ -34,38 +52,38 @@
   text-align: center;
 }
 
-   .j-body .bg .status {
+.j-body .bg .status {
   font-size: .44rem;
   line-height: .64rem;
   color: #F7F9FA;
   font-weight: bold;
 }
 
-   .j-body .bg .remaining {
+.j-body .bg .remaining {
   padding-top: .16rem;
   font-size: .28rem;
   line-height: .4rem;
   color: #F7F9FA;
 }
 
-   .j-body .finish-bg {
+.j-body .finish-bg {
   background-image: url(/jyapp/images/myorder/finish-bg.png?v=51430);
 }
 
-   .j-body .cancel-bg {
+.j-body .cancel-bg {
   background-image: url(/jyapp/images/myorder/cancel-bg.png?v=51430);
 }
 
-   .j-body .nopay-bg {
+.j-body .nopay-bg {
   background-image: url(/jyapp/images/myorder/nopay-bg.png?v=51430);
 }
 
-   .j-body .order-main {
+.j-body .order-main {
   padding: 0 .24rem;
   margin-top: -0.8rem;
 }
 
-   .j-body .order-main .top {
+.j-body .order-main .top {
   display: flex;
   align-items: center;
   background-color: #fff;
@@ -73,31 +91,31 @@
   border-radius: .16rem;
 }
 
-   .j-body .order-main .top .order-img {
+.j-body .order-main .top .order-img {
   width: 1.08rem;
   height: 1.08rem;
   overflow: hidden;
 }
 
-   .j-body .order-main .top .order-img img {
+.j-body .order-main .top .order-img img {
   width: 100%;
   height: 100%;
 }
 
-   .j-body .order-main .top .order-name {
+.j-body .order-main .top .order-name {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   padding: 0 .24rem;
 }
 
-   .j-body .order-main .top .order-name .o-name {
+.j-body .order-main .top .order-name .o-name {
   font-size: .28rem;
   line-height: .4rem;
   color: #5F5E64;
 }
 
-   .j-body .order-main .top .order-name .o-price {
+.j-body .order-main .top .order-name .o-price {
   margin-top: .16rem;
   color: #171826;
   font-weight: bold;
@@ -105,21 +123,21 @@
   line-height: .52rem;
 }
 
-   .j-body .order-main .middle {
+.j-body .order-main .middle {
   margin-top: .32rem;
   padding: .32rem;
   border-radius: .16rem;
   background-color: #fff;
 }
 
-   .j-body .order-main .bottom {
+.j-body .order-main .bottom {
   margin: .32rem 0;
   padding: .32rem;
   border-radius: .16rem;
   background-color: #fff;
 }
 
-   .j-body .order-main .title {
+.j-body .order-main .title {
   padding-bottom: .24rem;
   font-size: .36rem;
   line-height: .52rem;
@@ -127,7 +145,7 @@
   font-weight: bold;
 }
 
-   .j-body .order-main .list .l-item {
+.j-body .order-main .list .l-item {
   display: flex;
   padding: .12rem 0;
   font-size: .26rem;
@@ -135,22 +153,219 @@
   color: #5F5E64;
 }
 
-   .j-body .order-main .list .l-item .label {
+.j-body .order-main .list .l-item .label {
   flex-shrink: 0;
   min-width: 1.32rem;
   color: #5F5E64;
 }
 
-   .j-body .order-main .list .l-item .value {
+.j-body .order-main .list .l-item .value {
   padding-left: .16rem;
   color: #171826;
 }
 
-   .j-body .order-main .voucher,    .j-body .order-main .qingdan {
+.j-body .order-main .voucher,    .j-body .order-main .qingdan {
   padding-left: .12rem;
   color: #2ABED1;
 }
 
+.j-footer {
+  display: none;
+}
+
+.zfje {
+	font-size: .32rem;
+	margin: 0 auto;
+}
+.stop {
+  overflow: hidden;
+  height: 100%;
+}
+
+.jymobile-setting-dialog {
+  font-size: .32rem;
+}
+
+.jymobile-setting-dialog .weui-dialog__hd {
+  padding: 0;
+  height: 0.82rem;
+  line-height: .82rem;
+  text-align: center;
+  background-color: #F5F4F9;
+}
+
+.jymobile-setting-dialog .weui-dialog__hd .weui-dialog__title {
+  font-size: .36rem;
+}
+
+.jymobile-setting-dialog .weui-dialog__bd {
+  padding: .37rem .1rem .38rem;
+  color: #1D1D1D;
+  font-size: .32rem;
+  text-align: center;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft {
+  display: flex;
+  padding: 0 0 .38rem 0;
+  text-align: center;
+  justify-content: space-around;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft:after {
+  border: none;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn {
+  display: flex;
+  flex: none;
+  align-items: center;
+  justify-content: center;
+  width: 1.72rem;
+  height: .72rem;
+  color: #fff;
+  font-size: .32rem;
+  vertical-align: center;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_primary {
+  margin: 0;
+  margin-left: .3rem;
+  background-color: #2CB7CA;
+}
+
+.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_default {
+  margin: 0;
+  margin-right: .3rem;
+  background-color: #BFBFC3;
+}
+
+.cancel_time{
+	font-size: 16px;
+	margin-left: 20px;
+}
+
+.pay_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  height: 4.9rem;
+  z-index: 9999;
+}
+.pay_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+.pay_way .box .box_bd p {
+  font-size: .32rem;
+}
+.pay_way .box .box_bd .zfb_label{
+margin-bottom:.38rem;
+}
+.pay_way .box .box_hd>h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+.pay_way .box .box_hd .cancel {
+  color: #2cb7ca;
+  font-size: .32rem;
+}
+.pay_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+.pay_way .box .box_bd .wx_label, .pay_way .box .box_bd .zfb_label {
+  margin-top: .38rem;
+  padding: 0 .3rem;
+}
+
+.money_pay{
+  font-size: .50rem;
+  text-align: center;
+  height: 1rem;
+  line-height: 1rem;
+}
+.surePay{
+  font-size: .40rem;
+  text-align: center;
+  height: 1rem;
+  line-height: 1rem;
+  background-color: #2CB7CA;
+  color: #fff;
+  margin-top:  0.28rem;
+}
+
+.weui-cells {
+  margin-top: 0px !important;
+  background-color: #fff;
+  line-height: 1.47058824;
+  font-size: 17px;
+  overflow: hidden;
+  position: relative;
+}
+
+.weui-cell::before {
+  content: " ";
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  height: 1px;
+  border-top: 0px solid #e5e5e5 !important;
+  border-top-color:
+  rgb(229, 229, 229);
+  border-top-style: solid;
+  border-top-width: 5px;
+  color:#e5e5e5;
+  -webkit-transform-origin: 0 0;
+  transform-origin: 0 0;
+  -webkit-transform: scaleY(.5);
+  transform: scaleY(.5);
+  left: 15px;
+  z-index: 2;
+}
+
+.pay_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2cb7ca;
+}
+
+.nothing{
+  height: 100%;
+	margin: 50% auto;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction:column;
+}
+.nothing img{
+  width: 120px;
+}
+.nothingDiv {
+	padding-top:0.42rem;
+	font-size:0.3rem;
+	color:#838384;
+}
+
+.person > p >span , .unit > p >span{
+	margin-bottom: .12rem;
+}
+
 .billing-list-container .weui-half-screen-dialog {
   display: flex;
   flex-direction: column;
@@ -371,9 +586,9 @@
 }
 
 .va-total-container .total-price {
-  font-weight: 700;
-  font-size: 0.32rem;
-  color: #fe737a;
+  font-weight: 400;
+  font-size: 0.36rem;
+  color: #FB483D;
 }
 
 .valuation_list {
@@ -459,3 +674,16 @@
 .origin-price-container .price-num {
   text-decoration: line-through;
 }
+
+.bill-origin-price {
+  display: none;
+  align-items: center;
+  justify-content: flex-end;
+  padding: 0 .32rem;
+  color: #9B9CA3;
+  margin-bottom: 0.2rem;
+}
+
+.bill-origin-price .price-num {
+  text-decoration: line-through;
+}

+ 10 - 7
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -264,6 +264,9 @@ $(function () {
         pickerShow('.billing-list-container', false)
         pickerShow('.coupon-picker', false)
     })
+    $('body').on('click', '.jy-dialog .weui-mask', function () {
+        pickerShow('.jy-dialog', false)
+    })
 
     $('.close-expire-remind').on("click", function () {
         $(".expire-remind").hide();
@@ -344,6 +347,7 @@ $(function () {
             //cancelTip(module);
             window.history.back();
         });
+        window.removeEventListener('popstate',function(){})
         setTimeout(function () {
             window.addEventListener("popstate", function (e) {
                 //如果订单计费清单显示,则关闭清单;
@@ -730,18 +734,19 @@ $(function () {
 			var nowTime = new Date().getTime();
 			var startTime = live20200707.startTime;
 			var endTime = live20200707.endTime;
+            var activeDiscount = parseFloat(live20200707.activeDiscount)
 			var startTimes = parseInt(startTime) * 1000;
 			var endTimes = parseInt(endTime) * 1000;
 			if (nowTime >= startTimes && nowTime < endTimes) {
 				var price = status[0];
 				$(".price-num").text(price);
-				status[0] = parseFloat(price) * 0.6;
-				var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
+				status[0] = parseFloat(price) * activeDiscount;
+				var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
 				$(".reduce-price").text(formatMoney(activePrice));
 				// for (var i=0;i<status.length;i++){
 				// 	if(i===3){
 				// 		for (var a in status[i]){
-				// 			status[i][a].price = parseFloat(status[i][a].price) * 0.6;
+				// 			status[i][a].price = parseFloat(status[i][a].price) * activeDiscount;
 				// 		}
 				// 	}
 				// }
@@ -777,7 +782,7 @@ $(function () {
             if (!reqData.isTrial) {
                 $(".preview-label").text("需补差价:");
                 $(".billing-list-btn").text("计费清单");
-                $(".va-total-container .total-price").text("¥" + formatMoney(status[0]));
+                $(".va-total-container .total-price").text("共计:¥" + formatMoney(status[0]));
                 flushSubtotal(status[3]);
                 console.log("subtotail", status)
             }
@@ -870,9 +875,7 @@ $(function () {
         var confirmButton = $('.coupon-picker .weui-picker__btn')
         var cancelButton = $('.coupon-picker .cancel')
         var value = input.val()
-        input.focus(function (e) {
-          e.target.scrollIntoView({ 'block': 'center' })
-        }).on('input', function () {
+        input.val('').focus().val(value).on('input', function () {
             value = this.value
             confirmButton.prop('disabled', (value === '' || value === undefined))
         })

+ 755 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -0,0 +1,755 @@
+$(function () {
+  var canpay = true;
+  var orderCode = decodeURIComponent(getParam("orderCode"));
+  var pay_way = "wx_app";
+
+  if (!orderCode) {
+    weui.toast("订单号异常", {
+      duration: 2000,
+      className: 'custom-toast',
+    });
+  }
+
+  $(".orderCode").text(orderCode);
+
+  $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg", { "orderCode": orderCode }, function (r) {
+    $("body").css("visibility", "");
+    if (r.success) {
+      if (r.data.order.order_status == -1) {
+        $(".nothing").show();
+        $('.j-header').addClass('bgc-f').find('.header-title').text('我的订单')
+        $(".j-body").remove();
+      }
+      //下单时间
+      if (r.data.order.create_time) {
+        $(".prepayTime").text(r.data.order.create_time.replace("-", ".").replace("-", "."));
+      }
+      //产品类型
+      if (r.data.order.product_type) $(".productType").text(r.data.order.product_type);
+      if (r.data.order.original_price == 0) {
+        $(".productType").text(r.data.order.product_type + "(试用)");
+      }
+      //价格
+      $(".price").text("¥ " + r.data.order.original_price / 100 + "元");
+      //优惠码
+      if (r.data.order.isUsedActiveCode) {
+        $(".discount-container").removeClass("hide");
+      }
+      if (!r.data.order.isLiveActive) {
+        $(".origin-price-container").hide();
+      } else {
+        var originPrice = (r.data.order.original_price / 100 / parseFloat(activeDiscount)).toFixed(2);
+        $(".price-num").text(originPrice);
+        $(".bill-origin-price").css("display", "flex");
+      }
+
+      var areaText = "";
+      var industry_vip = "";
+      //订单条件
+      if (r.data.order.filter) {
+        var filterObj = JSON.parse(r.data.order.filter);
+        var newbuyset = filterObj.newBuyset;
+        if ((r.data.order.vip_type != 2) && (r.data.order.vip_type != 1)) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            //省份数 城市数
+            if (!$.isEmptyObject(filterObj.area)) {
+              var cityNum = 0;
+              var provinceNum = 0;
+              for (var i in filterObj.area) {
+                let citys = filterObj.area[i];
+                if (citys.length > 0) {
+                  cityNum += citys.length;
+                } else {
+                  provinceNum++;
+                }
+              }
+              var areaText = "";//1个省级区域、4个地市
+              if (provinceNum > 0) areaText = areaText + provinceNum + "个省级区域";
+              if (cityNum > 0) {
+                if (provinceNum > 0) areaText = areaText + "、"
+                areaText = areaText + cityNum + "个地市";
+              }
+              $(".areaNum").text(areaText);
+            } else {
+              $(".areaNum").text("全国");
+            }
+            //行业数
+            if (filterObj.industry.length != 0) {
+              $(".industryNum").text(filterObj.industry.length + "个行业");
+            } else {
+              $(".industryNum").text("全行业");
+            }
+          }
+        } else if (r.data.order.vip_type == 2) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            //升级订单 单独处理
+            if (!$.isEmptyObject(filterObj.addareacount)) {
+              if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city == 0)) {
+                areaText = "全国";
+              }
+              if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city == 0)) {
+                areaText = filterObj.addareacount.province + "个省级区域";
+              }
+              if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city != 0)) {
+                areaText = filterObj.addareacount.city + "个地市";
+              }
+              if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city != 0)) {
+                areaText = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
+              }
+            } else {
+              areaText = "无";
+            }
+            $(".areaNum").text(areaText);
+            //行业
+            var industry_vip = "";
+            industry_vip = filterObj.addbuyerclasscount + "个行业";
+            if (filterObj.addbuyerclasscount == 0) {
+              industry_vip = "无";
+            }
+            if (filterObj.addbuyerclasscount == -1) {
+              industry_vip = "全行业";
+            }
+            $(".industryNum").text(industry_vip);
+          }
+
+        } else if (r.data.order.vip_type == 1) {
+          if (!$.isEmptyObject(newbuyset)) {
+            var val = getnewbuyset(newbuyset);
+            areaText = val[0];
+            industry_vip = val[1];
+            $(".areaNum").text(areaText);
+            $(".industryNum").text(industry_vip);
+          } else {
+            var renewal_market = 0; //续费市级地区
+            var buyset = filterObj.buyset;
+            if (buyset.areacount == -1) {
+              $(".areaNum").text("全国");
+            } else {
+              if (!$.isEmptyObject(buyset.citys)) {
+                for (var key in buyset.citys) {
+                  renewal_market += (buyset.citys[key]);
+                }
+              }
+              //
+              var areaText = "";
+              if ((buyset.areacount != 0) && (renewal_market != 0)) {
+                areaText = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
+              } else if ((buyset.areacount == 0) && (renewal_market != 0)) {
+                areaText = renewal_market + "个地市";
+              } else if ((buyset.areacount != 0) && (renewal_market == 0)) {
+                areaText = buyset.areacount + "个省级地区";
+              }
+              $(".areaNum").text(areaText);
+            }
+            if (buyset.buyerclasscount == -1) {
+              $(".industryNum").text("全行业");
+            } else {
+              $(".industryNum").text(buyset.buyerclasscount + "个行业");
+            }
+          }
+        }
+
+      }
+
+      //周期
+      if ((r.data.order.vip_starttime != undefined) && (r.data.order.vip_endtime != undefined)) {
+        var start_time_vip = r.data.order.vip_starttime;
+        var end_time_vip = r.data.order.vip_endtime;
+        var start_time_arr = start_time_vip.split(" ")[0].split("-")
+        var end_time_arr = end_time_vip.split(" ")[0].split("-")
+        var start_year = start_time_arr[0];
+        var start_month = start_time_arr[1];
+        var end_year = end_time_arr[0];
+        var end_month = end_time_arr[1];
+        var year = 0;
+        var month = 0;
+        if (end_year > start_year) {
+          if (end_month > start_month) {
+            year = end_year - start_year;
+            month = end_month - start_month;
+          } else {
+            year = end_year - start_year - 1;
+            month = 12 + Number(end_month) - start_month;
+            if (month == 12) {
+              year = Number(year) + 1;
+              month = 0;
+            }
+          }
+        } else if (end_year === start_year) {
+          month = end_month - start_month;
+        }
+
+        if (year != 0 && month != 0) {
+          $(".cyclecount").text(year + "年" + month + "个月");
+        } else if (year !== 0 && month === 0) {
+          $(".cyclecount").text(year + "年");
+        } else if (year === 0 && month !== 0) {
+          $(".cyclecount").text(month + "个月");
+        }
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      } else {
+        //未支付
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      }
+
+
+      if (r.data.order.vip_type == 1) {
+        $(".productType").text(r.data.order.product_type + "(续费)");
+        $(".dyqy").text("续费区域:");
+        $(".dyhy").text("续费采购单位行业:");
+        $(".dyzq").text("续费周期:");
+      } else if (r.data.order.vip_type == 2) {
+        $(".productType").text(r.data.order.product_type + "(升级)");
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        } else if (filterObj.cycleunit == -1) {
+          $(".cyclecount").text("不延期");
+        }
+        $(".dyqy").text("升级区域:");
+        $(".dyhy").text("升级采购单位行业:");
+        $(".dyzq").text("延长周期:");
+      } else {
+        if (filterObj.cycleunit == 1) {
+          $(".cyclecount").text(filterObj.cyclecount + "年")
+        } else if (filterObj.cycleunit == 2) {
+          $(".cyclecount").text(filterObj.cyclecount + "个月")
+        } else if (filterObj.cycleunit == 3) {
+          $(".cyclecount").text(filterObj.cyclecount + "天")
+        }
+      }
+
+      //升级续费
+      var fnewBuyset = filterObj.newBuyset;
+      if (!$.isEmptyObject(fnewBuyset)) {
+        //续费升级逻辑修改后判断是否不延期
+        if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+          $(".cyclecount").text("不延期");
+        }
+      }
+      if (r.data.order.order_status == 0) {
+        //未支付
+        $("#card-header-bg").addClass("bg nopay-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("待付款");
+        $(".remaining").show()
+        var order_create_time = r.data.order.create_time
+        order_create_time = order_create_time.replace(/-/g, '/')
+        var downtime = r.data.order.order_countdown.split("h")[0]
+        downtime = downtime * 60 * 60 * 1000
+        var create_unix = new Date(order_create_time).getTime()
+        if (new Date().getTime() >= parseInt(liveActiveStartTime)*1000 && new Date().getTime() < parseInt(liveActiveEndTime)*1000){
+            if(parseInt(liveActiveEndTime)*1000 - create_unix < 72*60*60*1000){
+                downtime = parseInt(liveActiveEndTime) * 1000 - create_unix;
+            }
+        }
+        var t = setInterval(() => {
+          var nowtime = new Date()  //获取当前时间
+          endtime = new Date(order_create_time);  //定义结束时间
+          var lefttime = endtime.getTime() + downtime - nowtime.getTime() //距离结束时间的毫秒数
+          if (Math.floor(lefttime % 1000) <= 0) {
+            clearInterval(t)
+            $.ajax({
+              type: "post",
+              url: "/subscribepay/orderListDetails/deleteOrder",
+              data: {
+                "id": r.data.order.id,
+                "pageNum": 1,
+                "type": 1,
+                "cancel": "cancel"
+              },
+              dataType: 'json',
+              success: function () {
+                $(".nopay-bg h3").text("已取消")
+                $(".remaining").text("")
+                $(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
+                $(".j-footer").hide()
+              }
+            })
+          } else {
+            var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
+              hour = hour < 10 ? '0' + hour : hour;
+            var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
+              minute = minute < 10 ? '0' + minute : minute;
+            var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
+            seconds = seconds < 10 ? '0' + seconds : seconds;
+            $(".remaining").text("剩余支付时间:" + hour + ":" + minute + ":" + seconds)
+          }
+        }, 1000)
+        $(".invoice").hide();//隐藏开发票
+        //支付方式
+        if (r.data.order.pay_way.indexOf("wx") > -1) {
+          //$(".line_payway").css("display","");
+          $("#wx").prop("checked", true);
+          $("#zfb").prop("checked", false);
+          $(".payWay").text("微信支付");
+          pay_way = "wx_app"
+        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+          $(".payWay").text("支付宝支付");
+          $("#wx").prop("checked", false);
+          $("#zfb").prop("checked", true);
+          pay_way = "ali_app"
+        }
+
+        var pay_now = "<button class=\"j-button-confirm\" style='width: 100%!important;' onclick=choosePayWay()>去支付</button>"
+        $(".j-footer").show().html(pay_now)
+        $(".button.align").css("display", "").on("click", function () {//显示去支付按钮
+          $("#pay_way").show();
+          if (localStorage.getItem(orderCode) == "wx") {
+            pay_way = "wx_app"
+            $("#wx").prop("checked", true);
+            $("#zfb").prop("checked", false);
+          } else if (localStorage.getItem(orderCode) == "ali") {
+            $("#wx").prop("checked", false);
+            $("#zfb").prop("checked", true);
+            pay_way = "ali_app"
+          }
+        })
+      } else if (r.data.order.order_status == 1) {
+        $("#card-header-bg").addClass("bg finish-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("已完成");
+        //支付时间
+        $(".line_paytime").css("display", "");
+        if (r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+        if (r.data.order.original_price == 0) {
+          $(".line_paytime").css("display", "none");
+        }
+
+        //有效周期
+        $(".line_cycle").css("display", "");
+        //有效日期
+        if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+          var vip_starttime = r.data.time.vip_starttime + "";
+          var vip_endtime = r.data.time.vip_endtime + "";
+          vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+          vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+          var serviceTime = vip_starttime + " - " + vip_endtime;
+          $(".serviceTime").text(serviceTime)
+        }
+
+        //支付方式
+        if (r.data.order.pay_way.indexOf("wx") > -1) {
+          $(".line_payway").css("display", "");
+          $(".payWay").text("微信支付");
+          pay_way = "wx_app"
+        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+          $(".payWay").text("支付宝支付");
+          $(".line_payway").css("display", "");
+          pay_way = "ali_app"
+        } else {//试用用户
+          $(".invoice").css("display", "none");
+          return
+        }
+
+
+
+        $(".line_transaction").css("display", "");
+        if (r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
+        var pay_again = ""
+        //发票
+        if (r.data.order.applybill_status == 0) {
+          //已支付未申请发票
+          pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
+          $(".invoice .invoicing").css("display", "");
+          $(".invoicing").on("click", function () {
+            var nowTimestamp = (new Date()).valueOf();
+            $.post("/subscribepay/orderListDetails/emailOperation?v=" + nowTimestamp, {}, function (r) {
+              if (r.success) {
+                //没有绑定邮箱
+                weuiDialog();
+              } else {
+                //绑定了邮箱
+                window.location.href = "/jyapp/front/myOrder/getOrderCode/" + orderCode;
+              }
+            })
+          });
+        } else {
+          //已支付已申请发票
+          pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice()' style='width: 100%!important;'>查看发票</button >"
+          $(".invoice").css("display", "none");
+          switch (r.data.order.applybill_type) {
+            case 0:
+              $(".person").css("display", "");
+              break;
+            case 1:
+              $(".unit").css("display", "");
+              $(".company_name").html(r.data.order.applybill_company);
+              $(".taxpayer_number").html(r.data.order.applybill_taxnum);
+              break;
+          }
+
+        }
+        $(".j-footer").show().html(pay_again)
+      } else if (r.data.order.order_status == -2) {
+        $("#card-header-bg").addClass("bg cancel-bg")
+        $("#pageTitle").addClass("status")
+        $("#pageTitle").text("已取消");
+        $(".invoice").css("display", "none");//隐藏开发票
+      }
+    }
+
+    //计价清单
+    var filterObj = JSON.parse(r.data.order.filter);
+    var upgradeSubtotail = filterObj.upgradeSubtotail;
+    if (upgradeSubtotail) {	//有则显示
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/getValuationList',
+        data: {
+          "order_code": orderCode
+        },
+        success: function (data) {
+          appendList(data.list, data.order_money);
+        }
+      });
+      $(".valuationList").show();
+      // 计算标准点击事件
+      $('.valuationList').on('click', function () {
+        pickerShow('.billing-list-container', true)
+        $("html,body").addClass("stop");
+      })
+      // 计算标准隐藏
+      $('.billing-list-container .dialog_hd__close').on('click', function () {
+        pickerShow('.billing-list-container', false)
+        $("html,body").removeClass("stop");
+      })
+      $('.weui-mask').on('click', function () {
+        pickerShow('.billing-list-container', false)
+        $("html,body").removeClass("stop");
+      })
+    }
+
+    //离开按钮
+    $(".cancel").click(function () {
+      $('.pay_way').hide(200)
+    });
+
+    /* 选择支付方式*/
+    $('input:radio[name="way"]').click(function () {
+      var checkValue = $('input:radio[name="way"]:checked').val();
+      if (checkValue == "微信支付") {
+        localStorage.setItem($(".order_code_vip").text(), "wx");
+        $("#wx").prop("checked", true);
+        $("#zfb").prop("checked", false);
+        pay_way = "wx_app";
+      } else {
+        localStorage.setItem($(".order_code_vip").text(), "ali");
+        $("#wx").prop("checked", false);
+        $("#zfb").prop("checked", true);
+        pay_way = "ali_app";
+      }
+    });
+
+    //确认支付
+    $("#pay").on("click", function () {
+      $(".loading_").show();
+      //vip支付;
+      if (!canpay) return
+      canpay = false;
+      $.post("/subscribepay/vipsubscribe/orderToPay", { "orderCode": orderCode, "pay_way": pay_way }, function (r) {
+        if (r.success) {
+          if (pay_way == "wx_app") {
+            JyObj.wxPay(r.data.res);
+          } else {
+            JyObj.aliPay(r.data.res);
+          }
+          $('.pay_way').hide(200)
+          canpay = true;
+          checkPaySuccess_vip(orderCode);
+        }
+      })
+    })
+
+  })
+
+  function formatEffectiveDate(strat, end) {
+    var startDate = new Date(strat * 1000);
+    var endDate = new Date(end * 1000);
+    return formatDate(startDate) + " - " + formatDate(endDate)
+  }
+  function formatDate(d) {
+    return (d.getFullYear()) + "." +
+      (Array(2).join(0) + (d.getMonth() + 1)).slice(-2) + "." +
+      (Array(2).join(0) + (d.getDate())).slice(-2);
+  }
+
+  function weuiDialog() {
+    weui.dialog({
+      title: '提示信息',
+      content: '您未绑定邮箱<br/>请绑定后再开发票',
+      className: 'jymobile-setting-dialog',// 设置弹框的类名
+      buttons: [
+        {
+          label: '去设置',
+          type: 'primary',
+          onClick: function () {
+            window.location.replace("/jyapp/front/myorder/myEmail?name=invoice&orderCode=" + orderCode);
+          }
+        },
+        {
+          label: '取消',
+          type: 'default',
+          onClick: function () {
+            console.log('取消')
+          }
+        }
+      ]
+    });
+  }
+
+  var interval_vip
+  //支付完成跳转 VIP订单
+  function checkPaySuccess_vip(order_vipcode) {
+    if (interval_vip) {
+      clearInterval(interval_vip)
+    }
+    $(".loading_").show();
+    interval_vip = setInterval(function () {
+      $.post("/jypay/isPaySuccess", { code: order_vipcode }, function (r) {
+        if (r.success) {
+          clearInterval(interval_vip);
+          $(".loading_").hide();
+          window.location.href = "/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + order_vipcode;
+        }
+      })
+    }, 3000)
+    $(".loading_").hide();
+  }
+
+  function PrefixInteger(num, n) {
+    return (Array(n).join(0) + num).slice(-n);
+  }
+  // 参数为结束时间戳
+  function setTimeFunc(endtime) {
+    var t = endtime - +new Date();
+    if (t <= 0) {
+      $(".button").hide();
+      $(".cancel_time").hide();
+      $("#pageTitle").html("已取消");
+    }
+    var days_ = PrefixInteger(parseInt(t / 1000 / 60 / 60, 10).toString(), 2)
+    var minutes_ = PrefixInteger(parseInt(t / 1000 / 60 % 60, 10).toString(), 2)
+    var seconds = PrefixInteger(parseInt(t / 1000 % 60, 10).toString(), 2)
+    $(".cancel_time").text("剩余" + days_ + ":" + minutes_ + ":" + seconds + " ");
+  }
+
+  //升级续费逻辑重写后的数据处理
+  function getnewbuyset(newBuyset) {
+    if (newBuyset.areacount != -1) {
+      var newcitys = newBuyset.newcitys;
+      var scatter = newcitys.length;//分布
+      var citynum = 0;
+      for (var k in newcitys) {
+        citynum += newcitys[k];
+      }
+      if (newBuyset.areacount > 0) {
+        areaText = newBuyset.areacount + "个省级区域";
+        if (citynum != 0) {
+          if (scatter > 1) {
+            areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+          } else {
+            areaText += "、" + citynum + "个地市";
+          }
+        }
+      } else {
+        if (scatter > 1) {
+          areaText = citynum + "个地市(分布在" + scatter + "省内)";
+        } else {
+          areaText = citynum + "个地市";
+        }
+      }
+    } else {
+      areaText = "全国";
+    }
+    var buyerclasscount = newBuyset.buyerclasscount;
+    if (buyerclasscount > 3) {
+      buyerclasscount = filterObj.industry.length;
+      industry_vip = "全行业(" + buyerclasscount + "个行业)";
+    } else {
+      industry_vip = buyerclasscount + "个行业";
+    }
+    if (buyerclasscount == -1) {
+      industry_vip = "全行业";
+    }
+    return [areaText, industry_vip]
+  }
+  // picker的显示隐藏
+  function pickerShow(selector, f) {
+    if (f) {
+      // 添加进场动画,并显示
+      $(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
+      $(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
+      $(selector).show(300);
+    } else {
+      // 添加离场动画,并隐藏
+      $(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
+      $(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
+      $(selector).hide(300);
+    }
+  }
+  var total_price = 0;
+  function appendList(list, money) {
+    var returnHtml = "";
+    for (var i = 0; i < list.length; i++) {
+      var showTime = ""
+      var start = new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
+      var end = new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
+      showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
+
+      var typeName = "";
+      if (list[i].type === 1) {
+        typeName = "续费"
+      } else if (list[i].type === 0) {
+        typeName = "升级"
+      }
+      var showArea = "";
+      if (list[i].oldBuyset.areacount === -1) {
+        showArea = "全国"
+      } else {
+        //if (list[i].oldBuyset.newcitys.length > 0) {
+        var cityCount = 0;
+        for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
+          cityCount += list[i].oldBuyset.newcitys[j];
+        }
+        if (list[i].oldBuyset.areacount != 0) {
+          showArea = list[i].oldBuyset.areacount + "个省";
+          if (list[i].oldBuyset.newcitys.length > 1) {
+            showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+          } else {
+            if (cityCount != 0) {
+              showArea += "、" + cityCount + "个市";
+            }
+          }
+        } else {
+          if (list[i].oldBuyset.newcitys.length > 1) {
+            showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+          } else {
+            if (cityCount != 0) {
+              showArea += cityCount + "个市";
+            }
+          }
+        }
+        //}
+      }
+      var industryShow = "";
+      if (list[i].oldBuyset.buyerclasscount === -1) {
+        industryShow = "全行业"
+      } else {
+        industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
+      }
+      returnHtml += "<li class='list-item'>"
+        + '<div class="item-top">'
+        + '<div class="item-header">'
+        + '<span class="header-label">有效日期:</span>'
+        + '<span class="header-content ellipsis">' + showTime + '</span>'
+        + '</div>'
+        + '<div class="item-body">'
+        + '<div class="b-item body-area">'
+        + '<div class="body-area-title text-title">区域</div>'
+        + '<div class="body-area-sub">' + showArea + '</div>'
+        + '</div>'
+        + '<div class="b-item body-industry">'
+        + '<div class="body-industry-title text-title">采购单位行业</div>'
+        + '<div class="body-industry-sub">' + industryShow + '</div>'
+        + '</div>'
+      if (typeName != "") {
+        returnHtml += '<div class="vp-type">'
+          + '<div class="vp-type-text">' + typeName + '</div>'
+          + '</div>'
+      }
+
+      returnHtml += '</div>'
+        + '</div>'
+        + '<div class="item-footer">'
+        + '<span class="footer-label">小计:</span>'
+        + '<span class="footer-content text-title">¥' + (list[i].price / 100) + '</span>'
+        + '</div>'
+        + '</li>'
+
+      total_price += (list[i].price);
+    }
+    $(".total-price").text("共计:¥" + money / 100);
+    $(".list-content").html(returnHtml);
+  }
+
+  function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
+    //用-分成数组
+    date1 = date1.split("-");
+    date2 = date2.split("-");
+    //获取年,月数
+    var year1 = parseInt(date1[0]),
+      month1 = parseInt(date1[1]),
+      year2 = parseInt(date2[0]),
+      month2 = parseInt(date2[1]),
+      //通过年,月差计算月份差
+      months = (year2 - year1) * 12 + (month2 - month1);
+    return months;
+  }
+
+})
+var orderCode_ = decodeURIComponent(getParam("orderCode"));
+//选择
+function choosePayWay() {
+  window.location.href = "/jyapp/course/optionPay?code=" + orderCode_
+}
+//订单详情
+$(".icon-fanhui").on("click", function () {
+  history.go(-1)
+})
+
+//查看发票
+function checkinvoice() {
+  window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code=" + orderCode_
+}
+//开发票
+function invoiceAdd() {
+  var orderCode_ = decodeURIComponent(getParam("orderCode"));
+  $.post("/subscribepay/orderListDetails/isOver", { "order_code": orderCode_ }, function (data) {
+    if (data.status == 1) {
+      window.location.href = "/jyapp/front/invoice/showpage?order_code=" + orderCode_;
+    } else {
+      window.location.href = "/jyapp/front/cantInvoice";
+    };
+  })
+}
+
+//苹果端  刷新js
+$(function () {
+  var isPageHide = false;
+  window.addEventListener('pageshow', function () {
+    if (isPageHide) {
+      location.reload();
+    }
+  });
+  window.addEventListener('pagehide', function () {
+    isPageHide = true;
+  });
+});

+ 14 - 13
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_renew.js

@@ -62,7 +62,7 @@ var purchase = {
 				isUsedActiveCode = true;
 			}
 			if (sessionStorage.liveActiveCode_renew === "jianyu360"){
-				$('.coupon-code-tx .keywords-text').text("支付成功赠送30天订阅周期");
+				$('.coupon-code-tx .keywords-text').text("支付成功赠送30天订阅周期");
 				$('.coupon-picker .weui-input').val("jianyu360");
 				$('.coupon-code-tx').off('click');
 			}
@@ -165,14 +165,17 @@ var purchase = {
 		var showPrice = formatMoney(price);
 		var nowTime = new Date().getTime();
 		var startTime = live20200707.startTime;
-		var endTime = live20200707.endTime;
+		var endTime = live20200707.endTime;
+        var activeDiscount = parseFloat(live20200707.activeDiscount)
 		var startTimes = parseInt(startTime) * 1000;
 		var endTimes = parseInt(endTime) * 1000;
-		if (nowTime >= startTimes && nowTime < endTimes) {
-			$(".price-num").text(showPrice);
-			showPrice = formatMoney(parseFloat(price) * 0.6);
-			var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
-			$(".reduce-price").text(formatMoney(activePrice));
+		if (nowTime >= startTimes && nowTime < endTimes) {
+            if (flag !== 2) {
+                $(".price-num").text(showPrice);
+            	var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
+            	$(".reduce-price").text(formatMoney(activePrice));
+            }
+			showPrice = formatMoney(parseFloat(price) * activeDiscount);
 		}
 		if (flag === 1) {
 			$('.billing-price').text(showPrice);
@@ -602,12 +605,10 @@ $('.coupon-code-tx').on('click', function() {
 	var confirmButton = $('.coupon-picker .weui-picker__btn')
 	var cancelButton = $('.coupon-picker .cancel')
 	var value = input.val()
-	input.focus(function (e) {
-    e.target.scrollIntoView({ 'block': 'center' })
-  }).on('input', function() {
-		value = this.value
-		confirmButton.prop('disabled', (value === '' || value === undefined))
-	})
+	input.val('').focus().val(value).on('input', function () {
+    value = this.value
+    confirmButton.prop('disabled', (value === '' || value === undefined))
+  })
 
 	confirmButton.on('click', function() {
 		if (value.toLowerCase() !== couponInfo.code) {

+ 5 - 0
src/jfw/modules/app/src/web/templates/active/livePage/online.html

@@ -122,6 +122,11 @@
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/active/livePage/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/active/livePage/js/common.js?v={{Msg "seo" "version"}}"></script>
     <script>
+    	  window.addEventListener('pageshow', function(event) {
+          if (event.persisted || window.performance && window.performance.navigation.type == 2) {
+            location.reload();
+          }
+        }, false);
         $(function () {
             try{
         			JyObj.hiddenBottom("0");

+ 42 - 23
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html

@@ -2,7 +2,7 @@
 	<head>
 		{{include "/common/meta.html"}}
 		<title>我的订单</title>
-        <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/local/weui.min.css">
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/myorder/base.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/myorder/iconfont.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/myorder/order_list.css?v={{Msg "seo" "mod_version"}}">
@@ -12,8 +12,8 @@
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
 		<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/jquery.min.js"></script>
 		<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/dropload.js"></script>
-   	    <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
-        <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js"></script>
+    <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
+    <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js"></script>
 		{{include "/common/js.html"}}
 		<!--2.8.8-->
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/course/css/base.css?v={{Msg "seo" "version"}}" />
@@ -1316,9 +1316,13 @@
 						var listhtml='';
 						for(var index in object){
 					   		var obj=object[index];
-							var isUsedActiveCode = false
+							var isUsedActiveCode = false;
+							var isLiveActive = false;
 							if(obj.isLiveActive){
-								isUsedActiveCode = true;
+								isLiveActive = true;
+							}
+							if(obj.isUsedActiveCode){
+							    isUsedActiveCode = true;
 							}
 							if(obj.product_type=="历史数据"){
 					    		count++;
@@ -1813,6 +1817,21 @@
 										iconHtml+='<div class="card-footer">'
 														+'</div>'
 		                        }
+                                if(filter_vip.cyclecount!=undefined&&filter_vip.cyclecount!=""&&filter_vip.cycleunit!=undefined&&filter_vip.cycleunit!=""){
+                                	if(parseInt(filter_vip.cycleunit)==1){
+                                		effectiveduration_vip=filter_vip.cyclecount+"年"
+                                	}else if(parseInt(filter_vip.cycleunit)==2){
+                                		effectiveduration_vip=filter_vip.cyclecount+"个月"
+                                	}else{
+                                		effectiveduration_vip="7天"
+                                	}
+                                }
+                                if(filter_vip.cycleunit==0&&filter_vip.cyclecount==0){
+                                	effectiveduration_vip="不延期";
+                                }
+                                if(isUsedActiveCode){
+                                    effectiveduration_vip = effectiveduration_vip+ '<span class="discount-container"><span>+</span><span class="highlight-text">赠送30天</span></span>'
+                                }
 		                        //vip状态 0不是vip 1试用 2正式
 		                        if (orderStatus_vip!="已完成"){
 		                        //未支付 或 已取消
@@ -1822,7 +1841,7 @@
 													+orderHtml
 												+'</div>'
 												+'<div class="card-content">'
-													+'<a  eid='+orderCode_vip+' class="media" isvipOrder="true" href="/jyapp/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '">'
+													+'<a onclick="setSessionStorage()"  eid='+orderCode_vip+' class="media" isvipOrder="true" href="/jyapp/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '">'
 														+'<div class="media-img">'
 															+'<img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/image/vipBook.png?v=51430">'
 														+'</div>'
@@ -1831,17 +1850,17 @@
 															+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'</p>'
 															+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
 														+'</div>'
-													+'</a>'
-									if(isUsedActiveCode){
-										var originPrice = (parseFloat(orderMoney_vip) / 0.6).toFixed(2);
-										listhtml+= '<div class="price">'
-														+ '<span class="origin-price-container">'
+                          +'</a>'
+                  listhtml+= '<div class="price">'
+									if(isLiveActive){
+                    var activeDiscount = {{Msg "seo" "activeDiscount"}};
+                    var originPrice = (parseFloat(orderMoney_vip) / parseFloat(activeDiscount)).toFixed(2);
+										listhtml+= '<span class="origin-price-container">'
 														+ '<span>原价:¥</span>'
 														+ '<span class="origin-price">' + originPrice + '</span>'
-														+ '</span></div>'
+														+ '</span>'
 									}
-									listhtml+= '<div class="price">'
-												+'<strong class="current">¥'+orderMoney_vip+'</strong>'
+									listhtml+= '<strong class="current">¥'+orderMoney_vip+'</strong>'
 												+'</div>'
 												+'</div>'
 												+iconHtml
@@ -1860,7 +1879,7 @@
 															+orderHtml
 														+'</div>'
 														+'<div class="card-content">'
-															+'<a  eid='+orderCode_vip+' class="media" isvipOrder="true" href="/jyapp/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '">'
+															+'<a onclick="setSessionStorage()"  eid='+orderCode_vip+' class="media" isvipOrder="true" href="/jyapp/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '">'
 																+'<div class="media-img">'
 																	+'<img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/image/vipBook.png?v=51430">'
 																+'</div>'
@@ -1870,17 +1889,17 @@
 																	+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
 																	+'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>'
 																+'</div>'
-															+'</a>'
-											if(isUsedActiveCode){
-												var originPrice = (parseFloat(orderMoney_vip) / 0.6).toFixed(2);
-												listhtml+= '<div class="price">'
-																+ '<span class="origin-price-container">'
+                              +'</a>'
+                      listhtml+= '<div class="price">'
+											if(isLiveActive){
+                              var activeDiscount = {{Msg "seo" "activeDiscount"}};
+                              var originPrice = (parseFloat(orderMoney_vip) / parseFloat(activeDiscount)).toFixed(2);
+												listhtml+= '<span class="origin-price-container">'
 																+ '<span>原价:¥</span>'
 																+ '<span class="origin-price">' + originPrice + '</span>'
-																+ '</span></div>'
+																+ '</span>'
 											}
-											listhtml+= '<div class="price">'
-																+'<strong class="current">¥'+orderMoney_vip+'</strong>'
+											listhtml+= '<strong class="current">¥'+orderMoney_vip+'</strong>'
 															+'</div>'
 														+'</div>'
 														+iconHtml

+ 16 - 7
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -63,11 +63,11 @@
     VIP订阅
 <span></span></div>
 <div class="app-layout-content-b">
-	{{if not .T.isLiveActive}}
-	<div class="vip-upgrade">
-	{{else}}
-	<div class="vip-upgrade live-20200707">
-	{{end}}
+    {{if not .T.isLiveActive}}
+    <div class="vip-upgrade">
+    {{else}}
+    <div class="vip-upgrade live-20200707">
+    {{end}}
         <div class="vip-header">
             <div class="header-renew trail" style="display: none">
                 <div class="renew-l">
@@ -394,10 +394,17 @@
             </div>
             <div class="weui-half-screen-dialog__ft">
                 <div class="va-total-container">
-                    <span class="total-label">共计:</span>
+                    <span class="total-label"></span>
                     <span class="total-price">¥223.8</span>
                 </div>
             </div>
+			<div class="origin-price">
+			    <span class="price-label">原价:</span>
+			    <div class="price-container">
+			        <span class="currency-type">&yen;</span>
+			        <span class="price-num">5.80</span>
+			    </div>
+			</div>
         </div>
     </div>
     <!-- 选择订阅周期picker -->
@@ -507,12 +514,14 @@
 	<script>
         $(window).bind("pageshow", function (event) {
             if (event.originalEvent.persisted) {
+                sessionStorage.liveActiveCode_new = "";
                 window.location.reload();
             }
         });
 		var live20200707 = {
 			startTime: {{Msg "seo" "liveActiveStartTime"}},
-			endTime: {{Msg "seo" "liveActiveEndTime"}}
+			endTime: {{Msg "seo" "liveActiveEndTime"}},
+            activeDiscount: {{Msg "seo" "activeDiscount"}}
 		}
     </script>
 	<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>

+ 28 - 985
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_order_detail.html

@@ -14,238 +14,33 @@
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/public_.css?v={{Msg "seo" "version"}}">
     <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/vipsubscribe/css/vip_order_detail.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}"/>
+    
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
 
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
-	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_order_detail.css?v={{Msg "seo" "version"}}">
 </head>
-<style>
-  html, body {
-    height: 100%;
-  }
-
-.stop{
-    overflow: hidden;
-    height: 100%;
-}
-.va-total-container .total-price {
-    font-weight: 400 !important;
-    font-size: 0.36rem  !important;
-    color: #FB483D !important;
-}
-.person > p >span , .unit > p >span{
-	margin-bottom: .12rem;
-}
-.jymobile-setting-dialog {
-  font-size: .32rem;
-}
-
-.jymobile-setting-dialog .weui-dialog__hd {
-  padding: 0;
-  height: 0.82rem;
-  line-height: .82rem;
-  text-align: center;
-  background-color: #F5F4F9;
-}
-
-.jymobile-setting-dialog .weui-dialog__hd .weui-dialog__title {
-  font-size: .36rem;
-}
-
-.jymobile-setting-dialog .weui-dialog__bd {
-  padding: .37rem .1rem .38rem;
-  color: #1D1D1D;
-  font-size: .32rem;
-  text-align: center;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft {
-  display: flex;
-  padding: 0 0 .38rem 0;
-  text-align: center;
-  justify-content: space-around;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft:after {
-  border: none;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn {
-  display: flex;
-  flex: none;
-  align-items: center;
-  justify-content: center;
-  width: 1.72rem;
-  height: .72rem;
-  color: #fff;
-  font-size: .32rem;
-  vertical-align: center;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_primary {
-  margin: 0;
-  margin-left: .3rem;
-  background-color: #2CB7CA;
-}
-
-.jymobile-setting-dialog .weui-dialog__ft .weui-dialog__btn_default {
-  margin: 0;
-  margin-right: .3rem;
-  background-color: #BFBFC3;
-}
-.cancel_time{
-	font-size: 16px;
-	margin-left: 20px;
-}
-
-.pay_way .box {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    background: #fff;
-    height: 4.9rem;
-    z-index: 9999;
-}
-.pay_way .box .box_hd {
-    padding: 0 .4rem;
-    height: .88rem;
-    line-height: .88rem;
-    background: #F4F4F9;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-pack: justify;
-    -ms-flex-pack: justify;
-    justify-content: space-between;
-    -webkit-box-align: center;
-    -ms-flex-align: center;
-    align-items: center;
-    border-bottom: 1px solid #eee;
-}
-
- .pay_way .box .box_bd p {
-    font-size: .32rem;
-}
-.pay_way .box .box_bd .zfb_label{
-	margin-bottom:.38rem;
-}
- .pay_way .box .box_hd>h3 {
-    color: #1D1D1D;
-    font-size: .32rem;
-}
-.pay_way .box .box_hd .cancel {
-    color: #2cb7ca;
-    font-size: .32rem;
-}
-.pay_way .box .box_bd img {
-    width: .8rem;
-    height: .8rem;
-    margin-right: .3rem;
-}
-.pay_way .box .box_bd .wx_label, .pay_way .box .box_bd .zfb_label {
-    margin-top: .38rem;
-    padding: 0 .3rem;
-}
-.zfje{
-	font-size: .32rem;
-	margin: 0 auto;
-
-}
-.money_pay{
-    font-size: .50rem;
-    text-align: center;
-    height: 1rem;
-    line-height: 1rem;
-}
-.surePay{
-	font-size: .40rem;
-    text-align: center;
-    height: 1rem;
-    line-height: 1rem;
-    background-color: #2CB7CA;
-    color: #fff;
-    margin-top:  0.28rem;
-}
-
-.weui-cells {
-    margin-top: 0px !important;
-    background-color:
-	#fff;
-	line-height: 1.47058824;
-	font-size: 17px;
-	overflow: hidden;
-	position: relative;
-}
-
-.weui-cell::before {
-    content: " ";
-    position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    height: 1px;
-    border-top: 0px solid #e5e5e5 !important;
-    border-top-color:
-    rgb(229, 229, 229);
-    border-top-style: solid;
-    border-top-width: 5px;
-	color:#e5e5e5;
-    -webkit-transform-origin: 0 0;
-    transform-origin: 0 0;
-    -webkit-transform: scaleY(.5);
-    transform: scaleY(.5);
-    left: 15px;
-    z-index: 2;
-}
-
-.pay_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
-    color: #2cb7ca;
-}
-
-.nothing{
-  height: 100%;
-	margin: 50% auto;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  flex-direction:column;
-}
-.nothing img{
-    width: 120px;
-}
-.nothingDiv {
-	padding-top:0.42rem;
-	font-size:0.3rem;
-	color:#838384;
-}
-.j-footer {
-  display: none;
-}
-</style>
 <body style="visibility:hidden">
-	<div class="j-container" id="order_detail">
-	<!--			过期的订单-->
-	<div class="nothing" style="display:none">
-        <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/vipsubscribe/image/nothing.png?v=51430"/>
-		<div class="nothingDiv">
-			该订单记录已删除
-		</div>
-    </div>
+    <div class="j-container" id="order_detail">
 		<div class="j-header jy-app-header">
-			<span class="header-left iconfont icon-fanhui"><em class="left-title">订单详情</em></span>
-			<span class="header-title"></span>
+			<span class="header-left iconfont icon-fanhui"></span>
+			<span class="header-title">订单详情</span>
 			<span class="header-right"></span>
-		</div>
+    </div>
+    <!-- 过期的订单 -->
+    <div class="nothing" style="display:none">
+      <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/image/nothing.png?v=51430"/>
+      <div class="nothingDiv">该订单记录已删除</div>
+    </div>
 		<div class="j-body">
 			<div  id="card-header-bg">
 				<h3 id="pageTitle" ></h3>
 				<!-- <h3>待付款</h3> -->
 				<p class="remaining" hidden></p>
 			</div>
-	                    <div class="order-main">
+	        <div class="order-main">
 							<div class="vip_order">
 								<div class="top">
 									<div class="order-img">
@@ -317,7 +112,7 @@
 											<span class="productType value"></span>
 										</p>
 										<p class="l-item">
-											<span class="label" id="price">订单金额:</span>
+											<span class="label" id="price">实付金额:</span>
 											<span class="price value"></span><em class="qingdan valuationList" style="display:none">计费清单</em>
 										</p>
 									</div>
@@ -347,6 +142,13 @@
 					<span class="total-price"></span>
 				</div>
 			</div>
+			<div class="bill-origin-price">
+			    <span class="price-label">原价:</span>
+			    <div class="price-container">
+			        <span class="currency-type">&yen;</span>
+			        <span class="price-num">5.80</span>
+			    </div>
+			</div>
 		</div>
 	</div>
 </body>
@@ -355,770 +157,11 @@
 <!--<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/fastclick.min.js"></script>-->
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js"></script>
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}"></script>
-
 <script>
-  $(function(){
-    var canpay=true;
-    var orderCode=decodeURIComponent(getParam("orderCode"));
-	var pay_way="wx_app";
-    if(!orderCode){
-      weui.toast("订单号异常",{
-        duration: 2000,
-        className: 'custom-toast',
-	    });
-    }
-    $(".orderCode").text(orderCode);
-	$(".order_code_vip").text(orderCode);
-    $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
-		$("body").css("visibility","");
-      if(r.success){
-		if(r.data.order.order_status==-1){
-			$(".nothing").show();
-			$(".j-body").hide();
-		}
-        //下单时间
-        if(r.data.order.create_time) {
-        	$(".prepayTime").text(r.data.order.create_time.replace("-",".").replace("-","."));
-        }
-        //产品类型
-        if(r.data.order.product_type) $(".productType").text(r.data.order.product_type);
-        if(r.data.order.original_price==0){
-        	$(".productType").text(r.data.order.product_type+"(试用)");
-        }
-        //价格
-        $(".price").text("¥ "+r.data.order.original_price/100+"元");
-		//优惠码
-		if(r.data.order.isUsedActiveCode){
-			$(".discount-container").removeClass("hide");
-		}
-		if(!r.data.order.isLiveActive){
-			$(".origin-price-container").hide();
-		}else{
-			var originPrice = (r.data.order.original_price/100 / 0.6).toFixed(2);
-			$(".price-num").text(originPrice);
-		}
-		
-		var areaText="";
-		var industry_vip="";
-        //订单条件
-        if(r.data.order.filter){
-            var filterObj=JSON.parse(r.data.order.filter);
-			var newbuyset =filterObj.newBuyset;
-        	if ((r.data.order.vip_type!=2)&&(r.data.order.vip_type!=1)){
-	           if(!$.isEmptyObject(newbuyset)){
-				   var val = getnewbuyset(newbuyset);
-				   areaText=val[0];
-				   industry_vip=val[1];
-				   $(".areaNum").text(areaText);
-				   $(".industryNum").text(industry_vip);
-			   }else{
-				   //省份数 城市数
-				   if(!$.isEmptyObject(filterObj.area)){
-				     	var cityNum=0;
-				     	var provinceNum=0;
-				     	for(var i in filterObj.area) {
-				           let citys=filterObj.area[i];
-				           if(citys.length>0){
-				             cityNum+=citys.length;
-				           }else{
-				             	provinceNum++;
-				           }
-				     	}
-				     	var areaText="";//1个省级区域、4个地市
-				     	if(provinceNum>0) areaText= areaText + provinceNum+"个省级区域";
-				     	if(cityNum>0){
-				       	if(provinceNum>0) areaText= areaText+"、"
-				       	areaText = areaText+ cityNum+"个地市";
-				   	}
-				     	$(".areaNum").text(areaText);
-				   }else{
-				   	$(".areaNum").text("全国");
-				   }
-				   //行业数
-				   if(filterObj.industry.length!=0){
-				       $(".industryNum").text(filterObj.industry.length+"个行业");
-				   }else{
-				       $(".industryNum").text("全行业");
-				   }
-			   }
-	        }else if(r.data.order.vip_type==2){
-				if(!$.isEmptyObject(newbuyset)){
-					var val = getnewbuyset(newbuyset);
-					areaText=val[0];
-					industry_vip=val[1];
-					$(".areaNum").text(areaText);
-					$(".industryNum").text(industry_vip);
-				}else{
-					//升级订单 单独处理
-					if(!$.isEmptyObject(filterObj.addareacount)){
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
-							areaText="全国";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
-							areaText=filterObj.addareacount.province+"个省级区域";
-						}
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.city+"个地市";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
-						}
-					}else{
-						areaText="无";
-					}
-					$(".areaNum").text(areaText);
-					//行业
-					var industry_vip="";
-					industry_vip=filterObj.addbuyerclasscount+"个行业";
-					if(filterObj.addbuyerclasscount==0){
-						industry_vip="无";
-					}
-					if(filterObj.addbuyerclasscount==-1){
-						industry_vip="全行业";
-					}
-					$(".industryNum").text(industry_vip);
-				}
-
-	        }else if(r.data.order.vip_type==1){
-				if(!$.isEmptyObject(newbuyset)){
-					var val = getnewbuyset(newbuyset);
-					areaText=val[0];
-					industry_vip=val[1];
-					$(".areaNum").text(areaText);
-					$(".industryNum").text(industry_vip);
-				}else{
-					var renewal_market=0; //续费市级地区
-					var buyset=filterObj.buyset;
-					if (buyset.areacount==-1){
-						$(".areaNum").text("全国");
-					}else{
-						if(!$.isEmptyObject(buyset.citys)){
-							for (var key in buyset.citys) {
-							    renewal_market+=(buyset.citys[key]);
-							}
-						}
-						//
-						var areaText="";
-						if ((buyset.areacount!=0)&&(renewal_market!=0)){
-							areaText=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
-						}else if((buyset.areacount==0)&&(renewal_market!=0)){
-							areaText=renewal_market+"个地市";
-						}else if((buyset.areacount!=0)&&(renewal_market==0)){
-							areaText=buyset.areacount+"个省级地区";
-						}
-						$(".areaNum").text(areaText);
-					}
-					if(buyset.buyerclasscount==-1){
-						$(".industryNum").text("全行业");
-					}else{
-						$(".industryNum").text(buyset.buyerclasscount+"个行业");
-					}
-				}
-			}
-
-        }
-
-               //周期
-            if((r.data.order.vip_starttime!=undefined)&&(r.data.order.vip_endtime!=undefined)){
-				var start_time_vip = r.data.order.vip_starttime;
-				var end_time_vip = r.data.order.vip_endtime;
-				var start_time_arr = start_time_vip.split(" ")[0].split("-")
-				var end_time_arr = end_time_vip.split(" ")[0].split("-")
-				var start_year=start_time_arr[0];
-				var start_month=start_time_arr[1];
-				var end_year=end_time_arr[0];
-				var end_month=end_time_arr[1];
-				var year = 0;
-       			var month = 0;
-       			if(end_year > start_year){
-       	    		if(end_month > start_month){
-           				year = end_year - start_year;
-           				month = end_month - start_month;
-       	    		}else{
-           				year = end_year - start_year-1;
-           				month = 12+Number(end_month)-start_month;
-           				if (month==12){
-           					year=Number(year)+1;
-           					month=0;
-           				}
-       	    		}
-       	    	}else if(end_year === start_year){
-           			month = end_month - start_month;
-       	    	}
-
-       	    	if(year != 0 && month !=0){
-       	    		$(".cyclecount").text(year+"年"+month+"个月");
-       	    	}else if(year !== 0&& month ===0){
-       	    		$(".cyclecount").text(year+"年");
-       	    	}else if(year === 0&& month !==0){
-       	    		$(".cyclecount").text(month+"个月");
-       	    	}
-       			if(filterObj.cycleunit==1){
-			        $(".cyclecount").text(filterObj.cyclecount+"年")
-			    }else if(filterObj.cycleunit==2){
-			       $(".cyclecount").text(filterObj.cyclecount+"个月")
-			    }else if(filterObj.cycleunit==3){
-			       $(".cyclecount").text(filterObj.cyclecount+"天")
-			    }
-            }else{
-				//未支付
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}
-			}
-
-
-			if(r.data.order.vip_type==1){
-				$(".productType").text(r.data.order.product_type+"(续费)");
-				$(".dyqy").text("续费区域:");
-				$(".dyhy").text("续费采购单位行业:");
-				$(".dyzq").text("续费周期:");
-			}else if(r.data.order.vip_type==2){
-				$(".productType").text(r.data.order.product_type+"(升级)");
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}else if (filterObj.cycleunit==-1){
-					$(".cyclecount").text("不延期");
-				}
-				$(".dyqy").text("升级区域:");
-				$(".dyhy").text("升级采购单位行业:");
-				$(".dyzq").text("延长周期:");
-			}else{
-				if(filterObj.cycleunit==1){
-					$(".cyclecount").text(filterObj.cyclecount+"年")
-				}else if(filterObj.cycleunit==2){
-					$(".cyclecount").text(filterObj.cyclecount+"个月")
-				}else if(filterObj.cycleunit==3){
-					$(".cyclecount").text(filterObj.cyclecount+"天")
-				}
-			}
-
-			//升级续费
-			var fnewBuyset =filterObj.newBuyset;
-			if(!$.isEmptyObject(fnewBuyset)){
-				//续费升级逻辑修改后判断是否不延期
-				if(filterObj.cycleunit==0&&filterObj.cyclecount==0){
-					$(".cyclecount").text("不延期");
-				}
-			}
-        if(r.data.order.order_status==0){
-          //未支付
-			$("#card-header-bg").addClass("bg nopay-bg")
-			$("#pageTitle").addClass("status")
-	        $("#pageTitle").text("待付款");
-			$(".remaining").show()
-			var order_create_time = r.data.order.create_time
-			order_create_time = order_create_time.replace(/-/g, '/')
-			var downtime  = r.data.order.order_countdown.split("h")[0]
-			downtime = downtime*60*60*1000
-			var t =setInterval(() => {
-				var nowtime = new Date()  //获取当前时间
-				endtime = new Date(order_create_time);  //定义结束时间
-				var lefttime = endtime.getTime()+downtime - nowtime.getTime() //距离结束时间的毫秒数
-				if(Math.floor(lefttime %1000)<=0){
-					clearInterval(t)
-					$.ajax({
-						type: "post",
-						url: "/subscribepay/orderListDetails/deleteOrder",
-						data: {
-							"id": r.data.order.id,
-							"pageNum": 1,
-							"type": 1,
-							"cancel": "cancel"
-						},
-						dataType: 'json',
-						success: function () {
-							$(".nopay-bg h3").text("已取消")
-							$(".remaining").text("")
-							$(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
-							$(".j-footer").hide()
-						}
-					})
-				}else{
-					var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
-							hour = hour < 10 ? '0' + hour : hour;
-					var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
-							minute = minute < 10 ? '0' + minute : minute;
-					var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
-					seconds = seconds < 10 ? '0' + seconds : seconds;
-					$(".remaining").text("剩余支付时间:"+hour+":"+minute+":"+seconds)
-				}
-			},1000)
-	        $(".invoice").hide();//隐藏开发票
-			 //支付方式
-			  if(r.data.order.pay_way.indexOf("wx")>-1){
-				//$(".line_payway").css("display","");
-				  $("#wx").prop("checked",true);
-				  $("#zfb").prop("checked",false);
-				$(".payWay").text("微信支付");
-				pay_way="wx_app"
-			  }else if(r.data.order.pay_way.indexOf("ali")>-1){
-				$(".payWay").text("支付宝支付");
-				  $("#wx").prop("checked",false);
-				  $("#zfb").prop("checked",true);
-				pay_way="ali_app"
-        }
-
-			  var pay_now = "<button class=\"j-button-confirm\" style='width: 100%!important;' onclick=choosePayWay()>去支付</button>"
-			  $(".j-footer").show().html(pay_now)
-        $(".button.align").css("display","").on("click",function(){//显示去支付按钮
-	         	$("#pay_way").show();
-				if(localStorage.getItem(orderCode)=="wx"){
-				  pay_way="wx_app"
-				  $("#wx").prop("checked",true);
-				  $("#zfb").prop("checked",false);
-				}else if (localStorage.getItem(orderCode)=="ali"){
-				  $("#wx").prop("checked",false);
-				  $("#zfb").prop("checked",true);
-				  pay_way="ali_app"
-				}
-	        })
-        }else if (r.data.order.order_status==1){
-		  $("#card-header-bg").addClass("bg finish-bg")
-		  $("#pageTitle").addClass("status")
-          $("#pageTitle").text("已完成");
-          //支付时间
-          $(".line_paytime").css("display","");
-          if(r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-",".").replace("-","."));
-          if (r.data.order.original_price==0){
-         	 $(".line_paytime").css("display","none");
-          }
-
-          //有效周期
-          $(".line_cycle").css("display","");
-          //有效日期
-          if(r.data.time.vip_starttime&&r.data.time.vip_endtime){
-            	var vip_starttime=r.data.time.vip_starttime+"";
-           		var vip_endtime=r.data.time.vip_endtime+"";
-           		vip_starttime=vip_starttime.split(" ")[0].replace(/-/g,".");
-           		vip_endtime=vip_endtime.split(" ")[0].replace(/-/g,".");
-           		var serviceTime=vip_starttime+" - "+vip_endtime;
-           	  	$(".serviceTime").text(serviceTime)
-          }
-
-          //支付方式
-		  if(r.data.order.pay_way.indexOf("wx")>-1){
-			$(".line_payway").css("display","");
-			$(".payWay").text("微信支付");
-			pay_way="wx_app"
-		  }else if(r.data.order.pay_way.indexOf("ali")>-1){
-			$(".payWay").text("支付宝支付");
-			$(".line_payway").css("display","");
-			pay_way="ali_app"
-		  }else{//试用用户
-			$(".invoice").css("display","none");
-			return
-		  }
-
-
-
-          $(".line_transaction").css("display","");
-          if(r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
-          var pay_again = ""
-          //发票
-          if(r.data.order.applybill_status==0){
-            //已支付未申请发票
-			      pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()' style='width: 100%!important;'>开发票</button>"
-            $(".invoice .invoicing").css("display","");
-            $(".invoicing").on("click",function(){
-            	var nowTimestamp= (new Date()).valueOf();
-            	$.post("/subscribepay/orderListDetails/emailOperation?v="+nowTimestamp,{},function(r){
-					if (r.success){
-						//没有绑定邮箱
-						weuiDialog();
-					}else{
-						//绑定了邮箱
-						window.location.href="/jyapp/front/myOrder/getOrderCode/"+orderCode;
-					}
-				})
-            });
-          }else{
-            //已支付已申请发票
-			  pay_again += "<button class=\"j-button-cancel\" onclick= 'checkinvoice()' style='width: 100%!important;'>查看发票</button >"
-			    $(".invoice").css("display","none");
-				switch (r.data.order.applybill_type){
-					case 0:
-					$(".person").css("display","");
-					break;
-					case 1:
-					$(".unit").css("display","");
-					$(".company_name").html(r.data.order.applybill_company);
-					$(".taxpayer_number").html(r.data.order.applybill_taxnum);
-					break;
-				}
-
-          }
-          $(".j-footer").show().html(pay_again)
-        }else if(r.data.order.order_status==-2){
-			$("#card-header-bg").addClass("bg cancel-bg")
-			$("#pageTitle").addClass("status")
-    		$("#pageTitle").text("已取消");
-     		$(".invoice").css("display","none");//隐藏开发票
-        }
-      }
-
-	//计价清单
-	var filterObj=JSON.parse(r.data.order.filter);
-	var upgradeSubtotail=filterObj.upgradeSubtotail;
-	if (upgradeSubtotail){	//有则显示
-		$.ajax({
-			type: 'POST',
-			url: '/subscribepay/orderListDetails/getValuationList',
-			data: {
-				"order_code":orderCode
-			},
-			success: function (data) {
-        appendList(data.list);
-			}
-		});
-		$(".valuationList").show();
-		// 计算标准点击事件
-		$('.valuationList').on('click', function () {
-			pickerShow('.billing-list-container', true)
-      $("html,body").addClass("stop");
-		})
-		// 计算标准隐藏
-		$('.billing-list-container .dialog_hd__close').on('click', function () {
-			pickerShow('.billing-list-container', false)
-      $("html,body").removeClass("stop");
-		})
-		$('.weui-mask').on('click', function () {
-			pickerShow('.billing-list-container', false)
-      $("html,body").removeClass("stop");
-		})
-	}
-
-		//离开按钮
-		$(".cancel").click(function() {
-			$('.pay_way').hide(200)
-		});
-
-		/* 选择支付方式*/
-		$('input:radio[name="way"]').click(function() {
-			var checkValue = $('input:radio[name="way"]:checked').val();
-			if(checkValue=="微信支付"){
-				localStorage.setItem($(".order_code_vip").text(),"wx");
-				$("#wx").prop("checked",true);
-				$("#zfb").prop("checked",false);
-		    	pay_way="wx_app";
-			}else{
-				localStorage.setItem($(".order_code_vip").text(),"ali");
-				$("#wx").prop("checked",false);
-				$("#zfb").prop("checked",true);
-				pay_way="ali_app";
-			}
-		});
-
-		//确认支付
-		$("#pay").on("click", function() {
-			$(".loading_").show();
-			//vip支付;
-				if(!canpay)return
-				canpay=false;
-			    $.post("/subscribepay/vipsubscribe/orderToPay",{"orderCode":orderCode,"pay_way":pay_way},function(r){
-			    	if(r.success){
-			    		  if(pay_way=="wx_app"){
-			                  JyObj.wxPay(r.data.res);
-			                }else{
-			                  JyObj.aliPay(r.data.res);
-			                }
-			                $('.pay_way').hide(200)
-							canpay=true;
-			                checkPaySuccess_vip(orderCode);
-			    	}
-				})
-		})
-
-    })
-
-    function formatEffectiveDate(strat,end){
-        var startDate = new Date(strat*1000);
-        var endDate = new Date(end*1000);
-        return formatDate(startDate)+" - "+formatDate(endDate)
-    }
-    function formatDate(d){
-	    return (d.getFullYear()) + "." +
-	    (Array(2).join(0)+(d.getMonth() + 1)).slice(-2) + "." +
-	    (Array(2).join(0)+(d.getDate())).slice(-2);
-    }
-
-	function weuiDialog(){
-		weui.dialog({
-			title: '提示信息',
-			content: '您未绑定邮箱<br/>请绑定后再开发票',
-	        className: 'jymobile-setting-dialog',// 设置弹框的类名
-	        buttons: [
-	        {
-	        	label: '去设置',
-	        	type: 'primary',
-	        	onClick: function () {
-	        			window.location.replace("/jyapp/front/myorder/myEmail?name=invoice&orderCode="+orderCode);
-	        	}
-	        },
-	        {
-	        	label: '取消',
-	        	type: 'default',
-	        	onClick: function () {
-	        		console.log('取消')
-	        	}
-	        }
-	        ]
-	    });
-	}
-	var interval_vip
-	//支付完成跳转 VIP订单
-	function checkPaySuccess_vip(order_vipcode){
-		if(interval_vip){
-			clearInterval(interval_vip)
-		}
-		$(".loading_").show();
-		interval_vip=setInterval(function(){
-			$.post("/jypay/isPaySuccess",{code:order_vipcode},function(r){
-				if(r.success){
-					clearInterval(interval_vip);
-					$(".loading_").hide();
-					window.location.href="/jyapp/vipsubscribe/toPaySuccessPage?orderCode="+order_vipcode;
-				}
-			})
-		},3000)
-		$(".loading_").hide();
-	}
-
-	function PrefixInteger(num,n) {
-		return (Array(n).join(0) + num).slice(-n);
-	}
-	// 参数为结束时间戳
-	function setTimeFunc (endtime){
-  		var t = endtime - +new Date();
-  		if (t <= 0) {
-  			$(".button").hide();
-  			$(".cancel_time").hide();
-  			$("#pageTitle").html("已取消");
-  		}
-  		var days_ =PrefixInteger(parseInt(t/1000/60/60, 10).toString(),2)
-  		var minutes_ =PrefixInteger(parseInt(t/1000/60%60, 10).toString(),2)
-  		var seconds =PrefixInteger(parseInt(t/1000%60, 10).toString(),2)
-  		$(".cancel_time").text("剩余"+days_+":" + minutes_+":"+seconds+" ");
-	  }
-
-	  //升级续费逻辑重写后的数据处理
-	  function getnewbuyset(newBuyset){
-		if(newBuyset.areacount!=-1){
-			var newcitys=newBuyset.newcitys;
-			var scatter=newcitys.length ;//分布
-			var citynum=0;
-			for(var k in newcitys){
-				citynum+=newcitys[k];
-			}
-			if(newBuyset.areacount>0){
-				areaText=newBuyset.areacount+"个省级区域";
-				if (citynum!=0){
-					if(scatter>1){
-						areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-					}else{
-						areaText+="、"+citynum+"个地市";
-					}
-				}
-			}else{
-				if (scatter>1){
-					areaText=citynum+"个地市(分布在"+scatter+"省内)";
-				}else{
-					areaText=citynum+"个地市";
-				}
-			}
-		}else{
-			areaText="全国";
-		}
-		var buyerclasscount=newBuyset.buyerclasscount;
-		if(buyerclasscount>3){
-			buyerclasscount=filterObj.industry.length;
-			industry_vip="全行业("+buyerclasscount+"个行业)";
-		}else{
-			industry_vip=buyerclasscount+"个行业";
-		}
-		if(buyerclasscount==-1){
-			industry_vip="全行业";
-		}
-		return [areaText,industry_vip]
-	  }
-	 	 // picker的显示隐藏
-	 	function pickerShow(selector, f) {
-	 		if (f) {
-	 			// 添加进场动画,并显示
-	 			$(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
-	 			$(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
-	 			$(selector).show(300);
-	 		} else {
-	 			// 添加离场动画,并隐藏
-	 			$(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
-	 			$(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
-	 			$(selector).hide(300);
-	 		}
-	 	}
-	 	var total_price=0;
-	 	function appendList(list){
-	 		var returnHtml = "";
-	 		for (var i = 0; i < list.length; i++) {
-	 			var showTime=""
-	 			var start= new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
-	 			var end =new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
-	 		/*	var effective = MonthsBetw(start,end);	//月份
-	 			if (effective>=12){	//年份转换
-	 				if (effective%12==0){
-	 					showTime +="("+(effective/12)+"年)";
-	 				}else{
-	 					var effective_year ="";
-	 					effective_year+=(effective/12);
-	 					var indexof= effective_year.lastIndexOf(".");
-	 					effective_year =effective_year.substring(0,indexof);
-	 					showTime+="("+effective_year+"年"+(effective%12)+"个月)";
-	 				}
-	 			}else{
-	 				showTime +="("+effective+"个月)";
-	 			}
-				*/
-	 			showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
-
-
-	 			var typeName = "";
-	 			if (list[i].type === 1) {
-	 				typeName = "续费"
-	 			} else if (list[i].type === 0) {
-	 				typeName = "升级"
-	 			}
-	 			var showArea = "";
-	 			if (list[i].oldBuyset.areacount === -1) {
-	 				showArea = "全国"
-	 			} else {
-	 				//if (list[i].oldBuyset.newcitys.length > 0) {
-	 					var cityCount = 0;
-	 					for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
-	 						cityCount += list[i].oldBuyset.newcitys[j];
-	 					}
-	 					if(list[i].oldBuyset.areacount!=0){
-	 						showArea = list[i].oldBuyset.areacount + "个省";
-	 						if (list[i].oldBuyset.newcitys.length>1){
-	 							showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-	 						}else{
-	 							if(cityCount!=0){
-	 								showArea += "、" + cityCount + "个市";
-	 							}
-	 						}
-	 					}else{
-	 						if (list[i].oldBuyset.newcitys.length>1){
-	 							showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-	 						}else{
-	 							if(cityCount!=0){
-	 								showArea += cityCount + "个市";
-	 							}
-	 						}
-	 					}
-	 				//}
-	 			}
-	 			var industryShow = "";
-	 			if (list[i].oldBuyset.buyerclasscount === -1) {
-	 				industryShow = "全行业"
-	 			} else {
-	 				industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
-	 			}
-	 			returnHtml += "<li class='list-item'>"
-	 				+ '<div class="item-top">'
-	 				+ '<div class="item-header">'
-	 				+ '<span class="header-label">有效日期:</span>'
-	 				+ '<span class="header-content ellipsis">' + showTime + '</span>'
-	 				+ '</div>'
-	 				+ '<div class="item-body">'
-	 				+ '<div class="b-item body-area">'
-	 				+ '<div class="body-area-title text-title">区域</div>'
-	 				+ '<div class="body-area-sub">' + showArea + '</div>'
-	 				+ '</div>'
-	 				+ '<div class="b-item body-industry">'
-	 				+ '<div class="body-industry-title text-title">采购单位行业</div>'
-	 				+ '<div class="body-industry-sub">' + industryShow + '</div>'
-	 				+ '</div>'
-	 			if (typeName != "") {
-	 				returnHtml += '<div class="vp-type">'
-	 					+ '<div class="vp-type-text">' + typeName + '</div>'
-	 					+ '</div>'
-	 			}
-
-	 			returnHtml += '</div>'
-	 				+ '</div>'
-	 				+ '<div class="item-footer">'
-	 				+ '<span class="footer-label">小计:</span>'
-	 				+ '<span class="footer-content text-title">¥' +(list[i].price/100) + '</span>'
-	 				+ '</div>'
-	 				+ '</li>'
-
-	 			total_price+=(list[i].price) ;
-	 		}
-	 		$(".total-price").text("共计:¥"+total_price/100);
-	 		$(".list-content").html(returnHtml);
-	 	}
-
-	 	function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
-	 	    //用-分成数组
-	 	    date1 = date1.split("-");
-	 	    date2 = date2.split("-");
-	 	    //获取年,月数
-	 	    var year1 = parseInt(date1[0]),
-	 	        month1 = parseInt(date1[1]),
-	 	        year2 = parseInt(date2[0]),
-	 	        month2 = parseInt(date2[1]),
-	 	        //通过年,月差计算月份差
-	 	        months = (year2 - year1) * 12 + (month2 - month1);
-	 	    return months;
-	 	}
-
-  })
-  var orderCode_=decodeURIComponent(getParam("orderCode"));
-  //选择
-  function choosePayWay(){
-
-	  window.location.href = "/jyapp/course/optionPay?code="+orderCode_
-  }
-  //订单详情
-  $(".icon-fanhui").on("click",function () {
-	  history.go(-1)
-  })
-
-  //查看发票
-  function checkinvoice() {
-
-	  window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code="+orderCode_
-  }
-  //开发票
-  function invoiceAdd(){
-      var orderCode_=decodeURIComponent(getParam("orderCode"));
-      $.post("/subscribepay/orderListDetails/isOver", {"order_code":orderCode_}, function(data) {
-          if(data.status==1){
-            window.location.href = "/jyapp/front/invoice/showpage?order_code="+orderCode_;
-          }else{
-    				window.location.href = "/jyapp/front/cantInvoice";
-          };
-      })
-  }
-
-  //苹果端  刷新js
-  $(function () {
-		var isPageHide = false;
-		window.addEventListener('pageshow', function () {
-		    if (isPageHide) {
-                location.reload();
-		    }
-		});
-		window.addEventListener('pagehide', function () {
-		    isPageHide = true;
-		});
-	});
+  var activeDiscount = {{Msg "seo" "activeDiscount"}};
+  var liveActiveStartTime = {{Msg "seo" "liveActiveStartTime"}};
+  var liveActiveEndTime = {{Msg "seo" "liveActiveEndTime"}}
 </script>
+<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_order_detail.js?v={{Msg "seo" "version"}}"></script>
 	{{include "/common/baiducc.html"}}
 </html>

+ 7 - 4
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -565,14 +565,17 @@
 						var nowTime = new Date().getTime();
 						var startTime = {{Msg "seo" "liveActiveStartTime"}};
 						var endTime = {{Msg "seo" "liveActiveEndTime"}};
+                        var activeDiscount = {{Msg "seo" "activeDiscount"}};
 						var startTimes = parseInt(startTime)* 1000;
 						var endTimes = parseInt(endTime)* 1000;
 						var buyCount = {{.T.buyCount}};
 						if (nowTime >= startTimes && nowTime < endTimes) {
-							$(".price-num").text(showPrice);
-							showPrice = formatMoney(parseFloat(price) * 0.6);
-							var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
-							$(".reduce-price").text(formatMoney(activePrice));
+                            if (flag !== 2) {
+                                $(".price-num").text(showPrice);
+                                var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
+                                $(".reduce-price").text(formatMoney(activePrice));
+                            }
+							showPrice = formatMoney(parseFloat(price) * parseFloat(activeDiscount));
 							$(".bought-num").text(buyCount);
 						}
                         if (flag === 1) {

+ 2 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html

@@ -358,7 +358,8 @@
 	    });
 		var live20200707 = {
 			startTime: {{Msg "seo" "liveActiveStartTime"}},
-			endTime: {{Msg "seo" "liveActiveEndTime"}}
+			endTime: {{Msg "seo" "liveActiveEndTime"}},
+            activeDiscount: {{Msg "seo" "activeDiscount"}}
 		}
 	</script>
 	<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_renew.js?v={{Msg "seo" "version"}}"></script>

+ 2 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -56,5 +56,6 @@
 	"orderCountdown":"48h",
 	"liveOrderCountdown":"72h",
 	"liveActiveStartTime":1592755200,
-	"liveActiveEndTime":1594051200
+	"liveActiveEndTime":1594051200,
+	"activeDiscount":0.6
 }

+ 3 - 0
src/jfw/modules/subscribepay/src/config/config.go

@@ -52,6 +52,7 @@ type config struct {
 	LiveOrderCountdown  interface{}
 	LiveActiveStartTime int64
 	LiveActiveEndTime   int64
+	ActiveDiscount      float64
 }
 type timeTaskConfig struct {
 	ExpireRemind   string //到期提醒
@@ -82,6 +83,8 @@ type WxTplMsg struct {
 	Second   *qrpc.TmplItem
 	Third    *qrpc.TmplItem
 	Fourth   *qrpc.TmplItem
+	Fifth    *qrpc.TmplItem
+	Sixth    *qrpc.TmplItem
 	Keyword1 *qrpc.TmplItem
 	Keyword2 *qrpc.TmplItem
 	Keyword3 *qrpc.TmplItem

+ 5 - 0
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -153,6 +153,10 @@ func (this *vipSubscribeStruct) PayCallBack(param *CallBackParam) bool {
 	//}
 	//支付成功后
 	if flag {
+		//支付成功后 清除首页redis缓存
+		go func() {
+			redis.Del("other", "p1_indexMessage_"+userid)
+		}()
 		//支付提醒
 		liveStart := Config.LiveActiveStartTime
 		liveEnd := Config.LiveActiveEndTime
@@ -687,6 +691,7 @@ func PayCancel(userId, product_type, entname string) bool {
 				})
 				if bl {
 					util.MsgRemind.Delete(qutil.IntAll(v["id"]))
+					util.ActiveMsgRemind.Delete(qutil.IntAll(v["id"]))
 					i++
 				}
 			}

+ 8 - 0
src/jfw/modules/subscribepay/src/message.json

@@ -69,6 +69,14 @@
 			"value":"您的订单 %s 还未支付,将在 2 小时后关闭,现在支付享VIP订阅 6 折活动,立省%s元,全年仅此一次,错过不再有,请及时付款。",
 			"color":"#FE737A"
 		},
+		"fifth":{
+			"value":"您的订单 %s 还未支付,请及时付款。",
+			"color":"#FE737A"
+		},
+		"sixth":{
+			"value":"您的订单 %s 还未支付,将在 2 小时后关闭,请及时付款。",
+			"color":"#FE737A"
+		},
 		"keyword3": {
 			"value":"%s元"
 		},

+ 25 - 4
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -65,15 +65,23 @@ func (this *OrderListDetails) GetOrderPayAllMsg() {
 			//"order_status": 1,
 		}
 		oData := util.Mysql.FindOne(tableName_order, query, "id,order_code,prepay_time,create_time,pay_time,pay_way,original_price,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type", "")
-
+		orderStatus := qutil.IntAll((*oData)["order_status"])
 		//配置订单到期时间
 		order_countdown := config.Config.OrderCountdown //配置文件读取
 		//优惠码
-		order_countdown = config.Config.LiveOrderCountdown
+		nowTime := time.Now().Unix()
+		if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
+			order_countdown = config.Config.LiveOrderCountdown
+		}
 		create_time_str := qutil.ObjToString((*oData)["create_time"])
 		create_time, _ := time.ParseInLocation(qutil.Date_Full_Layout, create_time_str, time.Local)
 		if create_time.Unix() >= liveActiveStartTime && create_time.Unix() < liveActiveEndTime {
 			(*oData)["isLiveActive"] = true
+			if nowTime >= liveActiveEndTime && orderStatus == 0 {
+				if util.Mysql.Update(tableName_order, query, map[string]interface{}{"order_status": -2}) {
+					log.Println("VIP活动订单到期取消", orderCode)
+				}
+			}
 		}
 		activeData := util.Mysql.FindOne("prefer_active", map[string]interface{}{"order_code": orderCode, "user_id": userId}, "active_code", "")
 		if activeData != nil {
@@ -405,7 +413,7 @@ func (o *OrderListDetails) GetValuationList() error {
 		"order_code": order_code,
 		"user_Id":    userId,
 	}
-	filter := util.Mysql.FindOne(tableName_order, queryMap, "filter", "")
+	filter := util.Mysql.FindOne(tableName_order, queryMap, "filter,order_money", "")
 	if filter != nil {
 		res := qutil.ObjToMap((*filter)["filter"])
 		upgradeSubtotail = qutil.ObjArrToMapArr((*res)["upgradeSubtotail"].([]interface{}))
@@ -420,7 +428,8 @@ func (o *OrderListDetails) GetValuationList() error {
 	}
 	log.Println("upgradeSubtotail:", upgradeSubtotail)
 	o.ServeJson(map[string]interface{}{
-		"list": upgradeSubtotail,
+		"list":        upgradeSubtotail,
+		"order_money": (*filter)["order_money"],
 	})
 	return nil
 }
@@ -601,6 +610,18 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 				}
 			}
 		}
+		//直播活动订单取消
+		if create_time.Unix() >= liveActiveStartTime && create_time.Unix() < liveActiveEndTime {
+			order_status := qutil.Int64All(v["order_status"])
+			if now_time_stamp >= liveActiveEndTime && order_status == 0 {
+				//数据库更改
+				if util.Mysql.Update(tableName_order, queryM, map[string]interface{}{"order_status": -2}) {
+					//前端传参更改
+					v["order_status"] = -2
+					log.Println("直播活动结束,取消订单", v["order_code"])
+				}
+			}
+		}
 		if v["filter_publishtime"] != nil {
 			filter_publishtime := v["filter_publishtime"]
 			if filter_publishtime != nil {

+ 2 - 1
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -194,8 +194,9 @@ func (this *SubscribeChange) SaveChange() {
 		nowTime := time.Now().Unix()
 		liveActiveStartTime := config.Config.LiveActiveStartTime
 		liveActiveEndTime := config.Config.LiveActiveEndTime
+		activeDiscount := config.Config.ActiveDiscount
 		if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
-			final_price = int(float64(final_price) * 0.6)
+			final_price = int(float64(final_price) * activeDiscount)
 			log.Println("final_price", final_price)
 		}
 		if activeCode == "jianyu360" {

+ 2 - 1
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -100,9 +100,10 @@ func (this *SubVipPayOrder) CreateOrder() {
 		nowTime := time.Now().Unix()
 		liveActiveStartTime := config.Config.LiveActiveStartTime
 		liveActiveEndTime := config.Config.LiveActiveEndTime
+		activeDiscount := config.Config.ActiveDiscount
 		if nowTime >= liveActiveStartTime && nowTime < liveActiveEndTime {
 			if totalfee > 100 {
-				totalfee = int(float64(totalfee) * 0.6)
+				totalfee = int(float64(totalfee) * activeDiscount)
 			}
 			log.Println("totalfee", totalfee)
 		}

+ 6 - 5
src/jfw/modules/subscribepay/src/util/liveActiveMsgRemind.go

@@ -187,7 +187,8 @@ func (m *activeMsgRemind) run() {
 			if !ok || user == nil || len(*user) == 0 {
 				return true
 			}
-			origin := float64(unpaidOrder.orderMoney)/100/0.6 - float64(unpaidOrder.orderMoney)/100
+			activeDiscount := Config.ActiveDiscount
+			origin := float64(unpaidOrder.orderMoney)/100/activeDiscount - float64(unpaidOrder.orderMoney)/100
 			originPrice := fmt.Sprintf("%.2f", origin)
 			buyCount := strconv.Itoa(util.IntAll(redis.Get("other", "liveactiveRTB")))
 			log.Println("buyCount", buyCount)
@@ -219,17 +220,17 @@ func (m *activeMsgRemind) run() {
 				}
 				if remind_status == 1 {
 					tmplData["first"] = &qrpc.TmplItem{
-						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Second.Value, unpaidOrder.orderCode, originPrice),
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Fifth.Value, unpaidOrder.orderCode),
 						Color: MessageConfig.WxTpl_Unpaid.First.Color,
 					}
 				} else if remind_status == 2 {
 					tmplData["first"] = &qrpc.TmplItem{
-						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Third.Value, unpaidOrder.orderCode, buyCount, originPrice),
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Fifth.Value, unpaidOrder.orderCode),
 						Color: MessageConfig.WxTpl_Unpaid.First.Color,
 					}
 				} else if remind_status == 3 {
 					tmplData["first"] = &qrpc.TmplItem{
-						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Fourth.Value, unpaidOrder.orderCode, originPrice),
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Sixth.Value, unpaidOrder.orderCode),
 						Color: MessageConfig.WxTpl_Unpaid.First.Color,
 					}
 				}
@@ -254,7 +255,7 @@ func (m *activeMsgRemind) run() {
 				if remind_status == 1 {
 					tmplData["first"] = fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Second.Value, unpaidOrder.orderCode, originPrice)
 				} else if remind_status == 2 {
-					tmplData["first"] = fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Third.Value, unpaidOrder.orderCode, originPrice)
+					tmplData["first"] = fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Third.Value, unpaidOrder.orderCode, buyCount, originPrice)
 				} else if remind_status == 3 {
 					tmplData["first"] = fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Fourth.Value, unpaidOrder.orderCode, originPrice)
 				}

+ 3 - 0
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -177,6 +177,9 @@ func GetSqlObjFromId(_id string) *ViewCondition {
 	o_vipjy, _ := (*query)["o_vipjy"].(map[string]interface{})
 	a_items := o_vipjy["a_items"].([]interface{})
 	a_buyerclass := o_vipjy["a_buyerclass"].([]interface{})
+	if len(a_buyerclass) > 0 && qutil.IntAllDef(o_vipjy["i_matchbuyerclass_other"], 1) == 1 && len(a_items) > 0 {
+		a_buyerclass = append(a_buyerclass, "其它")
+	}
 	a_infotype := o_vipjy["a_infotype"].([]interface{})
 	o_area := o_vipjy["o_area"].(map[string]interface{})
 	return &ViewCondition{

+ 12 - 9
src/jfw/modules/weixin/src/wx/wx.go

@@ -127,16 +127,19 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 			//活动开始后
 			w.ReplyText(config.ActiveConfig.ListRep)
 			//回复图片
-			var listImgPath = "res/live/liveShare.jpg"
-			for i := 0; i < 3; i++ {
-				mediaId, err := w.UploadMediaFromFile("image", listImgPath)
-				if mediaId != "" && err == nil {
-					w.PostImage(mediaId)
-					break
-				} else {
-					log.Println("w.UploadMediaFromFile", openid, err)
+			go func() {
+				time.Sleep(time.Millisecond * 100)
+				var listImgPath = "res/live/liveShare.jpg"
+				for i := 0; i < 3; i++ {
+					mediaId, err := w.UploadMediaFromFile("image", listImgPath)
+					if mediaId != "" && err == nil {
+						w.PostImage(mediaId)
+						break
+					} else {
+						log.Println("w.UploadMediaFromFile", openid, err)
+					}
 				}
-			}
+			}()
 		}
 	} else if len(autoReply_reg.FindStringIndex(r.Content)) == 2 {
 		rContent := strings.TrimSpace(r.Content)

+ 2 - 1
src/seo.json

@@ -480,5 +480,6 @@
     },
 	"orderCountdown":"72h",
 	"liveActiveStartTime": "1592755200",
-	"liveActiveEndTime": "1594051200"
+	"liveActiveEndTime": "1594051200",
+	"activeDiscount": "0.6"
 }

+ 2 - 0
src/web/staticres/vipsubscribe/css/vip_index_new.css

@@ -560,6 +560,7 @@
 }
 
 .jy-alert .weui-dialog__bd {
+  margin: 0;
   padding: 0 0.4rem 0.48rem;
   font-size: 0.28rem;
   color: #686868;
@@ -992,6 +993,7 @@
   justify-content: flex-end;
   padding: 0 .32rem;
   color: #9B9CA3;
+  margin-bottom: .2rem;
 }
 
 .origin-price .price-num {

+ 13 - 11
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -266,6 +266,9 @@ $(function () {
         pickerShow('.billing-list-container', false)
         pickerShow('.coupon-picker', false)
     })
+    $('body').on('click', '.jy-dialog .weui-mask', function () {
+        pickerShow('.jy-dialog', false)
+    })
 
     $('.close-expire-remind').on("click", function () {
         $(".expire-remind").hide();
@@ -345,15 +348,15 @@ $(function () {
         $('.vip-footer .button-l.reset').off("click").on("click", function () {
             cancelTip(module);
         });
+        window.removeEventListener('popstate',function(){})
         window.addEventListener("popstate", function (e) {
-            //如果订单计费清单显示,则关闭清单;
+            // 如果订单计费清单显示,则关闭清单;
             if ($(".billing-list-container").css("display") != "none" && module === 2) {
                 pickerShow('.billing-list-container', false);
                 pushHistory();
             } else {//提示是否保存
                 $('.weui-mask').trigger('click')
                 cancelTip(module);
-                //pushHistory();
             }
         }, false);
     }
@@ -737,18 +740,19 @@ $(function () {
             var nowTime = new Date().getTime();
             var startTime = live20200707.startTime;
             var endTime = live20200707.endTime;
+            var activeDiscount = parseFloat(live20200707.activeDiscount);
             var startTimes = parseInt(startTime) * 1000;
             var endTimes = parseInt(endTime) * 1000;
             if (nowTime >= startTimes && nowTime < endTimes) {
               var price = status[0];
               $(".price-num").text(price);
-              status[0] = parseFloat(price) * 0.6;
-              var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
+              status[0] = parseFloat(price) * activeDiscount;
+              var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
               $(".reduce-price").text(formatMoney(activePrice));
               // for (var i=0;i<status.length;i++){
               //   if(i===3){
               //     for (var a in status[i]){
-              //       status[i][a].price = parseFloat(status[i][a].price) * 0.6;
+              //       status[i][a].price = parseFloat(status[i][a].price) * activeDiscount;
               //     }
               //   }
               // }
@@ -784,7 +788,7 @@ $(function () {
             if (!reqData.isTrial) {
                 $(".preview-label").text("需补差价:");
                 $(".billing-list-btn").text("计费清单");
-                $(".va-total-container .total-price").text("¥" + formatMoney(status[0]));
+                $(".va-total-container .total-price").text("共计:¥" + formatMoney(status[0]));
                 flushSubtotal(status[3]);
                 console.log("subtotail", status[3])
             }
@@ -874,11 +878,9 @@ $(function () {
         var confirmButton = $('.coupon-picker .weui-picker__btn')
         var cancelButton = $('.coupon-picker .cancel')
         var value = input.val()
-        input.focus(function (e) {
-          e.target.scrollIntoView({ 'block': 'center' })
-        }).on('input', function () {
-            value = this.value
-            confirmButton.prop('disabled', (value === '' || value === undefined))
+        input.val('').focus().val(value).on('input', function () {
+          value = this.value
+          confirmButton.prop('disabled', (value === '' || value === undefined))
         })
 
         confirmButton.on('click', function () {

+ 30 - 5
src/web/templates/pc/billing_list.html

@@ -23,7 +23,23 @@
             <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
         <![endif]-->
 </head>
-
+<style type="text/css">
+    .m_thead{
+        display: flex;
+    }
+    .origin-price-container {
+      display: flex;
+      color: #9B9CA3;
+      align-self: flex-end;
+      font-size: 16px;
+      padding-left: 21px;
+      line-height: 29px;
+    }
+    
+    .origin-price-container .price-num {
+      text-decoration: line-through;
+    }
+</style>
 <body>
     <!-- header -->
 	{{include "/common/pchead.html"}}
@@ -40,6 +56,13 @@
                     <span class="yen">&yen;</span>
                     <span class="price"></span>
                 </div>
+               <div class="origin-price-container">
+                   <p class="price-label">原价:</p>
+                   <p class="origin-price">
+                       <span class="yen">&yen;</span>
+                       <span class="price-num">1234</span>
+                   </p>
+               </div>
             </div>
             <div class="m_body">
                 <ul class="clearfix">
@@ -68,13 +91,14 @@
 				data: {
 					"order_code":{{.T.order_code}}
 				},
-				success: function (data) {
-					appendList(data.list);
+				success: function (data) {
+                    // console.log(data)
+					appendList(data.list,data.order_money);
 				}
 			});
         })
 		
-		function appendList(list){
+		function appendList(list,money){
 			var returnHtml = "";
 			var total_price=0;
 			for (var i = 0; i < list.length; i++) {
@@ -160,7 +184,8 @@
 				total_price+=(list[i].price) ;
 			}
 			$(".m_body > ul").html(returnHtml);
-			$(".price").text(total_price/100);
+			$(".price").text(money/100);
+			$(".price-num").text(total_price/100);
 		}
 		function gettime(t){
 			  var y = t.getFullYear();

+ 10 - 2
src/web/templates/pc/myOrder.html

@@ -292,7 +292,8 @@
 								var deleteOrderHtml = "";
 								var keysHtml = "";
 								var prepaytime = obj.prepay_time;
-								var isLiveActive = obj.isLiveActive
+								var isLiveActive = obj.isLiveActive;
+                                var isUsedActiveCode = obj.isUsedActiveCode;
 								if (!obj.user_openid){
 									canUseWxpay=false;
 								}
@@ -541,7 +542,7 @@
 										if(parseInt(filter_.cycleunit)==1){
 											cycleT=filter_.cyclecount+"年"
 										}else if(parseInt(filter_.cycleunit)==2){
-											cycleT=filter_.cyclecount+"月"
+											cycleT=filter_.cyclecount+"月"
 										}else{
 											cycleT="7天"
 										}
@@ -549,6 +550,10 @@
 									if(filter_.cycleunit==0&&filter_.cyclecount==0){
 										cycleT="不延期";
 									}
+                                    
+                                    if(isUsedActiveCode){
+                                        cycleT = cycleT + '<span class="discount-container"><span> + </span><span class="highlight-text" style="color: #2cb7ca;">赠送30天</span></span>'
+                                    }
 									
 									if(obj.vip_endtime!=""&&obj.vip_starttime!=""){
 										obj.vip_starttime = formatTime(obj.vip_starttime) +" - "+formatTime(obj.vip_endtime)
@@ -622,6 +627,9 @@
 										var originPrice = (parseFloat(orderMoney) / 0.6).toFixed(2);
 										priceHtml = '<div style="line-height:106px;" class="fl m_number '+orderStatusClassOne+'"><p style="height:20px;text-decoration:line-through;color:#9B9CA3;">¥' + FormatNum(originPrice) + '</p><p>¥' + FormatNum(orderMoney) + '</p></div>';
 									}
+                                    if(isUsedActiveCode){
+                                        
+                                    }
 								}
 								temp += '<div class="order_list '+orderStatusClassOne+'">'
 										+'<div class="clearfix o_l_top '+orderStatusClassTwo+'">'

+ 36 - 16
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -32,6 +32,7 @@
         .origin-price-container {
             color: #9B9CA3;
             font-size: .22rem;
+            margin-right: 0.1rem;
         }
         .origin-price-container .origin-price {
             text-decoration: line-through;
@@ -542,10 +543,14 @@
         var psss = 0;
         for (var index in object) {
             var obj = object[index];
-			var isUsedActiveCode = false
+			var isUsedActiveCode = false;
+            var isLiveActive = false;
 			if(obj.isLiveActive){
-				isUsedActiveCode = true;
+				isLiveActive = true;
 			}
+            if(obj.isUsedActiveCode){
+                isUsedActiveCode = true;
+            }
             if (obj.product_type == "历史数据") {
                 count++;
                 var id = obj.id;
@@ -1155,6 +1160,21 @@
                     iconHtml += '<div class="card-footer">'
                         + '</div>'
                 }
+                if(filter_vip.cyclecount!=undefined&&filter_vip.cyclecount!=""&&filter_vip.cycleunit!=undefined&&filter_vip.cycleunit!=""){
+                	if(parseInt(filter_vip.cycleunit)==1){
+                		effectiveduration_vip=filter_vip.cyclecount+"年"
+                	}else if(parseInt(filter_vip.cycleunit)==2){
+                		effectiveduration_vip=filter_vip.cyclecount+"个月"
+                	}else{
+                		effectiveduration_vip="7天"
+                	}
+                }
+                if(filter_vip.cycleunit==0&&filter_vip.cyclecount==0){
+                	effectiveduration_vip="不延期";
+                }
+                if(isUsedActiveCode){
+                    effectiveduration_vip = effectiveduration_vip+ '<span class="discount-container"><span>+</span><span class="highlight-text">赠送30天</span></span>'
+                }
                 //vip状态 0不是vip 1试用 2正式
                 if (orderStatus_vip != "已完成") {
                     //未支付 或 已取消
@@ -1174,16 +1194,16 @@
                         + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip + '</p>';
                     //}
                     listhtml += '</div></a>'
-					if(isUsedActiveCode){
-						var originPrice = (parseFloat(orderMoney_vip) / 0.6).toFixed(2);
-						listhtml += '<div class="price">'
-						+ '<span class="origin-price-container">'
+                    listhtml += '<div class="price">'
+					if(isLiveActive){
+                        var activeDiscount = {{Msg "seo" "activeDiscount"}};
+						var originPrice = (parseFloat(orderMoney_vip) / parseFloat(activeDiscount)).toFixed(2);
+						listhtml += '<span class="origin-price-container">'
 						+ '<span>原价:¥</span>'
 						+ '<span class="origin-price">' + originPrice + '</span>'
-						+ '</span></div>'
+						+ '</span>'
 					}
-                    listhtml += '<div class="price">'
-                        + '<strong class="current">¥' + orderMoney_vip + '</strong>'
+                    listhtml += '<strong class="current">¥' + orderMoney_vip + '</strong>'
                         + '</div>'
                         + '</div>'
                         + iconHtml
@@ -1213,16 +1233,16 @@
                         + '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
                     //}
                     listhtml += '</div></a>'
-                    if(isUsedActiveCode){
-						var originPrice = (parseFloat(orderMoney_vip) / 0.6).toFixed(2);
-                    	listhtml += '<div class="price">'
-                    	+ '<span class="origin-price-container">'
+                    listhtml += '<div class="price">'
+                    if(isLiveActive){
+						var activeDiscount = {{Msg "seo" "activeDiscount"}};
+						var originPrice = (parseFloat(orderMoney_vip) / parseFloat(activeDiscount)).toFixed(2);
+                      listhtml += '<span class="origin-price-container">'
                     	+ '<span>原价:¥</span>'
                     	+ '<span class="origin-price">' + originPrice + '</span>'
-                    	+ '</span></div>'
+                    	+ '</span>'
                     }
-                    listhtml += '<div class="price">'
-                        + '<strong class="current">¥' + orderMoney_vip + '</strong>'
+                    listhtml += '<strong class="current">¥' + orderMoney_vip + '</strong>'
                         + '</div>'
                         + '</div>'
                         + iconHtml

+ 10 - 2
src/web/templates/weixin/vipsubscribe/vip_index_new.html

@@ -396,10 +396,17 @@
         </div>
         <div class="weui-half-screen-dialog__ft">
             <div class="va-total-container">
-                <span class="total-label">共计:</span>
+                <span class="total-label"></span>
                 <span class="total-price">¥223.8</span>
             </div>
         </div>
+		<div class="origin-price">
+		    <span class="price-label">原价:</span>
+		    <div class="price-container">
+		        <span class="currency-type">&yen;</span>
+		        <span class="price-num">5.80</span>
+		    </div>
+		</div>
     </div>
 </div>
 <!-- 选择订阅周期picker -->
@@ -517,7 +524,8 @@
     });
 	var live20200707 = {
 		startTime: {{Msg "seo" "liveActiveStartTime"}},
-		endTime: {{Msg "seo" "liveActiveEndTime"}}
+		endTime: {{Msg "seo" "liveActiveEndTime"}},
+        activeDiscount: {{Msg "seo" "activeDiscount"}}
 	}
     try {
         var signature = {{.T.signature}};

+ 36 - 7
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -35,6 +35,18 @@
     .j-footer {
       display: none;
     }
+	.bill-origin-price {
+	  display: none;
+	  align-items: center;
+	  justify-content: flex-end;
+	  padding: 0 .32rem;
+	  color: #9B9CA3;
+	  margin-bottom: 0.2rem;
+	}
+	
+	.bill-origin-price .price-num {
+	  text-decoration: line-through;
+	}
 </style>
 <body style="visibility:hidden">
 	<div class="nothing" style="display:none;text-align: center;  padding-top: 2rem;">
@@ -122,7 +134,7 @@
                             <span class="productType value"></span>
                         </p>
                         <p class="l-item">
-                            <span class="label" id="price">订单金额:</span>
+                            <span class="label" id="price">实付金额:</span>
                             <span class="price value"></span><em class="qingdan valuationList" style="display:none">计费清单</em>
                         </p>
                     </div>
@@ -152,6 +164,13 @@
 					<span class="total-price"></span>
 				</div>
 			</div>
+			<div class="bill-origin-price">
+			    <span class="price-label">原价:</span>
+			    <div class="price-container">
+			        <span class="currency-type">&yen;</span>
+			        <span class="price-num">5.80</span>
+			    </div>
+			</div>
 		</div>
 	</div>
 </body>
@@ -200,6 +219,8 @@ try{
 	    });
     }
     $(".orderCode").text(orderCode);
+    var liveActiveStartTime = {{Msg "seo" "liveActiveStartTime"}};
+    var liveActiveEndTime = {{Msg "seo" "liveActiveEndTime"}};
     $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
       $("body").css("visibility","");
       if(r.success){
@@ -208,8 +229,8 @@ try{
 			$("#order_detail").hide();
 		}
         //下单时间
-        if(r.data.order.prepay_time) {
-        	$(".prepayTime").text(r.data.order.prepay_time.replace("-",".").replace("-","."));
+        if(r.data.order.create_time) {
+        	$(".prepayTime").text(r.data.order.create_time.replace("-",".").replace("-","."));
         }
         //产品类型
         if(r.data.order.product_type) $(".productType").text(r.data.order.product_type);
@@ -226,8 +247,10 @@ try{
 		if(!r.data.order.isLiveActive){
 			$(".origin-price-container").hide();
 		}else{
-			var originPrice = (r.data.order.original_price/100 / 0.6).toFixed(2);
+            var activeDiscount = {{Msg "seo" "activeDiscount"}};
+			var originPrice = (r.data.order.original_price/100 / parseFloat(activeDiscount)).toFixed(2);
 			$(".price-num").text(originPrice);
+            $(".bill-origin-price").css("display","flex")
 		}
 
         //订单条件
@@ -530,6 +553,12 @@ try{
           order_create_time = order_create_time.replace(/-/g, '/')
           var downtime  = r.data.order.order_countdown.split("h")[0]
           downtime = downtime*60*60*1000
+          var create_unix = new Date(order_create_time).getTime();
+          if (new Date().getTime() >= parseInt(liveActiveStartTime)*1000 && new Date().getTime() < parseInt(liveActiveEndTime)*1000){
+              if(parseInt(liveActiveEndTime)*1000 - create_unix < 72*60*60*1000){
+                  downtime = parseInt(liveActiveEndTime) * 1000 - create_unix;
+              }
+          }
           var t =setInterval(() => {
                 var nowtime = new Date()  //获取当前时间
                     endtime = new Date(order_create_time);  //定义结束时间
@@ -643,7 +672,7 @@ try{
       				"order_code":orderCode
       		    },
       		    success: function (data) {
-      		        appendList(data.list);
+      		        appendList(data.list,data.order_money);
       		    }
       		});
 
@@ -787,7 +816,7 @@ try{
 		}
 	}
 	var total_price=0;
-	function appendList(list){
+	function appendList(list,money){
 		var returnHtml = "";
 		for (var i = 0; i < list.length; i++) {
 			var showTime=""
@@ -883,7 +912,7 @@ try{
 
 			total_price+=(list[i].price) ;
 		}
-		$(".total-price").text("共计:¥"+total_price/100);
+		$(".total-price").text("共计:¥"+money/100);
 		$(".list-content").html(returnHtml);
 	}
 

+ 11 - 7
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -346,7 +346,8 @@
         });
 		var live20200707 = {
 			startTime: {{Msg "seo" "liveActiveStartTime"}},
-			endTime: {{Msg "seo" "liveActiveEndTime"}}
+			endTime: {{Msg "seo" "liveActiveEndTime"}},
+            activeDiscount: {{Msg "seo" "activeDiscount"}}
 		}
         //微信支付start
         {{if not .T.isTrial }}
@@ -601,16 +602,19 @@
                     //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
                     var showPrice = formatMoney(price);
 					var nowTime = new Date().getTime();
-					var startTime = {{Msg "seo" "liveActiveStartTime"}};
-					var endTime = {{Msg "seo" "liveActiveEndTime"}};
+					var startTime = live20200707.startTime;
+					var endTime = live20200707.endTime;
+                    var activeDiscount = parseFloat(live20200707.activeDiscount);
 					var startTimes = parseInt(startTime)* 1000;
 					var endTimes = parseInt(endTime)* 1000;
 					var buyCount = {{.T.buyCount}};
 					if (nowTime >= startTimes && nowTime < endTimes) {
-						$(".price-num").text(showPrice);
-						showPrice = formatMoney(parseFloat(price) * 0.6);
-						var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
-						$(".reduce-price").text(formatMoney(activePrice));
+                        if (flag !== 2) {
+                            $(".price-num").text(showPrice);
+                            var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
+                            $(".reduce-price").text(formatMoney(activePrice));
+                        }
+						showPrice = formatMoney(parseFloat(price) * activeDiscount);
 						$(".bought-num").text(buyCount);
 					}
                     if (flag === 1) {

+ 9 - 5
src/web/templates/weixin/vipsubscribe/vip_renew.html

@@ -338,7 +338,8 @@
     });
 	var live20200707 = {
 		startTime: {{Msg "seo" "liveActiveStartTime"}},
-		endTime: {{Msg "seo" "liveActiveEndTime"}}
+		endTime: {{Msg "seo" "liveActiveEndTime"}},
+        activeDiscount: {{Msg "seo" "activeDiscount"}}
 	}
     try {
         var signature = {{.T.signature}};
@@ -553,13 +554,16 @@
 			var nowTime = new Date().getTime();
 			var startTime = live20200707.startTime;
 			var endTime = live20200707.endTime;
+            var activeDiscount = parseFloat(live20200707.activeDiscount);
 			var startTimes = parseInt(startTime) * 1000;
 			var endTimes = parseInt(endTime) * 1000;
 			if (nowTime >= startTimes && nowTime < endTimes) {
-				$(".price-num").text(showPrice);
-				showPrice = formatMoney(parseFloat(price) * 0.6);
-				var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * 0.6);
-				$(".reduce-price").text(formatMoney(activePrice));
+                if (flag !== 2) {
+                    $(".price-num").text(showPrice);
+                    var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
+                    $(".reduce-price").text(formatMoney(activePrice));
+                }
+				showPrice = formatMoney(parseFloat(price) * activeDiscount);
 			}
             if (flag === 1) {
                 $('.billing-price').text(showPrice);