浏览代码

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

wangkaiyue 4 年之前
父节点
当前提交
6ce9e03ecb

+ 429 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_upgrade.css

@@ -0,0 +1,429 @@
+.no-touch {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.vip-upgrade {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  height: 100%;
+}
+
+.vip-upgrade .vip-body {
+  display: flex;
+  flex-direction: column;
+  flex: 1;
+  overflow-y: scroll;
+}
+
+.vip-upgrade .vip-body .body-item {
+  position: relative;
+  padding: 0.33rem 0.31rem;
+}
+
+.vip-upgrade .vip-body .body-item::after {
+  position: absolute;
+  content: '';
+  left: .32rem;
+  right: .32rem;
+  bottom: 0;
+  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+}
+
+.vip-upgrade .vip-body ul>.body-item:first-child {
+  border-top-left-radius: 8px;
+  border-top-right-radius: 8px;
+}
+
+.vip-upgrade .vip-body ul>.body-item:last-child::after {
+  content: none;
+}
+
+.vip-upgrade .vip-footer {
+  width: 100%;
+}
+
+.vip-body {
+  padding-bottom: 0.32rem;
+}
+
+.vip-body .vertical-center {
+  display: flex;
+  align-items: center;
+}
+
+.vip-body .body-item {
+  background-color: #fff;
+}
+
+.vip-body .body-item.area {
+  border-radius: 8px 8px 0 0;
+}
+
+.vip-body .body-item.select_cycle {
+  border-radius: 0 0 8px 8px;
+}
+
+.vip-body .body-item .item-container {
+  display: block;
+  width: 100%;
+}
+
+.vip-body .body-item .item,
+.vip-body .body-item .sub-item {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  color: #686868;
+  font-size: 0.32rem;
+}
+
+.vip-body .body-item .item .item-l,
+.vip-body .body-item .item .item-r,
+.vip-body .body-item .sub-item .item-l,
+.vip-body .body-item .sub-item .item-r {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  flex-wrap: nowrap;
+}
+
+.vip-body .body-item .text {
+  font-size: 0.24rem;
+}
+
+.vip-body .body-item .item .item-l {
+  font-size: 0.32rem;
+  color: #1d1d1d;
+}
+
+.vip-body .body-item .item .item-r {
+  font-size: 0.28rem;
+  width: 65%;
+}
+
+.vip-body .body-item .item .item-r .ellipsis {
+  display: none;
+}
+
+.vip-body .body-item .item .iconfont {
+  margin-left: 0.12rem;
+  color: #c2c2c2;
+  font-size: 0.24rem;
+}
+
+.vip-body .body-item .sub-item {
+  margin-top: 0.04rem;
+  justify-content: flex-start;
+}
+
+.vip-body .body-item .sub-item .sub-r {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.vip-body .body-item .sub-item .sub-r .tip {
+  display: none;
+  color: #fe737a;
+}
+
+.checkbox {
+  display: inline-block;
+  width: 0.36rem;
+  height: 0.36rem;
+  border: 1px solid #ddd;
+  border-radius: 50%;
+  margin-right: 0.2rem;
+  -webkit-appearance: none;
+  background: #fff;
+}
+
+.checkbox.checked {
+  border: 0;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACpElEQVRogc1asa2DMBBlhIyQMpKNxAiMwAiMwAhswAgZgQrOHSVwLhiBERghvwCSwMdgOzYG6aQUhLw7v3u+Z+J5Bq4g724U6pCUTeIznlGGHQHsKcOBAPbT544yntOiTSnUoYnf/Rm0X7YRAXxShgMFfCkH4zkBjE8HTos21QYtCJ/xzDpwAhgTwN4k8OWK4GBlRYK8u1HGc2vA/yfSPaC+GwFPoQ6tVn1vNQoMfgJPyiYxzXXl3ijbSA88YOwa/BzKfUEKDK4C/hOSe8cD6vv1wOOLMhykGvtUtVFPotunDmDsHORBCPth1PoLUmeDStvUKdrUObgxqinE9xRt+q/6TjarZWW79cZFGXaiVQjy7va+0S/byDX4LYUhZZOIvrPoBafKw7BbVFOW1ozn7pt3B/xe9ed4QH33KNSho+pXv4CngC9SNon0zVcDTwFHNTqb/wTwqcX5TQry3KNHmmswfMYzEXif8Uz5mQwHT1r/55MGC+AJ4FPruVIJrJwRhToUbjA74LeATxuoHvg5gSMJFf24bO9YAy+7AgTwuQVAirfrmeULvBHxYDhINTEpm0SYhGgMsQ1+LG4v3f17B09rCyqa2Y0fzzCeq8pXJUpiPB/F6jTwc1GVJ1GNQ6dp3lJSLqkEyjbSG+YYDrKnBA+o77a8xruQunK219yeN/aGNaM0j9NTAvpmXqA2VsHDSigMWMrFdDnt1vY8xtpSep4hUz+qTGXbIG1K+iWMvW7137x1Y27UQtBzHyqd6A80qi/00AsqXfKETuWFh0OjLwSv/KLjSkkcbZjXTYLhoA3eeRI6tBFd86h8Inhzr1m/L+v7xESZQ6m8XCJnARckoketca+paNGmVuiievllG032tKKjtezf1f36u43PeEYAY1PV/gMeU6lGAhyHxgAAAABJRU5ErkJggg==) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+.jy_icon {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+
+.jy_icon.decrease:before,
+.jy_icon.increase:before,
+.jy_icon.increase:after {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  content: "";
+  width: 0.4rem;
+  height: 0.04rem;
+  background-color: #686868;
+  transform: translate(-50%, -50%);
+}
+
+.jy_icon.increase:after {
+  transform: translate(-50%, -50%) rotate(90deg);
+}
+
+
+.js_dialog .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 4.8rem;
+  background: #fff;
+  z-index: 9999;
+}
+
+.js_dialog .box .box_hd {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  /* padding: 0 0.4rem; */
+  background: #f4f4f9;
+  /* border-bottom: 1px solid #eee; */
+}
+
+.js_dialog .box .box_hd h3 {
+  color: #1d1d1d;
+  font-size: 0.32rem;
+  font-weight: normal;
+}
+
+.js_dialog .box .box_hd .cancel {
+  color: #2cb7ca;
+  font-size: 0.32rem;
+}
+
+.js_dialog .box .box_bd .weui-cells:after {
+  border: 0;
+}
+
+.js_dialog .box .box_bd .weui-cells:before {
+  border: 0;
+}
+
+.js_dialog .box .box_bd .weui-cell:before {
+  border: 0;
+}
+
+.js_dialog .box .box_bd .choose-form {
+  margin: 0;
+}
+
+.js_dialog .box .box_bd .tips {
+  display: none;
+}
+
+.js_dialog .box .box_bd p {
+  font-size: 0.32rem;
+}
+
+.weui-cells_checkbox .weui-icon-checked:before {
+  font-size: 20px;
+}
+
+.js_dialog .box .box_bd .weui-check:checked+.weui-icon-checked:before {
+  color: #2cb7ca;
+}
+
+.js_dialog .form-btn {
+  display: flex;
+  align-items: center;
+}
+
+.js_dialog .form-btn .enter {
+  background: #2cb7ca;
+  color: #fff;
+}
+
+.js_dialog .form-btn .btn {
+  flex: 1;
+  height: 0.94rem;
+  line-height: 0.94rem;
+  text-align: center;
+  font-size: 0.36rem;
+}
+
+.time_cycle .box {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: auto;
+}
+
+.time_cycle .box .tips {
+  height: 0.64rem;
+  line-height: 0.64rem;
+  font-size: 0.26rem;
+  color: #fff;
+  background-color: #ffb901;
+  text-align: center;
+}
+
+.time_cycle .box_bd {
+  width: 100%;
+}
+
+.time_cycle .box_bd .monthly_label,
+.time_cycle .box_bd .yearly_label {
+  padding: 0;
+  display: flex;
+  align-items: center;
+  font-size: 13px;
+}
+
+.time_cycle .box_bd .computed_price {
+  padding: 0.4rem 0.36rem 0.24rem;
+  font-size: 0.4rem;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.time_cycle .box_bd .bd_select {
+  padding: 0.62rem 0.4rem 0.64rem;
+}
+
+.time_cycle .box_bd .bd_select .choose-form {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  box-sizing: border-box;
+}
+
+.time_cycle .box_bd .bd_select .choose-form .number_box {
+  margin-top: 0.3rem;
+}
+
+.time_cycle .box_bd .bd_select .choose-form:nth-child(2) {
+  padding-top: 0.56rem;
+}
+
+.time_cycle .number_box {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 0.8rem;
+  border: 1px solid #f5f4f9;
+  text-align: center;
+}
+
+.time_cycle .number_box.active {
+  color: #2cb7ca;
+}
+
+.time_cycle .number_box.active .jy_icon.decrease:before,
+.time_cycle .number_box.active .jy_icon.increase:before,
+.time_cycle .number_box.active .jy_icon.increase:after {
+  background-color: #2cb7ca;
+}
+
+.time_cycle .number_box button[disabled] {
+  opacity: 0.2;
+}
+
+.time_cycle .number_box .weui-btn_plain-default {
+  width: 1.6rem;
+  height: 100%;
+  line-height: normal;
+  border-color: transparent;
+  border-radius: 0;
+  background-color: #f5f4f9;
+}
+
+.time_cycle .number_box span.month_number {
+  flex: 1;
+  font-size: 0.4rem;
+}
+
+.time_cycle .number_box span.year_number {
+  width: 2rem;
+  height: 0.8rem;
+  line-height: 0.8rem;
+  background-color: #f5f4f9;
+  border: 1px solid #e0e0e0;
+}
+
+.time_cycle .number_box span.year_number.active {
+  color: #2ABED1 !important;
+  background-color: #E8FAFD;
+}
+
+.jy-toast .weui-toast {
+  font-size: 0.28rem;
+  padding: 0.2rem;
+  width: auto;
+  height: auto;
+  max-width: 6rem;
+  min-height: 0;
+  top: 50%;
+  left: 50%;
+  margin-left: 0;
+  margin-top: -0.47rem;
+  transform: translateX(-50%) translateY(-50%);
+}
+
+.jy-toast .weui-icon_toast {
+  display: none;
+}
+
+.jy-toast .weui-toast__content {
+  margin: 0;
+}
+
+.pay-mode {
+  margin-top: .3rem;
+}
+
+/* 2.10.9 直播优惠码新增 */
+.coupon-code-tx,
+.coupon-picker,
+.vip-bar {
+  display: none;
+}
+
+.live-20200707 .j-notice-bar,
+.live-20200707 .origin-price {
+  display: flex;
+}
+
+.live-20200707 .coupon-code-tx {
+  display: block;
+}
+
+.coupon-code-tx {
+  margin-top: .32rem;
+}
+
+.text-red {
+  color: #FB483D;
+}
+/* 专属权益 */
+.vip-upgrade .rights{
+  padding: 0 .32rem;
+}
+.vip-upgrade .rights-title{
+  padding: .36rem 0 .16rem;
+  display: flex;
+  align-items: center;
+  color: #171826;
+  line-height: .44rem;
+  font-size: .3rem;
+}
+.rights-title .title-line{
+  display: inline-block;
+  width: 3px;
+  height: .32rem;
+  border-radius: .22rem;
+  background-color: #2abed1;
+  margin-right: .16rem;
+}

+ 5 - 4
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -54,10 +54,10 @@ function getNewYearMarketing () {
 //         }
 //     }
 // });
-
 $(function () {
   var $dialog;
   /* vue 代码 start 提交订单 */
+  /* 
   var coupon = new Vue({ 
     el: '#coupon-vue',
     data: function () {
@@ -134,6 +134,7 @@ $(function () {
       }
     }
   })
+  */
   /* vue 代码 end */
 
   //项目匹配开关
@@ -570,7 +571,7 @@ $(function () {
                   onClick: function () {
                       // doSubmit();
                       $('.vip-footer .button-r.confirm').trigger('click')
-                      coupon.submitOrder()
+                      // coupon.submitOrder()
                   }
               },
           ]
@@ -943,7 +944,7 @@ $(function () {
               // 优惠提示
               $('.j-notice-bar.vip-bar').css("display", "flex")
           }
-          coupon.updatePrice(status[0])
+          // coupon.updatePrice(status[0])
       }
 
       if (reqData.isTrial) {//试用购买
@@ -965,7 +966,7 @@ $(function () {
           }
           initBack(4);
           $(".vip-footer.upgrade .confirm").text("立即购买");
-          coupon.$refs.couponRef.btnText = "立即购买"
+          // coupon.$refs.couponRef.btnText = "立即购买"
       } else if ((!status[1] && !status[2])) {//续费
           initBack(2);
       } else {//升级

+ 624 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_upgrade.js

@@ -0,0 +1,624 @@
+var purchase = {
+  areaSelect: {
+    "一个省": ["一个市"]
+  }, //已选择地区 {"一个省":["一个市"]}计算价格临时变量
+  industrySelect: ["一个行业"], // 已选择行业 一个行业(计算价格临时变量)
+  timeSelect: [1, 2], //已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
+  timeValue: "一个月",
+  endTime: "",
+  price: {}, //价格
+  nowBuyset: {},
+  timeCheckOk: false,
+  payWay: "wx_app",
+  initData: function () {
+    //已选择
+    try {
+      //即将到期 回显已购买
+      console.log(sessionStorage.getItem("pay_read_cache"))
+      if (!sessionStorage.getItem("pay_read_cache")) {
+        $DoPost("/subscribepay/vipsubscribe/getSubBuyMsg", {}, function (r) {
+          if (r.success) {
+            if (!$.isEmptyObject(r.data.area)) {
+              purchase.areaSelect = r.data.area
+            } else {
+              purchase.areaSelect = {
+                "全国": []
+              }
+            }
+            if (r.data.industry.length != 0) {
+              purchase.industrySelect = r.data.industry
+            } else {
+              purchase.industrySelect = ["全部行业"]
+            }
+            if (r.data.endTime) {
+              purchase.endTime = r.data.endTime;
+            }
+            sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+            sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+            sessionStorage.setItem("endTime", JSON.stringify(purchase.endTime))
+            sessionStorage.setItem("vipSub_read", true);
+          }
+        }, false)
+      } else {
+        sessionStorage.removeItem("pay_read_cache");
+        if (sessionStorage.getItem("vipSubSelectArea")) {
+          this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
+        }
+        if (sessionStorage.getItem("vipSubSelectIndustry")) {
+          this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
+        }
+        if (sessionStorage.getItem("endTime")) {
+          this.endTime = parseInt(sessionStorage.getItem("endTime"))
+        }
+      }
+      if (sessionStorage.getItem("vipSubSelectTime")) {
+        this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
+      }
+      if (sessionStorage.liveActiveCode_renew === "jianyu360") {
+        $('.coupon-code-tx .keywords-text').text("支付成功赠送30天订阅周期");
+        $('.coupon-picker .weui-input').val("jianyu360");
+        $('.coupon-code-tx').off('click');
+      }
+      //加载价格
+      $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
+        if (r) {
+          purchase.price = r;
+          purchase.can1111 = r.isActiving && r.isWritten === 0
+          if (purchase.can1111) {
+            if (!sessionStorage.getItem("vipSubSelectTime")) {
+              purchase.timeValue = "1年";
+              purchase.timeSelect_tmp = [1, 1]
+              purchase.timeSelect = purchase.timeSelect_tmp;
+              purchase.showTime();
+              purchase.flushPrice(purchase.timeSelect, 1);
+              sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+            }
+            showGiveStatus(true)
+          } else {
+            //showGiveStatus(false)
+          }
+        }
+      }, false)
+
+    } catch (e) {
+      console.log(e)
+    }
+    this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect, this.price);
+
+    if (sessionStorage.getItem("payWay")) {
+      if (sessionStorage.getItem("payWay").indexOf("ali") > -1) {
+        this.payWay = "ali_app";
+        $("#zfb").prop("checked", true);
+        $(".pay-mode-text").text("支付宝支付");
+      }
+    }
+  },
+  showArea: function () {
+    if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["一个省"]) { //有选择
+      if (this.nowBuyset.areacount === -1) {
+        $(".selected-area").text("全国");
+      } else {
+        var tipTxt = "";
+        if (this.nowBuyset.areacount > 0) tipTxt += this.nowBuyset.areacount + " 个省";
+        var count = 0;
+        this.nowBuyset.citys.forEach(function (item, index) {
+          count += item;
+        });
+        if (count > 0) {
+          if (this.nowBuyset.areacount > 0) tipTxt += "、";
+          tipTxt += count + " 个市";
+          if (this.nowBuyset.citys.length > 1) tipTxt += "(分布在" + this.nowBuyset.citys.length + "个省内)"
+        }
+        $(".selected-area").text(tipTxt);
+      }
+    } else {
+      $(".selected-area").text("");
+    }
+  },
+  showPrice: function () {
+    $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
+    $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
+    $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
+    $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
+    $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
+    $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
+
+    $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
+    $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
+    $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
+    $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
+    $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
+    $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
+  },
+  showIndustry: function () {
+    if (this.industrySelect.length > 0 && this.industrySelect[0] !== "一个行业") { //选择有行业信息
+      if (this.nowBuyset.buyerclasscount === -1) {
+        $(".selected-industry-count").text("全部行业");
+      } else {
+        var tipTxt = "";
+        $(".selected-industry-count").text(tipTxt + this.nowBuyset.buyerclasscount + " 个行业");
+      }
+    } else {
+      $(".selected-industry-count").text("");
+    }
+  },
+  showTime: function () {
+    var tmp = this.timeSelect[0];
+    if (this.timeSelect[1] === 1) {
+      tmp += "年";
+      $("#yearly").prop('checked', true);
+      //$('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').trigger("click");
+      $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active")
+      //$(".number_box:eq(1)").addClass("active");
+    } else {
+      tmp += "个月";
+      $("#monthly").prop('checked', true);
+      $(".number_box:eq(0)").addClass("active");
+      $("#number_box_month .month_number").text(this.timeSelect[0]);
+      //if (this.timeSelect[0] >= 10) {
+      //    $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
+      //}
+      if (this.timeSelect[0] === 1) {
+        $('#number_box_month button:eq(0)').attr("disabled", "disabled");
+      } else {
+        $('#number_box_month button:eq(0)').removeAttr("disabled");
+      }
+    }
+    this.timeValue = tmp;
+  },
+  flushPrice: function (time, flag) {
+    //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
+    var times = [time[0], time[1]];
+    var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
+    var givePrice = getsubVipOrderPriceBybuyset(this.nowBuyset, [time[1] === 1 ? 1 : time[0], time[1]]);
+
+    var showPrice = formatMoney(price);
+    if (flag === 1) {
+      $('.billing-price').text(showPrice);
+      $('.origin-price .price-num').text(formatMoney(price + givePrice));
+      // 优惠明细
+      $('.discount-price .dis-price').text(formatMoney(givePrice))
+      $('.now-price .dis-price').text(formatMoney(price));
+
+    } else if (flag === 2) {
+      $('.computed_price').html(showPrice);
+    } else {
+      $('.billing-price').text(showPrice);
+      $('.origin-price .price-num').text(formatMoney(price + givePrice));
+      // 优惠明细
+      $('.discount-price .dis-price').text(formatMoney(givePrice))
+      $('.now-price .dis-price').text(formatMoney(price));
+      $('.computed_price').html(showPrice);
+    }
+    this.flushSelectTime(times, flag === undefined ? 1 : flag);
+    coupon.updatePrice(price)
+  },
+  flushSelectTime (thisValue, flag) {
+    if (this.endTime) {
+      var time1 = new Date(this.endTime * 1000).pattern('yyyy年MM月dd日');
+      var end = getVipEndDate(thisValue[1], thisValue[0], this.endTime);
+      var time2 = new Date(end * 1000).pattern('yyyy年MM月dd日');
+
+      if (flag === 1) {
+        $(".select_cycle .month").text(this.timeValue);
+        var giveTime = this.timeValue
+        if (this.timeValue.indexOf('年') !== -1) {
+          giveTime = '1年'
+        }
+        $(".select_cycle #giveTime").text(giveTime);
+        $(".select_cycle .duration").text(time1 + "-" + time2);
+        $(".select_cycle .duration").show();
+        // @NewYearMarketing 2021/1/25
+        // checkMonth(giveTime)
+      }
+
+      //是否超过三年
+      var now = Math.floor(new Date().getTime() / 1000);
+      var MaxEnd = getVipEndDate(1, 3, now);
+      if (!purchase.can1111 && end > MaxEnd) {
+        var timeShow = getDateSub(now, this.endTime);
+        var showTipText = "<div style='white-space: nowrap;'>最长订阅周期不可超过3年</div>剩余周期:";
+        if (timeShow[0] !== 0) {
+          showTipText += timeShow[0] + "年"
+        }
+        if (timeShow[1] !== 0) {
+          showTipText += timeShow[1] + "个月"
+        }
+        weui.toast(showTipText, {
+          duration: 3000,
+          className: 'jy-toast',
+        });
+        if (flag === 1) this.timeCheckOk = false;
+        if (flag === 2) $("#enter_period").prop("disabled", true);
+      } else {
+        if (flag === 1) this.timeCheckOk = true;
+        if (flag === 2) $("#enter_period").prop("disabled", false);
+      }
+      this.flushSubmit();
+    } else {
+      $(".select_cycle .duration").hide();
+    }
+  },
+  showTip () { //是否展示即将到期
+    var timeSub = this.endTime * 1000 - new Date().getTime();
+    if (timeSub > 0 && timeSub < 60 * 60 * 24 * 1000 * 3) {
+      $(".vip-header").show();
+    }
+  },
+  flushSubmit () { //是否可提交
+    if (this.timeCheckOk && sessionStorage.getItem("vipSub_read") === "true") {
+      $('.vip-footer.renew .confirm').prop('disabled', false)
+      coupon.checkboxStatus = true
+      coupon.$refs.couponRef.submitStatus = false
+    } else {
+      $('.vip-footer.renew .confirm').prop('disabled', true)
+      coupon.$refs.couponRef.submitStatus = true
+    }
+  }
+};
+
+
+$(function () {
+  purchase.initData();
+  purchase.showArea();
+  purchase.showIndustry();
+  purchase.showPrice();
+  purchase.showTime();
+  purchase.showTip();
+  purchase.flushPrice(purchase.timeSelect);
+  purchase.flushSubmit();
+  var time_limit; //定义一个周期变量
+  /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
+  $('.weui-mask').click(hideDialog);
+  $('.cancel').click(hideDialog);
+
+  /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
+  // 选择订阅周期
+  $('.select_cycle a').click(function (e) {
+    $('#time_cycle').show(200);
+  });
+
+
+  /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
+  $('.vip-body .pay-mode').on('click', function () {
+    pickerShow('#pay_way', true)
+  });
+
+  $('#pay_way input:radio[name="way"]').click(function () {
+    var checkValue = $('input:radio[name="way"]:checked').val();
+    pickerShow('#pay_way', false)
+    $('.vip-body .pay-mode .pay-mode-text').text(checkValue);
+    if (checkValue === "微信支付") {
+      purchase.payWay = "wx_app"
+    } else {
+      purchase.payWay = "ali_app"
+    }
+    sessionStorage.setItem("payWay", purchase.payWay);
+  });
+
+
+  // 对订阅时间选择的input绑定点击事件
+  $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+    // 解除确认按钮的锁定
+    if ($(e.target).hasClass('monthly') !== $('#number_box_month').hasClass('active')) {
+      $('#time_cycle .form-btn button').removeAttr('disabled');
+    }
+    if ($(e.target).hasClass('monthly')) {
+      // 按月订阅
+      $('#number_box_month').addClass('active');
+      $('#number_box_year span').removeClass('active');
+    } else {
+      // 按年订阅
+      $('#number_box_month').removeClass('active');
+      // $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active');
+    }
+  });
+
+  /* --------控制月份number_box的事件  点击加减号触发的事件------- */
+  $('#number_box_month').on('click', 'button', function (e) {
+    // 点击加减号让input radio选中
+    $('#monthly').prop('checked', true);
+    $('#yearly').prop('checked', false);
+    $('.number_box span').removeClass('active');
+    $('#number_box_month').addClass('active');
+
+    var $number = $('#number_box_month span.month_number');
+    var $monthlyInput = $('#monthly');
+    // 未整理的data数组,里面的值都是字符串
+    var preData = e.delegateTarget.dataset;
+    var currentNum = parseInt($number.text());
+    var data = {};
+    // 把字符串转换成数字
+    for (var i in preData) {
+      data[i] = preData[i] - 0
+    }
+
+    if (!$monthlyInput.prop('checked')) {
+      return
+    }
+    // 判断是点击的是+ 还是-
+    if ($(e.target).hasClass('add') || $(e.currentTarget).hasClass('add')) {
+      if (currentNum == 11) { //12个月自动跳转1年
+        $("#number_box_year .year_number:eq(0)").trigger("click");
+        return
+      }
+      // 点的+
+      currentNum = currentNum >= data.numboxMax ? data.numboxMax : (currentNum + data
+        .numboxStep);
+    } else {
+      // 点的-
+      currentNum = currentNum <= data.numboxMin ? data.numboxMin : (currentNum - data
+        .numboxStep);
+    }
+    $number.text(currentNum);
+    purchase.timeSelect_tmp = [Number(currentNum), 2];
+    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+    //var price = (5.8 * currentNum).toFixed(1);
+    //$('.computed_price').html('¥' + price)
+    var firstButton = $('#number_box_month button:first');
+    var lastButton = $('#number_box_month button:last');
+    /*if (currentNum >= 10) {
+        $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
+    } else {
+        $('.profit_tips').hide();
+    }*/
+    // 如果为操作后的结果为1,则锁定减号按钮
+    if (currentNum === data.numboxMin) {
+      firstButton.attr('disabled', true)
+    } else {
+      firstButton.removeAttr('disabled')
+    }
+    // 如果为操作后的结果为12,则锁定加号按钮
+    if (currentNum === data.numboxMax) {
+      lastButton.attr('disabled', true)
+    } else {
+      lastButton.removeAttr('disabled')
+    }
+  });
+
+  /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
+  $('#number_box_year').on('click', 'span', function (e) {
+    // console.log(e.target.dataset.id);
+    $('#number_box_month').removeClass('active');
+    var id = e.target.dataset.id;
+    //$('.profit_tips').hide();
+    $(this).addClass('active').siblings().removeClass('active');
+    $('#yearly').prop('checked', true);
+    $("#monthly").prop('checked', false);
+
+    // 渲染结果 保留一位小数
+    //var result = (Number(id) * 58).toFixed(1);
+    //$('.computed_price').html('¥' + result)
+    purchase.timeSelect_tmp = [Number(id), 1];
+    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+  });
+
+  /* -------- 选择按月订阅  radio触发的事件------- */
+  $('#monthly').on('change', function (e) {
+    var isChecked = $(this).is(':checked');
+    var val = $('.month_number').text();
+    /*if (val >= 10) {
+        $('.profit_tips').show()
+    }*/
+    if (!isChecked) {
+      $('#number_box_month button').attr('disabled', true)
+    }
+    //var result = (Number(val) * 5.8).toFixed(1);
+    //$('.computed_price').html('¥' + result);
+    purchase.timeSelect_tmp = [Number(val), 2];
+    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+  });
+  //计价清单
+  $('.billing-list-btn').on('click', function () {
+    pickerShow('.billing-list-container', true)
+  })
+  // 计算标准隐藏
+  $('.billing-list-container .dialog_hd__close').on('click', function () {
+    pickerShow('.billing-list-container', false)
+  })
+
+  $('.checkbox').on('click', function () {
+    $(this).toggleClass('checked')
+    var state = $(this).hasClass('checked');
+    sessionStorage.setItem("vipSub_read", state);
+    purchase.flushSubmit();
+    //$('.vip-footer.renew .confirm').prop('disabled', !state)
+  });
+  //是否点击已读
+  if (sessionStorage.getItem("vipSub_read") === "true") {
+    $('.checkbox').addClass("checked");
+  }
+
+  /* -------- 选择按年订阅  radio触发的事件------- */
+  $('#yearly').on('change', function (e) {
+    //$('.profit_tips').hide();
+    // console.log($(this).is(':checked'))
+    var isChecked = $(this).is(':checked');
+    // 按年订阅默认选择1年
+    var val = 1;
+    //$('.computed_price').html('¥' + Number(val) * 58)
+    if (isChecked) {
+      $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
+    }
+    purchase.timeSelect_tmp = [Number(val), 1];
+    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+    purchase.flushSelectTime(purchase.timeSelect_tmp, 2);
+  });
+
+  // 确认订阅周期
+  $('#enter_period').on('click', function () {
+    var val;
+    var selectedDOM = $('#time_cycle input[name=time]:checked');
+    if (selectedDOM.val() === 'year') {
+      val = $('#number_box_year .year_number.active').attr('data-id');
+      purchase.timeSelect_tmp = [parseInt(val), 1];
+      $('#time_cycle').hide(function () {
+        purchase.timeValue = val + "年";
+      });
+    } else if (selectedDOM.val() === 'month') {
+      val = $('#number_box_month .month_number').text();
+      purchase.timeSelect_tmp = [parseInt(val), 2];
+      $('#time_cycle').hide(function () {
+        purchase.timeValue = val + "个月";
+      });
+    }
+    purchase.timeSelect = purchase.timeSelect_tmp;
+    purchase.showTime();
+    purchase.flushPrice(purchase.timeSelect, 1);
+    sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+  });
+  $('.vip-footer.renew .confirm').click(function () {
+    $('.vip-footer.renew .confirm').attr("disabled", "disabled");
+    //支付请求
+    var area = purchase.areaSelect;
+    var industry = purchase.industrySelect;
+    if (area["全国"]) {
+      area = {};
+    }
+    if (industry.length === 1 && industry[0] === "全部行业") {
+      industry = [];
+    }
+    //优惠码
+    /*var activeCode = $('.coupon-picker .weui-input').val();
+    var activeCodes = "";
+    if (activeCode.toLowerCase() === couponInfo.code && $('.coupon-code-tx .keywords-text').text() === couponInfo.successTip){
+        activeCodes = couponInfo.code;
+    }*/
+    //付费用户
+    var param = {
+      "userLotteryId": coupon.$refs.couponRef.coupon.userLotteryId,
+      "lotteryId": coupon.$refs.couponRef.coupon.lotteryId,
+      "area": JSON.stringify(area),
+      "industry": industry.join(","),
+      "time": purchase.timeValue.trim(),
+      "orderType": 5,
+      "disWord": GetQueryString("disWord"),
+    };
+    $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
+      if (r.success) {
+        try {
+          clearSessionStorage()
+          history.replaceState({}, '', '/jyapp/vipsubscribe/toOrderDetailPage?orderCode=' + r.data.code);
+          window.location.href = "/jyapp/pay/checkout_subvip?orderCode=" + r.data.code + "&t=1&from=buy"
+        } catch (e) {
+          showToast(e)
+        }
+      }
+    }, false);
+    $('.vip-footer.renew .confirm').removeAttr("disabled");
+  })
+
+});
+
+//获取url中"?"符后的字符串并正则匹配
+function GetQueryString (name) {
+  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+  var r = window.location.search.substr(1).match(reg);
+  var context = "";
+  if (r != null)
+    context = r[2];
+  reg = null;
+  r = null;
+  return context == null || context == "" || context == "undefined" ? "" : context;
+}
+// 隐藏dialog选择框
+function hideDialog () {
+  $('#pay_way').hide(200);
+  $('#time_cycle').hide(200);
+  $('.discount-details').hide()
+  $('.discount-button .icon-arrow').removeClass('up')
+}
+
+function clearSessionStorage () {
+  sessionStorage.removeItem("vipSubSelectArea");
+  sessionStorage.removeItem("vipSubSelectIndustry");
+  sessionStorage.removeItem("vipSubSelectTime");
+  sessionStorage.removeItem("vipSub_read");
+  sessionStorage.removeItem("historypushDataCache");
+  sessionStorage.removeItem("endTime");
+  sessionStorage.removeItem("payWay");
+  sessionStorage.To_introducePage = 2;
+  //订阅首页
+  sessionStorage.removeItem("sub_vip_state");
+  sessionStorage.removeItem("vip_index_read");
+  sessionStorage.removeItem("vip_change_time");
+
+  sessionStorage.removeItem("pay_read_cache")
+  sessionStorage.removeItem("liveActiveCode_renew");
+  sessionStorage.removeItem("liveActiveCode_new");
+}
+
+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);
+  }
+}
+/* vue 代码 start */
+var coupon = new Vue({
+  el: '#coupon-vue',
+  data: function () {
+    return {
+      type: 'vip',
+      initPrice: 0, // 原价
+      realPrice: 0, // 实付价
+      checkboxStatus: false, // checkbox状态
+      submitStatus: true,  // 提交按钮状态
+      links: [
+        {
+          text: '《剑鱼标讯线上购买与服务条款》',
+          url: '',
+          event: this.readEvent
+        }
+      ],
+      buttons: {
+        submit: this.submitOrder
+      },
+    }
+  },
+  mounted () {
+    this.init()
+  },
+  methods: {
+    // 更新价格相关
+    updatePrice: function (before) {
+      console.log('原价:' + before)
+      this.initPrice = before;
+      // 调用子组件查询最优卡券
+      this.$refs.couponRef.getCoupon();
+    },
+    // 初始化及回显相关
+    init: function () { },
+    // 勾选阅读协议
+    updateS: function (data) {
+      data.callback(this.checkSubmitStatus(data.check))
+    },
+    // 校验checkbox
+    checkSubmitStatus: function (checkStatus) {
+      sessionStorage.setItem("vipSub_read", checkStatus);
+      purchase.flushSubmit();
+      return purchase.timeCheckOk && sessionStorage.getItem("vipSub_read") === "true"
+    },
+    saveEvent: function () {
+      sessionStorage.setItem("pay_read_cache", "0");
+    },
+    // 阅读协议点击事件
+    readEvent: function () {
+      toRead()
+    },
+    // 订单提交事件
+    submitOrder: function () {
+      this.$refs.couponRef.submitStatus = true
+      $('.vip-footer.renew .confirm').trigger('click')
+      this.$refs.couponRef.submitStatus = false
+    }
+  }
+})
+/* vue 代码 end */

