Explorar o código

Merge branch 'dev3.0active' of http://192.168.3.207:10080/qmx/jy into dev3.0active

TANGSHIZHE %!s(int64=4) %!d(string=hai) anos
pai
achega
ca9c1127b5
Modificáronse 37 ficheiros con 3716 adicións e 80 borrados
  1. 15 2
      src/jfw/front/big-member.go
  2. 9 6
      src/jfw/front/shorturl.go
  3. 2 0
      src/jfw/front/swordfish.go
  4. 9 2
      src/jfw/modules/app/src/app/front/big-member.go
  5. 5 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/vant-reset.css
  6. 3 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/page_init.js
  7. 57 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css
  8. 6 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css
  9. 55 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css
  10. 58 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js
  11. 12 2
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_renew.js
  12. 1 0
      src/jfw/modules/app/src/web/templates/big-member/page_init.html
  13. 56 2
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html
  14. 15 13
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_pay_success.html
  15. 15 5
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  16. 55 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html
  17. 13 3
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  18. 1 1
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  19. 13 2
      src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html
  20. 1 1
      src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go
  21. 1290 0
      src/web/staticres/js/login.js
  22. 390 0
      src/web/staticres/structuredata/pc/js/write_infor.js
  23. 56 0
      src/web/staticres/vipsubscribe/css/vip_index_new.css
  24. 60 4
      src/web/staticres/vipsubscribe/css/vip_purchase.css
  25. 56 0
      src/web/staticres/vipsubscribe/css/vip_renew.css
  26. 1218 0
      src/web/staticres/vipsubscribe/js/vip_index_new.js
  27. 2 2
      src/web/templates/big-member/wx/page_write_infor_wx.html
  28. 5 1
      src/web/templates/pc/index.html
  29. 2 2
      src/web/templates/pc/vip_orderDetail.html
  30. 8 2
      src/web/templates/weixin/commonPay/myOrder.html
  31. 13 3
      src/web/templates/weixin/historypush.html
  32. 54 1
      src/web/templates/weixin/vipsubscribe/vip_index_new.html
  33. 7 0
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  34. 14 14
      src/web/templates/weixin/vipsubscribe/vip_pay_success.html
  35. 63 4
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  36. 64 2
      src/web/templates/weixin/vipsubscribe/vip_renew.html
  37. 13 2
      src/web/templates/weixin/wxkeyset/index.html

+ 15 - 2
src/jfw/front/big-member.go