+ 190 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_UpgradePage.html

@@ -0,0 +1,190 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>超级订阅升级</title>
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/rem.js'></script>
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.css' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/public_.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/css/vip_upgrade.css?v={{Msg "seo" "version"}}'>
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/css/pay-order-template.css?v={{Msg "seo" "version"}}' />
+  <style>
+    .vip-header {
+      display: none;
+      padding: .26rem .3rem;
+      font-size: .26rem;
+      color: #FE737A;
+    }
+    .weui-toast {
+      z-index: 999999;
+    }
+    button[disabled] {
+      opacity: .5;
+    }
+  </style>
+</head>
+
+<body class="no-touch" data-weui-theme="light">
+  <div class="app-layout-header jy-app-header" style="z-index: 8;">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    超级订阅升级
+    <span></span>
+  </div>
+  <div class="app-layout-content-b">
+    <div class="vip-upgrade live-20200707">
+      <!-- <div class="vip-header">
+        <span class="header-left">提示:</span>
+        <span class="header-right">您的超级订阅服务即将到期,为不影响您的使用。请立即续费</span>
+      </div> -->
+      <div class="vip-body">
+        <ul style="padding: .16rem .24rem;">
+          <li class="body-item area">
+            <a class="item-container" href="/jyapp/vipsubscribe/toChooseArea">
+              <div class="item">
+                <span class="item-l">
+                  <span class="item-label">省份数量</span>
+                </span>
+                <span class="item-r">
+                  <span class="selected-area-name ellipsis"></span>
+                  <span class="iconfont icon-arrow"></span>
+                </span>
+              </div>
+              <div>
+                <span>已选择</span>
+                <span class="text selected-area"></span>
+              </div>
+            </a>
+          </li>
+          <li class="body-item select_cycle">
+            <a class="item-container" href="javascript:;">
+              <div class="item">
+                <span class="item-l">
+                  <span class="item-label">订阅周期</span>
+                </span>
+                <span class="item-r">
+                  <span class="buy-cycle text ellipsis">6个月</span>
+                  <span class="iconfont icon-arrow"></span>
+                </span>
+              </div>
+              <div class="sub-item text">
+                <span class="sub-l" style="white-space:nowrap;">有效日期:</span>
+                <span class="sub-r ellipsis">
+                  <span class="ellipsis">
+                    (<span class="month">3个月</span>)<span class="duration"></span>
+                  </span>
+                </span>
+              </div>
+            </a>
+          </li>
+        </ul>
+        <!-- 超级订阅专属权益 -->
+        <div class="rights">
+          <div class="rights-title">
+            <span class="title-line"></span>
+            <span>超级订阅专属权益</span>
+          </div>
+        </div>
+      </div>
+      <!-- vue组件 -->
+      <div class="vip-footer" id="coupon-vue">
+        <pay-order-template ref="couponRef" :config="$data" @update="updateS" @save="saveEvent"></pay-order-template>
+      </div>
+    </div>
+  </div>
+  <!-- 选择订阅周期picker -->
+  <div class="js_dialog time_cycle p13" id="time_cycle" style="display: none;">
+    <div class="weui-mask"></div>
+    <div class="box">
+      <div class="box_hd">
+        <h3>订阅周期</h3>
+        <div class="cancel">
+          <span class="j-icon icon-del-grey"></span>
+        </div>
+      </div>
+      <div class="box_bd">
+        <div class="computed">
+          <span class="computed_mon">¥</span>
+          <div class="computed_price"></div>
+        </div>
+        <div class="bd_select">
+          <div class="weui-cells weui-cells_checkbox choose-form">
+            <label class="weui-cell weui-check__label monthly_label" for="monthly">
+              <div class="weui-cell__hd">
+                <input type="radio" class="weui-check monthly" name="time" value="month" id="monthly" checked />
+                <i class="weui-icon-checked"></i>
+              </div>
+              <div class="weui-cell__bd">
+                <p>按月订阅</p>
+              </div>
+            </label>
+            <div class="number_box active" id="number_box_month" data-numbox-step="1" data-numbox-min="1" data-numbox-max="12">
+              <button class="weui-btn weui-btn_plain-default" type="button" disabled>
+                <div class="jy_icon decrease"></div>
+              </button>
+              <span class="month_number">1</span>
+              <button class="weui-btn weui-btn_plain-default add" type="button">
+                <div class="jy_icon increase"></div>
+              </button>
+            </div>
+          </div>
+          <div class="weui-cells weui-cells_checkbox choose-form">
+            <label class="weui-cell weui-check__label yearly_label" for="yearly">
+              <div class="weui-cell__hd">
+                <input type="radio" class="weui-check yearly" name="time" value="year" id="yearly"/>
+                <i class="weui-icon-checked"></i>
+              </div>
+              <div class="weui-cell__bd">
+                <p>按年订阅</p>
+              </div>
+            </label>
+            <div class="number_box" id="number_box_year" style="border: 0;">
+              <span class="year_number j-button-select" data-id="1">1年</span>
+              <span class="year_number j-button-select" data-id="2">2年</span>
+              <span class="year_number j-button-select" data-id="3">3年</span>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="form-btn j-footer">
+        <button class="btn enter j-button" id="enter_period">确认</button>
+      </div>
+    </div>
+  </div>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/jquery.min.js'></script>
+  <!--<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}'></script>
+  {{include "/common/iosJS.html"}}
+  <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script> 
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/pay-order-template.js?v={{Msg "seo" "version"}}'>
+  </script>
+  <script>
+    $(window).bind("pageshow", function (event) {
+      if (event.originalEvent.persisted) {
+        window.location.reload();
+      }
+    });
+
+    function toRead() {
+      sessionStorage.setItem("pay_read_cache", "0");
+      window.location.href = "/jyapp/front/staticPage/wx-serviceterms.html";
+    }
+  </script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_upgrade.js?v={{Msg "seo" "version"}}'>
+  </script>
+  {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 242 - 223
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -3,8 +3,7 @@
 
 <head>
   <meta charset="UTF-8">
-  <meta name="viewport"
-    content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>超级订阅</title>
   <meta name="apple-mobile-web-app-capable" content="yes">
@@ -24,7 +23,7 @@
   <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" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/css/pay-order-template.css?v={{Msg "seo" "version"}}' />
+  <!-- <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/css/pay-order-template.css?v={{Msg "seo" "version"}}' /> -->
   <style>
     .jy-switch:before {
       background-color: #fbfbfb;
@@ -67,32 +66,50 @@
     .item-label-other {
       width: 4rem;
     }
-  .app-layout-header {
+
+    .app-layout-header {
       z-index: 999;
-  }
-    .custom-header{
+    }
+
+    .custom-header {
       background: url('image/vip-index-bg.png') no-repeat;
       background-size: cover;
       border: 0;
     }
-    .sub-info{
-        min-height: 4.5rem;
+
+    .sub-info {
+      min-height: 4.5rem;
+    }
+
+    .banner-ad-box {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      justify-content: space-between;
+      background: rgba(251, 72, 61, 0.88);
+      border-radius: 8px;
+      margin: 0.24rem .24rem;
+      padding: 0.16rem 0.32rem;
+      color: #fff;
+      font-size: 0.26rem;
+    }
+
+    .banner-ad-box .iconfont.icon-arrow {
+      color: #fff;
+    }
+
+    .update-tips {
+      padding: .14rem .32rem;
+      background: #fff4e8;
+      color: #ff9f40;
+      font-size: .26rem;
+      text-align: center;
+    }
+
+    .j-button-confirm {
+      flex: none;
+      border-radius: 0.08rem;
     }
-      .banner-ad-box {
-          display: flex;
-          flex-direction: row;
-          align-items: center;
-          justify-content: space-between;
-          background: rgba(251, 72, 61, 0.88);
-          border-radius: 8px;
-          margin: 0.24rem .24rem;
-          padding: 0.16rem 0.32rem;
-          color: #fff;
-          font-size: 0.26rem;
-      }
-      .banner-ad-box .iconfont.icon-arrow {
-          color: #fff;
-      }
   </style>
 </head>
 
@@ -101,32 +118,32 @@
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou" style="color: #fff;"></span>
     <div class="custom-header-title">
       <span class="title-text"><em class="title-vip-logo"></em>超级订阅</span>
-      <span class="title-tip" style="display: none;">试用7天</span>
+      <!-- <span class="title-tip" style="display: none;">试用7天</span> -->
     </div>
-    <a href="/jyapp/vipsubscribe/vipsubscribe_renew" class="custom-header-right go_renew" style="display: none;">续费</a>
-    <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="custom-header-right go_buy" style="display: none;">去购买</a>
+    <!-- <a href="/jyapp/vipsubscribe/vipsubscribe_renew" class="custom-header-right go_renew" style="display: none;">续费</a> -->
+    <!-- <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="custom-header-right go_buy" style="display: none;">去购买</a> -->
   </div>
   <!-- 匹配方式 -->
   <div class="match-keywords-actionsheet">
-      <div class="weui-mask" id="iosMask" style="opacity: 1;display: none;"></div>
-      <div class="weui-actionsheet" id="iosActionsheet">
-          <div class="weui-actionsheet__title">
-              <p class="weui-actionsheet__title-text">关键词匹配方式</p>
-              <i class="weui-icon-clear" id="iosActionsheetCancel" ></i>
-          </div>
-          <div class="weui-actionsheet__menu">
-              <div class="weui-actionsheet__cell">
-                <p class="cell_title">按标题匹配</p>
-              </div>
-              <div class="weui-actionsheet__cell">
-                  <p class="cell_title">按全文匹配</p>
-                  <p class="small-title">会产生无效信息,请根据需要选择</p>
-              </div>
-          </div>
-  <!-- <div class="weui-actionsheet__action">
-      <div class="weui-actionsheet__cell" id="iosActionsheetCancel">取消</div>
-      </div> -->
+    <div class="weui-mask" id="iosMask" style="opacity: 1;display: none;"></div>
+    <div class="weui-actionsheet" id="iosActionsheet">
+      <div class="weui-actionsheet__title">
+        <p class="weui-actionsheet__title-text">关键词匹配方式</p>
+        <i class="weui-icon-clear" id="iosActionsheetCancel"></i>
       </div>
+      <div class="weui-actionsheet__menu">
+        <div class="weui-actionsheet__cell">
+          <p class="cell_title">按标题匹配</p>
+        </div>
+        <div class="weui-actionsheet__cell">
+          <p class="cell_title">按全文匹配</p>
+          <p class="small-title">会产生无效信息,请根据需要选择</p>
+        </div>
+      </div>
+      <!-- <div class="weui-actionsheet__action">
+    <div class="weui-actionsheet__cell" id="iosActionsheetCancel">取消</div>
+    </div> -->
+    </div>
   </div>
   <div class="app-layout-content-b">
     {{if not .T.isLiveActive}}
@@ -135,18 +152,18 @@
       <div class="vip-upgrade live-20200707">
         {{end}}
         <ul class="vip-body">
-
           <li class="sub-box">
-           <a data-href="/jyapp/vipsubscribe/introducePage?type=renew" class="banner-ad-box update" style="display: none">
-               <span>限时续费,3个月起,续多久送多久!</span>
-           </a>
-              <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="banner-ad-box trial" style="display: none">
-                  <span>限时购买,3个月起,买多久送多久!</span>
-                  <div>
-                      <span>去抢</span>
-                      <i class="iconfont icon-arrow"></i>
-                  </div>
-              </a>
+            <a data-href="/jyapp/vipsubscribe/introducePage?type=renew" class="banner-ad-box update"
+              style="display: none">
+              <span>限时续费,3个月起,续多久送多久!</span>
+            </a>
+            <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="banner-ad-box trial" style="display: none">
+              <span>限时购买,3个月起,买多久送多久!</span>
+              <div>
+                <span>去抢</span>
+                <i class="iconfont icon-arrow"></i>
+              </div>
+            </a>
             <ul class="sub-info">
               <li class="area">
                 <a class="item-container" href="/jyapp/vipsubscribe/toChangeArea">
@@ -311,18 +328,18 @@
               </div>
             </a>
           </li>
-        <li class="body-item" id="giveTimeBox" style="display: none;margin-top: 0.16rem;">
+          <li class="body-item" id="giveTimeBox" style="display: none;margin-top: 0.16rem;">
             <div class="item-container" href="javascript:;">
-                <div class="item">
-                    <span class="item-l">
-                      <span class="item-label">赠送周期</span>
-                    </span>
-                    <span class="item-r">
-                      <span class="keywords-text ellipsis" id="giveTimeText"></span>
-                    </span>
-                </div>
+              <div class="item">
+                <span class="item-l">
+                  <span class="item-label">赠送周期</span>
+                </span>
+                <span class="item-r">
+                  <span class="keywords-text ellipsis" id="giveTimeText"></span>
+                </span>
+              </div>
             </div>
-        </li>
+          </li>
           <li class="body-item coupon-code-tx" style="display: none">
             <a class="item-container" href="javascript:;">
               <div class="item">
@@ -337,7 +354,8 @@
             </a>
           </li>
         </ul>
-        <div class="vip-header">
+        <!-- 到期提醒  超级订阅新套餐将试用下架、续费入口调整(更改于2021/5/19)-->
+        <!-- <div class="vip-header">
           <div class="header-renew trail" style="display: none">
             <div class="renew-l">
               <div class="vip-logo"></div>
@@ -345,25 +363,25 @@
             </div>
             <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="renew-r">去购买</a>
           </div>
-          <!-- <div class="header-renew renew" style="display: none">
-            <div class="renew-l">
-              <div class="vip-logo"></div>
-              <div class="vip-text">超级订阅服务</div>
-            </div>
-            <a href="/jyapp/vipsubscribe/vipsubscribe_renew" class="renew-r">续费</a>
-          </div> -->
-          <!-- 到期提醒 -->
           <div class="expire-remind" style="display: none">
             <i class="j-icon icon-chahao red close-expire-remind"></i>
             <span class="remind-text">超级订阅服务试用即将过期,请及时购买!</span>
             <a class="remind-link" href="/jyapp/vipsubscribe/vipsubscribe_new">去购买</a>
           </div>
-        </div>
+        </div> -->
         <!-- 升级 -->
+        <div class="update_renew">
+          <div class="update-tips">因系统升级,已购买用户可选择原套餐续费,或升级到新版本享受更多权益。</div>
+          <div class="footer-button-group j-button-group">
+            <button class="j-button-confirm" data-bind-renew>续费</button>
+            <button class="j-button-confirm" data-bind-update>升级</button>
+          </div>
+        </div>
         <!-- vue组件 -->
-        <div class="vip-footer upgrade" id="coupon-vue">
+        <!-- 新版超级订阅移除在这个页面的升级计价  跳转到升级页面 (更改于2021/5/19)-->
+        <!-- <div class="vip-footer upgrade" id="coupon-vue">
           <pay-order-template ref="couponRef" :config="$data" @update="updateS" @save="savePageData"></pay-order-template>
-        </div>
+        </div> -->
         <!-- <div class="vip-footer upgrade" style="display: none;">
           <div class="j-notice-bar bar-red vip-bar" style="display: none">限时6折,现在购买,帮您省<span class="reduce-price">0</span>元</div>
           <div class="footer-preview-container">
@@ -406,45 +424,45 @@
           </div>
         </div> -->
       </div>
-        <!-- 优惠明细 -->
-        <div class="j-picker adaption discount-details" style="display:none;">
-            <div class="weui-mask"></div>
-            <div class="weui-half-screen-dialog weui-picker">
-                <div class="weui-half-screen-dialog__hd">
-                    <div class="weui-half-screen-dialog__hd__main">
-                        <strong class="weui-half-screen-dialog__title">优惠明细</strong>
-                    </div>
-                    <span class="j-icon icon-del-grey cancel"></span>
+      <!-- 优惠明细 -->
+      <div class="j-picker adaption discount-details" style="display:none;">
+        <div class="weui-mask"></div>
+        <div class="weui-half-screen-dialog weui-picker">
+          <div class="weui-half-screen-dialog__hd">
+            <div class="weui-half-screen-dialog__hd__main">
+              <strong class="weui-half-screen-dialog__title">优惠明细</strong>
+            </div>
+            <span class="j-icon icon-del-grey cancel"></span>
+          </div>
+          <div class="weui-half-screen-dialog__bd">
+            <div class="weui-picker__bd">
+              <div class="details-bd-item origin-price">
+                <div class="d-b-left">原价</div>
+                <div class="d-b-right">
+                  <span class="dis-mon">&yen;</span>
+                  <span class="dis-price price-num">0</span>
                 </div>
-                <div class="weui-half-screen-dialog__bd">
-                    <div class="weui-picker__bd">
-                        <div class="details-bd-item origin-price">
-                            <div class="d-b-left">原价</div>
-                            <div class="d-b-right">
-                                <span class="dis-mon">&yen;</span>
-                                <span class="dis-price price-num">0</span>
-                            </div>
-                        </div>
-                        <div class="details-bd-item discount-price">
-                            <div class="d-b-left">限时优惠</div>
-                            <div class="d-b-right text-red">
-                                <span class="dis-mon">-&yen;</span>
-                                <span class="dis-price">0</span>
-                            </div>
-                        </div>
-                        <div class="details-bd-item now-price">
-                            <div class="d-b-left">实付</div>
-                            <div class="d-b-right text-red">
-                                <span class="dis-mon">&yen;</span>
-                                <span class="dis-price">0</span>
-                            </div>
-                        </div>
-                    </div>
+              </div>
+              <div class="details-bd-item discount-price">
+                <div class="d-b-left">限时优惠</div>
+                <div class="d-b-right text-red">
+                  <span class="dis-mon">-&yen;</span>
+                  <span class="dis-price">0</span>
                 </div>
+              </div>
+              <div class="details-bd-item now-price">
+                <div class="d-b-left">实付</div>
+                <div class="d-b-right text-red">
+                  <span class="dis-mon">&yen;</span>
+                  <span class="dis-price">0</span>
+                </div>
+              </div>
             </div>
+          </div>
         </div>
+      </div>
 
-        <!-- 计费清单picker -->
+      <!-- 计费清单picker -->
       <div class="billing-list-container p13" style="display: none;">
         <div class="weui-mask weui-animate-fade-in"></div>
         <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up">
@@ -456,97 +474,97 @@
             <div class="va-list-container">
               <ul class="list-content">
                 <!-- <li class="list-item">
-                            <div class="item-top">
-                                <div class="item-header">
-                                    <span class="header-label">有效日期:</span>
-                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</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">1个省、3个市(分布在2个省内)</div>
-                                    </div>
-                                    <div class="b-item body-industry">
-                                        <div class="body-industry-title text-title">采购单位行业</div>
-                                        <div class="body-industry-sub">3个行业</div>
-                                    </div>
-                                    <div class="vp-type">
-                                        <div class="vp-type-text">升级</div>
-                                    </div>
-                                </div>
+                    <div class="item-top">
+                        <div class="item-header">
+                            <span class="header-label">有效日期:</span>
+                            <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</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">1个省、3个市(分布在2个省内)</div>
+                            </div>
+                            <div class="b-item body-industry">
+                                <div class="body-industry-title text-title">采购单位行业</div>
+                                <div class="body-industry-sub">3个行业</div>
                             </div>
-                            <div class="item-footer">
-                                <span class="footer-label">小计:</span>
-                                <span class="footer-content text-title">¥223.8</span>
+                            <div class="vp-type">
+                                <div class="vp-type-text">升级</div>
                             </div>
-                        </li>
-                        <li class="list-item">
-                            <div class="item-top">
-                                <div class="item-header">
-                                    <span class="header-label">有效日期:</span>
-                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
-                                </div>
-                                <div class="item-body vp-oneline">
-                                    <div class="b-item body-area">
-                                        <div class="body-area-title text-title">区域</div>
-                                        <div class="body-area-sub">1个省、3个市(分布在2个省内)</div>
-                                    </div>
-                                    <div class="vp-type">
-                                        <div class="vp-type-text">续续费</div>
-                                    </div>
-                                </div>
+                        </div>
+                    </div>
+                    <div class="item-footer">
+                        <span class="footer-label">小计:</span>
+                        <span class="footer-content text-title">¥223.8</span>
+                    </div>
+                </li>
+                <li class="list-item">
+                    <div class="item-top">
+                        <div class="item-header">
+                            <span class="header-label">有效日期:</span>
+                            <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                        </div>
+                        <div class="item-body vp-oneline">
+                            <div class="b-item body-area">
+                                <div class="body-area-title text-title">区域</div>
+                                <div class="body-area-sub">1个省、3个市(分布在2个省内)</div>
                             </div>
-                            <div class="item-footer">
-                                <span class="footer-label">小计:</span>
-                                <span class="footer-content text-title">¥223.8</span>
+                            <div class="vp-type">
+                                <div class="vp-type-text">续续费</div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="item-footer">
+                        <span class="footer-label">小计:</span>
+                        <span class="footer-content text-title">¥223.8</span>
+                    </div>
+                </li>
+                <li class="list-item">
+                    <div class="item-top">
+                        <div class="item-header">
+                            <span class="header-label">有效日期:</span>
+                            <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</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">1个省、3个市(分布在2个省内)</div>
                             </div>
-                        </li>
-                        <li class="list-item">
-                            <div class="item-top">
-                                <div class="item-header">
-                                    <span class="header-label">有效日期:</span>
-                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</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">1个省、3个市(分布在2个省内)</div>
-                                    </div>
-                                    <div class="b-item body-industry">
-                                        <div class="body-industry-title text-title">采购单位行业</div>
-                                        <div class="body-industry-sub">3个行业</div>
-                                    </div>
-                                    <div class="vp-type">
-                                        <div class="vp-type-text">升级</div>
-                                    </div>
-                                </div>
+                            <div class="b-item body-industry">
+                                <div class="body-industry-title text-title">采购单位行业</div>
+                                <div class="body-industry-sub">3个行业</div>
                             </div>
-                            <div class="item-footer">
-                                <span class="footer-label">小计:</span>
-                                <span class="footer-content text-title">¥223.8</span>
+                            <div class="vp-type">
+                                <div class="vp-type-text">升级</div>
                             </div>
-                        </li>
-                        <li class="list-item">
-                            <div class="item-top">
-                                <div class="item-header">
-                                    <span class="header-label">有效日期:</span>
-                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
-                                </div>
-                                <div class="item-body vp-oneline">
-                                    <div class="b-item body-industry">
-                                        <div class="body-industry-title text-title">采购单位行业</div>
-                                        <div class="body-industry-sub">3个行业</div>
-                                    </div>
-                                    <div class="vp-type">
-                                        <div class="vp-type-text">升级</div>
-                                    </div>
-                                </div>
+                        </div>
+                    </div>
+                    <div class="item-footer">
+                        <span class="footer-label">小计:</span>
+                        <span class="footer-content text-title">¥223.8</span>
+                    </div>
+                </li>
+                <li class="list-item">
+                    <div class="item-top">
+                        <div class="item-header">
+                            <span class="header-label">有效日期:</span>
+                            <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                        </div>
+                        <div class="item-body vp-oneline">
+                            <div class="b-item body-industry">
+                                <div class="body-industry-title text-title">采购单位行业</div>
+                                <div class="body-industry-sub">3个行业</div>
                             </div>
-                            <div class="item-footer">
-                                <span class="footer-label">小计:</span>
-                                <span class="footer-content text-title">¥223.8</span>
+                            <div class="vp-type">
+                                <div class="vp-type-text">升级</div>
                             </div>
-                        </li> -->
+                        </div>
+                    </div>
+                    <div class="item-footer">
+                        <span class="footer-label">小计:</span>
+                        <span class="footer-content text-title">¥223.8</span>
+                    </div>
+                </li> -->
               </ul>
             </div>
           </div>
@@ -643,36 +661,37 @@
           </div>
         </div>
       </div>
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/jquery.min.js'></script>
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js'></script>
-      <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}'>
-      </script>
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}'></script>
-      <!--<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
-      
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/pay-order-template.js?v={{Msg "seo" "version"}}'></script>
-        <script>
-        $(window).on("pageshow", function (event) {
-          if (event.originalEvent.persisted) {
-            sessionStorage.liveActiveCode_new = "";
-            window.location.reload();
-          }
-        });
-        var live20200707 = {
-          startTime: {{.T.liveActiveStartTime}},
-          endTime: {{.T.liveActiveEndTime}},
-          activeDiscount: {{.T.activeDiscount}}
-        }
-        console.log({{not .T.isLiveActive}})
-      </script>
-      <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}'>
-      </script>
-      <script
-        src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_index_new.js?v={{Msg "seo" "version"}}'>
-      </script>
     </div>
-
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/jquery.min.js'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js'></script>
+    <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js> </script> 
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}'></script>
+    <!--<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
+    <!-- <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/coupon/js/pay-order-template.js?v={{Msg "seo" "version"}}'></script> -->
+    <script>
+      $(window).on("pageshow", function (event) {
+        if (event.originalEvent.persisted) {
+          sessionStorage.liveActiveCode_new = "";
+          window.location.reload();
+        }
+      });
+      var live20200707 = {
+        startTime: {{.T.liveActiveStartTime}},
+        endTime: {{.T.liveActiveEndTime}},
+        activeDiscount: {{.T.activeDiscount}}
+      }
+      // 跳转到续费页面
+      $('*[data-bind-renew]').on('click',function() {
+        location.href = '/jyapp/vipsubscribe/vipsubscribe_renew'
+      })
+      // 跳转到升级页面
+      $('*[data-bind-update]').on('click',function() {
+        location.href = '/jyapp/vipsubscribe/vipsubscribe_update'
+      })
+    </script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/vip_index_new.js?v={{Msg "seo" "version"}}'></script>
 </body>
 {{include "/common/baiducc.html"}}
 

+ 25 - 0
src/jfw/modules/bigmember/src/ent.json

@@ -0,0 +1,25 @@
+{
+	"ents":[
+		"山东弘盛信息科技有限公司",
+		"北京数慧时空信息技术有限公司",
+		"上海帕科信息科技有限公司",
+		"北京惠泽智信科技有限公司",
+		"泰豪软件股份有限公司",
+		"浙江创联信息技术股份有限公司",
+		"成都索贝数码科技股份有限公司",
+		"上海宝信软件股份有限公司",
+		"北京嘉和美康信息技术有限公司",
+		"内蒙古新联信息产业有限公司",
+		"中电科信息产业有限公司",
+		"深圳市雅码科技有限公司",
+		"杭州中房信息科技有限公司",
+		"福建顶点软件股份有限公司",
+		"浙江和仁科技股份有限公司",
+		"武汉荣御信息技术有限公司",
+		"武汉中地数码科技有限公司",
+		"双翊科技有限公司",
+		"南京苏迪科技有限公司",
+		"云南智讯达科技开发有限公司",
+		"南京南软科技有限公司"
+		]
+}

+ 111 - 0
src/jfw/modules/bigmember/src/entinfo/entinfo.go

@@ -0,0 +1,111 @@
+package entinfo
+
+import (
+	"db"
+	"fmt"
+	"qfw/util"
+	"qfw/util/elastic"
+	. "util"
+
+	"github.com/go-xweb/xweb"
+)
+
+type entConfig struct {
+	Ents []string `json:"ents"`
+}
+
+var EntConfig *entConfig
+
+type EntInfoStruct struct {
+	EntName        string  `json:"entName"`        //企业名称
+	EntId          string  `json:"entId"`          //id需要加密
+	Company_area   string  `json:"company_area"`   //地区
+	Company_city   string  `json:"company_city"`   //城市
+	Establish_date string  `json:"establish_date"` //注册时间
+	Capital        float64 `json:"capital"`        //注册金额
+	Company_phone  string  `json:"company_phone"`  //公司联系方式
+	Employee_no    string  `json:"employee_no"`    //员工人数
+}
+
+func init() {
+	xweb.AddAction(&EntInfo{})
+	util.ReadConfig("./ent.json", &EntConfig)
+}
+
+var entData = []EntInfoStruct{}
+
+type EntInfo struct {
+	*xweb.Action
+	entInfos xweb.Mapper `xweb:"/entinfo/bynames"` //根据entname 查询企业信息
+}
+
+//
+func (this *EntInfo) EntInfos() error {
+	defer util.Catch()
+	if len(entData) == 0 {
+		entInfoInit()
+	}
+	this.ServeJson(entData)
+	return nil
+}
+
+//查询中标企业名称【带曾用名检索】
+const queryFullEntName = `{"query":{"function_score":{"query":{"multi_match":{"query":"%s","type":"phrase","fields":["name","history_name"]}},"field_value_factor":{"field":"company_type_int","modifier":"reciprocal","factor":2}}},"_source":["name","history_name","company_type_int","_id","company_area","company_city","establish_date","capital","company_phone", "employee_no"],"size":%d}`
+
+//数据填充
+func entInfoInit() []EntInfoStruct {
+	if len(EntConfig.Ents) > 0 {
+		var lastEnts = EntConfig.Ents
+		entInfo := EntInfoStruct{}
+		query := map[string]interface{}{
+			"company_name": map[string]interface{}{
+				"$in": lastEnts,
+			},
+		}
+		sess := db.Mgo_Ent.GetMgoConn()
+		defer db.Mgo_Ent.DestoryMongoConn(sess)
+		it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1, "company_area": 1, "company_city": 1, "establish_date": 1, "capital": 1, "employee_no": 1, "company_phone": 1}).Iter()
+		for m := make(map[string]interface{}); it.Next(&m); {
+			if m["company_name"] != nil && m["company_name"].(string) != "" {
+				entInfo.EntId = EncodeId(m["_id"].(string))
+				entInfo.EntName = util.ObjToString(m["company_name"])
+				entInfo.Company_area = util.ObjToString(m["company_area"])
+				entInfo.Company_city = util.ObjToString(m["company_city"])
+				entInfo.Establish_date = util.ObjToString(m["establish_date"])
+				entInfo.Company_phone = util.ObjToString(m["company_phone"])
+				entInfo.Employee_no = util.ObjToString(m["employee_no"])
+				entInfo.Capital = util.Float64All(m["capital"])
+				entData = append(entData, entInfo)
+				for ek, ev := range lastEnts {
+					if ev == entInfo.EntName {
+						lastEnts = append(lastEnts[:ek], lastEnts[ek+1:]...)
+					}
+				}
+			}
+		}
+		if len(lastEnts) > 0 {
+			for _, ev := range lastEnts {
+				if ev != "" {
+					list := elastic.Get("qyxy", "qyxy", fmt.Sprintf(queryFullEntName, ev, 1))
+					m := make(map[string]interface{})
+					if list != nil && len(*list) > 0 {
+						m = (*list)[0]
+					}
+					if util.ObjToString(m["_id"]) == "" {
+						continue
+					}
+					entInfo.EntId = EncodeId(util.ObjToString(m["_id"]))
+					entInfo.EntName = util.ObjToString(m["name"])
+					entInfo.Company_area = util.ObjToString(m["company_area"])
+					entInfo.Company_city = util.ObjToString(m["company_city"])
+					entInfo.Establish_date = util.ObjToString(m["establish_date"])
+					entInfo.Company_phone = util.ObjToString(m["company_phone"])
+					entInfo.Employee_no = util.ObjToString(m["employee_no"])
+					entInfo.Capital = util.Float64All(m["capital"])
+					entData = append(entData, entInfo)
+				}
+			}
+		}
+	}
+	return entData
+}

+ 13 - 8
src/jfw/modules/bigmember/src/entity/followEnterprise.go

@@ -42,19 +42,24 @@ func CreateEntFollowManager(userid string, pageFlag ...string) (*EntFollow, erro
 }
 
 //关注企业联想
-func (this *EntFollow) GetAssociationEnt(entName string) ([]map[string]string, error) {
-	accMap := []map[string]string{}
-	query := fmt.Sprintf(`{"query":{"function_score":{"query":{"multi_match":{"query":"%s","type":"phrase","fields":["name","history_name"]}},"field_value_factor":{"field":"company_type_int","modifier":"reciprocal","factor":2}}},"_source":["name","history_name","company_type_int","_id"],"size":%d}`, entName, 6)
+func (this *EntFollow) GetAssociationEnt(entName string) ([]map[string]interface{}, error) {
+	accMap := []map[string]interface{}{}
+	query := fmt.Sprintf(`{"query":{"function_score":{"query":{"multi_match":{"query":"%s","type":"phrase","fields":["name","history_name"]}},"field_value_factor":{"field":"company_type_int","modifier":"reciprocal","factor":2}}},"_source":["name","history_name","company_type_int","_id","company_area","company_city","establish_date","capital","company_phone"],"size":%d}`, entName, 6)
 	r := elastic.Get("qyxy", "qyxy", query)
 	if r == nil || len(*r) == 0 {
 		return accMap, nil
 	}
 	for _, v := range *r {
 		//accMap[qutil.ObjToString(v["name"])] = ""
-		accMap = append(accMap, map[string]string{
-			"entId":    qutil.ObjToString(v["_id"]), //id需要加密
-			"entName":  qutil.ObjToString(v["name"]),
-			"isFollow": "",
+		accMap = append(accMap, map[string]interface{}{
+			"entId":          qutil.ObjToString(v["_id"]), //id需要加密
+			"entName":        qutil.ObjToString(v["name"]),
+			"company_area":   qutil.ObjToString(v["company_area"]),   //地区
+			"company_city":   qutil.ObjToString(v["company_city"]),   //城市
+			"establish_date": qutil.ObjToString(v["establish_date"]), //注册日期
+			"capital":        qutil.Float64All(v["capital"]),         //注册资本
+			"company_phone":  qutil.ObjToString(v["company_phone"]),  //企业联系方式
+			"isFollow":       "",
 		})
 	}
 	//查询是否关注
@@ -74,7 +79,7 @@ func (this *EntFollow) GetAssociationEnt(entName string) ([]map[string]string, e
 	}
 	//加密企业id
 	for index, item := range accMap {
-		accMap[index]["entId"] = util.EncodeId(item["entId"]) //加密
+		accMap[index]["entId"] = util.EncodeId(item["entId"].(string)) //加密
 	}
 	return accMap, nil
 }

+ 1 - 0
src/jfw/modules/bigmember/src/main.go

@@ -4,6 +4,7 @@ import (
 	_ "a"
 	. "config"
 	_ "db"
+	_ "entinfo"
 	_ "filter"
 	"net/http"
 	_ "service"

+ 1 - 1
src/jfw/modules/bigmember/src/service/follow/enterprise.go

@@ -28,7 +28,7 @@ func (this *FollowEnt) Association() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
 		entName := this.GetString("entName")
-		returnData := []map[string]string{}
+		returnData := []map[string]interface{}{}
 		if entName == "" {
 			return returnData, nil
 		}