@@ -43,9 +43,12 @@ func (s *BigMemberAction) WxVIPViewPage(htmlName string) error {
 	if power > 0 && htmlName == "landingPage" {
 		htmlName = "index"
 	}
-	if member_give == 1 && isActiving() {
+	if member_give == 1 && isActiving() && htmlName != "full" {
 		htmlName = "write_infor_wx"
 	}
+	if member_give == 2 && power > 0 && htmlName != "full" {
+		htmlName = "open_app_active"
+	}
 	s.T["member_status"] = power
 	return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
 }
@@ -56,13 +59,23 @@ func Power(userid string) (int, int, int) {
 	if userid == "" {
 		return 0, 0, 0
 	}
-	data, ok := public.MQFW.FindById("user", userid, `{"i_member_status":1,"i_member_give":1}`)
+	data, ok := public.MQFW.FindById("user", userid, `{"i_member_status":1,"i_member_give":1,"i_member_starttime":1,"i_member_endtime":1}`)
 	i_member_status, isused, member_give := 0, 0, 0
 	if ok && *data != nil && len(*data) > 0 {
 		i_member_status = qutil.IntAllDef((*data)["i_member_status"], 0)
 		if (*data)["i_member_give"] != nil && qutil.IntAll((*data)["i_member_give"]) == 1 && i_member_status <= 0 {
 			member_give = 1
 		}
+		//判断用户是不是试用用户
+		if (*data)["i_member_starttime"] != nil && (*data)["i_member_endtime"] != nil && (*data)["i_member_give"] != nil {
+			endtime := qutil.Int64All((*data)["i_member_endtime"])
+			starttime := qutil.Int64All((*data)["i_member_starttime"])
+			cycle := (endtime - starttime) / 86400
+			if cycle == 15 && qutil.IntAll((*data)["i_member_give"]) == 2 {
+				member_give = 2
+			}
+		}
+
 	}
 	if public.MQFW.Count("member", map[string]interface{}{"userid": userid}) > 0 {
 		isused = 1

+ 9 - 6
src/jfw/front/shorturl.go

@@ -383,12 +383,15 @@ func (s *Short) Qr(t, id string) error {
 }
 
 func (s *Short) Replication() {
-	mongodb.Save("copyaction", map[string]interface{}{
-		"userid":     s.GetSession("userId").(string),
-		"createtime": time.Now().Unix(),
-		"url":        s.Request.Referer(),
-		"client":     s.Header("User-Agent"),
-	})
+	userId, OK := s.GetSession("userId").(string)
+	if OK && userId != "" {
+		mongodb.Save("copyaction", map[string]interface{}{
+			"userid":     userId,
+			"createtime": time.Now().Unix(),
+			"url":        s.Request.Referer(),
+			"client":     s.Header("User-Agent"),
+		})
+	}
 }
 
 func isbid(typ interface{}) bool {

+ 2 - 0
src/jfw/front/swordfish.go

@@ -110,6 +110,8 @@ func (m *Front) NewSordfish() error {
 	}
 	m.T["logid"] = config.Seoconfig["jysy"].(string)
 	m.T["shareid"] = se.EncodeString(shareid)
+	m.T["activestart"] = config.ActiveConfig.DoubleEleven.Active_Start
+	m.T["activeend"] = config.ActiveConfig.DoubleEleven.Active_End
 	regex, _ := regexp.Compile("(Android|Mobile)")
 	if ispc == 0 && len(regex.FindAllString(m.Header("User-Agent"), -1)) > 0 {
 		m.T["s_m_openid"] = util.ObjToString(m.GetSession("s_m_openid"))

+ 9 - 2
src/jfw/modules/app/src/app/front/big-member.go

@@ -22,6 +22,9 @@ func init() {
 //白名单(不需要权限的页面)
 var whiteReg = regexp.MustCompile(`full|landingPage|buy_commit|contrast|memberdetail|write_infor|init|set_*`)
 
+//推送设置列表
+var setListReg = regexp.MustCompile(`push_*|full`)
+
 //专家版可进入的页面
 var expertReg = regexp.MustCompile(`potential_cor_list|bigvip_subreport|ent_portrait_change`)
 
@@ -29,9 +32,9 @@ var expertReg = regexp.MustCompile(`potential_cor_list|bigvip_subreport|ent_port
 var wisdomReg = regexp.MustCompile(`forecast_list|ai_search|analysis_search|unit_portrayal`)
 
 func (s *BigMemberAction) VIPViewPage(htmlName string) error {
+	userid, _ := s.GetSession("userId").(string)
+	power, isused, member_give := Power(userid)
 	if !whiteReg.MatchString(htmlName) {
-		userid, _ := s.GetSession("userId").(string)
-		power, isused, member_give := Power(userid)
 		if member_give == 1 && isActiving() {
 			return s.Redirect("/jyapp/big/page/write_infor")
 		}
@@ -43,6 +46,10 @@ func (s *BigMemberAction) VIPViewPage(htmlName string) error {
 		if isused != 1 { //如果没有首次使用 跳转至首次使用页面
 			return s.Redirect("/jyapp/big/page/init")
 		}
+	} else {
+		if member_give == 1 && isActiving() && !setListReg.MatchString(htmlName) {
+			htmlName = "write_infor"
+		}
 	}
 	return s.Render("/big-member/page_" + htmlName + ".html")
 }

+ 5 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/vant-reset.css

@@ -28,8 +28,12 @@
     color: #171826;
 }
 
+.van-dialog .van-dialog__confirm, .van-dialog__confirm:active {
+    color: #2ABED1;
+}
+
 /* toast弹出框 */
 .van-toast {
     max-width: 4.2rem;
     line-height: 1.6;
-}
+}

+ 3 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/page_init.js

@@ -138,6 +138,8 @@ var vNode = {
         this.checkTopRightText()
         if (!this.ajaxStatus.isAdd) {
             this.ajaxIsFirst()
+        } else if (this.step.now === 1) {
+            this.ajaxIsFirst()
         }
         // 输入防抖
         this.changeEnt = utils.debounce(this.ajaxEntList, 350)
@@ -294,6 +296,7 @@ var vNode = {
                         }
                     } else {
                         this.hideLoading()
+                        sessionStorage.setItem('stop_recovery_init', 'true')
                         vant.Dialog.confirm({
                             title: '提示',
                             showCancelButton: true,

+ 57 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css

@@ -1117,20 +1117,25 @@
   margin-top: .32rem;
 }
 
+/* 优惠弹框 */
+.discount-details .weui-half-screen-dialog__hd,
 .coupon-picker .weui-half-screen-dialog__hd {
   padding-left: 0;
   padding-right: 0;
 }
+.discount-details .icon-del-grey,
 .coupon-picker .icon-del-grey {
   padding-left: 0;
   padding-right: 0;
   order: 2;
 }
 
+.discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
 }
 
+.discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
   position: relative;
   display: flex;
@@ -1141,6 +1146,57 @@
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
 
+.discount-details .weui-mask,
+.discount-details .weui-picker {
+    bottom: 3.1rem;
+    min-height: unset;
+    transform: unset;
+}
+.discount-details .weui-picker__bd {
+    padding: 0;
+    padding-bottom: .36rem;
+    flex-direction: column;
+}
+.discount-details .details-bd-item {
+    margin-bottom: unset;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: .24rem 0;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #171826;
+}
+.discount-details .d-b-right .dis-price {
+    text-decoration: unset;
+}
+
+.discount-button {
+    display: none;
+    margin-right: .16rem;
+    padding: .03rem .06rem;
+    font-size: .2rem;
+    line-height: .28rem;
+    color: #9B9CA3;
+    background-color: #F5F7F7;
+    border-radius: 2px;
+}
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
+.discount-button .icon-arrow {
+    transition: all 0.2s;
+    display: inline-block;
+    font-size: .2rem;
+    transform: rotate(90deg);
+}
+
+.text-red {
+    color: #FB483D;
+}
+
+
+
 .origin-price {
   display: none;
   align-items: center;
@@ -1211,4 +1267,4 @@
 .weui-actionsheet__cell:before{
   left: .32rem;
   right: -16px;
-}
+}

+ 6 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css

@@ -955,7 +955,7 @@
 .discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
-}       
+}
 
 .discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
@@ -980,6 +980,7 @@
   flex-direction: column;
 }
 .discount-details .details-bd-item {
+    margin-bottom: unset;
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -1002,7 +1003,11 @@
   background-color: #F5F7F7;
   border-radius: 2px;
 }
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
 .discount-button .icon-arrow {
+    transition: all 0.2s;
   display: inline-block;
   font-size: .2rem;
   transform: rotate(90deg);

+ 55 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css

@@ -599,20 +599,25 @@
   margin-top: .32rem;
 }
 
+/* 优惠弹框 */
+.discount-details .weui-half-screen-dialog__hd,
 .coupon-picker .weui-half-screen-dialog__hd {
   padding-left: 0;
   padding-right: 0;
 }
+.discount-details .icon-del-grey,
 .coupon-picker .icon-del-grey {
   padding-left: 0;
   padding-right: 0;
   order: 2;
 }
 
+.discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
 }
 
+.discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
   position: relative;
   display: flex;
@@ -623,6 +628,56 @@
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
 
+.discount-details .weui-mask,
+.discount-details .weui-picker {
+    bottom: 3.1rem;
+    min-height: unset;
+    transform: unset;
+}
+.discount-details .weui-picker__bd {
+    padding: 0;
+    padding-bottom: .36rem;
+    flex-direction: column;
+}
+.discount-details .details-bd-item {
+    margin-bottom: unset;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: .24rem 0;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #171826;
+}
+.discount-details .d-b-right .dis-price {
+    text-decoration: unset;
+}
+
+.discount-button {
+    display: none;
+    margin-right: .16rem;
+    padding: .03rem .06rem;
+    font-size: .2rem;
+    line-height: .28rem;
+    color: #9B9CA3;
+    background-color: #F5F7F7;
+    border-radius: 2px;
+}
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
+.discount-button .icon-arrow {
+    transition: all 0.2s;
+    display: inline-block;
+    font-size: .2rem;
+    transform: rotate(90deg);
+}
+
+.text-red {
+    color: #FB483D;
+}
+
+
 .origin-price {
   display: none;
   align-items: center;

+ 58 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -1,3 +1,37 @@
+function showGiveStatus (t) {
+    if (t) {
+        $("#giveTimeBox").addClass('hasDoubleEleven')
+        $('.discount-button').show().on('click', function () {
+            var details = $('.discount-details')
+            if (details.is(':hidden')) {
+                $('.discount-details').show()
+                $(this).children('.icon-arrow').addClass('up')
+            } else {
+                $('.discount-details').hide()
+                $(this).children('.icon-arrow').removeClass('up')
+            }
+        })
+    } else {
+        $("#giveTimeBox").removeClass('hasDoubleEleven')
+        $(".origin-price").hide()
+    }
+}
+// 拦截获取价格接口读取11.11活动信息
+$.ajaxSetup({
+    complete:function(XMLHttpRequest,textStatus){
+        if (this.url.indexOf('/subscribepay/vipsubscribe/getPrice') !== -1) {
+            if (textStatus === 'success') {
+                var data = XMLHttpRequest.responseJSON
+                if (data && data.isActiving && data.isWritten === 0) {
+                    showGiveStatus(true)
+                } else {
+                    showGiveStatus(false)
+                }
+            }
+        }
+    }
+});
+
 $(function () {
     //项目匹配开关
     var checkedflag = true;
@@ -276,6 +310,8 @@ $(function () {
     $('.weui-mask').on('click', function () {
         pickerShow('.billing-list-container', false)
         $('.coupon-picker').hide()
+        $('.discount-details').hide()
+        $('.discount-button .icon-arrow').removeClass('up')
     })
 
     // 关键词匹配方式
@@ -736,6 +772,18 @@ $(function () {
             "buyerclasscount": reqData.buyset.buyerclasscount,
             "citys": reqData.buyset.newcitys
         }, changeTime, reqData.endTime, reqData.renewList, reqData.isTrial);
+        // 双11.11活动
+        var giveT = [changeTime[1] === 1 ? 1 :changeTime[0], changeTime[1]]
+        if (!giveT[0] || !giveT[1]) {
+            giveT = []
+        }
+        var giveStatue = getUpgradeFinalStatus(getBuySet(reqData.area, reqData.industry), {
+            "areacount": reqData.buyset.areacount,
+            "buyerclasscount": reqData.buyset.buyerclasscount,
+            "citys": reqData.buyset.newcitys
+        }, giveT, reqData.endTime, reqData.renewList, reqData.isTrial);
+        var givePrice = giveStatue[0]
+        var giveCycle = changeTime[1] === 1 ? ('1年') : ((changeTime[0] ? changeTime[0] : 1) + '个月')
 
         if (status[0] === -2) {
             weui.toast('订单冲突', {
@@ -774,6 +822,7 @@ $(function () {
             $(".vip-footer.upgrade .billing-price").text(formatMoney(status[0]));
             submitPrice = status[0] * 10000 / 100
 
+
             // 活动期间,则显示优惠码
             if ($('.vip-upgrade').hasClass('live-20200707')) {
                 // 优惠码选项
@@ -786,6 +835,15 @@ $(function () {
         }
 
         if (reqData.isTrial) {//试用购买
+            if ($("#giveTimeBox").hasClass('hasDoubleEleven')) {
+                $(".origin-price").css('display', 'flex')
+                $("#giveTimeBox").show()
+                $("#giveTimeText").text(giveCycle)
+                $('.origin-price .price-num').text(formatMoney(status[0] + givePrice));
+                // 优惠明细
+                $('.discount-price .dis-price').text(formatMoney(givePrice))
+                $('.now-price .dis-price').text(formatMoney(status[0]));
+            }
             if (changeTime.length === 0) {
                 //刷新展示时间
                 changeTime = [1, 2];//

+ 12 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_renew.js

@@ -62,7 +62,8 @@ var purchase = {
             $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
                 if (r) {
                     purchase.price = r;
-                    if (r.isActiving && r.isWritten === 0) {
+                    purchase.can1111 = r.isActiving && r.isWritten === 0
+                    if (purchase.can1111) {
                         if (!sessionStorage.getItem("vipSubSelectTime")) {
                             purchase.timeValue = "1年";
                             purchase.timeSelect_tmp = [1,1]
@@ -174,11 +175,18 @@ var purchase = {
         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);
@@ -203,7 +211,7 @@ var purchase = {
             //是否超过三年
             var now = Math.floor(new Date().getTime() / 1000);
             var MaxEnd = getVipEndDate(1, 3, now);
-            if (false && end > MaxEnd) {
+            if (!purchase.can1111 && end > MaxEnd) {
                 var timeShow = getDateSub(now, this.endTime);
                 var showTipText = "<div style='white-space: nowrap;'>最长订阅周期不可超过3年</div>剩余周期:";
                 if (timeShow[0] !== 0) {
@@ -506,6 +514,8 @@ function GetQueryString(name) {
 function hideDialog() {
     $('#pay_way').hide(200);
     $('#time_cycle').hide(200);
+    $('.discount-details').hide()
+    $('.discount-button .icon-arrow').removeClass('up')
 }
 
 function clearSessionStorage() {

+ 1 - 0
src/jfw/modules/app/src/web/templates/big-member/page_init.html

@@ -19,6 +19,7 @@
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/page_init.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/vant-reset.css?v={{Msg "seo" "version"}}' />
     <!--E-当前页面的css资源-->
     <style>
         input[type="search"]{-webkit-appearance:none;}

+ 56 - 2
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -285,6 +285,18 @@
               </div>
             </a>
           </li>
+        <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>
+        </li>
           <li class="body-item coupon-code-tx" style="display: none">
             <a class="item-container" href="javascript:;">
               <div class="item">
@@ -336,7 +348,11 @@
               </span>
             </div>
             <div class="origin-price" style="display: none">
-              <span class="price-label">原价:</span>
+                <span class="discount-button">
+                    <span>优惠明细</span>
+                    <span class="iconfont icon-arrow"></span>
+                </span>
+                <span class="price-label">原价:</span>
               <div class="price-container">
                 <span class="currency-type">&yen;</span>
                 <span class="price-num">5.80</span>
@@ -360,7 +376,45 @@
           </div>
         </div> -->
       </div>
-      <!-- 计费清单picker -->
+        <!-- 优惠明细 -->
+        <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>
+                        <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 -->
       <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">

+ 15 - 13
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_pay_success.html

@@ -61,22 +61,24 @@
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}"></script>
 <script>
     $(function () {
-        $.get('/jyactive/doubleEleven/isActiving', function (r) {
-            if (r && r.data) {
-                if (r.data.isActiving && r.data.isWritten === 1) {
-                    try {
-                        var title = {{.T.title}}
-                        if (title.indexOf('超级订阅') !== -1 && title.indexOf('超级订阅试用') === -1) {
-                            setTimeout(function () {
-                                location.href = '/jyapp/big/page/write_infor'
-                            }, 3000)
-                        }
-                    } catch (e) {
+        if (window.performance.navigation.type !== 2) {
+            $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+                if (r && r.data) {
+                    if (r.data.isActiving && r.data.isWritten === 1) {
+                        try {
+                            var title = {{.T.title}}
+                            if (title.indexOf('超级订阅') !== -1 && title.indexOf('超级订阅试用') === -1) {
+                                setTimeout(function () {
+                                    location.href = '/jyapp/big/page/write_infor'
+                                }, 3000)
+                            }
+                        } catch (e) {
 
+                        }
                     }
                 }
-            }
-        })
+            })
+        }
         try {
             JyObj.hiddenBottom("0");
         } catch (e) {

+ 15 - 5
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -394,14 +394,14 @@
                                     <span class="dis-price price-num">0</span>
                                 </div>
                             </div>
-                            <div class="details-bd-item">
+                            <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">
+                            <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>
@@ -427,8 +427,10 @@
                         var details = $('.discount-details')
                         if (details.is(':hidden')) {
                             $('.discount-details').show()
+                            $(this).children('.icon-arrow').addClass('up')
                         } else {
                             $('.discount-details').hide()
+                            $(this).children('.icon-arrow').removeClass('up')
                         }
                     })
                 } else {
@@ -642,21 +644,28 @@
                 },
                 flushPrice: function (time, flag) {
                     if (this.vipSubisTrial) {
-                        $('.price strong').text('0.00');
+                        $('.price .billing-price').text('0.00');
+                        $('.now-price .dis-price').text('0.00');  // 优惠明细
                     } else {
                         var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
                         var givePrice = getsubVipOrderPriceBybuyset(this.nowBuyset, [time[1] === 1 ? 1 :time[0], time[1]]);
                         //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
                         var showPrice = formatMoney(price);
                         if (flag === 1) {
-                            $('.price strong').text(showPrice);
+                            $('.price .billing-price').text(showPrice);
+                            $('.now-price .dis-price').text(showPrice); // 优惠明细
+
                             $('.origin-price .price-num').text(formatMoney(price + givePrice));
+                            $('.discount-price .dis-price').text(formatMoney(givePrice))
                         } else if (flag === 2) {
                             $('.computed_price').html(showPrice);
                         } else {
-                            $('.price strong').text(showPrice);
+                            $('.price .billing-price').text(showPrice);
+                            $('.now-price .dis-price').text(showPrice); // 优惠明细
+
                             $('.origin-price .price-num').text(formatMoney(price + givePrice));
                             $('.computed_price').html(showPrice);
+                            $('.discount-price .dis-price').text(formatMoney(givePrice))
                         }
 
                     }
@@ -927,6 +936,7 @@
                 $('#time_cycle').hide(200);
                 $('.coupon-picker').hide()
                 $('.discount-details').hide()
+                $('.discount-button .icon-arrow').removeClass('up')
             }
 
 

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

@@ -159,6 +159,10 @@
                     </span>
                 </div>
                 <div class="origin-price" style="display: none">
+                    <span class="discount-button">
+                        <span>优惠明细</span>
+                        <span class="iconfont icon-arrow"></span>
+                    </span>
                     <span class="price-label">原价:</span>
                     <div class="price-container">
                         <span class="currency-type">&yen;</span>
@@ -177,7 +181,46 @@
         </div>
     </div>
 
-    <!-- 计费清单picker -->
+        <!-- 优惠明细 -->
+        <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>
+                        <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 -->
     <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">
@@ -381,6 +424,17 @@
 	        $(".vip-bar").show()
 	        $("#giveTimeBox").show()
             $(".origin-price").css('display', 'flex')
+            $(".discount-details .weui-picker").css('bottom', $(".vip-footer.renew").height() + 'px')
+            $('.discount-button').show().on('click', function () {
+                var details = $('.discount-details')
+                if (details.is(':hidden')) {
+                    $('.discount-details').show()
+                    $(this).children('.icon-arrow').addClass('up')
+                } else {
+                    $('.discount-details').hide()
+                    $(this).children('.icon-arrow').removeClass('up')
+                }
+            })
         } else {
             $(".vip-bar").hide()
             $("#giveTimeBox").hide()

+ 13 - 3
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -79,8 +79,8 @@
   		<div class="header_header" style="height: 60px;display:none;transition: all 0.1s;">
   			<div class="only-personal" style="position: absolute;top: .2rem;left: 4%;background-image: url(/jyapp/vipsubscribe/image/entback.png?v=51430);background-size: 100%;background-repeat: no-repeat;border-radius: 8px;width: 92%;display: flex;align-items: center;justify-content: space-between;height: 44px;">
   				<img style="width: 20px;height: 20px; margin-left: .3rem;" src="/jyapp/vipsubscribe/image/vip-icon.png?v=1">
-  				<span style="color:#fff;font-weight: bold;font-size: 15px;text-align: left;width: 4.1rem;">买超级订阅,买多久送多久!</span>
-  				<span class="switch_ext" id="app-historypush-vipSub-banner" style="border-radius: 32px;display: flex;flex-direction: row;padding: 3px 12px;font-size: 12px;color: #FAE7CA;margin-right: .2rem;background: linear-gradient(to bottom, #F1D090 0%, #FAE7CA 100%);color: #33323A;font-family: PingFang SC;font-size: 12px;line-height: 18px;letter-spacing: 0px;text-align: center;">去抢</span>
+  				<span  data-name="doubleEleven_title" style="color:#fff;font-weight: bold;font-size: 15px;text-align: left;width: 4.1rem;">300组关键词特权</span>
+  				<span  data-name="doubleEleven_button" class="switch_ext" id="app-historypush-vipSub-banner" style="border-radius: 32px;display: flex;flex-direction: row;padding: 3px 12px;font-size: 12px;color: #FAE7CA;margin-right: .2rem;background: linear-gradient(to bottom, #F1D090 0%, #FAE7CA 100%);color: #33323A;font-family: PingFang SC;font-size: 12px;line-height: 18px;letter-spacing: 0px;text-align: center;">免费试用</span>
   			</div>
   		</div>
       {{end}}
@@ -271,7 +271,17 @@
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 <!-- 账号合并弹窗js -->
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/merge-wx.js?v={{Msg "seo" "version"}}"></script>
-
+    <script>
+        // 双11活动文案修改
+        $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+            if (r && r.data) {
+                if (r.data.isActiving) {
+                    $('*[data-name="doubleEleven_title"]').text('买超级订阅,买多久送多久!')
+                    $('*[data-name="doubleEleven_button"]').text('去抢')
+                }
+            }
+        })
+    </script>
 <script>
   /*
   * money unit for zyh @date 2020/6/5

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -438,7 +438,7 @@
     });
 </script>
 <script type="text/javascript">
-    $.get('/jyactive/doubleEleven/isActiving', function (r) {
+    $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
         if (r && r.data) {
             if (r.data.isActiving && r.data.isWritten === 1) {
                 var readToDay = localStorage.getItem('doubleEleven_isActiving') === new Date().toDateString()

+ 13 - 2
src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html

@@ -26,8 +26,8 @@
         <div class="vip_banner">
             <div class="banner-box">
                 <span class="j-icon vip-icon"></span>
-                <span class="content">买超级订阅,买多久送多久!</span>
-                <a class="right-action" id="free-keyset-list-link" href="/jyapp/vipsubscribe/introducePage">去抢</a>
+                <span  data-name="doubleEleven_title" class="content">300组关键词特权</span>
+                <a  data-name="doubleEleven_button" class="right-action" id="free-keyset-list-link" href="/jyapp/vipsubscribe/introducePage">免费试用</a>
             </div>
         </div>
         {{end}}
@@ -88,6 +88,17 @@
             </div>
         </div>
     </div>
+    <script>
+        // 双11活动文案修改
+        $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+            if (r && r.data) {
+                if (r.data.isActiving) {
+                    $('*[data-name="doubleEleven_title"]').text('买超级订阅,买多久送多久!')
+                    $('*[data-name="doubleEleven_button"]').text('去抢')
+                }
+            }
+        })
+    </script>
 
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/vue.min.js"></script>
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/swiper.min.js"></script>

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

@@ -46,7 +46,7 @@ func (this *SubscribeChange) GetSubBuyMsg() {
 		vipStatus := qutil.IntAll((*rData)["i_vip_status"])
 		var renewList *[]map[string]interface{}
 		if vipStatus == 2 { //查询是否有未执行的续费订单
-			renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":"1"}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
+			renewList, _ = util.MQFW.Find("vip_upgrade", &bson.M{"s_userid": userId, "i_isvalid": 0}, `{"l_validtime":1}`, `{"o_buyset":1,"l_validtime":1}`, false, -1, -1)
 		}
 		return &entity.FuncResult{true, nil, map[string]interface{}{
 			"isTrial":         vipStatus == 1,

+ 1290 - 0
src/web/staticres/js/login.js

@@ -0,0 +1,1290 @@
+/**统一登录js文件**/
+var loginfg='';//websocket请求标识
+var bIE9=false;
+if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/[6789]./i)) { 
+	bIE9=true
+}
+var wsUrl = "ws"+(!bIE9&&"https:"==document.location.protocol?"s":"")+"://"+window.location.host+"/ws";
+var ws = "";
+var openid = "";
+var jylgi = 0;
+var loginflag = false;//登录状态
+var mynum = "";//页面参数num
+var keysorpname = "";//项目名称
+var kzyflag = false;//快照页标识
+var thurl = "";//url
+var semnum = "";//SEM
+var ldpnum = "";//落地页扫码后调整标识
+var ldmold = "";//落地页扫码后调整标识
+var pageshareid = "";
+var kopshareid = "";
+var oldshareid = "";
+var encryptId = null;
+var qr_type = "s";
+var unseatflag = false;//未登录情况下,用户点击超级搜索等开启按钮或者功能,根据此状态看是否弹出二维码
+var unseatzbqyflag = false;//未登录情况下,用户点击中标企业等开启按钮或者功能,根据此状态看是否弹出二维码
+var sendMsgInterval = null;
+var entjumpflag = false;
+//轮询查询
+var LoginPolling = {
+	isPostLoginPolling: false,//是否发起轮询请求
+	loginPollingInterval: null,
+	initInterval: null,
+	init: function(){
+		//防止重复调用
+		if(this.initInterval != null){
+			return;
+		}
+		//先发一个消息,保存session
+		this.postShareid();
+		this.initInterval = setInterval(this.postShareid,3000);
+	},
+	postShareid: function(){
+		if(WSpolling.isPageHidden || pageshareid == "" || kopshareid == ""){
+			return;
+		}
+		$.ajax({
+			type: "POST",
+			url: "/front/ajaxPolling",
+			data: {reqType: 1,shareIds: pageshareid+"___"+kopshareid},
+			dataType: "json",
+			timeout: 3000,
+			success: function(r){
+				clearInterval(LoginPolling.initInterval);
+				//LoginPolling.initInterval = null;
+			}
+		});
+	},
+	start: function(){
+		//防止重复调用
+		if(this.loginPollingInterval != null){
+			return;
+		}
+		//定时器,定时请求看是否扫码登录,返回用户信息,登录
+		this.loginPollingInterval = setInterval(function(){
+			//如果浏览器不支持webscoket,走ajax轮询方式
+			if(window.WebSocket == undefined) {
+				LoginPolling.isPostLoginPolling = true;
+			}
+			if(WSpolling.isPageHidden || !LoginPolling.isPostLoginPolling){
+				return;
+			}
+			$.ajax({
+				type: "POST",
+				url: "/front/ajaxPolling",
+				data: {reqType:2},
+				dataType: "json",
+				timeout: 3000,
+				success: function(r){
+					if(!jQuery.isEmptyObject(r)){
+						logic(r,mynum);
+					}
+				}
+			});
+		},5000);
+	},
+	stop: function(){
+		clearInterval(this.loginPollingInterval);
+		this.loginPollingInterval = null;
+		this.isPostLoginPolling = false;
+		this.initInterval = null;
+	}
+}
+var webSocketHeartCheck = new WebSocketHeartCheck(LoginPolling);
+//创建websocket连接
+var createWebSocket = function(flag){
+	try{
+		ws = new WebSocket(wsUrl);//实例化websocket对象
+		initEventHandle(flag);
+	}catch(e){
+		reconnect();
+		//console.log(e)
+	}
+}
+//
+var initEventHandle = function(flag){
+	ws.onmessage = function(e){
+		//接收消息正常,就不再发ajax轮询
+		LoginPolling.isPostLoginPolling = false;
+		if(e.data==""){
+			return
+		}else if(e.data=="HeartBeat"){//心跳检测
+			//如果获取到消息,心跳检测重置
+	        //拿到任何消息都说明当前连接是正常的
+	        webSocketHeartCheck.reset().start(ws,loginflag);
+			return;
+		}
+		//用户登录
+		logic($.parseJSON(e.data),mynum);
+	}
+	ws.onerror = function(e){
+		//console.info("onerror");
+		reconnect();
+	}
+	ws.onclose = function(e) {
+		//console.info("onclose");
+        reconnect();
+    }
+	ws.onopen = function(e) {
+		if(flag){//重连之后发送shareid
+			SendMsg();
+		}
+		//心跳检测重置
+        webSocketHeartCheck.reset().start(ws,loginflag);
+	}
+}
+//
+function reconnect() {
+	if(webSocketHeartCheck.lockReconnect || loginflag){
+		return;
+	}
+	LoginPolling.isPostLoginPolling = true;
+    webSocketHeartCheck.lockReconnect = true;
+	LoginPolling.init();
+    //没连接上会一直重连,设置延迟避免请求过多
+    setTimeout(function () {
+        createWebSocket(true);
+		webSocketHeartCheck.lockReconnect = false;
+    }, 2000);
+}
+//websocket查看用户是否登录
+var JYLogin = function(num){
+	clearInterval(loginfg)
+	loginfg = setInterval(function(){
+		jylgi++;
+		//console.log(jylgi+"-----")
+		if(jylgi>12*60){
+			getNewShareId(num);
+			jylgi = 0;
+		}
+	},1000)
+	LoginPolling.init();
+	SendMsg();
+}
+var SendMsg = function(){
+	//向后台发送websocket数据
+	if (window["WebSocket"]){
+		if(ws.readyState==1){
+			//console.log("发送:"+pageshareid+"___"+kopshareid)
+			ws.send(pageshareid+"___"+kopshareid);
+		}else{
+			LoginPolling.isPostLoginPolling = true;
+		}
+	}else{
+		LoginPolling.isPostLoginPolling = true;
+	}
+}
+//生成页面二维码,不同页面处理逻辑
+var getNewShareId = function(num){
+	mynum = num;
+	pageType = "T"
+	var rref = document.referrer;
+	if (localStorage.getItem("oldshareid")!=null){
+		oldshareid=localStorage.getItem("oldshareid");
+	}
+	//console.log("num:"+num)
+	$.post("/front/getLoginNum/"+num,{rref:rref,oid:oldshareid},function(data){
+        if($("#bidLogin").attr("data-rec")=="sjdc"){
+            window.location.href = "/front/dataExport/toSieve";
+            return;
+        }
+		if(data&&data.num){
+			pageshareid = data.num;
+			kopshareid = data.numot;
+			mynum = num;
+			localStorage.setItem("oldshareid", pageshareid);
+			//redisUserInfo(pageshareid,kopshareid);
+			$(".jyhead_qr img").attr("src","/front/share/"+pageshareid);
+			$("#bottomimg").attr("src","/front/share/"+pageshareid);
+			$("#layerImg-login").attr("src","/front/share/"+pageshareid);
+			$("#layerImg-zbsq").attr("src","/front/share/"+pageshareid);
+			switch(num){
+				case "10"://首页
+					//$("#layerImg").attr("src","/front/share/"+pageshareid);
+					//$("#sy-shareimg img").attr("src","/front/share/"+pageshareid);
+					$(".wxlinkdiv").attr("src","/front/share/"+pageshareid);
+					break;
+				case "11"://订阅页面
+					$("#dyym-1 img").attr("src","/front/share/"+kopshareid);
+					$("#dyym-2").attr("src","/front/share/"+pageshareid);
+					$(".secondleft img").attr("src","/front/share/"+pageshareid);
+					$("#vipCode").attr("src","/front/share/"+kopshareid);
+					break;
+				case "12"://搜索列表页
+					$("#layerImg").attr("src","/front/share/"+pageshareid);
+					$("#wxCode").attr("src","/front/share/"+pageshareid);
+					$("#keyImg").attr("src","/front/share/"+kopshareid);
+					if(keysorpname!=undefined&&keysorpname!=""){
+						var ref = document.referrer;
+						if(ref != ""&&ref.indexOf("jianyu360.com")<0||ref.indexOf("qmx.top")<0){
+							$.post("/front/rediskw",{"skw":keysorpname,"num":kopshareid});
+						}
+					}
+					break;
+				case "13"://快照页
+					$("#layerImg").attr("src","/front/share/"+pageshareid);
+					$("#wxCode").attr("src","/front/share/"+kopshareid);
+					//生成二维码
+					if(keysorpname!=undefined&&keysorpname!=""){
+						$.post("/front/rediskw",{"skw":keysorpname,"num":kopshareid});
+					}
+					break;
+				case "14"://标签页面
+					$("#bottomimg").attr("src","/front/share/"+pageshareid);
+					$("#layerImg").attr("src","/front/share/"+pageshareid);
+					$("#keyImg").attr("src","/front/share/"+pageshareid);
+					break;
+				case "15"://博客列表和内容页面
+					break;
+				case "16"://关于我们页面
+					break;
+				case "18"://扫码关注企业18
+					$("#layerImg").attr("src","/front/share/"+pageshareid);
+					var company = $.trim($("#zbSeatchT input[name='keywords']").val());
+					if(company != "" && company != null && company.length >0){
+						$("#keyImg").attr("src","/front/share/"+kopshareid);
+						$.post("/front/rediskw",{"skw":company,"num":kopshareid});
+					}else{
+						$("#keyImg").attr("src","/front/share/"+pageshareid);
+					}
+					break;
+				case "19"://拟建项目
+					$("#layerImg").attr("src","/front/share/"+pageshareid);
+					$("#wxCode").attr("src","/front/share/"+pageshareid);
+					$("#keyImg").attr("src","/front/share/"+kopshareid);
+					if(keysorpname!=undefined&&keysorpname!=""){
+						$.post("/front/rediskw",{"skw":keysorpname,"num":kopshareid});
+					}
+					break;
+				case "17"://1808新落地页
+					$(".ewm1").attr("src","/front/share/"+pageshareid);
+					$(".ewm2").attr("src","/front/share/"+kopshareid);
+					$("#kwewm").attr("src","/front/share/"+kopshareid);
+					$(".ecode_img img").attr("src","/front/share/"+kopshareid).css("display","");
+					break;
+				case "23"://数据导出
+					break;	
+			}
+			if(num=="13"&&!kzyflag){
+				return false;
+			}
+			setTimeout(function(){
+				if(!loginflag){
+					JYLogin(num);
+				}
+			},500);
+		}
+	},'json');
+}
+//
+var redisUserInfo = function(pid,kid){
+	var rurl = window.location.href;
+	var rref = document.referrer;
+	if (localStorage.getItem("oldshareid")!=null){
+		oldshareid=localStorage.getItem("oldshareid");
+	}
+	$.post("/front/followinfo",{pid:pid,kid:kid,rurl:rurl,rref:rref,oid:oldshareid},function(data){
+		if(data&&data.result=="ok"){
+			localStorage.setItem("oldshareid", pid);
+		}
+	})
+}
+
+//查询用户信息,响应页面登录信息
+var logic = function(data,num){
+	if(data.result=="ok"){
+		//$(".QRLogin").hide();
+		$("#bidLogin").modal("hide")
+		$("#bidcommunity").modal("hide")				
+		clearInterval(loginfg);
+		loginflag = true;
+		processpage(data.shareid,num);
+		//登录成功,停止轮询
+		LoginPolling.stop();
+		//登录成功,停止心跳监测
+		webSocketHeartCheck.reset();
+		if(ws.readyState==1){
+			ws.send("close");
+			ws.close();
+		}
+		encryptId = data.encryptId
+		if(data.s_nickname.length>11){
+			data.s_nickname = data.s_nickname.substring(0,11);
+			data.s_nickname = data.s_nickname + "...";
+		}
+		var hhtml = "<img "
+		if(data.redisheadimg==null||data.redisheadimg==undefined||data.redisheadimg=="<nil>"){
+			data.redisheadimg==""
+		}
+		if(data.s_headimage==null||data.s_headimage==undefined||data.s_headimage=="<nil>"){
+			data.s_headimage==""
+		}
+		if(data.redisheadimg!=""){
+			hhtml+="src='"+data.redisheadimg+"' class='imgShow nomalheadimg'"
+		}else if(data.s_headimage!=""){
+			hhtml+="src='"+data.s_headimage+"' class='imgShow nomalheadimg'"
+		}else{
+			hhtml+="src='"+data.s_headimage+"' class='imgShow'"
+		}
+		hhtml+=" onerror='this.src=\"/images/auto.png\";$(this).removeClass(\"nomalheadimg\");'>"
+			+"<div class='userInfo'>"
+				+"<div class='infoList' style='display:none'>"
+					+"<span class='one'></span>"
+					+"<span class='two'></span>"
+					+"<div class='usernameDiv'>"
+						+data.s_nickname
+					+"</div>"
+					 +"<div class=\"myorderDiv\" onclick=\"window.location.href='/front/swordfish/toMyOrder'\">"
+					 	+"<span>我的订单</span>"
+					 +"</div>"
+                     $.ajax({
+                         type: 'get',
+                         url: '/entbase/ent/mySelectent?t=' + new Date().getTime(),
+                         async: false,
+                     })
+                     $.ajax({
+                         type: 'get',
+                         url: '/front/entExportAuth/getAuth?t=' + new Date().getTime(),
+                         async: false,
+                         success: function (r) {
+                             if(r.myEntMenu){
+                                 hhtml += "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
+                                            +"<span>我的企业</span>"
+                                          +"</div>"
+                             }
+                             if(r.entnicheMenu){
+                                 hhtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/bus'\">"
+                                            +"<span>商机管理</span>"
+                                         +"</div>"
+                             }
+                         }
+                     })
+					hhtml+= "<div class='exitDiv' onclick='signout()'>"
+						+"<img id='outImg' src='/images/userexit.png'/>"
+						+"<span>退出</span>"
+					+"</div>"
+				+"</div>"
+			+"</div>"	
+		$("#login").html(hhtml);
+		try{
+			infoListCss();
+			commonMouseEvent();
+		}catch(e){}
+	}
+}
+
+//登录后处理页面逻辑
+var processpage = function(shareid,num){
+	if($("#bidLogin").attr("data-rec")=="sjdc"){
+		window.location.href = "/front/dataExport/toSieve";
+		return;
+	}
+	clearInterval(loginfg);
+	switch(num){
+		case "10"://10首页
+			var ful = $("#myModal").attr("aria-hidden");
+			if(ful=="true"){
+				break;
+			}
+			$("#myModal").modal("hide");
+//			if(dataListId!=""){
+//				setTimeout(function(){
+//					window.open("/article/content/"+dataListId+".html");
+//				},500)
+//			}
+			break;
+		case "11"://11订阅页面
+			//$("#myModal-01").click();
+			$(".modal").click();
+			break;
+		case "12"://12搜索列表
+			var ful = $("#myModal").attr("aria-hidden");
+			
+			if(ful=="true"){
+				break;
+			}
+			
+			$("#myModal").modal("hide");
+			$("#labModal").modal("hide");
+			if(dataId!=""){
+				setTimeout(function(){
+					//$('a[dataId="'+ dataId +'"]').click();
+					var aHref = "";
+					if(searchvalue != ""){
+						aHref += '.html?kds='+searchvalue;
+					}else{
+						aHref += '.html';
+					}
+					window.open("/article/content/"+dataId+aHref);
+				},500);
+			}
+			break;
+		case "13"://13快照页
+			if(thurl!=""&&thurl!="D"){
+				window.location.href=thurl;
+			}else if(thurl==""){
+				window.location.href="/";
+			}
+			break;
+		case "14"://14标签页面
+		
+			var ful = $("#myModal").attr("aria-hidden");
+			if(ful=="true"){
+				break;
+			}
+			$("#myModal").click();
+			if(dataId!=""){
+				setTimeout(function(){
+					window.open("/article/content/"+dataId+".html");
+				},500);
+			}
+			break;
+		case "15"://15剑鱼标讯博客页面
+			break;
+		case "16"://关于我们页面16
+			break;
+		case "18"://中标企业搜索
+			var ful = $("#myModal").attr("aria-hidden");	
+			if(ful=="true"){
+				break;
+			}
+			$("#myModal").modal("hide");
+			$("#labModal").modal("hide");
+			if(dataId!=""){
+				setTimeout(function(){
+					//$('a[dataId="'+ dataId +'"]').click();
+					var aHref = "";
+					if(searchvalue != ""){
+						aHref += '.html?kds='+searchvalue;
+					}else{
+						aHref += '.html';
+					}
+					window.open("/article/content/"+dataId+aHref);
+				},500);
+			}
+			break;
+			break;
+		case "19"://拟建项目
+			var ful = $("#myModal").attr("aria-hidden");
+			if(ful=="true"){
+				break;
+			}
+			$("#myModal").modal("hide");
+			$("#labModal").modal("hide");
+			if(dataId!=""){
+				setTimeout(function(){
+					var aHref = "";
+					if(searchvalue != ""){
+						aHref += '.html?kds='+searchvalue;
+					}else{
+						aHref += '.html';
+					}
+					window.open("/article/content/"+dataId+aHref);
+				},500);
+			}
+			break;
+		case "17"://落地页
+			$("#bidLogin").modal("hide");
+			$(".close").click();
+			if(ldpnum=="0"){
+				window.open('/jylab/supsearch/index.html', '_self')
+			}else if(ldpnum=="1"){
+				window.open('/front/subscribe.html', '_self')
+			}else if(ldpnum=="2"){
+				window.open('/jylab/supsearch/proposedProject.html', '_self')
+			}else if(ldpnum=="3"){
+				if(ldmold!=""){
+					window.open('/list/stype/'+ldmold+'.html', '_self')
+				}else{
+					window.open('/jylab/supsearch/index.html', '_self')
+				}
+			}else if(ldpnum=="4"){
+				if(ldmold!=""){
+					window.open('/list/area/'+ldmold+'.html', '_self')
+				}else{
+					window.open('/jylab/supsearch/index.html', '_self')
+				}
+			}else if(ldpnum=="5"){
+				if(ldmold){
+					window.open('/article/content/'+ldmold+'.html')
+				}else{
+					window.open('/jylab/supsearch/index.html')	
+				}
+			}else if(ldpnum=="6"){
+				window.open('/front/dataExport/toSieve')
+			}
+			break;
+		case "24"://百度SEM-p 快照页推广-落地页
+			window.open(semHref, '_self')
+			break
+	}
+}
+
+
+//退出登录
+var signout = function(){
+	clearInterval(loginfg);
+	kzyflag = true;
+	loginflag = false;
+	unseatflag = false;
+	unseatzbqyflag = false;
+	$("#login").html("<button class='loginBtn'  data-toggle='modal' onclick='openLoginDig()'>登录</button>");
+	loginBtnType();
+	$(".control-tabBtn>a:first>font").text("招标搜索");
+	$(".control-tabBtn>a:eq(2)").addClass("hidden");
+	$(".control-tabBtn>a:eq(3)").addClass("hidden");
+	$(".superSearch").show();
+	$.post("/front/signOut",function(data){
+		if(data=="ok"){
+			try{
+				$.cookie("userid_secure","",{expires:-1,path:"/",domain:document.domain.replace(/[^.]+/,"")});
+			}catch(e){
+				document.cookie = "userid_secure=;expires=-1;path=/";
+			}
+			window.location.href="/";
+            var pt = new RegExp("^/article/content/.+$|^/front/dataExport/.+$|^/front/course/codePay$|^/front/course/orderPay$|^/entpc/.+$");
+            if(pt.test(window.location.pathname)){
+                window.location.href="/";
+            }else{
+            	window.location.reload();
+				/*LoginPolling.start();
+				createWebSocket(false);
+				getNewShareId(mynum);*/
+			}
+		}
+	})
+}
+
+//查看用户是否已经登录
+var haslogin = function(num,kyorpn,url){
+	mynum = num;//页面logid
+	keysorpname = kyorpn;//其他参数
+	thurl = url;//列表也跳转快照页url
+	$.post("/front/hasSign",function(data, location){
+		if(data){
+			loginflag = true;
+			encryptId = data.encryptId
+			if(data.s_nickname!=null&&data.s_nickname.length>11){
+				data.s_nickname = data.s_nickname.substring(0,11);
+				data.s_nickname = data.s_nickname + "...";
+			}
+			var hhtml = "<img "
+			if(data.redisheadimg==null||data.redisheadimg==undefined||data.redisheadimg=="<nil>"){
+				data.redisheadimg=""
+			}
+			if(data.s_headimage==null||data.s_headimage==undefined||data.s_headimage=="<nil>"){
+				data.s_headimage=""
+			}
+			if(data.redisheadimg!=""){
+				hhtml+="src='"+data.redisheadimg+"' class='imgShow nomalheadimg'"
+			}else if(data.s_headimage!=""){
+				hhtml+="src='"+data.s_headimage+"' class='imgShow nomalheadimg'"
+			}else{
+				hhtml+="src='"+data.s_headimage+"' class='imgShow'"
+			}
+			hhtml+=" onerror='this.src=\"/images/auto.png\";$(this).removeClass(\"nomalheadimg\");'>"
+				+"<div class='userInfo'>"
+					+"<div class='infoList' style='display:none'>"
+						+"<span class='one'></span>"
+						+"<span class='two'></span>"
+						+"<div class='usernameDiv'>"
+							+data.s_nickname
+						+"</div>"
+						 +"<div class=\"myorderDiv\" onclick=\"window.location.href='/front/swordfish/toMyOrder'\">"
+						 	+"<span>我的订单</span>"
+						 +"</div>"
+                         $.ajax({
+                             type: 'get',
+                             url: '/entbase/ent/mySelectent?t=' + new Date().getTime(),
+                             async: false,
+                         })
+                         $.ajax({
+                              type: 'get',
+                              url: '/front/entExportAuth/getAuth?t=' + new Date().getTime(),
+                              async: false,
+                              success: function (r) {
+                                  if(r.myEntMenu){
+                                      hhtml += "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
+                                                 +"<span>我的企业</span>"
+                                               +"</div>"
+                                  }
+                                  if(r.entnicheMenu){
+                                      hhtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/bus'\">"
+                                                 +"<span>商机管理</span>"
+                                              +"</div>"
+                                  }
+                              }
+                          })
+                         hhtml+= "<div class='exitDiv' onclick='signout()'>"
+                         	+"<img id='outImg' src='/images/userexit.png'/>"
+                         	+"<span>退出</span>"
+                         +"</div>"
+					+"</div>"
+				+"</div>"	
+			$("#login").html(hhtml);
+			try{
+				infoListCss();
+				commonMouseEvent();
+			}catch(e){}
+			getNewShareId(num);
+		}else{
+			$("#login").html("<button class='loginBtn' data-toggle='modal' onclick='openLoginDig()'>登录</button>");
+			loginBtnType();
+			getNewShareId(num);
+			LoginPolling.start();
+			createWebSocket(false);
+			kzyflag = true;//未登录进入快照页面
+		}
+	})
+}
+function loginBtnType(){
+	var href = window.location.pathname;
+	if (href=="/"||href.indexOf("subscribe")>-1||href.indexOf("advservices")>-1||href.indexOf("aboutus")>-1||href.indexOf("busicooperation")>-1||href.indexOf("pcindex.html")>-1||window.location.pathname==="/jyxspc/"||window.location.pathname==="/entpc/"){
+		$(".loginBtn").attr("onmouseover","this.style.borderColor='#2cb7ca'; this.style.color='#2cb7ca';");
+		$(".loginBtn").attr("onmouseout","this.style.borderColor='#fff'; this.style.color='#fff';");
+	}else if(href.indexOf("topics")>-1){
+		$(".loginBtn").css({"border":"none"});
+	}else{
+		$(".loginBtn").css({"border-color":"#e0e0e0","color":"rgb(37, 38, 39)"});
+		$(".loginBtn").attr("onmouseover","this.style.borderColor='#2cb7ca'; this.style.color='#2cb7ca';");
+		$(".loginBtn").attr("onmouseout","this.style.borderColor='#e0e0e0'; this.style.color='#252627';");
+	}
+}
+///////////////////////////////
+
+
+// ajax部分匿名函数自执行,防止泄露全局变量
+$(function(){
+	var Direct = {
+        verify: {},
+        forge: {},
+        ajaxSms: function (e, type) {
+            var _this = this;
+            if (type === 'verify') {
+                $.post("/phone/login",{
+                  reqType:"sendIdentCode",
+                  phone:$("#bidLogin .login-dig-input-box [name='verify_phone']").val(),
+                  code:$("#bidLogin .login-dig-input-box [name='verify_code']").val()
+                },function(r){
+                  if(r.status==-1){
+                    _this.verify.code.showError('手机号格式错误');
+                  }else if(r.status==-2){//图形验证码错误
+                    _this.verify.code.showError('图形验证码输入错误');
+                    $("#bidLogin .verify-img").attr("src","/front/landpage/captcha?v="+new Date().getTime());                    
+                  }else{
+                    sessionStorage.setItem('login-verify-start-time', new Date().getTime())
+                    startTimeDown(type)
+                  }
+                });
+            } else {
+              $.post("/phone/forgetPwd",{
+                  reqType:"sendIdentCode",
+                  phone:$(".forgetpwd_page .login-dig-input-box [name='forge_phone']").val(),
+                  code:$(".forgetpwd_page .login-dig-input-box [name='forge_code']").val()
+                },function(r){
+                  if(r.status=="phoneError"){
+                    _this.forge.code.showError('手机号格式错误');
+                  }else if(r.status=="codeError"){
+                    _this.forge.code.showError('图形验证码输入错误');
+                    $(".forgetpwd_page .verify-img").attr("src","/front/landpage/captcha?v="+new Date().getTime());                    
+                  }else if(r.status=="phoneNotExists"){
+                    _this.forge.phone.showError('手机号尚未注册');
+                    $(".forgetpwd_page .verify-img").attr("src","/front/landpage/captcha?v="+new Date().getTime());                    
+                  }else if(r.status=="y"){
+                    sessionStorage.setItem('login-verify-start-time', new Date().getTime())
+                    startTimeDown(type)
+                  }
+                });
+            }
+        },
+        // 忘记密码
+        ajaxStepOne: function (e, arr) {
+            $.post("/phone/forgetPwd",{reqType:"nextStep",identCode:arr[2].value},function(r){
+              e.setAttribute('data-loading', 'false');
+              if(r.status=="identCodeError"){
+                arr[2].showError('短信验证码错误');
+              }else if(r.status=="y"){
+                toggleStep(false);
+              }
+            });
+        },
+        ajaxStepTwo: function (e, arr) {
+            $.post("/phone/forgetPwd",{reqType:"save",password:arr[1].value},function(r){
+              e.setAttribute('data-loading', 'false');
+              if(r.status=="passwordError"){
+                arr[0].showError('密码格式错误');
+              }else if(r.status=="passwordRepeat"){
+                arr[0].showError('新密码不能与之前设置过的密码重复');
+              }else{
+                var toast = document.querySelector('.login-dig-success-toast')
+                toast.classList.add('is-show')
+                setTimeout(function () {
+                    toast.classList.remove('is-show')
+                    if(sessionStorage){
+                    	sessionStorage.reLogin=1;
+                    }
+	                window.history.back();
+                }, 1500);
+              }
+            });
+        },
+        // 验证码/密码登录
+        ajaxLoginPass: function (e, arr) {
+            $.post("/phone/login",{reqType:"phoneLogin",phone:arr[0].value,password: arr[1].value},function(r){
+                e.setAttribute('data-loading', 'false')
+                if(r.status==1){
+                  logic(r.userInfo,mynum);
+                }else if(r.status==-1){
+                  arr[0].showError('该手机号未注册')
+                }else if(r.status==-2){
+                  arr[1].showError('密码输入错误')
+                }
+            });
+        },
+        ajaxLoginSms: function (e, arr) {
+            $.post("/phone/login",{reqType:"identCodeLogin",identCode:arr[2].value},function(r){
+              	e.setAttribute('data-loading', 'false')
+              	if(r.status==1){
+                	logic(r.userInfo,mynum);
+                }else if(r.status==-1){
+            		arr[2].showError('短信验证码输入错误')
+              	}
+            });
+        }
+    }
+    // 初始化弹窗
+    try{
+    	initDirect()
+    }catch(e){}
+    // 初始化忘记密码
+    initForgetDirect()
+	if(sessionStorage&&sessionStorage.reLogin==1){
+		sessionStorage.removeItem("reLogin");
+		$(".login-dig-tabbar-navbar>[name='pass']").click();
+		openLoginDig();
+	}
+	$("#bidLogin").on("show.bs.modal", function () {
+		$("#bidLogin .verify-img").attr("src","/front/landpage/captcha?v="+new Date().getTime());
+	});
+	$("#bidLogin").on("hidden.bs.modal", function () {
+		$(".public-nav").css({"padding-right":""});
+		if($("#bidLogin").attr("data-rec")){
+      $("#bidLogin").removeAttr("data-rec");
+		}
+	});
+    function startTimeDown (type) {
+        var nowCount = 60
+        if (sessionStorage.getItem('login-verify-start-time')) {
+            var cCount = parseInt((new Date().getTime() - sessionStorage.getItem('login-verify-start-time')) / 1000)
+            if (cCount >= 0 & cCount <= 60) {
+                nowCount -= cCount
+            } else {
+                sessionStorage.removeItem('login-verify-start-time')
+                return
+            }
+        } else {
+            return
+        }
+        var nowQ = 'span[data-name="verify_get_sms"]'
+        var otherQ = 'span[data-name="forge_get_sms"]'
+        if (type === 'forge') {
+            var tempQ = nowQ
+            nowQ = otherQ
+            otherQ = tempQ
+        }
+        var Ele = document.querySelector(nowQ)
+        var otherEle = document.querySelector(otherQ)
+        var defalutIT = '重新获取('+ --nowCount +'s)'
+        if (Ele) Ele.innerText = defalutIT
+        if (otherEle) otherEle.innerText = defalutIT
+        var nowSS = window.setInterval(function ()  {
+            if (nowCount === 1 || !sessionStorage.getItem('login-verify-start-time')) {
+                clearInterval(nowSS)
+                if (Ele) Ele.innerText = '获取验证码'
+				if (Ele) Ele.classList.remove('is-stop')
+                if (otherEle) otherEle.innerText = '获取验证码'
+                sessionStorage.removeItem('login-verify-start-time')
+                return
+            }
+            var iT = '重新获取('+ --nowCount +'s)'
+            if (Ele) Ele.classList.add('is-stop')
+            if (Ele)  Ele.innerText = iT
+            if (otherEle) otherEle.classList.add('is-stop')
+            if (otherEle)  otherEle.innerText = iT
+        }, 1000)
+    }
+    function getSMSCode (e) {
+        if (e.classList.contains('is-stop')) return
+        var verifyStartTime = new Date().getTime()
+        var oldTime = sessionStorage.getItem('login-verify-start-time') || verifyStartTime - 70000
+        if (verifyStartTime - oldTime >= 60000) {
+            var nowQ = e.getAttribute('data-name') === 'forge_get_sms' ? 'forge' : 'verify'
+            Direct.ajaxSms(e, nowQ)
+        }
+    }
+
+    // 表单规则
+    function ruleForPhone (data, type) {
+        var checkStatus = /^[1][3-9][0-9]{9}$/.test(data.value)
+        if (type === 'input') {
+            return data.value.length >= 11 ? checkStatus : true
+        }
+        if (type === 'blur') {
+            return data.value.length ? checkStatus : true
+        }
+        return checkStatus
+    }
+    function ruleForCode (data, type) {
+        var checkStatus = /^\S{4}$/.test(data.value)
+        if (type === 'blur') {
+            return data.value.length ? checkStatus : true
+        }
+        if (type === 'input') {
+            return data.value.length == 4 ? checkStatus : true
+        }
+        return checkStatus
+    }
+    function ruleForSms (data, type) {
+        var checkStatus = /^\S{6}$/.test(data.value)
+        if (type === 'blur') {
+            return data.value.length ? checkStatus : true
+        }
+        if (type === 'input') {
+            return data.value.length == 6 ? checkStatus : true
+        }
+        return checkStatus
+    }
+    function ruleForPass (data, type) {
+        var checkStatus = /^\S{6,}$/.test(data.value)
+        if (type === 'blur') {
+            return data.value.length ? checkStatus : true
+        }
+        if (type === 'input') {
+            return data.value.length >= 6 ? checkStatus : true
+        }
+        return checkStatus
+    }
+    function createFormStauts (formOption) {
+        var nowEle = document.querySelector(formOption.el)
+        var errClass = 'is-error'
+        // 实时状态
+        var nowData = {
+            status: null,
+            next: false,
+            value: null,
+            el: nowEle,
+            showError: function (error) {
+                this.status = false
+                this.next = false
+                formOption.upStatus()
+                if (error) {
+                    this.el.parentNode.setAttribute('data-error', error)
+                    this.el.parentNode.classList.add(errClass)
+                }
+            }
+        }
+        // 错误提示
+        if (formOption.errorTip && formOption.errorTip !== '') {
+            nowEle.parentNode.setAttribute('data-error', formOption.errorTip)
+        }
+        // 校验规则
+        if (typeof formOption.rule !== "function") {
+            formOption.rule = function (data) {
+                return true
+            }
+        }
+        // 状态变动通知回调
+        if (typeof formOption.upStatus !== "function") {
+            formOption.upStatus = function (data) {
+                return true
+            }
+        }
+        // 监听事件
+        var events = formOption.event;
+        for(var i=0;i<events.length;i++){
+        	if (nowEle) nowEle.addEventListener(events[i],function (e) {
+                // input
+                var nowTarget = e.target
+                var errorTarget = nowTarget.parentNode
+                // 移除错误提示
+                errorTarget.classList.remove(errClass)
+                // 更新状态
+                nowData.value = nowTarget.value
+                nowData.status = formOption.rule(nowData, e.type)
+                nowData.next = formOption.rule(nowData, 'next')
+                formOption.upStatus()
+                // 更新错误提示
+                if (nowData.status) {
+                    errorTarget.classList.remove(errClass)
+                } else {
+                    errorTarget.classList.add(errClass)
+                }
+            })
+        }
+		/*formOption.event.forEach(function(v){
+			if (nowEle) nowEle.addEventListener(v,function (e) {
+                // input
+                var nowTarget = e.target
+                var errorTarget = nowTarget.parentNode
+                // 移除错误提示
+                errorTarget.classList.remove(errClass)
+                // 更新状态
+                nowData.value = nowTarget.value
+                nowData.status = formOption.rule(nowData, v)
+                nowData.next = formOption.rule(nowData, 'next')
+                formOption.upStatus()
+                // 更新错误提示
+                if (nowData.status) {
+                    errorTarget.classList.remove(errClass)
+                } else {
+                    errorTarget.classList.add(errClass)
+                }
+            })
+		});*/
+        return nowData
+    }
+    // 事件
+    function installInputEvent () {
+        // verify img event for click
+		var s1 = document.querySelectorAll('.login-dig-input-box .verify-img');
+        for(var i=0;i<s1.length;i++){
+			s1[i].addEventListener('click', function (e) {
+                e.target.src = '/front/landpage/captcha?v='+new Date().getTime();
+            })
+		}
+		var s2 = document.querySelectorAll('.login-dig-input-box .l-get-sms');
+		for(var i=0;i<s2.length;i++){
+			s2[i].addEventListener('click', function (e) {
+                getSMSCode(e.target)
+            })
+		}
+        var s3 = document.querySelectorAll('.login-dig-input-box input');
+        for(var i=0;i<s3.length;i++){
+        	s3[i].addEventListener('focus', function (e) {
+                var nowInput = e.target
+                nowInput.parentNode.classList.add('is-focus')
+            })
+            s3[i].addEventListener('blur', function (e) {
+                var nowInput = e.target
+                nowInput.parentNode.classList.remove('is-focus')
+            })
+        }
+    }
+    // E-公用
+
+    // 忘记密码
+    function toggleStep (type) {
+        var nowArr = ['.forget-form-box[data-step="1"]', '.forget-step-title[data-step="1"]']
+        var otherArr = ['.forget-form-box[data-step="2"]', '.forget-step-title[data-step="2"]']
+		for(var i=0;i<otherArr.length;i++){
+			if (document.querySelector(otherArr[i])) document.querySelector(otherArr[i]).style.display = (type ? 'none' : '')
+		}
+		for(var i=0;i<nowArr.length;i++){
+			if (document.querySelector(nowArr[i]))  document.querySelector(nowArr[i]).style.display = (type ? '' : 'none')
+		}
+    }
+    // 弹窗登录
+    function installAddEventListener () {
+        // tabbar toggle event
+        document.querySelector('.login-dig-tabbar-navbar').addEventListener('click', function (e) {
+            if (e.target.nodeName !== "SPAN") return
+            if (e.target.classList.contains('is-active')) {
+                return
+            }
+            var SelectName = e.target.getAttribute('name')
+            document.querySelector('.login-dig-tabbar-navbar span.is-active').classList.toggle('is-active')
+            e.target.classList.toggle('is-active')
+            // content toggle
+            document.querySelector('.login-dig-tabbar-content.is-active').classList.toggle('is-active')
+            document.querySelector('.login-dig-tabbar-content[data-name="'+ SelectName +'"]').classList.toggle('is-active')
+        })
+        installInputEvent()
+    }
+    // 初始化
+    function isCheckInit() {
+        return document.querySelector('button[name="forge_submit_phone"]')
+    }
+    function initDirect () {
+        // 初始化事件
+        installAddEventListener()
+        // 初始化倒计时
+        startTimeDown()
+        // 验证码登录
+        var verifySubmit = {
+            el: 'button[name="verify_submit"]',
+            arr: [],
+            init: function (arr) {
+                this.arr = arr
+                this.check()
+                var submitEle = document.querySelector(this.el)
+                submitEle.addEventListener('click', this.submit)
+            },
+            submit: function (e) {
+                var e = e.target
+                if (e.getAttribute('data-loading') === 'true') return
+                e.setAttribute('data-loading', 'true')
+                Direct.ajaxLoginSms(e, verifySubmit.arr)
+            },
+            check: function () {
+                var submitEle = document.querySelector(this.el)
+                var checkStauts = false
+				for(var i=0;i<this.arr.length;i++){
+					if (!this.arr[i].next) {
+                        checkStauts = true
+                    }
+				}
+                if (checkStauts) {
+                    submitEle.setAttribute('disabled', checkStauts)
+                } else {
+                    submitEle.removeAttribute('disabled')
+                }
+            }
+        }
+        var verifySendSms = {
+            el: '.login-dig-input-box span[data-name="verify_get_sms"]',
+            update: function (type) {
+                var Ele = document.querySelector(this.el)
+                if (type) {
+                    Ele.classList.remove('is-stop')
+                } else {
+                    Ele.classList.add('is-stop')
+                }
+            }
+        }
+        var verifyPhone = createFormStauts({
+            el: '.login-dig-input-box input[name="verify_phone"]',
+            rule: ruleForPhone,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+                verifySendSms.update(verifyCode.next && verifyPhone.next)
+            }
+        })
+        var verifyCode = createFormStauts({
+            el: '.login-dig-input-box input[name="verify_code"]',
+            rule: ruleForCode,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+                verifySendSms.update(verifyCode.next && verifyPhone.next)
+            }
+        })
+        var verifySms = createFormStauts({
+            el: '.login-dig-input-box input[name="verify_sms"]',
+            rule: ruleForSms,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+            }
+        })
+        verifySubmit.init([verifyPhone, verifyCode, verifySms])
+        verifySendSms.update(verifyCode.next && verifyPhone.next)
+
+        // 密码登录
+        var passSubmit = {
+            el: 'button[name="pass_submit"]',
+            arr: [],
+            init: function (arr) {
+                this.arr = arr
+                this.check()
+                var submitEle = document.querySelector(this.el)
+                submitEle.addEventListener('click', this.submit)
+            },
+            submit: function (e) {
+                var e = e.target
+                if (e.getAttribute('data-loading') === 'true') return
+                e.setAttribute('data-loading', 'true')
+                Direct.ajaxLoginPass(e, passSubmit.arr)
+            },
+            check: function () {
+                var submitEle = document.querySelector(this.el)
+                var checkStauts = false
+				for(var i=0;i<this.arr.length;i++){
+					if (!this.arr[i].next) {
+                        checkStauts = true
+                    }
+				}
+                if (checkStauts) {
+                    submitEle.setAttribute('disabled', checkStauts)
+                } else {
+                    submitEle.removeAttribute('disabled')
+                }
+            }
+        }
+        var passPhone = createFormStauts({
+            el: '.login-dig-input-box input[name="pass_phone"]',
+            rule: ruleForPhone,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                passSubmit.check()
+            }
+        })
+        var passPass = createFormStauts({
+            el: '.login-dig-input-box input[name="pass_pass"]',
+            rule: ruleForPass,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                passSubmit.check()
+            }
+        })
+        passSubmit.init([passPhone, passPass])
+        Direct.verify = {
+            phone: verifyPhone,
+            code: verifyCode
+        }
+    }
+    function initForgetDirect () {
+        // 判断是否需要初始化
+        if (!isCheckInit()) return
+        // 初始化显示
+        toggleStep(true)
+        // 初始化倒计时
+        startTimeDown('forge')
+        // 手机验证
+        var verifySubmit = {
+            el: 'button[name="forge_submit_phone"]',
+            arr: [],
+            init: function(arr) {
+                this.arr = arr
+                this.check()
+                var submitEle = document.querySelector(this.el)
+                if (!submitEle) return
+                submitEle.addEventListener('click', this.submit)
+            },
+            submit: function (e) {
+                var e = e.target
+                if (e.getAttribute('data-loading') === 'true') return
+                e.setAttribute('data-loading', 'true')
+                Direct.ajaxStepOne(e, verifySubmit.arr)
+            },
+            check: function () {
+                var submitEle = document.querySelector(this.el)
+                if (!submitEle) return
+                var checkStauts = false
+				for(var i=0;i<this.arr.length;i++){
+					if (!this.arr[i].next) {
+                        checkStauts = true
+                    }
+				}
+                if (checkStauts) {
+                    submitEle.setAttribute('disabled', checkStauts)
+                } else {
+                    submitEle.removeAttribute('disabled')
+                }
+            }
+        }
+        var verifySendSms = {
+            el: '.login-dig-input-box span[data-name="forge_get_sms"]',
+            update: function(type) {
+                var Ele = document.querySelector(this.el)
+                if (type) {
+                    Ele.classList.remove('is-stop')
+                } else {
+                    Ele.classList.add('is-stop')
+                }
+            }
+        }
+        var verifyPhone = createFormStauts({
+            el: '.login-dig-input-box input[name="forge_phone"]',
+            rule: ruleForPhone,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+                verifySendSms.update(verifyCode.next && verifyPhone.next)
+            }
+        })
+        var verifyCode = createFormStauts({
+            el: '.login-dig-input-box input[name="forge_code"]',
+            rule: ruleForCode,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+                verifySendSms.update(verifyCode.next && verifyPhone.next)
+            }
+        })
+        var verifySms = createFormStauts({
+            el: '.login-dig-input-box input[name="forge_sms"]',
+            rule: ruleForSms,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                verifySubmit.check()
+            }
+        })
+        verifySubmit.init([verifyPhone, verifyCode, verifySms])
+        verifySendSms.update(verifyCode.next && verifyPhone.next)
+
+        // 密码重置
+        var passSubmit = {
+            el: 'button[name="forge_submit_pass"]',
+            arr: [],
+            init: function(arr) {
+                this.arr = arr
+                this.check()
+                var submitEle = document.querySelector(this.el)
+                submitEle.addEventListener('click', this.submit)
+            },
+            submit: function (e) {
+                var e = e.target
+                if (e.getAttribute('data-loading') === 'true') return
+                e.setAttribute('data-loading', 'true')
+                Direct.ajaxStepTwo(e, passSubmit.arr)
+            },
+            check: function () {
+                var submitEle = document.querySelector(this.el)
+                var checkStauts = false
+				for(var i=0;i<this.arr.length;i++){
+					if (!this.arr[i].next) {
+                        checkStauts = true
+                    }
+				}
+                if (checkStauts) {
+                    submitEle.setAttribute('disabled', checkStauts)
+                } else {
+                    if (this.arr[0].value !== this.arr[1].value) {
+                        this.arr[1].showError('两次密码输入不一致')
+                    } else {
+                        submitEle.removeAttribute('disabled')
+                    }
+                }
+            }
+        }
+        var passPhone = createFormStauts({
+            el: '.login-dig-input-box input[name="forge_pass_one"]',
+            rule: ruleForPass,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                passSubmit.check()
+            }
+        })
+        var passPass = createFormStauts({
+            el: '.login-dig-input-box input[name="forge_pass_two"]',
+            rule: ruleForPass,
+            event: ['input', 'blur'],
+            upStatus: function () {
+                passSubmit.check()
+            }
+        })
+        passSubmit.init([passPhone, passPass])
+
+        Direct.forge = {
+            phone: verifyPhone,
+            code: verifyCode
+        }
+    }
+});
+function openLoginDig() {
+  $("#bidLogin").modal("show");
+}
+function closeLoginDig() {
+  $("#bidLogin").modal("hide");
+}
+function openLoginDigForWx (type) {
+	var otherArr = ['.login-dig-box > .logo','.login-dig-footer-box .wx-logo-box', '.login-dig-footer-box .login-dig-text-split' ,'.login-dig-tabbar-navbar', '.login-dig-tabbar-content', '.login-dig-tabbar-content.is-active']
+	var wxArr = ['.login-dig-wx-qrcode-box', '.login-dig-top-back-box']
+	for(var i=0;i<otherArr.length;i++){
+		document.querySelector(otherArr[i]).style.display = (type ? 'none' : '')
+	}
+	for(var i=0;i<wxArr.length;i++){
+		document.querySelector(wxArr[i]).style.display = (type ? '' : 'none')
+	}
+}

+ 390 - 0
src/web/staticres/structuredata/pc/js/write_infor.js

@@ -0,0 +1,390 @@
+
+var issubmit = ['false', 'false']
+var isfreesubmit = ["false","false","false","false"]
+$(function(){
+if (s_myemail!=""&&s_myemail!=null){
+   $('.email_code').slideUp();
+   isfreesubmit[2] = 'true';
+   isfreesubmit[3] = 'true';
+   $('.ipt_email').val(s_myemail)
+   $('.correct-icon').show()
+   freesubmit();
+}else{
+    $('.ipt_email').val('')
+}
+
+  //   每次进页面都要清空之前的信息
+  $('.ipt_name').val('')
+  $('.ipt_phone').val('')
+  $('.ipt_code').val('')
+  $('.write_ipt_name').val('')
+  $('.write_ipt_phone').val('')
+
+$(".write_run_now").on("click",function(){
+window.location.href="/front/dataExport/toSieve?from=structed"
+})
+    // tab切换
+    $('#tit span').click(function() {
+        var i = $(this).index();//下标第一种写法
+        //var i = $('tit').index(this);//下标第二种写法
+        $(this).addClass('select').siblings().removeClass('select');
+        $('.con li').eq(i).show().siblings().hide();
+        $(".thisPageName").text($(this).text());
+    });
+
+    // 姓名输入事件
+    $('.ipt_name').on('blur', function() {
+        var namerule =  isname(this.value)
+        var myreg=/^\s*$/g;
+        if(namerule){
+            $('.ipt_name').parent().removeClass('input-err')
+            $('.error-name').hide()
+            isfreesubmit[0] = 'true'
+        }else{
+            if(myreg.test(this.value)){
+                $('.ipt_name').parent().removeClass('input-err')
+                $('.error-name').hide()
+                isfreesubmit[0] = 'false'
+            }else{
+                $('.ipt_name').parent().addClass('input-err')
+                $('.error-name').css('display','flex')
+                isfreesubmit[0] = 'false'
+            }
+        }
+        freesubmit()
+    })
+
+    $('.write_ipt_name').on('blur', function() {
+        var namerule =  isname(this.value)
+        var myreg=/^\s*$/g;
+        if(namerule){
+            $('.write_ipt_name').parent().removeClass('input-err')
+            $('.write_error-name').hide()
+            issubmit[0] = "true"
+        }else{
+            if(myreg.test(this.value)){
+                $('.write_ipt_name').parent().removeClass('input-err')
+                $('.write_error-name').hide()
+                issubmit[0] = "false"
+            }else{
+                $('.write_ipt_name').parent().addClass('input-err')
+                $('.write_error-name').css('display','flex')
+                issubmit[0] = "false"
+            }
+        }
+        submit()
+    })
+    
+
+    // 手机号输入事件
+    $('.ipt_phone').on('blur', function() {
+        var phonerule = isPoneAvailable(this.value)
+        var myreg=/^\s*$/g;
+        if(phonerule){
+            $('.ipt_phone').parent().removeClass('input-err')
+            $('.err-phone').hide()
+            isfreesubmit[1] = 'true'
+        }else{
+            if(myreg.test(this.value)){
+                $('.ipt_phone').parent().removeClass('input-err')
+                $('.err-phone').hide()
+                isfreesubmit[1] = 'false'
+            } else{
+                $('.ipt_phone').parent().addClass('input-err')
+                $('.err-phone').css('display','flex')
+                isfreesubmit[1] = 'false'
+            }
+            
+        }
+        freesubmit()
+    })
+    
+    $('.write_ipt_phone').on('blur', function() {
+        var phonerule = isPoneAvailable(this.value)
+        var myreg=/^\s*$/g;
+        if(phonerule){
+            $('.write_ipt_phone').parent().removeClass('input-err')
+            $('.write_err-phone').hide()
+            issubmit[1] = "true"
+        }else{
+            if(myreg.test(this.value)){
+                $('.write_ipt_phone').parent().removeClass('input-err')
+                $('.write_err-phone').hide()
+                issubmit[1] = "false"
+            } else{
+                $('.write_ipt_phone').parent().addClass('input-err')
+                $('.write_err-phone').css('display','flex')
+                issubmit[1] = "false"
+            }
+            
+        }
+        submit()
+    })
+
+    // 邮箱输入事件
+    $('.ipt_email').on('input', function() {
+        var emailrule = isAvailableEmail(this.value)
+        if(emailrule){
+        	if (this.value==s_myemail){
+                $('.correct-icon').show()
+	         	$('.email_code').slideUp()
+	         	isfreesubmit[3] = 'true'
+	       	}else{
+				$.ajax({
+	                url:'/front/structed/verifyEmail',
+	                type:'POST',
+	                data:{
+	                    email:this.value,
+	                },
+	                success:function(res) {
+	                    if(res.status == true) {
+	                        isfreesubmit[3] = 'true'
+	                        $('.ipt_email').attr('disabled','disabled');
+                            $('.email_code').slideUp();
+                            $('.correct-icon').show()
+	                    }else{
+	                        $('.email_code').slideDown()
+                            isfreesubmit[3] = 'false'
+                            $('.correct-icon').hide()
+	                    }
+	                    freesubmit()
+	                },
+	                error:function(err) {
+	                    console.log(err)
+	
+	                } 
+	            })
+	       	}
+            $('.ipt_email').parent().removeClass('input-err')
+            $('.err-email').hide()
+            isfreesubmit[2] = 'true'
+        }else{
+            $('.correct-icon').hide()
+            var myreg=/^\s*$/g;
+            if(myreg.test(this.value)){
+                $('.err-email').hide()
+                $('.ipt_email').parent().removeClass('input-err')
+                isfreesubmit[2] = 'false'
+                $('.email_code').slideUp()
+            }else{
+                $('.ipt_email').parent().addClass('input-err')
+                $('.err-email').css('display','flex')
+                isfreesubmit[2] = 'false'
+                $('.email_code').slideUp()
+            }
+            
+        }
+        freesubmit()
+    })
+
+    // 点击发送验证码
+    $('.l-get-sms').on('click', function() {
+        // 先判断邮箱格式
+        var iptemail = $('.ipt_email').val()
+        var emailrule = isAvailableEmail(iptemail)
+        if(emailrule){
+            $('.err-email').hide()
+            // $('.l-get-sms').text()
+            $.ajax({
+                url:'/front/structed/sendMailVerify',
+                type:'POST',
+                data:{
+                    email:iptemail
+                },
+                success:function(res){
+                    // isfreesubmit[3] = 'true';
+                    // res.errCode = 5
+                    if(res.errCode == 1){
+                        $('.correct-icon').hide()
+                        return
+                    }else if(res.errCode == 2) {
+                        countdown()
+                        $('.correct-icon').hide()
+                        return
+                    }else if(res.errCode == 3) {
+                        countdown()
+                        $('.correct-icon').hide()
+                        return
+                    }else if(res.errCode == 4) {
+                        isfreesubmit[3] = 'true';
+                        $('.email_code').slideUp()
+                        $('.correct-icon').show()
+                        freesubmit()
+                    }else if(res.errCode == 5) {
+                        countdown()
+                    }else{
+                        // vTools.jLoading({
+                        //     content: '发送失败',
+                        //     duration: 1500
+                        // })
+                    }
+                }
+            })
+        }else{
+            $('.err-email').show()
+            $('.ipt_email').parent().addClass('input-err')
+        }
+        
+    })
+
+    function countdown() {
+        $('.l-get-sms').hide()
+        $('.timedown').show()
+        var time=300;
+        setTime=setInterval(function(){
+            if(time<=0){
+                $('.timedown').hide()
+                $('.l-get-sms').show()
+                $(".timedown").text('重新获取'+ '(' + 299+'s' + ')');
+                clearInterval(setTime);
+                return;
+            }
+            time--;
+            $(".timedown").text('重新获取'+ '(' + time+'s' + ')');
+        },1000);
+    }
+
+    // 邮箱验证码输入事件
+    $('.ipt_code').on('input',function() {
+        // console.log($(this).val().length)
+        var codeLen = $(this).val()
+        var iptEmail = $('.ipt_email').val()
+        if(codeLen.length == 6){
+            $.ajax({
+                url:'/front/structed/verifyCode',
+                type:'POST',
+                data:{
+                    s_email:iptEmail,
+                    verifyCode:codeLen
+                },
+                success:function(res) {
+                    if(res.status == true) {
+                        isfreesubmit[3] = 'true'
+                        $('.ipt_email').attr('disabled','disabled')
+                        $('.email_code').slideUp()
+                        $('.correct-icon').show()
+                    }else{
+                        $('.correct-icon').hide()
+                        vTools.jLoading({
+                            content: res.msg,
+                            duration: 1500
+                        })
+                        isfreesubmit[3] = 'false'
+                    }
+                    freesubmit()
+                },
+                error:function(err) {
+                    console.log(err)
+
+                } 
+            })
+        }
+    })
+        // 免费样例--确定
+    $('.free_button').on('click', function() {
+        var iptname = $('.ipt_name').val()
+        var iptphone = $('.ipt_phone').val()
+        var iptemail = $('.ipt_email').val()
+        $.ajax({
+            url:'/front/structed/freeSamples',
+            type:'POST',
+            data:{
+                name:iptname,
+                phone_num:iptphone,
+                s_email:iptemail
+            },
+            success:function(res){
+                if(res.status == true) {
+                    $('.savedata-free').show()
+                    setTimeout(function() {
+                        $('.savedata-free').hide()
+                        window.location.replace('/front/structed/pc_index.html')
+                    },1500)
+                }else{
+                    // vTools.jLoading({
+                    //     content: '提交失败',
+                    //     duration: 1500
+                    // })
+                }
+            },
+            error:function(err){
+                // vTools.jLoading({
+                //     content: '提交失败',
+                //     duration: 1500
+                // })
+            }
+        })
+    })
+
+    // 联系客服--确认
+    $('.write_run').on('click', function() {
+        var sub_name = $('.write_ipt_name').val()
+        var sub_phone = $('.write_ipt_phone').val()
+        $.ajax({
+            url:'/front/structed/savedata',
+            type:'POST',
+            data:{
+                name:sub_name,
+                phone_num:sub_phone
+            },
+            success:function(res) {
+                if(res.data.status == true) {
+                   $('.savedata-infor').show()
+                   setTimeout(function(){
+                        $('.savedata-infor').hide()
+                        window.location.replace('/front/structed/pc_index.html')
+                   },1500)
+                } else{
+                    // vTools.jLoading({
+                    //     content: '提交失败',
+                    //     duration: 1500
+                    // })
+                }
+            }
+        })
+    })
+    // 验证手机号格式
+    function isPoneAvailable($poneInput) {
+        var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
+        if (!myreg.test($poneInput)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    // 联系人必须是两个汉字以上
+    function isname($nameInput) {
+        // var myreg=/^\s*$/g;
+        var tworeg = /^[\u4E00-\u9FA5]{2,}$/;
+        if (!tworeg.test($nameInput)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    // 验证邮箱格式
+    function isAvailableEmail($emailInput) {
+        return /^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/.test($emailInput)
+    }
+
+    // 判断提交按钮是否可以点击
+    function submit() {
+        if(issubmit.indexOf('false') != -1) {
+            $('.write_run').attr('disabled',true)
+        } else {
+            $('.write_run').attr('disabled',false)
+        }
+    }
+
+    // 判断免费样例的按钮是否可以点击
+    function freesubmit() {
+        if(isfreesubmit.indexOf('false') != -1) {
+            $('.login-dig-submit-button').attr('disabled',true)
+        } else {
+            $('.login-dig-submit-button').attr('disabled',false)
+        }
+    }
+    freesubmit()
+})

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

@@ -1111,20 +1111,25 @@
   margin-top: .32rem;
 }
 
+/* 优惠弹框 */
+.discount-details .weui-half-screen-dialog__hd,
 .coupon-picker .weui-half-screen-dialog__hd {
   padding-left: 0;
   padding-right: 0;
 }
+.discount-details .icon-del-grey,
 .coupon-picker .icon-del-grey {
   padding-left: 0;
   padding-right: 0;
   order: 2;
 }
 
+.discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
 }
 
+.discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
   position: relative;
   display: flex;
@@ -1135,6 +1140,57 @@
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
 
+.discount-details .weui-mask,
+.discount-details .weui-picker {
+    bottom: 3.1rem;
+    min-height: unset;
+    transform: unset;
+}
+.discount-details .weui-picker__bd {
+    padding: 0;
+    padding-bottom: .36rem;
+    flex-direction: column;
+}
+.discount-details .details-bd-item {
+    margin-bottom: unset;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: .24rem 0;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #171826;
+}
+.discount-details .d-b-right .dis-price {
+    text-decoration: unset;
+}
+
+.discount-button {
+    display: none;
+    margin-right: .16rem;
+    padding: .03rem .06rem;
+    font-size: .2rem;
+    line-height: .28rem;
+    color: #9B9CA3;
+    background-color: #F5F7F7;
+    border-radius: 2px;
+}
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
+.discount-button .icon-arrow {
+    transition: all 0.2s;
+    display: inline-block;
+    font-size: .2rem;
+    transform: rotate(90deg);
+}
+
+.text-red {
+    color: #FB483D;
+}
+
+
+
 .origin-price {
   display: none;
   align-items: center;

+ 60 - 4
src/web/staticres/vipsubscribe/css/vip_purchase.css

@@ -659,7 +659,7 @@ html, body {
 .weui-cells:before {
     border-top: 0;
   }
-  
+
   .weui-cells:after {
     border-bottom: 0;
   }
@@ -800,7 +800,7 @@ html, body {
 .vip_purchase .time_cycle .box_bd .monthly_label .weui-cell__hd{
     padding-right: 0.08rem;
   }
-  
+
   .vip_purchase .time_cycle .box_bd .yearly_label .weui-cell__hd{
     padding-right: 0.08rem;
   }
@@ -935,20 +935,25 @@ html, body {
   margin-top: .26rem!important;
 }
 
+/* 优惠弹框 */
+.discount-details .weui-half-screen-dialog__hd,
 .coupon-picker .weui-half-screen-dialog__hd {
   padding-left: 0;
   padding-right: 0;
 }
+.discount-details .icon-del-grey,
 .coupon-picker .icon-del-grey {
   padding-left: 0;
   padding-right: 0;
   order: 2;
 }
 
+.discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
-}       
+}
 
+.discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
   position: relative;
   display: flex;
@@ -959,6 +964,57 @@ html, body {
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
 
+.discount-details .weui-mask,
+.discount-details .weui-picker {
+    bottom: 3.1rem;
+    min-height: unset;
+    transform: unset;
+}
+.discount-details .weui-picker__bd {
+    padding: 0;
+    padding-bottom: .36rem;
+    flex-direction: column;
+}
+.discount-details .details-bd-item {
+    margin-bottom: unset;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: .24rem 0;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #171826;
+}
+.discount-details .d-b-right .dis-price {
+    text-decoration: unset;
+}
+
+.discount-button {
+    display: none;
+    margin-right: .16rem;
+    padding: .03rem .06rem;
+    font-size: .2rem;
+    line-height: .28rem;
+    color: #9B9CA3;
+    background-color: #F5F7F7;
+    border-radius: 2px;
+}
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
+.discount-button .icon-arrow {
+    transition: all 0.2s;
+    display: inline-block;
+    font-size: .2rem;
+    transform: rotate(90deg);
+}
+
+.text-red {
+    color: #FB483D;
+}
+
+
+
 .free-7day-tip {
   justify-content: space-between;
 }
@@ -980,4 +1036,4 @@ html, body {
 .weui-cells_checkbox .weui-icon-checked{
   width: 20px;
   height: 20px;
-}
+}

+ 56 - 0
src/web/staticres/vipsubscribe/css/vip_renew.css

@@ -616,20 +616,25 @@
   margin-top: .26rem!important;
 }
 
+/* 优惠弹框 */
+.discount-details .weui-half-screen-dialog__hd,
 .coupon-picker .weui-half-screen-dialog__hd {
   padding-left: 0;
   padding-right: 0;
 }
+.discount-details .icon-del-grey,
 .coupon-picker .icon-del-grey {
   padding-left: 0;
   padding-right: 0;
   order: 2;
 }
 
+.discount-details .weui-picker__bd,
 .coupon-picker .weui-picker__bd {
   padding: 0 0.2rem;
 }
 
+.discount-details .weui-picker__group,
 .coupon-picker .weui-picker__group {
   position: relative;
   display: flex;
@@ -640,6 +645,57 @@
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }
 
+.discount-details .weui-mask,
+.discount-details .weui-picker {
+    bottom: 3.1rem;
+    min-height: unset;
+    transform: unset;
+}
+.discount-details .weui-picker__bd {
+    padding: 0;
+    padding-bottom: .36rem;
+    flex-direction: column;
+}
+.discount-details .details-bd-item {
+    margin-bottom: unset;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: .24rem 0;
+    font-size: .28rem;
+    line-height: .4rem;
+    color: #171826;
+}
+.discount-details .d-b-right .dis-price {
+    text-decoration: unset;
+}
+
+.discount-button {
+    display: none;
+    margin-right: .16rem;
+    padding: .03rem .06rem;
+    font-size: .2rem;
+    line-height: .28rem;
+    color: #9B9CA3;
+    background-color: #F5F7F7;
+    border-radius: 2px;
+}
+.discount-button .icon-arrow.up {
+    transform: rotate(-90deg);
+}
+.discount-button .icon-arrow {
+    transition: all 0.2s;
+    display: inline-block;
+    font-size: .2rem;
+    transform: rotate(90deg);
+}
+
+.text-red {
+    color: #FB483D;
+}
+
+
+
 .origin-price {
   display: none;
   align-items: center;

+ 1218 - 0
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -0,0 +1,1218 @@
+function showGiveStatus (t) {
+    if (t) {
+        $("#giveTimeBox").addClass('hasDoubleEleven')
+        $('.discount-button').show().on('click', function () {
+            var details = $('.discount-details')
+            if (details.is(':hidden')) {
+                $('.discount-details').show()
+                $(this).children('.icon-arrow').addClass('up')
+            } else {
+                $('.discount-details').hide()
+                $(this).children('.icon-arrow').removeClass('up')
+            }
+        })
+        $(".j-icon.icon-del-grey.cancel").on('click', function () {
+            $('.weui-mask').trigger('click')
+        })
+    } else {
+        $("#giveTimeBox").removeClass('hasDoubleEleven')
+        $(".origin-price").hide()
+    }
+}
+// 拦截获取价格接口读取11.11活动信息
+$.ajaxSetup({
+    complete:function(XMLHttpRequest,textStatus){
+        if (this.url.indexOf('/subscribepay/vipsubscribe/getPrice') !== -1) {
+            if (textStatus === 'success') {
+                var data = XMLHttpRequest.responseJSON
+                if (data && data.isActiving && data.isWritten === 0) {
+                    showGiveStatus(true)
+                } else {
+                    showGiveStatus(false)
+                }
+            }
+        }
+    }
+});
+
+$(function () {
+    //项目匹配开关
+    var checkedflag = true;
+
+    function setprojectmatch(index) {
+        if (checkedflag) {
+            checkedflag = false;
+            $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
+                if (r.flag) {
+                    checkedflag = true;
+                    reqData.projectmatch = index;
+                    sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
+                }
+            })
+        }
+    }
+
+    function setMatchway(index) {
+        $.post("/subscribepay/afterPay/setUserInfo", {pageType: "saveSeniorset", matchtype: index}, function (r) {
+            if (r.flag) {
+                reqData.matchway = index;
+                sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
+            }
+        })
+    }
+
+    var checkedflag_other = true; //其他采购单位开关
+    function setotherbuyerclass(index) {
+        if (checkedflag_other) {
+            checkedflag_other = false;
+            $.post("/subscribepay/afterPay/setUserInfo", {pageType: "other_buyerclass", other: index}, function (r) {
+                if (r.flag) {
+                    checkedflag_other = true;
+                    reqData.otherbuyerclass = index;
+                    sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
+                }
+            })
+        }
+    }
+
+
+    function flushSubtotal(list) {
+        var returnHtml = "";
+        for (var i = 0; i < list.length; i++) {
+            var 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].buyset.areacount === -1) {
+                showArea = "全国"
+            } else {
+                if (list[i].buyset.areacount > 0) {
+                    showArea = list[i].buyset.areacount + "个省";
+                }
+                if (list[i].buyset.citys.length > 0) {
+                    var cityCount = 0;
+                    for (var j = 0; j < list[i].buyset.citys.length; j++) {
+                        cityCount += list[i].buyset.citys[j];
+                    }
+                    if (list[i].buyset.areacount > 0) showArea += "、";
+                    showArea += cityCount + "个市";
+                    if (list[i].buyset.citys.length > 1) {
+                        showArea += "(分布在" + list[i].buyset.citys.length + "个省内)"
+                    }
+                }
+            }
+            var industryShow = "";
+            if (list[i].buyset.buyerclasscount === -1) {
+                industryShow = "全行业"
+            } else {
+                industryShow = list[i].buyset.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\">¥" + formatMoney(list[i].price) + "</span>"
+                + "</div>"
+                + "</li>"
+        }
+        $(".list-content").html(returnHtml);
+    }
+
+    function getDataWitXHR() {
+        $DoPost('/subscribepay/vipsubscribe/getSubBuyMsg', {}, function (res) {
+            if (!res.success) return;
+            res.data.oldArea = res.data.area;
+            res.data.oldIndustry = res.data.industry;
+
+            var globalStateStr = JSON.stringify(res.data);
+            sessionStorage.setItem('sub_vip_state', globalStateStr);
+            sessionStorage.setItem('vip_index_read', true);
+            globalState = JSON.parse(globalStateStr);
+            reqData = JSON.parse(globalStateStr);
+            init(res.data)
+        })
+    }
+
+
+    // 设置已选择的区域和行业
+    function setSelectedAreaAndInd(selected) {
+        // buySet = {
+        //     areacount: 2,
+        //     buyerclasscount: 2,
+        //     newcitys: []
+        // }
+        // 设置已选择区域
+        var citySum = arrSum(selected.citys);
+        var text = {
+            p: selected.areacount === 0 ? '' : selected.areacount + '个省',
+            c: citySum === 0 ? '' : citySum + '个市',
+            s: selected.citys.length === 1 ? '' : '(分布在' + selected.citys.length + '个省内)'
+        };
+
+        if (selected.areacount === -1) {
+            $('.vip-body .area .selected-area').text('全国')
+        } else {
+            var dunhao = '';
+            if (citySum !== 0 && selected.areacount !== 0) {
+                dunhao = '、'
+            }
+            if (citySum === 0 || citySum === 1) {
+                text.s = ''
+            }
+            $('.vip-body .area .selected-area').text(text.p + dunhao + text.c + text.s);
+        }
+
+        // 设置已选择行业
+        if (selected.buyerclasscount === -1) {
+            $('.vip-body .industry .selected-industry').text('全行业')
+        } else {
+            $('.vip-body .industry .selected-industry').text(selected.buyerclasscount + '个行业')
+        }
+    }
+
+
+    // 设置已购买的区域和行业
+    function setBuyAreaAndInd(buySet) {
+        // 设置已购买区域
+        var buySetCitySum = arrSum(buySet.newcitys)
+        var text = {
+            p: buySet.areacount === 0 ? '' : buySet.areacount + '个省',
+            c: buySetCitySum === 0 ? '' : buySetCitySum + '个市',
+            s: buySet.newcitys.length === 1 ? '' : '(分布在' + buySet.newcitys.length + '个省内)'
+        }
+
+        if (buySet.areacount === -1) {
+            $('.vip-body .area .buy-set-area').text('全国')
+        } else {
+            var dunhao = '';
+            // 如果省或者市都不为0,则添加顿号
+            if (buySetCitySum !== 0 && buySet.areacount !== 0) {
+                dunhao = '、'
+            }
+            // 如果市等于0或者1,text.s不需要显示
+            if (buySetCitySum === 0 || buySetCitySum === 1) {
+                text.s = ''
+            }
+            $('.vip-body .area .buy-set-area').text(text.p + dunhao + text.c + text.s);
+        }
+
+        // 设置已选择行业
+        if (buySet.buyerclasscount === -1) {
+            $('.vip-body .industry .buy-set-industry').text('全行业')
+        } else {
+            $('.vip-body .industry .buy-set-industry').text(buySet.buyerclasscount + '个行业')
+        }
+    }
+
+    function showTimeOut(endTime, isTrail) {
+        if (!isTrail) {
+            $('.vip-header .expire-remind .remind-link').attr('href', '/front/vipsubscribe/vipsubscribe_renew').text('去续费')
+        } else {
+            $('.vip-header .expire-remind .remind-link').attr('href', '/front/vipsubscribe/vipsubscribe_new').text('去购买')
+        }
+        var timeSub = endTime * 1000 - new Date().getTime();
+        if (timeSub > 0 && timeSub < 60 * 60 * 24 * 1000 * 3) {
+            var hours = Math.floor(timeSub / (60 * 60 * 1000));
+            var day = Math.floor(hours / 24);
+            if (day > 0) {
+                if (!isTrail) {
+                    $(".expire-remind .remind-text").text("超级订阅服务还有" + (day + 1) + "天到期,请及时续费!");
+                } else {
+                    $(".expire-remind .remind-text").text("超级订阅服务还有" + (day + 1) + "天到期,请及时购买!");
+                }
+            } else {
+                if (!isTrail) {
+                    $(".expire-remind .remind-text").text("超级订阅服务今天到期,请及时续费!");
+                } else {
+                    $(".expire-remind .remind-text").text("超级订阅服务今天到期,请及时购买!");
+                }
+            }
+            $(".expire-remind").show();
+        }
+    }
+
+
+    function arrSum(arr) {
+        var sum = 0
+        arr.forEach(function (item, i) {
+            sum += item
+        })
+        return sum
+    }
+
+    // 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);
+        }
+    }
+
+    // 项目匹配问号点击事件
+    $('.project-match .icon-bangzhu').on('click', function () {
+        var str = '开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在超级订阅内一并推送。'
+        weui.alert(str, {
+            title: '项目匹配',
+            className: 'jy-alert',
+            buttons: [{
+                label: '我知道了'
+            }]
+        });
+    })
+
+    // 其他采购单位行业问号点击事件
+    $('.other .icon-bangzhu').on('click', function () {
+        var str = '每条信息的采购单位行业属性由机器自动识别,会存在少数无法识别的情况,此时将归类为“其它”。(注:当采购单位行业选择为全部时,关闭无效)'
+        weui.alert(str, {
+            title: '“其它”采购单位',
+            className: 'jy-alert',
+            buttons: [{
+                label: '我知道了'
+            }]
+        });
+    })
+
+    // 计算标准点击事件
+    $('.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)
+    })
+    $('.weui-mask').on('click', function () {
+        pickerShow('.billing-list-container', false)
+        $('.coupon-picker').hide()
+        $('.discount-details').hide()
+        $('.discount-button .icon-arrow').removeClass('up')
+    })
+
+    // 关键词匹配方式
+    var defaultVal = $('.match-way-value').text()
+    var $iosActionsheet = $('#iosActionsheet');
+    var $iosMask = $('#iosMask');
+
+    function hideActionSheet() {
+        $iosActionsheet.removeClass('weui-actionsheet_toggle');
+        $iosMask.fadeOut(200);
+    }
+
+    $iosMask.on('click', hideActionSheet);
+    $('#iosActionsheet .weui-actionsheet__cell').each(function (index, item) {
+        var t = $(item).children().text().trim();
+        if (t == defaultVal) {
+            $(this).addClass('active')
+        }
+    })
+    $('#iosActionsheetCancel').on('click', hideActionSheet);
+    $('body').on('click', '.match-way', function () {
+        $iosActionsheet.addClass('weui-actionsheet_toggle');
+        $iosMask.fadeIn(200);
+    })
+    $('#iosActionsheet .weui-actionsheet__cell').on('click', function () {
+        $(this).addClass('active').siblings().removeClass('active');
+        $iosActionsheet.removeClass('weui-actionsheet_toggle');
+        $iosMask.fadeOut(200);
+        $('.match-way-value').text($(this).children('.cell_title').text())
+        var nowMode = $(this).children('.cell_title').text()
+        var ModeArr = ['按标题匹配', '按全文匹配']
+        var nowIndex = ModeArr.indexOf(nowMode)
+        if (nowIndex !== -1) {
+            setMatchway(ModeArr.indexOf(nowMode) + 1)
+        } else {
+            $(this).removeClass('active').siblings().addClass('active');
+            $('.match-way-value').text($(this).siblings().children('.cell_title').text())
+            weui.toast('关键词匹配方式修改失败', {
+                duration: 1500,
+                className: 'jy-toast',
+                callback: function () {
+                    console.log('close')
+                }
+            });
+        }
+    })
+
+    $('body').on('click', '.jy-dialog .weui-mask', function () {
+        pickerShow('.jy-dialog', false)
+    })
+
+    $('.close-expire-remind').on("click", function () {
+        $(".expire-remind").hide();
+    });
+    // 阅读并接受协议前的模拟checkbox点击事件
+    if (sessionStorage.getItem("vip_index_read") === "true") {
+        $('.checkbox').addClass("checked");
+        $('.vip-footer.upgrade .confirm').prop('disabled', false);
+    }
+    $('.checkbox').on('click', function () {
+        $(this).toggleClass('checked');
+        var state = $(this).hasClass('checked');
+        $('.vip-footer.upgrade .confirm').prop('disabled', !state);
+        sessionStorage.setItem("vip_index_read", state ? true : false);
+    });
+    if (sessionStorage.liveActiveCode_new === "jianyu360") {
+        $('.coupon-code-tx .keywords-text').text("支付成功赠送30天订阅周期");
+        $('.coupon-picker .weui-input').val("jianyu360");
+        $('.coupon-code-tx').off('click');
+    }
+
+    // switch点击切换
+    $('.switch').on('click', function (e) {
+        var $this = $(this);
+        var hasChecked = $this.hasClass('checked');
+
+        if (!hasChecked) {
+            $this.addClass('checked');
+            setprojectmatch(1);
+        } else {
+            $this.removeClass('checked');
+            setprojectmatch(0);
+            weui.toast('项目匹配已关闭', {
+                duration: 1500,
+                className: 'jy-toast',
+                callback: function () {
+                    console.log('close')
+                }
+            });
+        }
+    })
+
+
+    // switch点击切换
+    $('.switch_other').on('click', function (e) {
+        var $this = $(this);
+        var hasChecked = $this.hasClass('checked');
+        if (!hasChecked) {
+            $this.addClass('checked');
+            setotherbuyerclass(1);
+        } else {
+            $this.removeClass('checked');
+            setotherbuyerclass(0);
+            weui.toast('“其它”采购单位已关闭', {
+                duration: 1500,
+                className: 'jy-toast other-buyerclass',
+                callback: function () {
+                    console.log('close')
+                }
+            });
+        }
+    })
+
+    var $dialog;
+
+    //保存取消提示 module 1 修改 2升级 3续费 4购买
+    function cancelTip(module) {
+        var content = "";
+        var labName = "";
+        var title = "";
+        if (module === 1) {
+            content = "所选订阅设置已做修改,返回后修改的设置将不做保存。";
+            labName = "保存修改";
+            title = "";
+        } else if (module === 2) {
+            content = "所选订阅设置已超出购买范围,升级后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即升级";
+            title = "并升级";
+        } else if (module === 3) {
+            content = "所选订阅设置已超出购买范围,续费后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即续费";
+        } else {
+            content = "所选订阅设置已超出试用范围,购买后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即购买";
+            title = "去购买";
+        }
+
+        $dialog = weui.dialog({
+            title: '保存修改' + title,
+            content: content,
+            className: 'jy-dialog',
+            buttons: [
+                {
+                    label: '不保存',
+                    type: 'default',
+                    onClick: function () {
+                        clearSessionStorage();
+                        window.history.go(-1);
+                        window.location.reload();
+                    }
+                },
+                {
+                    label: labName,
+                    type: 'primary',
+                    onClick: function () {
+                        doSubmit();
+                    }
+                }
+            ]
+        });
+    }
+
+    //展示订阅周期时间
+    function flushShowTime(isTrial, changeValue, startValue, endValue) {
+        if (isTrial) {
+            sessionStorage.removeItem("vip_trial_buy");
+        }
+        var dEnd;
+        if (isTrial && changeValue) {
+            // 初始化订阅周期
+            endValue = new Date().getTime() / 1000;
+            startValue = new Date().getTime() / 1000;
+        }
+        if (changeValue) {
+            var afterEndTime;
+            if (isTrial) {
+                $(".cycle .tip").text("购买订阅周期" + changeValue).show();
+            } else {
+                $(".cycle .tip").text("延长订阅周期" + changeValue).show();
+            }
+            if (changeValue.indexOf("月") > -1) {
+                var monthNum = parseInt(changeValue.replace("个月", ""));
+                afterEndTime = getVipEndDate(2, monthNum, endValue);
+                changeTime = [monthNum, 2]
+            } else {
+                var yearNum = parseInt(changeValue.replace("年", ""));
+                afterEndTime = getVipEndDate(1, yearNum, endValue);
+                changeTime = [yearNum, 1]
+            }
+            dEnd = new Date(afterEndTime * 1000).pattern('yyyy年MM月dd日');
+        } else {
+            dEnd = new Date(endValue * 1000).pattern('yyyy年MM月dd日')
+        }
+        var dStart = new Date(startValue * 1000).pattern('yyyy年MM月dd日');
+        var sDuration = dStart + ' - ' + dEnd;
+        $('.cycle .buy-cycle').text(sDuration);
+    }
+
+    function initCycleSelector() {
+        $('.vip-body .cycle').on('click', function () {
+            pickerShow('#time_cycle', true)
+        })
+        // 打开dialog
+        $('#time_cycle .weui-mask').on('click', function () {
+            pickerShow('#time_cycle', false)
+        })
+        // 关闭dialog
+        $('#time_cycle .box_hd .cancel').on('click', function () {
+            pickerShow('#time_cycle', false)
+        })
+
+        // 选择完成(确定)按钮的点击事件
+        $('#enter_period').on('click', function () {
+            var checkedValue = $('#time_cycle input:radio[name="time"]:checked').val();
+            var result = null
+            if (checkedValue == 'month') {
+                result = $('#number_box_month .month_number').text() + '个月'
+            } else if (checkedValue == 'year') {
+                result = $('#number_box_year span.active').attr('data-id') + '年'
+            }
+            console.log(result)
+            $('.vip-body .extend-cycle').show().text('延长订阅周期' + result)
+            pickerShow('#time_cycle', false)
+        })
+
+
+        // 1. 对订阅时间选择的input绑定点击事件
+        $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+            // 解除确认按钮的锁定
+            $('#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')) {
+                // 点的+
+                // currentNum = currentNum >= 12 ? 12 : currentNum + 1;
+                currentNum = currentNum >= data.numboxMax ? data.numboxMax : (currentNum + data
+                    .numboxStep);
+            } else {
+                // 点的-
+                // currentNum = currentNum <= 1 ? 1 : currentNum - 1;
+                currentNum = currentNum <= data.numboxMin ? data.numboxMin : (currentNum - data
+                    .numboxStep);
+            }
+            $number.text(currentNum)
+            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').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) {
+            $('#number_box_month').removeClass('active');
+            console.log(e.target.dataset.id)
+            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)
+        })
+
+        /* -------- 选择按月订阅  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)
+            } else {
+                $('#number_box_month button').removeAttr('disabled')
+            }
+
+            if (val === 1) {
+                $('#number_box_month button:eq(0)').prop('disabled', true)
+            }
+            if (val === 12) {
+                $('#number_box_month button:eq(1)').prop('disabled', true)
+            }
+
+            var result = (Number(val) * 5.8).toFixed(1);
+            $('.computed_price').html(result)
+
+        })
+
+        /* -------- 选择按年订阅  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')
+            }
+        });
+
+    }
+
+    //提交请求
+    $('.vip-footer .button-r.confirm').on('click', function () {
+        $(this).attr("disabled", "disabled");
+        doSubmit();
+        $(this).removeAttr("disabled");
+    });
+    // 以下数据交互 -------------------
+    // 定义全部变量state
+    var globalState = {};
+    var changeTime = [];
+    var submitPrice = 0;
+    var selectTime = "";
+
+    function init(state) {
+        checkmerge(state.industry, state.isread)
+        // init 已选择的区域和行业
+        var selectedAreaAndInd = getBuySet(state.area, state.industry);
+        setSelectedAreaAndInd(selectedAreaAndInd);
+        // 初始化,已购买的城市和行业
+        setBuyAreaAndInd(state.buyset);
+        //是否提示即将到期
+        showTimeOut(state.endTime, state.isTrial);
+
+        selectTime = sessionStorage.getItem("vip_change_time");
+        var endflag = state.endTime;
+        var stratFlag = state.startTime;
+        //刷新展示周期
+        flushShowTime(state.isTrial, selectTime, stratFlag, endflag);
+
+        // 初始化关键词
+        if (state.items.length === 0) {
+            $('.body-item.keywords .keywords-text').text('未分类')
+        } else {
+            var arr = []
+            state.items.forEach(function (item, index) {
+                arr.push(item['s_item'])
+            })
+            $('.body-item.keywords .keywords-text').text(arr.join('、'))
+        }
+
+        // 初始化信息类型
+        if (state.infotype.length === 0) {
+            $('.body-item.info-type .info-type-text').text('全部类型')
+        } else {
+            $('.body-item.info-type .info-type-text').text(state.infotype.join('、'))
+        }
+
+        if (state.matchway) {
+            var ModeArr = ['按标题匹配', '按全文匹配']
+            var nowMode = ModeArr[state.matchway - 1] || '按标题匹配'
+            $(".body-item.match-way .keywords-text.match-way-value").text(nowMode)
+            var popDom = $("#iosActionsheet .weui-actionsheet__cell.active")
+            if (popDom.find('.cell_title').text() !== nowMode) {
+                popDom.removeClass('active').siblings().addClass('active');
+            }
+        }
+        // 推送设置初始化
+        var pushSettingMap = {
+            1: '实时推送',
+            2: '每日推送',
+            3: '每周推送',
+            4: '每月推送',
+        }
+        $('.body-item.push-setting .push-setting-text').text(pushSettingMap[state.ratemode])
+
+        // 初始化项目匹配
+        if (state.projectmatch) {
+            $('.switch').addClass('checked')
+        } else {
+            $('.switch').removeClass('checked')
+        }
+
+        // 初始化“其他"开关
+        console.log(state.otherbuyerclass)
+        if (state.otherbuyerclass == 1 || state.otherbuyerclass == null) {
+            $('.switch_other').addClass('checked')
+        } else {
+            $('.switch_other').removeClass('checked')
+        }
+
+        //试用不展示续费
+        if (!state.isTrial) {
+            $('.super-title').show();
+            $(".renew").show();
+        } else {
+            $('.try-seven').show();
+            $(".trail").show();
+        }
+    }
+
+
+    // 给订阅周期栏目绑定点击事件(订阅周期选择框显示与隐藏等各种操作)
+    //initCycleSelector()
+
+    var subVipState = sessionStorage.getItem('sub_vip_state');
+    var reqData = JSON.parse(subVipState);
+    if (subVipState) {
+        init(reqData);
+        //判断是否修改
+        var IndustryNoChange = JSON.stringify(reqData.oldIndustry.sort()) === JSON.stringify(reqData.industry.sort());
+        var tmp1 = getAreaClassArr(reqData.oldArea);
+        var tmp2 = getAreaClassArr(reqData.area);
+        var areaNoChange = (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
+        if (IndustryNoChange && areaNoChange && changeTime.length === 0) {
+            getDataWitXHR()
+            return
+        }
+
+        //判断是否需要升级
+        var status = getUpgradeFinalStatus(getBuySet(reqData.area, reqData.industry), {
+            "areacount": reqData.buyset.areacount,
+            "buyerclasscount": reqData.buyset.buyerclasscount,
+            "citys": reqData.buyset.newcitys
+        }, changeTime, reqData.endTime, reqData.renewList, reqData.isTrial);
+        // 双11.11活动
+        var giveT = [changeTime[1] === 1 ? 1 :changeTime[0], changeTime[1]]
+        if (!giveT[0] || !giveT[1]) {
+            giveT = []
+        }
+        var giveStatue = getUpgradeFinalStatus(getBuySet(reqData.area, reqData.industry), {
+            "areacount": reqData.buyset.areacount,
+            "buyerclasscount": reqData.buyset.buyerclasscount,
+            "citys": reqData.buyset.newcitys
+        }, giveT, reqData.endTime, reqData.renewList, reqData.isTrial);
+        var givePrice = giveStatue[0]
+        var giveCycle = changeTime[1] === 1 ? ('1年') : ((changeTime[0] ? changeTime[0] : 1) + '个月')
+
+        if (status[0] === -2) {
+            weui.toast('订单冲突', {
+                duration: 3000,
+                className: 'jy-toast',
+            });
+            return
+        }
+        if (status[0] === -1) {
+            //直接修改
+            $(".vip-footer.modify").show();
+            doSubmit()
+            // initBack(1);
+            return
+        }
+
+        //区域需要升级
+        if (status[1]) {
+            if (reqData.isTrial) {
+                $(".area .tip").text("需购买");
+            }
+            $(".area .tip-need-upgrade").show();
+        }
+        //行业需要升级
+        if (status[2]) {
+            if (reqData.isTrial) {
+                $(".industry .tip").text("需购买");
+            }
+            $(".industry .tip-need-upgrade").show()
+        }
+
+        if (status[0] > 0) {
+            //需要付钱
+            $(".vip-footer.upgrade").show();
+            //价格展示
+            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) * 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) * activeDiscount;
+                //     }
+                //   }
+                // }
+            }
+            $(".vip-footer.upgrade .billing-price").text(formatMoney(status[0]));
+
+            submitPrice = status[0] * 10000 / 100
+
+            // 活动期间,则显示优惠码
+            if ($('.vip-upgrade').hasClass('live-20200707')) {
+                // 优惠码选项
+                $('.coupon-code-tx').show()
+                // 原价现价
+                $('.origin-price').css('display', 'flex')
+                // 优惠提示
+                $('.j-notice-bar.vip-bar').css('display', 'flex')
+            }
+        }
+
+        if (reqData.isTrial) {//试用购买
+            if ($("#giveTimeBox").hasClass('hasDoubleEleven')) {
+                $(".origin-price").css('display', 'flex')
+                $("#giveTimeBox").show()
+                $("#giveTimeText").text(giveCycle)
+                $('.origin-price .price-num').text(formatMoney(status[0] + givePrice));
+                // 优惠明细
+                $('.discount-price .dis-price').text(formatMoney(givePrice))
+                $('.now-price .dis-price').text(formatMoney(status[0]));
+            }
+            if (changeTime.length === 0) {
+                //刷新展示时间
+                changeTime = [1, 2];//
+                flushShowTime(true, "1个月");
+                sessionStorage.setItem("vip_trial_buy", true);
+                selectTime = "1个月"
+            }
+            initBack(4);
+            $(".vip-footer.upgrade .confirm").text("立即购买");
+        } else if ((!status[1] && !status[2])) {//续费
+            initBack(2);
+        } else {//升级
+            //升级展示计价清单
+            if (!reqData.isTrial) {
+                $(".preview-label").text("需补差价:");
+                $(".billing-list-btn").text("计费清单");
+                $(".va-total-container .total-price").text("共计:¥" + formatMoney(status[0]));
+                flushSubtotal(status[3]);
+                console.log("subtotail", status[3])
+            }
+            initBack(2);//升级
+        }
+    } else {
+        getDataWitXHR()
+    }
+
+    //返回提示使用
+    function pushHistory() {
+        var state = {
+            title: "title",
+            url: "#"
+        };
+        window.history.pushState(state, "title", "#");
+    }
+
+
+    function initBack(module) {
+        pushHistory();
+        //weui.toast(module);
+        $('.vip-footer .button-l.reset').off("click").on("click", function () {
+            cancelTip(module);
+        });
+        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')
+                var flagString = location.href.slice(-1)
+                if (flagString === '#') return
+                if (history.state && history.state.flag === "pay") {
+                    return
+                }
+                cancelTip(module);
+            }
+        }, false);
+    }
+
+    //保存 or 升级
+    var submited = false;
+
+    function doSubmit() {
+        if (submited) {
+            return
+        }
+        submited = true;
+        setTimeout(function () {
+            submited = false;
+        }, 1000);
+
+        //校验是否点击阅读条款
+        if (submitPrice > 0) {
+            if (!$('.checkbox').hasClass("checked")) {
+                weui.toast('请勾选服务条款', {
+                    duration: 1500,
+                    className: 'jy-toast',
+                });
+                $dialog.hide(function () {
+                });
+                return
+            }
+        }
+        //优惠码
+        var activeCode = $('.coupon-picker .weui-input').val();
+        var activeCodes = "";
+        if (activeCode.toLowerCase() === 'jianyu360' && $('.coupon-code-tx .keywords-text').text() === '支付成功赠送30天订阅周期') {
+            activeCodes = 'jianyu360';
+        }
+        weui.loading()
+        $DoPost('/subscribepay/vipsubscribe/saveChange', {
+            "area": reqData.area["全国"] ? '{}' : JSON.stringify(reqData.area),
+            "industry": reqData.industry.join(","),
+            "time": selectTime,
+            "price": parseInt((submitPrice).toFixed(0)),
+            "activeCode": activeCodes
+        }, function (r) {
+            if (r.success) {
+                if (r.data.needPay) {
+                    weui.loading().hide()
+                    //创建支付订单
+                    clearSessionStorage();
+                    history.replaceState({"flag": "pay"}, '', '/front/vipsubscribe/toOrderDetailPage?orderCode=' + r.data.code);
+                    var nextHref = "/weixin/pay/checkout_subvip?orderCode=" + r.data.code
+                    if (reqData.isTrial) {
+                        nextHref += "&t=3"
+                    } else {
+                        nextHref += "&t=2"
+                    }
+                    window.location.href = nextHref
+                } else {
+                    weui.loading().hide()
+                    //订阅修改
+                    if (r.data.doSuccess) {
+                        clearSessionStorage();
+                        getDataWitXHR()
+                        // clearSessionStorage();
+                        // window.location.reload();
+                    } else {
+                        weui.toast('修改保存失败', {
+                            duration: 1500,
+                            className: 'jy-toast',
+                        });
+                    }
+                }
+            }
+        }, false);
+    }
+
+    // 活动事件绑定
+    var couponInfo = {
+        code: 'jianyu360',
+        successTip: '支付成功赠送30天订阅周期'
+    }
+    $('.j-picker').on('click', '.cancel', function () {
+        $('.coupon-picker').hide()
+    })
+    $('.coupon-code-tx').on('click', function () {
+        if ($('.vip-upgrade').hasClass('live-20200707')) {
+            $('.coupon-picker').show()
+        } else {
+            return
+        }
+
+        var input = $('.coupon-picker .weui-input')
+        var confirmButton = $('.coupon-picker .weui-picker__btn')
+        var cancelButton = $('.coupon-picker .cancel')
+        var value = input.val()
+        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) {
+                weui.toast('优惠码输入错误', {
+                    className: 'j-toast',
+                    duration: 1500
+                })
+                return
+            }
+            if (value.length === couponInfo.code.length && value.toLowerCase() === couponInfo.code) {
+                $('.coupon-code-tx .keywords-text').text(couponInfo.successTip)
+                sessionStorage.liveActiveCode_new = "jianyu360"
+                $('.coupon-code-tx').off('click')
+                cancelButton.trigger('click')
+            }
+        })
+    })
+
+});
+
+function clearSessionStorage() {
+    sessionStorage.removeItem("sub_vip_state");
+    sessionStorage.removeItem("vip_index_read");
+    sessionStorage.removeItem("vip_change_time");
+    sessionStorage.removeItem("vip_trial_buy");
+
+    //续费页面缓存
+    sessionStorage.removeItem("vipSubSelectArea");
+    sessionStorage.removeItem("vipSubSelectIndustry");
+    sessionStorage.removeItem("vipSubSelectTime");
+    sessionStorage.removeItem("endTime");
+    sessionStorage.removeItem("liveActiveCode_new");
+    sessionStorage.removeItem("liveActiveCode_renew");
+}
+
+var mergedlist = []
+var merge_industry = ["国土", "林业", "环保", "卫生", "工商", "质监", "食药", "安监", "地震", "公安", "文化", "旅游", "银监", "保监"]
+
+function checkmerge(state, isread) {
+    if (checkindustry(state)) {
+        var tips = "<span style='font-size:15px;font-family:PingFang SC;font-weight:bold;color:rgba(29,29,29,1);opacity:1;'>随着政府机构改革和职能转变工作深入推进,部分采购单位行业与现实不一致,为了提高订阅推送数据的准确性,剑鱼标讯需要针对采购单位行业名称进行优化。</span><br><span style='font-size:13px;font-family:PingFang SC;font-weight:400;color:rgba(104,104,104,1);opacity:1;'>采购单位名称的调整不影响所购买的采购单位数量,您仍可按需调整。<br><br>您订阅的:<br></span>"
+        var hasMerged = isread
+        var s_count = h_count = m_count = p_count = cultural_count = CBRC_count = t_count = 0
+        var nature_source = ["国土", "林业"];
+        var health_commission = ["卫生"]
+        var market_supervision = ["工商", "质监", "食药"]
+        var contingency_management = ["安监", "地震", "公安"]
+        var cultural_tourism = ["文化", "旅游"]
+        var CBRC = ["银监", "保监"]
+        var ecological_environment = ["环保"]
+
+        state.forEach(function (item, index) {
+            if (merge_industry.indexOf(item) > -1) {
+                if (item == "国土" || item == "林业") {
+                    mergedlist.push("自然资源")
+                    // hasMerged = true
+                    nature_source = Highlight(nature_source, item)
+                    s_count++
+                } else if (item == "环保") {
+                    mergedlist.push("生态环境")
+                    // hasMerged = true
+                    ecological_environment = Highlight(ecological_environment, item)
+                    h_count++
+
+                } else if (item == "卫生") {
+                    mergedlist.push("卫健委")
+                    // hasMerged = true
+                    health_commission = Highlight(health_commission, item)
+                    p_count++
+                } else if (item == "工商" || item == "质监" || item == "食药") {
+                    mergedlist.push("市场监管")
+                    // hasMerged = true
+
+                    market_supervision = Highlight(market_supervision, item)
+                    m_count++
+                } else if (item == "地震" || item == "安监" || item == "公安") {
+
+                    if (item !== "公安") {
+                        mergedlist.push("应急管理")
+                    } else {
+                        mergedlist.push("公安")
+                    }
+                    // hasMerged = true
+                    contingency_management = Highlight(contingency_management, item)
+                    t_count++
+                } else if (item == "文化" || item == "旅游") {
+                    mergedlist.push("文旅")
+                    // hasMerged = true
+                    cultural_tourism = Highlight(cultural_tourism, item)
+                    cultural_count++
+                } else if (item == "银监" || item == "保监") {
+                    mergedlist.push("银保监")
+                    // hasMerged = true
+                    CBRC = Highlight(CBRC, item)
+                    CBRC_count++
+                }
+            } else {
+                mergedlist.push(item)
+            }
+        })
+        if (s_count >= 1) {
+            tips += nature_source.join('、') + " 合并为 【自然资源】<br>"
+        }
+        if (h_count >= 1) {
+            tips += ecological_environment.join('、') + " 整合其他部门部分职能后更改为 【生态环境】<br>"
+        }
+        if (p_count >= 1) {
+            tips += health_commission.join('、') + " 变更为 【卫健委】<br>"
+        }
+        if (m_count >= 1) {
+            tips += market_supervision.join('、') + " 合并为 【市场监管】<br>"
+        }
+        if (t_count >= 1) {
+            tips += contingency_management.join('、') + "中的消防 合并为 【应急管理】<br>"
+        }
+        if (cultural_count >= 1) {
+            tips += cultural_tourism.join('、') + " 合并为 【文旅】<br>"
+        }
+        if (CBRC_count >= 1) {
+            tips += CBRC.join('、') + " 合并为 【银保监】<br>"
+        }
+        if (!hasMerged) {
+            $("#merge_content").html(tips)
+            $("#merge_dialog").show()
+        }
+
+    }
+
+}
+
+function Highlight(a_list, key) {
+    a_list.forEach(function (item, index) {
+        if (item == key) {
+            var m = "<span style='color:red'>" + item + "</span>"
+            a_list[index] = m
+
+        }
+    })
+    return a_list
+}
+
+function acceptchange() {
+    var q = removeDuplicatedItem(mergedlist)
+    $.post("/subscribepay/vipsubscribe/mergeIndustry", {"industry": q.toString(), "isread": true}, function (r) {
+        if (r.success) {
+            sessionStorage.removeItem("sub_vip_state")
+            console.log("行业合并成功")
+        } else {
+            console.log("行业合并失败")
+        }
+    })
+    $("#merge_dialog").hide()
+}
+
+function removeDuplicatedItem(ar) {
+    var ret = [];
+
+    for (var i = 0, j = ar.length; i < j; i++) {
+        if (ret.indexOf(ar[i]) === -1) {
+            ret.push(ar[i]);
+        }
+    }
+
+    return ret;
+}
+
+function checkindustry(industry) {
+    var isinclude = false
+    industry.forEach(function (item, index) {
+        if (merge_industry.indexOf(item) > -1) {
+            isinclude = true
+            return
+        }
+    })
+    return isinclude
+}
+
+// 解决ios微信下软键盘收起后,页面留白
+document.body.addEventListener("focusout", function () {
+    //软键盘收起的事件处理
+    setTimeout(function () {
+        const scrollHeight =
+            document.documentElement.scrollTop || document.body.scrollTop || 0;
+        window.scrollTo(0, Math.max(scrollHeight - 1, 0));
+    }, 100);
+});

+ 2 - 2
src/web/templates/big-member/wx/page_write_infor_wx.html

@@ -159,7 +159,7 @@
                 },
                 success: function (res) {
                     if (res.error_code === 0) {
-                        window.location.replace("/big/wx/page/open_app_active?from=vip_order_20201111")
+                        window.location.replace("/big/wx/page/open_app_active?from=active_20201111")
                     } else {
                         weui.toast(res.error_msg, 1500);
                     }
@@ -280,4 +280,4 @@
 </script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}
-</html>
+</html>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 1
src/web/templates/pc/index.html


+ 2 - 2
src/web/templates/pc/vip_orderDetail.html

@@ -131,8 +131,8 @@
 						//订单信息
 						$(".order_code").text(orderCode);
 						var filterObj=JSON.parse(r.data.order.filter);
-						if(r.data.order.prepay_time) {
-							$(".order_time").text(r.data.order.prepay_time.replace("-",".").replace("-","."));
+						if(r.data.order.create_time) {
+							$(".order_time").text(r.data.order.create_time.replaceAll("-","."));
 						}
 						$(".price").text(r.data.order.original_price/100);
 						//优惠码

+ 8 - 2
src/web/templates/weixin/commonPay/myOrder.html

@@ -1166,13 +1166,19 @@
                         + '<div class="media-info">';
                     listhtml += '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
                         + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
+                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>')  : '')
+                        + '</p>'
                         + '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
                     //}
                     listhtml += '</div></a>'
                     listhtml += '<div class="price">'
-                    if (isLiveActive) {
+                    if (can1111 || isLiveActive) {
                         var originPrice = formatMoney(parseFloat(orginsPrices) / parseFloat(0.6));
+                        if (can1111) {
+                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
+                        }
+
                         listhtml += '<span class="origin-price-container">'
                             + '<span>原价:¥</span>'
                             + '<span class="origin-price">' + originPrice + '</span>'

+ 13 - 3
src/web/templates/weixin/historypush.html

@@ -550,9 +550,9 @@
             {{else}}
             <div class="left">
                 <img src="/vipsubscribe/image/vip-icon.png">
-                <h4>买超级订阅,买多久送多久!</h4>
+                <h4  data-name="doubleEleven_title">300组关键词特权</h4>
             </div>
-            <a onclick="tointroducepage()" id="app-historypush-vipSub-topBanner" class="right freeuse" style="text-decoration: none;background: linear-gradient(270deg, #F1D090 0%, #FAE7CA 100%)">去抢</a>
+            <a data-name="doubleEleven_button" onclick="tointroducepage()" id="app-historypush-vipSub-topBanner" class="right freeuse" style="text-decoration: none;background: linear-gradient(270deg, #F1D090 0%, #FAE7CA 100%)">免费试用</a>
             {{end}}
         </div>
     </div>
@@ -681,7 +681,17 @@
 <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/mapArea.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/js/merge-wx.js?v={{Msg "seo" "version"}}"></script>
-
+<script>
+    // 双11活动文案修改
+    $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+        if (r && r.data) {
+            if (r.data.isActiving) {
+                $('*[data-name="doubleEleven_title"]').text('买超级订阅,买多久送多久!')
+                $('*[data-name="doubleEleven_button"]').text('去抢')
+            }
+        }
+    })
+</script>
 <script>
   /*
       * money unit for zyh @date 2020/6/5

+ 54 - 1
src/web/templates/weixin/vipsubscribe/vip_index_new.html

@@ -251,6 +251,18 @@
                     </div>
                 </a>
             </li>
+                    <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>
+        </li>
             <li class="body-item coupon-code-tx">
               <a class="item-container" href="javascript:;">
                   <div class="item">
@@ -303,6 +315,10 @@
                     </span>
             </div>
             <div class="origin-price">
+                <span class="discount-button">
+                    <span>优惠明细</span>
+                    <span class="iconfont icon-arrow"></span>
+                </span>
                 <span class="price-label">原价:</span>
                 <div class="price-container">
                     <span class="currency-type">&yen;</span>
@@ -346,6 +362,43 @@
       </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>
+                <div class="weui-half-screen-dialog__bd" style="padding-bottom: unset;">
+                    <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>
+        </div>
 <!-- 计费清单picker -->
 <div class="billing-list-container p13" style="display: none;">
     <div class="weui-mask weui-animate-fade-in"></div>
@@ -590,4 +643,4 @@
 <script src="/vipsubscribe/js/vip_index_new.js?v={{Msg "seo" "version"}}"></script>
 </body>
 {{include "/common/baiducc.html"}}
-</html>
+</html>

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

@@ -78,6 +78,13 @@
                         <p class="o-name">超级订阅</p>
                         <p class="o-price price"></p>
                     </div>
+                    <div class="origin-price-container" style="display: none;">
+                        <p class="price-label">原价:</p>
+                        <p class="origin-price">
+                            <span class="yen">&yen;</span>
+                            <span class="price-num">1222</span>
+                        </p>
+                    </div>
                 </div>
                 <div class="middle">
                     <div class="title">订阅信息</div>

+ 14 - 14
src/web/templates/weixin/vipsubscribe/vip_pay_success.html

@@ -49,22 +49,22 @@
 <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 <script>
     $(function () {
-        $.get('/jyactive/doubleEleven/isActiving', function (r) {
-            if (r && r.data) {
-                if (r.data.isActiving && r.data.isWritten === 1) {
-                    try {
-                        var title = {{.T.title}}
-                        if (title.indexOf('超级订阅') !== -1 && title.indexOf('超级订阅试用') === -1) {
-                            setTimeout(function () {
-                                location.href = '/big/wx/page/write_infor_wx'
-                            }, 3000)
-                        }
-                    } catch (e) {
-
+        if (window.performance.navigation.type !== 2) {
+            $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+                if (r && r.data) {
+                    if (r.data.isActiving && r.data.isWritten === 1) {
+                        try {
+                            var title = {{.T.title}}
+                            if (title.indexOf('超级订阅') !== -1 && title.indexOf('超级订阅试用') === -1) {
+                                setTimeout(function () {
+                                    location.href = '/big/wx/page/write_infor_wx'
+                                }, 3000)
+                            }
+                        } catch (e) {}
                     }
                 }
-            }
-        })
+            })
+        }
         //查看订单
         $(".left_btn").on("click", function () {
             window.location.href = '/front/vipsubscribe/toOrderDetailPage?orderCode={{.T.orderCode}}'

+ 63 - 4
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -180,6 +180,10 @@
                 </div>
                 {{if not .T.isTrial }}
                     <div class="origin-price" style="display:none;">
+                        <span class="discount-button">
+                            <span>优惠明细</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
                         <span class="price-label">原价:</span>
                         <div class="price-container">
                             <span class="currency-type">&yen;</span>
@@ -333,8 +337,45 @@
                         </button>
                     </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>
+                <div class="weui-half-screen-dialog__bd" style="padding-bottom: 0;">
+                    <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>
         </div>
+        </div>
         <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
         <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
         <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
@@ -345,7 +386,16 @@
                     $(".j-notice-bar.bar-red.free-7day-tip.give").css('display', 'flex')
                     $("#giveTimeBox").show()
                     $(".origin-price").css('display', 'flex')
-
+                    $('.discount-button').show().on('click', function () {
+                        var details = $('.discount-details')
+                        if (details.is(':hidden')) {
+                            $('.discount-details').show()
+                            $(this).children('.icon-arrow').addClass('up')
+                        } else {
+                            $('.discount-details').hide()
+                            $(this).children('.icon-arrow').removeClass('up')
+                        }
+                    })
                 } else {
                     $(".j-notice-bar.bar-red.free-7day-tip.give").hide()
                     $("#giveTimeBox").hide()
@@ -555,7 +605,8 @@
                 },
                 flushPrice: function (time, flag) {
                     if (this.vipSubisTrial) {
-                        $('.price strong').text('0.00');
+                        $('.price .billing-price').text('0.00');
+                        $('.now-price .dis-price').text('0.00');  // 优惠明细
                     } else {
                         var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
                         var givePrice = getsubVipOrderPriceBybuyset(this.nowBuyset, [time[1] === 1 ? 1 : time[0], time[1]]);
@@ -563,14 +614,20 @@
                         var showPrice = formatMoney(price);
 
                         if (flag === 1) {
-                            $('.price strong').text(showPrice);
+                            $('.price .billing-price').text(showPrice);
+                            $('.now-price .dis-price').text(showPrice); // 优惠明细
+
                             $('.origin-price .price-num').text(formatMoney(price + givePrice));
+                            $('.discount-price .dis-price').text(formatMoney(givePrice))
                         } else if (flag === 2) {
                             $('.computed_price').html(showPrice);
                         } else {
-                            $('.price strong').text(showPrice);
+                            $('.price .billing-price').text(showPrice);
+                            $('.now-price .dis-price').text(showPrice); // 优惠明细
+
                             $('.origin-price .price-num').text(formatMoney(price + givePrice));
                             $('.computed_price').html(showPrice);
+                            $('.discount-price .dis-price').text(formatMoney(givePrice))
                         }
 
                     }
@@ -824,6 +881,8 @@
                 $('#pay_way').hide(200);
                 $('#time_cycle').hide(200);
                 $('.j-picker').hide();
+                $('.discount-details').hide()
+                $('.discount-button .icon-arrow').removeClass('up')
             }
 
             //是否可点击

+ 64 - 2
src/web/templates/weixin/vipsubscribe/vip_renew.html

@@ -126,6 +126,10 @@
                     </span>
                 </div>
                 <div class="origin-price">
+                    <span class="discount-button">
+                        <span>优惠明细</span>
+                        <span class="iconfont icon-arrow"></span>
+                    </span>
                     <span class="price-label">原价:</span>
                     <div class="price-container">
                         <span class="currency-type">&yen;</span>
@@ -144,6 +148,43 @@
             </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>
+                <div class="weui-half-screen-dialog__bd" style="padding-bottom: 0;">
+                    <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>
+        </div>
 
     <!-- 计费清单picker -->
     <div class="billing-list-container p13" style="display: none;">
@@ -340,6 +381,17 @@
             $(".vip-bar").show()
             $("#giveTimeBox").show()
             $(".origin-price").css('display', 'flex')
+            $(".discount-details .weui-picker").css('bottom', $(".vip-footer.renew").height() + 'px')
+            $('.discount-button').show().on('click', function () {
+                var details = $('.discount-details')
+                if (details.is(':hidden')) {
+                    $('.discount-details').show()
+                    $(this).children('.icon-arrow').addClass('up')
+                } else {
+                    $('.discount-details').hide()
+                    $(this).children('.icon-arrow').removeClass('up')
+                }
+            })
         } else {
             $(".vip-bar").hide()
             $("#giveTimeBox").hide()
@@ -418,7 +470,8 @@
                     $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
                         if (r) {
                             purchase.price = r;
-                            if (r.isActiving && r.isWritten === 0) {
+                            purchase.can1111 = r.isActiving && r.isWritten === 0
+                            if (purchase.can1111) {
                                 if (!sessionStorage.getItem("vipSubSelectTime")) {
                                     purchase.timeValue = "1年";
                                     purchase.timeSelect_tmp = [1,1]
@@ -535,6 +588,9 @@
                 if (flag === 1) {
                     $('.billing-price').text(showPrice);
                     $('.origin-price .price-num').text(formatMoney(parseFloat(price + givePrice)));
+                    // 优惠明细
+                    $('.discount-price .dis-price').text(formatMoney(givePrice))
+                    $('.now-price .dis-price').text(formatMoney(price));
 
                 } else if (flag === 2) {
                     $('.computed_price').html(showPrice);
@@ -543,6 +599,10 @@
                     $('.origin-price .price-num').text(formatMoney(parseFloat(price + givePrice)));
 
                     $('.computed_price').html(showPrice);
+                    // 优惠明细
+                    $('.discount-price .dis-price').text(formatMoney(givePrice))
+                    $('.now-price .dis-price').text(formatMoney(price));
+
                 }
                 this.flushSelectTime(times, flag === undefined ? 1 : flag);
             },
@@ -567,7 +627,7 @@
                     //是否超过三年
                     var now = Math.floor(new Date().getTime() / 1000);
                     var MaxEnd = getVipEndDate(1, 3, now);
-                    if (false && end > MaxEnd) {
+                    if (!purchase.can1111 && end > MaxEnd) {
                         var timeShow = getDateSub(now, this.endTime);
                         var showTipText = "<div style='white-space: nowrap;'>最长订阅周期不可超过3年</div>剩余周期:";
                         if (timeShow[0] !== 0) {
@@ -868,6 +928,8 @@
             $('#pay_way').hide(200);
             $('#time_cycle').hide(200);
             $('.j-picker').hide();
+            $('.discount-details').hide()
+            $('.discount-button .icon-arrow').removeClass('up')
         }
 
         function clearSessionStorage() {

+ 13 - 2
src/web/templates/weixin/wxkeyset/index.html

@@ -24,8 +24,8 @@
         <div class="vip_banner">
             <div class="banner-box">
                 <span class="j-icon vip-icon"></span>
-                <span class="content">买超级订阅,买多久送多久!</span>
-                <a class="right-action" id="free-keyset-list-link" href="/front/vipsubscribe/introducePage">去抢</a>
+                <span  data-name="doubleEleven_title" class="content">300组关键词特权</span>
+                <a  data-name="doubleEleven_button" class="right-action" id="free-keyset-list-link" href="/front/vipsubscribe/introducePage">免费试用</a>
             </div>
         </div>
         <div class="j-main keyset" ref="jMain">
@@ -85,6 +85,17 @@
             </div>
         </div>
     </div>
+    <script>
+        // 双11活动文案修改
+        $.get('/jyactive/doubleEleven/isActiving?t=' + new Date().getTime(), function (r) {
+            if (r && r.data) {
+                if (r.data.isActiving) {
+                    $('*[data-name="doubleEleven_title"]').text('买超级订阅,买多久送多久!')
+                    $('*[data-name="doubleEleven_button"]').text('去抢')
+                }
+            }
+        })
+    </script>
     <script src="{{Msg "seo" "cdn"}}/js/vue.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/js/swiper.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js"></script>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio