浏览代码

修改app

wangkaiyue 5 年之前
父节点
当前提交
796a6a8bd5
共有 62 个文件被更改,包括 9643 次插入2874 次删除
  1. 1 1
      src/jfw/front/front.go
  2. 4 3
      src/jfw/front/swordfish.go
  3. 1 0
      src/jfw/modules/app/src/app/front/swordfish.go
  4. 9 15
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  5. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/css/wx/treasure_box.css
  6. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_arrow_right.png
  7. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_data_export.png
  8. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_head.png
  9. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_1.png
  10. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_2.png
  11. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_3.png
  12. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_4.png
  13. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_5.png
  14. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_6.png
  15. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_1.png
  16. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_2.png
  17. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_3.png
  18. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_4.png
  19. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_vip.png
  20. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_bg.png
  21. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_data.png
  22. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_vip.png
  23. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js
  24. 102 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/base2.css
  25. 584 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_area.css
  26. 556 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_industry.css
  27. 618 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_time.css
  28. 13 8
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css
  29. 104 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/payway_select.css
  30. 61 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css
  31. 19 11
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css
  32. 339 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css
  33. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/bgi-curve.png
  34. 400 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/UpgradePrice.js
  35. 463 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js
  36. 164 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_industry.js
  37. 226 73
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/common.js
  38. 753 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js
  39. 1 1
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html
  40. 2 2
      src/jfw/modules/app/src/web/templates/me/index.html
  41. 416 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/change_area.html
  42. 277 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/change_industry.html
  43. 294 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/change_time.html
  44. 14 14
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html
  45. 3 3
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry.html
  46. 152 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/payway_select.html
  47. 1 5
      src/jfw/modules/app/src/web/templates/vipsubscribe/renew_notice.html
  48. 1 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/renew_pay.html
  49. 241 234
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index.html
  50. 407 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html
  51. 1 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_pay_success.html
  52. 855 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  53. 0 808
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase_willExpire.html
  54. 831 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html
  55. 1370 1313
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  56. 7 7
      src/jfw/modules/app/src/web/templates/weixin/treasure_box.html
  57. 0 1
      src/jfw/modules/subscribepay/src/service/afterPay.go
  58. 1 1
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  59. 0 27
      src/web/staticres/vipsubscribe/js/common.js
  60. 14 14
      src/web/templates/weixin/historypush.html
  61. 1 5
      src/web/templates/weixin/vipsubscribe/renew_notice.html
  62. 335 324
      src/web/templates/weixin/vipsubscribe/vip_index.html

+ 1 - 1
src/jfw/front/front.go

@@ -1476,7 +1476,7 @@ func (f *Front) Msgremind() error {
 					return f.Redirect("/weixin/pay/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
 				} else {
 					//未续费未到期,跳转到续费页面
-					return f.Redirect("/weixin/pay/renewPayPage")
+					return f.Redirect("/weixin/pay/vipsubscribe_renew")
 				}
 			}
 		}

+ 4 - 3
src/jfw/front/swordfish.go

@@ -297,8 +297,8 @@ func (m *Front) Searchinfolist(p string) error {
 					intns = append(intns, rand.Intn(100))
 				} else {
 					for {
-						v := rand.Intn(intns[(i-1)] + 100)
-						if v-intns[(i-1)] >= 30 {
+						v := rand.Intn(intns[(i - 1)] + 100)
+						if v-intns[(i - 1)] >= 30 {
 							intns = append(intns, v)
 							break
 						}
@@ -1970,7 +1970,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 			,"s_content":{"force_source": true}
         }
     },"_source":["s_title","s_date","s_contenttype","s_content","releasetime","s_description","praise","s_source","s_pic","s_pic1","l_createdate","s_code","_id","s_author"]
-	,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
+	,"from":` + fmt.Sprintf("%v", ((currentPage - 1) * perPage)) + `,
 	"size":` + fmt.Sprintf("%v", perPage) +
 		`,"sort":[{"releasetime":{"order":"desc"}}] }`
 
@@ -2502,6 +2502,7 @@ func (f *Front) Historypush() error {
 	f.T["signature"] = wx.SignJSSDK(f.Site() + f.Url())
 	f.T["openid"] = se.EncodeString(myopenid)
 	f.T["stime"] = times
+	f.T["isVip"] = util.IntAll((*data)["i_vip_status"]) > 0
 	return f.Render("/weixin/historypush.html", &f.T)
 }
 

+ 1 - 0
src/jfw/modules/app/src/app/front/swordfish.go

@@ -746,6 +746,7 @@ func (f *Front) Historypush() error {
 			}
 		}
 		f.T["vipSubtips"] = isExprie
+		f.T["isVip"] = util.IntAll((*data)["i_vip_status"]) > 0
 	}
 	return f.Render("/weixin/historypush.html", &f.T)
 }

+ 9 - 15
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -19,22 +19,20 @@ type Subscribepay struct {
 	toOrderDetailPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toOrderDetailPage"` //订阅收费支付订单详情页面
 	toSetKeyWordPage  xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetKeyWordPage"`  //订阅收费设置关键词
 
-
 	//toSetPageOld         xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPage"`         //订阅收费设置
 	toSetInfoTypePage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetInfoTypePage"` //订阅收费设置信息类型
 	toSetOtherKwsPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSet(.*)Page"`     //订阅收费附加词和排除词设置
 	toVIPViewPage     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toVIPViewPage"`     //订阅收费预览
 
-
 	//修改升级
-	toSetPage        xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSubVipSetPage"`          //订阅收费设置
+	toSetPage        xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSubVipSetPage"`  //订阅收费设置
 	toChangeArea     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeArea"`     //修改区域
 	toChangeIndustry xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeIndustry"` //修改行业
 	toChangeTime     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeTime"`     //修改时间
+	toSelectPayWay   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSelectPayWay"`   //支付方式选择
 	toSetPushSetPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPushSetPage"` //订阅收费推送设置
-
 	//续费
-	renewPage    xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPage/(.*)"` //订阅到期(will:即将到期,exprie:已到期)
+	renewPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPage/(.*)"` //订阅到期(will:即将到期,exprie:已到期)
 	//renewPayPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPayPage"`   //订阅到期续费
 
 	//发票
@@ -85,7 +83,10 @@ func (s *Subscribepay) ToChangeTime() {
 	s.Render("/vipsubscribe/change_time.html")
 }
 
-
+//支付方式选择
+func (s *Subscribepay) ToSelectPayWay() {
+	s.Render("/vipsubscribe/payway_select.html")
+}
 
 //vip订阅介绍页
 func (s *Subscribepay) Introduce() error {
@@ -98,7 +99,7 @@ func (s *Subscribepay) Introduce() error {
 		return s.Redirect("/jyapp/login")
 	}
 	if util.IntAll((*m)["i_vip_status"]) > 0 {
-		return s.Redirect("/jyapp/vipsubscribe/toSetPage")
+		return s.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
 	s.T["notShowTrial"] = util.IntAll((*obj)["i_trial"]) == -1 || (*m)["i_vip_status"] != nil
@@ -130,14 +131,7 @@ func (s *Subscribepay) ToPurchasePage(flag string) {
 			s.Render("/vipsubscribe/vip_renew.html")
 			return
 		}
-		if flag == "willExpire" {
-			s.T["orderType"] = 5
-			s.T["orderType"] = 5
-			s.Render("/vipsubscribe/vip_purchase_willExpire.html")
-			return
-		} else {
-			s.T["orderType"] = 1
-		}
+		s.T["orderType"] = 1
 		if s.GetString("orderCode") != "" {
 			s.T["again"] = 1 //再次购买
 		}

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/css/wx/treasure_box.css

@@ -1,7 +1,7 @@
 .treasure .top {
   width: 100%;
   height: 4.15rem;
-  background: url(/images/syzindex/treasure_bg.png) no-repeat center center;
+  background: url(/jyapp/images/syzindex/treasure_bg.png) no-repeat center center;
   background-size: 100% 100%;
 }
 

二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_arrow_right.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_data_export.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_head.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_1.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_2.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_3.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_4.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_5.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_6.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_1.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_2.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_3.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_4.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_vip.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_bg.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_data.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_vip.png


+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js

@@ -2193,7 +2193,7 @@ var SuperSearch = {
 	initHomePage:function(){
 		$(".home_toset").click(function(){
 			if(SuperSearch.isVip){
-				window.location.href="/jyapp/vipsubscribe/toSetPage"
+				window.location.href="/jyapp/vipsubscribe/toSubVipSetPage"
 			}else{
 				sessionStorage.removeItem("keysetindexToHistory");
 				//window.location.href="/jyapp/swordfish/historypush"

+ 102 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/base2.css

@@ -0,0 +1,102 @@
+* {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+    -webkit-tap-highlight-color:transparent;
+}
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, sumary {
+    margin: 0;
+    padding: 0;
+}
+html,body {
+    /* max-width: 750px; */
+    -webkit-text-size-adjust: 100%;
+    margin: 0 auto;
+    height: 100%;
+    overflow-x: hidden;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: .24rem;
+    background:rgba(245,244,249,1);;
+    color: #3d3d3d;
+    font-family:  "Microsoft YaHei","Helvetica Neue", "Roboto", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,ol {
+    list-style: none;
+}
+/*清除输入框内阴影*/
+input,textarea,select,button{
+    outline: none;
+    border: 0;
+    -webkit-appearance: none;
+    appearance:none;
+}
+button,span,div{
+    -webkit-tap-highlight-color:rgba(0,0,0,0);
+	/* -webkit-user-modify:read-only; */
+}
+img {
+    border: 0;
+    vertical-align: middle;
+    max-width: 100%;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+    text-decoration: none;
+    color: #3d3d3d;
+	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+	-webkit-user-select: none;
+	-moz-user-focus: none;
+	-moz-user-select: none;
+}
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img,a{
+    -webkit-touch-callout:none;
+}
+em,i{
+	font-style: normal;
+}
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+    display: none;
+    position: fixed;
+    top: 0;
+    padding-top: 15px;
+    background: #18974b;
+    width: 100%;
+    z-index: 100;
+}
+/*base*/
+.clearfix{
+    zoom: 1;
+}
+.clearfix:after{
+    clear: both;
+    height: 0;
+    overflow: hidden;
+    display: block;
+    visibility: hidden;
+    content: "";
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+.ellipsis {
+    overflow:hidden;
+    text-overflow:ellipsis;
+    white-space:nowrap;
+}
+.show{
+	display: block;
+}
+.hide{
+	display: none;
+}

文件差异内容过多而无法显示
+ 584 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_area.css


+ 556 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_industry.css

@@ -0,0 +1,556 @@
+@charset "UTF-8";
+.main {
+  width: 100%;
+  overflow: scroll;
+}
+
+.main::-webkit-scrollbar {
+  display: none;
+}
+
+.layout_top-bottom {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+}
+
+.layout_top-bottom .layou_top {
+  flex: 1;
+  overflow: scroll;
+}
+
+.bottom_button {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: .94rem;
+}
+
+.bottom_button .left_btn,
+.bottom_button .right_btn {
+  flex: 1;
+  height: 100%;
+  font-size: .34rem;
+}
+
+.bottom_button .left_btn {
+  color: #2cb7ca;
+  background-color: #fff;
+  border-top: 1px solid #e0e0e0;
+}
+
+.bottom_button .right_btn {
+  color: #fff;
+  background-color: #2cb7ca;
+  border-top: 1px solid #2cb7ca;
+}
+
+.bottom_button button[disabled] {
+  opacity: .5;
+}
+
+.public_btn {
+  width: 100%;
+  height: .94rem;
+  line-height: .94rem;
+  text-align: center;
+  background: #2CB7CA;
+  color: #fff;
+  border-radius: 0.06rem;
+  font-size: .34rem;
+}
+
+.tips_btn {
+  display: flex;
+  position: relative;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.tips_btn .tips_discount {
+  width: 100%;
+}
+
+.tips_btn .tips_discount .tips_d_money {
+  display: none;
+  position: absolute;
+  left: 50%;
+  top: -.2rem;
+  padding: 0 .4rem;
+  height: .64rem;
+  line-height: .64rem;
+  color: #2CB7CA;
+  font-size: .32rem;
+  background-color: #fff;
+  border-radius: .32rem;
+  transform: translate(-50%, -100%);
+  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+}
+
+.tips_btn .tips_discount .tips_d_text {
+  display: none;
+  height: .72rem;
+  line-height: .72rem;
+  color: #fff;
+  font-size: .28rem;
+  text-align: center;
+  background-color: #FFB901;
+}
+
+.tips_btn .btns {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  height: .94rem;
+  line-height: .94rem;
+  color: #fff;
+  font-size: .34rem;
+}
+
+.tips_btn .btns .save-btn,
+.tips_btn .btns .reset-btn {
+  flex: 1;
+  width: 50%;
+  text-align: center;
+  height: 100%;
+  font-size: .34rem;
+}
+
+.tips_btn .btns .reset-btn {
+  background: #fff;
+  color: #2cb7ca;
+  border-top: 1px solid #e0e0e0;
+}
+
+.tips_btn .btns .save-btn {
+  background: #2cb7ca;
+  color: #fff;
+  border-top: 1px solid #2cb7ca;
+}
+
+.tips_btn .btns button[disabled] {
+  opacity: .5;
+}
+
+.jy_icon {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+
+.jy_icon.decrease:before,
+.jy_icon.increase:before,
+.jy_icon.increase:after {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  content: '';
+  width: 0.4rem;
+  height: 0.04rem;
+  background-color: #686868;
+  transform: translate(-50%, -50%);
+}
+
+.jy_icon.increase:after {
+  transform: translate(-50%, -50%) rotate(90deg);
+}
+
+/*禁止长按复制 加给body*/
+.no-touch {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+/* 弹性盒子布局 */
+.flex_alginC {
+  display: flex;
+  align-items: center;
+}
+
+.flex_alginC_justB {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.flex_alginC_justC {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.flex_column {
+  display: flex;
+  flex-direction: column;
+}
+
+.flex_column_alignC {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+/* 自定义弹窗*/
+@-webkit-keyframes c {
+  0% {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes c {
+  0% {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+.custom-dialog .weui-animate-fade-in {
+  -webkit-animation: c ease 0s forwards;
+  animation: c ease 0s forwards;
+}
+
+@-webkit-keyframes d {
+  0% {
+    opacity: 1;
+  }
+  to {
+    opacity: 0;
+  }
+}
+
+@keyframes d {
+  0% {
+    opacity: 1;
+  }
+  to {
+    opacity: 0;
+  }
+}
+
+.custom-dialog .weui-animate-fade-out {
+  -webkit-animation: d ease 0s forwards;
+  animation: d ease 0s forwards;
+}
+
+.custom-dialog .weui-dialog__hd {
+  background: #F5F4F9;
+  padding: .17rem 0;
+  color: #000;
+  font-size: .34rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__bd {
+  padding: .37rem 0;
+  color: #1D1D1D;
+  font-size: .32rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__ft:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__btn:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__ft {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding-bottom: .38rem;
+  box-sizing: border-box;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__btn {
+  display: block;
+  width: 1.72rem;
+  height: .72rem;
+  line-height: .72rem;
+  color: #fff;
+  padding: 0;
+  flex: none;
+  text-align: center;
+  border-radius: 3px;
+}
+
+.custom-dialog .weui-dialog__btn_primary {
+  background-color: #2CB7CA;
+  margin-right: 1rem;
+}
+
+.custom-dialog .weui-dialog__btn_default {
+  background-color: #BFBFC3;
+}
+
+/* 自定义switch按钮 */
+.custom-switch {
+  position: relative;
+  width: 52px;
+  height: 32px;
+  border: 1px solid #dfdfdf;
+  outline: 0;
+  border-radius: 16px;
+  box-sizing: border-box;
+  background-color: #dfdfdf;
+  -webkit-transition: background-color .1s,border .1s;
+  transition: background-color .1s,border .1s;
+  -webkit-appearance: none;
+}
+
+.custom-switch:before {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 50px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fdfdfd;
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+}
+
+.custom-switch:after {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 30px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fff;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+}
+
+.custom-switch.checked {
+  border-color: #04be02;
+  background-color: #04be02;
+}
+
+.custom-switch.checked:before {
+  transform: scale(0);
+}
+
+.custom-switch.checked:after {
+  transform: translateX(20px);
+}
+
+.custom-toast .weui-toast {
+  font-size: .3rem;
+  padding: 0.2rem;
+  width: auto;
+  max-width: 6rem;
+  min-height: 0;
+  height: auto;
+  top: 50%;
+  left: 50%;
+  margin-left: 0;
+  margin-top: -0.47rem;
+  transform: translateX(-50%) translateY(-50%);
+}
+
+.custom-toast .weui-icon_toast {
+  display: none;
+}
+
+.custom-toast .weui-toast__content {
+  margin: 0;
+}
+
+.jymobile-tab-triangle {
+  position: relative;
+}
+
+.jymobile-tab-triangle:after {
+  content: '';
+  position: absolute;
+  top: 50%;
+  right: 0;
+  width: 0;
+  height: 0;
+  font-size: 0;
+  line-height: 0;
+  border-style: solid;
+  border-width: .1rem;
+  border-color: #aaa transparent transparent transparent;
+  transform: translate(140%, -30%);
+}
+
+.jymobile-tab-triangle.active:after {
+  border-color: transparent transparent #2cb7ca transparent;
+  transform: translate(140%, -70%);
+}
+
+.jymobile-tab-triangle.current {
+  color: #2cb7ca;
+}
+
+.jymobile-tab-triangle.current:after {
+  border-color: #2cb7ca transparent transparent transparent;
+}
+
+.choose_industry {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+}
+
+.choose_industry .optional_count {
+  background: #fff;
+  height: .88rem;
+  line-height: .88rem;
+  padding: 0 .3rem;
+  font-size: .3rem;
+  color: #1d1d1d;
+}
+
+.choose_industry .optional_count em {
+  color: #2cb7ca;
+}
+
+.choose_industry .result {
+  padding: .2rem .3rem;
+  background-color: #fff;
+  margin-bottom: 0.2rem;
+}
+
+.choose_industry .result .label {
+  color: #1d1d1d;
+  font-size: .26rem;
+}
+
+.choose_industry .result .result_name, .choose_industry .result .result_count {
+  color: #888888;
+  font-size: .26rem;
+}
+
+.choose_industry .result .update_tips {
+  display: none;
+  padding-left: 1rem;
+  color: #FE737A;
+}
+
+.choose_industry .form {
+  flex: 1;
+  overflow: scroll;
+}
+
+.choose_industry .slide {
+  position: absolute;
+  top: 50%;
+  right: 0;
+  display: flex;
+  flex-direction: column;
+  width: 0.3rem;
+  transform: translateY(-50%);
+}
+
+.choose_industry .slide a {
+  display: inline-block;
+  width: 100%;
+}
+
+.choose_industry .select-area-box {
+  padding-bottom: .94rem;
+  background-color: #fff;
+  min-height: 100%;
+}
+
+.choose_industry .list {
+  padding: 0 .3rem;
+}
+
+.choose_industry .list .wenhao {
+  display: inline-block;
+  padding: 0 0.1rem;
+  height: .7rem;
+  line-height: .7rem;
+}
+
+.choose_industry .list .show_tips {
+  color: #2cb7ca;
+  font-size: .34rem;
+}
+
+.choose_industry .list .tips_detail {
+  width: 6.4rem;
+  padding: .2rem;
+  margin-top: -0.1rem;
+  margin-bottom: .25rem;
+  display: none;
+  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
+  text-align: justify;
+  font-size: .26rem;
+  color: #1d1d1d;
+  line-height: .4rem;
+  border-radius: 2px;
+}
+
+.choose_industry .list .list_item {
+  display: flex;
+  align-items: baseline;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.choose_industry .list .list_item:last-of-type {
+  border-bottom: none;
+}
+
+.choose_industry .list .list_item .item_label {
+  width: .2rem;
+  text-align: left;
+}
+
+.choose_industry .list .list_item .item_industry_list {
+  display: flex;
+  flex: 1;
+  flex-wrap: wrap;
+  justify-content: flex-start;
+  padding-top: .25rem;
+}
+
+.choose_industry .list .list_item .item_industry_list .industry_item {
+  margin: 0 .08rem;
+  margin-bottom: .25rem;
+  padding: 0 .3rem;
+  height: .7rem;
+  line-height: .7rem;
+  font-size: .28rem;
+  color: #1d1d1d;
+  background-color: #f5f4f9;
+  border-radius: .03rem;
+}
+
+.choose_industry .list .list_item .item_industry_list .industry_item.active {
+  color: #fff;
+  background-color: #2cb7ca;
+}
+
+.choose_industry .list .list_item .item_industry_list .industry_item[disabled] {
+  color: #fff;
+  background-color: #bfbfc3;
+}

+ 618 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_time.css

@@ -0,0 +1,618 @@
+@charset "UTF-8";
+.main {
+  width: 100%;
+  overflow: scroll;
+}
+
+.main::-webkit-scrollbar {
+  display: none;
+}
+
+.layout_top-bottom {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+}
+
+.layout_top-bottom .layou_top {
+  flex: 1;
+  overflow: scroll;
+}
+
+.bottom_button {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: .94rem;
+}
+
+.bottom_button .left_btn,
+.bottom_button .right_btn {
+  flex: 1;
+  height: 100%;
+  font-size: .34rem;
+}
+
+.bottom_button .left_btn {
+  color: #2cb7ca;
+  background-color: #fff;
+  border-top: 1px solid #e0e0e0;
+}
+
+.bottom_button .right_btn {
+  color: #fff;
+  background-color: #2cb7ca;
+  border-top: 1px solid #2cb7ca;
+}
+
+.bottom_button button[disabled] {
+  opacity: .5;
+}
+
+.public_btn {
+  width: 100%;
+  height: .94rem;
+  line-height: .94rem;
+  text-align: center;
+  background: #2CB7CA;
+  color: #fff;
+  border-radius: 0.06rem;
+  font-size: .34rem;
+}
+
+.tips_btn {
+  display: flex;
+  position: relative;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.tips_btn .tips_discount {
+  width: 100%;
+}
+
+.tips_btn .tips_discount .tips_d_money {
+  display: none;
+  position: absolute;
+  left: 50%;
+  top: -.2rem;
+  padding: 0 .4rem;
+  height: .64rem;
+  line-height: .64rem;
+  color: #2CB7CA;
+  font-size: .32rem;
+  background-color: #fff;
+  border-radius: .32rem;
+  transform: translate(-50%, -100%);
+  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+}
+
+.tips_btn .tips_discount .tips_d_text {
+  display: none;
+  height: .72rem;
+  line-height: .72rem;
+  color: #fff;
+  font-size: .28rem;
+  text-align: center;
+  background-color: #FFB901;
+}
+
+.tips_btn .btns {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  height: .94rem;
+  line-height: .94rem;
+  color: #fff;
+  font-size: .34rem;
+}
+
+.tips_btn .btns .save-btn,
+.tips_btn .btns .reset-btn {
+  flex: 1;
+  width: 50%;
+  text-align: center;
+  height: 100%;
+  font-size: .34rem;
+}
+
+.tips_btn .btns .reset-btn {
+  background: #fff;
+  color: #2cb7ca;
+  border-top: 1px solid #e0e0e0;
+}
+
+.tips_btn .btns .save-btn {
+  background: #2cb7ca;
+  color: #fff;
+  border-top: 1px solid #2cb7ca;
+}
+
+.tips_btn .btns button[disabled] {
+  opacity: .5;
+}
+
+.jy_icon {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+
+.jy_icon.decrease:before,
+.jy_icon.increase:before,
+.jy_icon.increase:after {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  content: '';
+  width: 0.4rem;
+  height: 0.04rem;
+  background-color: #686868;
+  transform: translate(-50%, -50%);
+}
+
+.jy_icon.increase:after {
+  transform: translate(-50%, -50%) rotate(90deg);
+}
+
+/*禁止长按复制 加给body*/
+.no-touch {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+/* 弹性盒子布局 */
+.flex_alginC {
+  display: flex;
+  align-items: center;
+}
+
+.flex_alginC_justB {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.flex_alginC_justC {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.flex_column {
+  display: flex;
+  flex-direction: column;
+}
+
+.flex_column_alignC {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+/* 自定义弹窗*/
+@-webkit-keyframes c {
+  0% {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes c {
+  0% {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+.custom-dialog .weui-animate-fade-in {
+  -webkit-animation: c ease 0s forwards;
+  animation: c ease 0s forwards;
+}
+
+@-webkit-keyframes d {
+  0% {
+    opacity: 1;
+  }
+  to {
+    opacity: 0;
+  }
+}
+
+@keyframes d {
+  0% {
+    opacity: 1;
+  }
+  to {
+    opacity: 0;
+  }
+}
+
+.custom-dialog .weui-animate-fade-out {
+  -webkit-animation: d ease 0s forwards;
+  animation: d ease 0s forwards;
+}
+
+.custom-dialog .weui-dialog__hd {
+  background: #F5F4F9;
+  padding: .17rem 0;
+  color: #000;
+  font-size: .34rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__bd {
+  padding: .37rem 0;
+  color: #1D1D1D;
+  font-size: .32rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__ft:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__btn:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__ft {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding-bottom: .38rem;
+  box-sizing: border-box;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__btn {
+  display: block;
+  width: 1.72rem;
+  height: .72rem;
+  line-height: .72rem;
+  color: #fff;
+  padding: 0;
+  flex: none;
+  text-align: center;
+  border-radius: 3px;
+}
+
+.custom-dialog .weui-dialog__btn_primary {
+  background-color: #2CB7CA;
+  margin-right: 1rem;
+}
+
+.custom-dialog .weui-dialog__btn_default {
+  background-color: #BFBFC3;
+}
+
+/* 自定义switch按钮 */
+.custom-switch {
+  position: relative;
+  width: 52px;
+  height: 32px;
+  border: 1px solid #dfdfdf;
+  outline: 0;
+  border-radius: 16px;
+  box-sizing: border-box;
+  background-color: #dfdfdf;
+  -webkit-transition: background-color .1s,border .1s;
+  transition: background-color .1s,border .1s;
+  -webkit-appearance: none;
+}
+
+.custom-switch:before {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 50px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fdfdfd;
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+}
+
+.custom-switch:after {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 30px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fff;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+}
+
+.custom-switch.checked {
+  border-color: #04be02;
+  background-color: #04be02;
+}
+
+.custom-switch.checked:before {
+  transform: scale(0);
+}
+
+.custom-switch.checked:after {
+  transform: translateX(20px);
+}
+
+.custom-toast .weui-toast {
+  font-size: .3rem;
+  padding: 0.2rem;
+  width: auto;
+  max-width: 6rem;
+  min-height: 0;
+  height: auto;
+  top: 50%;
+  left: 50%;
+  margin-left: 0;
+  margin-top: -0.47rem;
+  transform: translateX(-50%) translateY(-50%);
+}
+
+.custom-toast .weui-icon_toast {
+  display: none;
+}
+
+.custom-toast .weui-toast__content {
+  margin: 0;
+}
+
+.jymobile-tab-triangle {
+  position: relative;
+}
+
+.jymobile-tab-triangle:after {
+  content: '';
+  position: absolute;
+  top: 50%;
+  right: 0;
+  width: 0;
+  height: 0;
+  font-size: 0;
+  line-height: 0;
+  border-style: solid;
+  border-width: .1rem;
+  border-color: #aaa transparent transparent transparent;
+  transform: translate(140%, -30%);
+}
+
+.jymobile-tab-triangle.active:after {
+  border-color: transparent transparent #2cb7ca transparent;
+  transform: translate(140%, -70%);
+}
+
+.jymobile-tab-triangle.current {
+  color: #2cb7ca;
+}
+
+.jymobile-tab-triangle.current:after {
+  border-color: #2cb7ca transparent transparent transparent;
+}
+
+.vip_extend_cycle {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+}
+
+.vip_extend_cycle .extend_content {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  overflow-y: scroll;
+}
+
+.vip_extend_cycle .extend_content .extend_item {
+  display: block;
+  position: relative;
+  background: #fff;
+  margin-top: .2rem;
+  padding: .32rem .3rem;
+  border-top: 1px solid #CECECE;
+}
+
+.vip_extend_cycle .extend_content .extend_item:after {
+  position: absolute;
+  content: '';
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 1px;
+  background-color: #CECECE;
+  transform-origin: 0 0;
+  transform: scaleY(0.5);
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_top {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_top .label {
+  font-size: .32rem;
+  color: #1d1d1d;
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_top .value {
+  display: flex;
+  align-items: center;
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_top .value span {
+  margin-right: .12rem;
+  font-size: .26rem;
+  color: #686868;
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_top .value i {
+  font-size: .32rem;
+  color: #C2C2C2;
+}
+
+.vip_extend_cycle .extend_content .extend_item .item_bottom {
+  margin-top: .16rem;
+  color: #686868;
+  font-size: .26rem;
+  line-height: .4rem;
+}
+
+.vip_extend_cycle .extend_content .ul_box {
+  flex: 1;
+  margin-top: .2rem;
+  background-color: #fff;
+  padding: 0 .4rem;
+}
+
+.vip_extend_cycle .extend_content .ul_box .li_box {
+  padding: .48rem 0 .46rem;
+}
+
+.vip_extend_cycle .extend_content .ul_box .li_box:nth-child(1) {
+  border-bottom: 1px solid #E0E0E0;
+}
+
+.vip_extend_cycle .extend_content .ul_box .top {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.vip_extend_cycle .extend_content .ul_box .radio_parent {
+  display: flex;
+  align-items: center;
+  font-size: .32rem;
+  color: #1D1D1D;
+}
+
+.vip_extend_cycle .extend_content .ul_box .radio {
+  width: .4rem;
+  height: .4rem;
+  border: 1px solid #ddd;
+  border-radius: 50%;
+  margin-right: .2rem;
+  -webkit-appearance: none;
+  background: #fff;
+}
+
+.vip_extend_cycle .extend_content .ul_box .radio:checked {
+  border: 0;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACpElEQVRogc1asa2DMBBlhIyQMpKNxAiMwAiMwAhswAgZgQrOHSVwLhiBERghvwCSwMdgOzYG6aQUhLw7v3u+Z+J5Bq4g724U6pCUTeIznlGGHQHsKcOBAPbT544yntOiTSnUoYnf/Rm0X7YRAXxShgMFfCkH4zkBjE8HTos21QYtCJ/xzDpwAhgTwN4k8OWK4GBlRYK8u1HGc2vA/yfSPaC+GwFPoQ6tVn1vNQoMfgJPyiYxzXXl3ijbSA88YOwa/BzKfUEKDK4C/hOSe8cD6vv1wOOLMhykGvtUtVFPotunDmDsHORBCPth1PoLUmeDStvUKdrUObgxqinE9xRt+q/6TjarZWW79cZFGXaiVQjy7va+0S/byDX4LYUhZZOIvrPoBafKw7BbVFOW1ozn7pt3B/xe9ed4QH33KNSho+pXv4CngC9SNon0zVcDTwFHNTqb/wTwqcX5TQry3KNHmmswfMYzEXif8Uz5mQwHT1r/55MGC+AJ4FPruVIJrJwRhToUbjA74LeATxuoHvg5gSMJFf24bO9YAy+7AgTwuQVAirfrmeULvBHxYDhINTEpm0SYhGgMsQ1+LG4v3f17B09rCyqa2Y0fzzCeq8pXJUpiPB/F6jTwc1GVJ1GNQ6dp3lJSLqkEyjbSG+YYDrKnBA+o77a8xruQunK219yeN/aGNaM0j9NTAvpmXqA2VsHDSigMWMrFdDnt1vY8xtpSep4hUz+qTGXbIG1K+iWMvW7137x1Y27UQtBzHyqd6A80qi/00AsqXfKETuWFh0OjLwSv/KLjSkkcbZjXTYLhoA3eeRI6tBFd86h8Inhzr1m/L+v7xESZQ6m8XCJnARckoketca+paNGmVuiievllG032tKKjtezf1f36u43PeEYAY1PV/gMeU6lGAhyHxgAAAABJRU5ErkJggg==) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+.vip_extend_cycle .extend_content .ul_box .switch_box {
+  display: none;
+}
+
+.vip_extend_cycle .extend_content .ul_box .date_tab {
+  width: 1.6rem;
+  height: .48rem;
+  line-height: .48rem;
+  text-align: center;
+  display: flex;
+  align-items: center;
+  font-size: .28rem;
+  border-radius: 4px;
+  background-color: #F5F4F9;
+  color: #686868;
+  overflow: hidden;
+}
+
+.vip_extend_cycle .extend_content .ul_box .date_tab .date_tab_item {
+  flex: 1;
+}
+
+.vip_extend_cycle .extend_content .ul_box .date_tab .active {
+  background-color: #2CB7CA;
+  color: #fff;
+}
+
+.vip_extend_cycle .extend_content .ul_box .bottom {
+  display: none;
+}
+
+.vip_extend_cycle .extend_content .ul_box .month {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 6.7rem;
+  height: .8rem;
+  margin: .44rem auto;
+  border: 1px solid #F5F4F9;
+  border-radius: 4px;
+  overflow: hidden;
+}
+
+.vip_extend_cycle .extend_content .ul_box .month .minus, .vip_extend_cycle .extend_content .ul_box .month .add {
+  width: 1.6rem;
+  height: .8rem;
+  line-height: 0.8rem;
+  text-align: center;
+  border-radius: 0;
+  background: #F5F4F9;
+  border-radius: 4px;
+  border: 0;
+}
+
+.vip_extend_cycle .extend_content .ul_box .month .month_number {
+  flex: 1;
+  height: .8rem;
+  line-height: .8rem;
+  background-color: #fff;
+  font-size: .4rem;
+}
+
+.vip_extend_cycle .extend_content .ul_box .month button:disabled {
+  opacity: 0.4;
+}
+
+.vip_extend_cycle .extend_content .ul_box .year {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: .44rem 0;
+}
+
+.vip_extend_cycle .extend_content .ul_box .year span {
+  display: inline-block;
+  width: 2.02rem;
+  height: .8rem;
+  margin: 0 .16rem;
+  line-height: .8rem;
+  text-align: center;
+  background-color: #F5F4F9;
+  border: 1px solid #E0E0E0;
+  color: #1D1D1D;
+  font-size: .32rem;
+  border-radius: 4px;
+}
+
+.vip_extend_cycle .extend_content .ul_box .year .on {
+  background-color: #2CB7CA;
+  color: #fff;
+}

文件差异内容过多而无法显示
+ 13 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css


文件差异内容过多而无法显示
+ 104 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/payway_select.css


文件差异内容过多而无法显示
+ 61 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css


+ 19 - 11
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css

@@ -308,8 +308,8 @@
   border-radius: 16px;
   box-sizing: border-box;
   background-color: #dfdfdf;
-  -webkit-transition: background-color .1s,border .1s;
-  transition: background-color .1s,border .1s;
+  -webkit-transition: background-color .1s, border .1s;
+  transition: background-color .1s, border .1s;
   -webkit-appearance: none;
 }
 
@@ -483,7 +483,7 @@
   color: #000;
 }
 
-.choose_item input:disabled, .choose_item input[disabled]{
+.choose_item input:disabled, .choose_item input[disabled] {
   opacity: 1;
 }
 
@@ -565,14 +565,16 @@
 }
 
 .vip_purchase .fixed-bottom-box {
-  width: 100%;	
+  width: 100%;
   background-color: #fff;
   position: fixed;
   bottom: 0;
 }
+
 .weui-check__label:active {
-    background-color: #fff !important;
+  background-color: #fff !important;
 }
+
 .vip_purchase .fixed-bottom-box .price {
   display: flex;
   align-items: center;
@@ -787,10 +789,16 @@
   background-color: #2cb7ca;
 }
 
-.choose_item .show_time{
-	display:block;
-	width: 5rem;
-	text-align: right;
-	padding-right: .2rem;
-	color: #000;
+.choose_item .show_time {
+  display: block;
+  width: 5rem;
+  text-align: right;
+  padding-right: .2rem;
+  color: #000;
+}
+
+.choose_item .add_tips.area_warn,
+.choose_item .add_tips.industry_warn {
+  color: #fe737a !important;
+  display: block;
 }

文件差异内容过多而无法显示
+ 339 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css


二进制
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/bgi-curve.png


+ 400 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/UpgradePrice.js

@@ -0,0 +1,400 @@
+var req = {
+    "data": {
+        "area": {},
+        "industry": [
+            " 保监",
+            "我安排"
+        ],
+        "buyset": {
+            "areacount": 6,
+            "newcitys": [
+                2,
+                2,
+                2,
+                2
+            ],
+            "buyerclasscount": 2
+        },
+        "isTrial": false,
+        "renewList": [
+            {
+                "_id": "5e044b8df4e49821247fb2d5",
+                "l_validtime": 1580054399,
+                "o_buyset": {
+                    "areacount": 1,
+                    "buyerclasscount": 2,
+                    "newcitys": [
+                        2,
+                        2
+                    ]
+                }
+            },
+            {
+                "_id": "5e044bc4f4e49821247fb2d9",
+                "l_validtime": 1582732799,
+                "o_buyset": {
+                    "areacount": 2,
+                    "buyerclasscount": 1,
+                    "newcitys": [
+                        2
+                    ]
+                }
+            }
+        ]
+    }
+};
+
+// var buyset = {
+//     "areacount": -1,  //省份数量
+//     "buyerclasscount": -1,
+//     "citys": [] //购买省份中城市数量
+// };
+
+//判断是否需要升级 不需要升级返回nil 需要则返回升级后的buyset
+function needUpgrade(newBuyset, oldBuyset) {
+    var BuyerclassUpgrade = AreaNeedUpgrade = false;
+    var UpgradeBuyset = {
+        areacount: oldBuyset.areacount,
+        citys: oldBuyset.citys,
+        buyerclasscount: oldBuyset.buyerclasscount
+    };
+    //比较行业
+    if (oldBuyset.buyerclasscount != -1) {
+        if (oldBuyset.buyerclasscount < newBuyset.buyerclasscount || newBuyset.buyerclasscount == -1) {
+            BuyerclassUpgrade = true;
+            UpgradeBuyset.buyerclasscount = newBuyset.buyerclasscount;
+        }
+    }
+    //比较地区
+    if (oldBuyset.areacount !== -1) {
+        if (newBuyset.areacount === -1) { //升级为全国
+            UpgradeBuyset.areacount = newBuyset.areacount;
+            UpgradeBuyset.citys = newBuyset.citys;
+            AreaNeedUpgrade = true
+        } else {
+            var oldCitysBuyOne = oldCitysBuyTwo = 0;
+            var newCitysBuyOne = newCitysBuyTwo = 0;
+            var oldCopy = []; //复制(防止影响原数组)
+            for (var i = 0; i < oldBuyset.citys.length; i++) {
+                if (oldBuyset.citys[i] === 1) {
+                    oldCitysBuyOne++
+                } else {
+                    oldCitysBuyTwo++
+                }
+                oldCopy.push(oldBuyset.citys[i]);
+            }
+            UpgradeBuyset.citys = oldCopy;
+            for (var i = 0; i < newBuyset.citys.length; i++) {
+                if (newBuyset.citys[i] === 1) {
+                    newCitysBuyOne++
+                } else {
+                    newCitysBuyTwo++
+                }
+            }
+
+            var p_Diff = newBuyset.areacount - oldBuyset.areacount;
+            var c_1_diff = newCitysBuyOne - oldCitysBuyOne;
+            var c_2_diff = newCitysBuyTwo - oldCitysBuyTwo;
+
+            console.log(p_Diff, c_2_diff, c_1_diff);
+
+            if (p_Diff > 0) {
+                UpgradeBuyset.areacount = newBuyset.areacount
+            }
+
+            if (p_Diff > 0 || p_Diff + c_2_diff > 0 || p_Diff + c_2_diff + c_1_diff > 0 ) {//需要升级
+                //有多余未使用名额保留
+                if (p_Diff + c_2_diff + c_1_diff < 0) {
+                    if (c_1_diff < 0 && p_Diff + c_2_diff >= 0) {
+                        c_1_diff = -(p_Diff + c_2_diff)
+                    }
+                    if (c_2_diff < 0 && p_Diff + c_1_diff >= 0) {
+                        c_2_diff = -(p_Diff + c_1_diff)
+                    }
+                }
+
+
+                AreaNeedUpgrade = true;
+                //计算升级后的buySet
+                if (p_Diff < 0) { //有剩余省份未使用
+                    if (c_2_diff > 0) {
+                        c_2_diff += p_Diff //转移给两个市使用
+                    } else {
+                        c_1_diff += p_Diff //转移给一个市使用
+                    }
+                } else { //省份数量增加
+                    UpgradeBuyset.areacount = newBuyset.areacount
+                }
+                var del_2_flag = del_1_flag = 0;//被占用
+                if (c_2_diff < 0) { //有两个城市的名额未使用完
+                    if (p_Diff > 0) {
+                        //转移给一个省使用
+                        if (c_2_diff + p_Diff > 0) {
+                            del_2_flag += -c_2_diff;
+                            c_2_diff = 0;
+                            //p_Diff -= -c_2_diff;
+                        } else {
+                            c_2_diff += p_Diff;
+                            del_2_flag += p_Diff;
+                            //p_Diff = 0
+                        }
+                    }
+                    if (c_1_diff > 0 && c_2_diff < 0) { //转移给一个市使用
+                        c_1_diff += c_2_diff;
+                    }
+                }
+                if (c_1_diff < 0) { //有一个城市的名额未使用完
+                    if (p_Diff > 0) {
+                        if (c_1_diff + p_Diff > 0) {
+                            del_1_flag += -c_1_diff;
+                            c_1_diff = 0;
+                            //p_Diff -= -c_1_diff
+                        } else {
+                            c_1_diff += p_Diff;
+                            del_1_flag += p_Diff;
+                            //p_Diff = 0
+                        }
+                    }
+                    if (c_2_diff > 0 && c_1_diff < 0) {
+                        if (c_1_diff + c_2_diff > 0) {
+                            del_1_flag += -c_1_diff;
+                            c_1_diff = 0;
+                            //c_2_diff -= -c_1_diff;
+                        } else {
+                            c_1_diff += c_2_diff;
+                            del_1_flag += c_2_diff;
+                            //c_2_diff = 0
+                        }
+                    }
+                }
+                //删除顶替
+                console.log("start", UpgradeBuyset.citys, del_2_flag, del_1_flag);
+                var index_flag = 0;
+                for (; del_2_flag > 0 || del_1_flag > 0;) {
+                    var valueFlag = UpgradeBuyset.citys[index_flag];
+                    //console.log(del_2_flag, del_1_flag, UpgradeBuyset.citys);
+                    if (del_2_flag > 0 && valueFlag === 2) {
+                        //UpgradeBuyset.citys = append(UpgradeBuyset.citys[:index_flag], UpgradeBuyset.citys[index_flag+1:]...)
+                        UpgradeBuyset.citys.splice(index_flag, 1);
+                        del_2_flag--;
+                        continue
+                    } else if (del_1_flag > 0 && valueFlag === 1) {
+                        //UpgradeBuyset.citys = append(UpgradeBuyset.citys[:index_flag], UpgradeBuyset.citys[index_flag+1:]...)
+                        UpgradeBuyset.citys.splice(index_flag, 1);
+                        del_1_flag--;
+                        continue
+                    }
+                    index_flag++;
+                }
+                console.log("end", UpgradeBuyset.citys, c_2_diff, c_1_diff);
+                //console.log("add-end", c_1_diff,c_2_diff)
+                //增加新增
+                for (var i = c_2_diff; i > 0; i--) { //添加购买两个市数量
+                    UpgradeBuyset.citys.push(2);
+                }
+
+                for (var i = c_1_diff; i > 0; i--) { //添加购买一个市数量
+                    UpgradeBuyset.citys.push(1);
+                }
+                //console.log("add-end", UpgradeBuyset.citys)
+            } else {//不需要升级
+                AreaNeedUpgrade = false
+            }
+
+        }
+    }
+    if (BuyerclassUpgrade || AreaNeedUpgrade) {
+        return [UpgradeBuyset, AreaNeedUpgrade, BuyerclassUpgrade]
+    } else {
+        return [-1, AreaNeedUpgrade, BuyerclassUpgrade]
+    }
+}
+
+//获取支付价格
+//-1 不用升级 -2 不能升级
+function getUpgradeFinalStatus(newBuyset, oldBuyset, t, endUnix, renewList, isTrail) {
+    var Upgradestatus = needUpgrade(newBuyset, oldBuyset);
+    var Upgrade = Upgradestatus[0];
+    console.log("Upgrade", Upgrade, Upgradestatus);
+    if (isTrail) {//试用用户
+        if (Upgrade !== -1) {//试用用户超出选择
+            if (t.length === 0) { //默认一个月
+                t = [1, 2]
+            }
+            var trailPay = getsubVipOrderPriceBybuyset(newBuyset, t);//试用用户购买
+            return [trailPay, Upgradestatus[1], Upgradestatus[2], []]
+        } else {
+            if (t.length === 0) {
+                return [-1, false, false, []]   //订阅修改
+            }
+            var renewPrice = getsubVipOrderPriceBybuyset(newBuyset, t);//续费
+            return [renewPrice, false, false, []]
+        }
+    }
+    if (Upgrade === -1) {
+        if (t.length === 0) {
+            return [-1, false, false, []]   //订阅修改
+        }
+        var renewPrice = getsubVipOrderPriceBybuyset(oldBuyset, t);//续费
+        return [renewPrice, false, false, []]
+    }
+
+    var final_price = 0;
+    var nowEndTime = endUnix;
+
+    var subtotail = [];
+    //续费升级价格
+    if (renewList) {
+        for (var i = renewList.length - 1; i >= 0; i--) {
+            var thisBuyset = renewList[i].o_buyset;
+            var thisStartTime = renewList[i].l_validtime;
+            var old = getMergeNewBuyset(thisBuyset);
+            var this_price = getSubPrice(old, Upgrade, thisStartTime, nowEndTime);
+            if (this_price < 0) {
+                return [-2, false, false, []]
+            }
+            //清单数组
+            subtotail.push({
+                "buyset": old,
+                "startTime": thisStartTime,
+                "endTime": nowEndTime,
+                "price": this_price,
+                "type": 1
+            });
+            final_price = numAdd(final_price, this_price);
+            //final_price += this_price;
+            nowEndTime = thisStartTime;
+        }
+    }
+    //现在使用升级价格
+    var now_price = getSubPrice(oldBuyset, Upgrade, new Date().getTime() / 1000, nowEndTime);
+    if (now_price < 0) {
+        return [-2, false, false, []]
+    }
+
+    //清单数组
+    subtotail.push({
+        "buyset": oldBuyset,
+        "startTime": new Date().getTime() / 1000,
+        "endTime": nowEndTime,
+        "price": now_price,
+        "type": 0
+    });
+    //final_price += now_price;
+    final_price = numAdd(final_price, now_price);
+    //新增续费升级价格
+    if (t.length !== 0) {
+        var thisPrice = getsubVipOrderPriceBybuyset(Upgrade, t);
+        if (thisPrice < 0) {
+            return [-2, false, false, []]
+        }
+        console.log(Upgrade, t, "额外升级费用", thisPrice);
+        //final_price += thisPrice;
+        final_price = numAdd(final_price, thisPrice);
+        //清单数组
+        subtotail.push({
+            "buyset": Upgrade,
+            "startTime": endUnix,//xxx
+            "endTime": getVipEndDate(t[1], t[0], endUnix),//xxx
+            "price": thisPrice,
+            "type": 2
+        });
+    }
+    return [final_price, Upgradestatus[1], Upgradestatus[2], subtotail]
+}
+
+// var buyset = {
+//     "areacount": -1,  //省份数量
+//     "buyerclasscount": -1,
+//     "citys": [] //购买省份中城市数量
+// };
+
+//计算差价
+function getSubPrice(oldBuyset, newBuyset, start, end) {
+    //不能降级
+    if ((oldBuyset.areacount != -1 && newBuyset.areacount != -1 && oldBuyset.areacount > newBuyset.areacount) || (oldBuyset.areacount == -1 && newBuyset.areacount != -1) ||
+        (oldBuyset.buyerclasscount != -1 && newBuyset.buyerclasscount != -1 && oldBuyset.buyerclasscount > newBuyset.buyerclasscount) || (oldBuyset.BuyerclassCount == -1 && newBuyset.BuyerclassCount != -1)) {
+        return -1
+    }
+
+    var beforePrice = 0;
+    var newPrice = 0;
+    var t = getDateSub(start, end);
+    console.log("getSubPrice==", start, end, t);
+    if (t[1] !== 0) {//月
+        //beforePrice += getsubVipOrderPriceBybuyset(oldBuyset, [t[1], 2]);
+        beforePrice = numAdd(beforePrice, getsubVipOrderPriceBybuyset(oldBuyset, [t[1], 2]))
+        //newPrice += getsubVipOrderPriceBybuyset(newBuyset, [t[1], 2]);
+        newPrice = numAdd(newPrice, getsubVipOrderPriceBybuyset(newBuyset, [t[1], 2]))
+    }
+    if (t[0] !== 0) {//年
+        //beforePrice += getsubVipOrderPriceBybuyset(oldBuyset, [t[0], 1]);
+        beforePrice = numAdd(beforePrice, getsubVipOrderPriceBybuyset(oldBuyset, [t[0], 1]))
+        //newPrice += getsubVipOrderPriceBybuyset(newBuyset, [t[0], 1]);
+        newPrice = numAdd(newPrice, getsubVipOrderPriceBybuyset(newBuyset, [t[0], 1]))
+    }
+    //
+    console.log("old ", oldBuyset, " \n new ", newBuyset, " \n 相差", t[0], "年 ", t[1], "个月\n price:", newPrice, "-", beforePrice, "=", (newPrice * 10000 - beforePrice * 10000) / 10000);
+    return (newPrice * 10000 - beforePrice * 10000) / 10000
+}
+
+//小数相加
+function numAdd(num1, num2) {
+    return (num1 * 10000 + num2 * 10000) / 10000
+}
+
+
+//计算时间间隔差
+//[年个数, 月个数]
+function getDateSub(start, end) {
+    var startTime = new Date(start * 1000);
+    var endTime = new Date(end * 1000);
+
+    var startYear = startTime.getFullYear();
+    var startMonth = startTime.getMonth();
+    var startDay = startTime.getDate();
+
+    var endYear = endTime.getFullYear();
+    var endMonth = endTime.getMonth();
+    var endDay = endTime.getDate();
+
+    var finalMonthNum = 0;
+    var finalYearNum = 0;
+    if (startYear === endYear) {
+        if (startMonth === endMonth) {
+            finalMonthNum = 1;
+        } else {
+            if (endDay > startDay) {
+                finalMonthNum = endMonth - startMonth + 1;
+            } else {
+                finalMonthNum = endMonth - startMonth;
+            }
+        }
+    } else {
+        if (startMonth === endMonth) {
+            if (endDay <= startDay) {
+                finalMonthNum = (endYear - startYear) * 12;
+            } else {
+                finalMonthNum = (endYear - startYear) * 12 + 1;
+            }
+        } else if (endMonth > startMonth) {
+            if (endDay <= startDay) {
+                finalMonthNum = (endYear - startYear) * 12 + (endMonth - startMonth);
+            } else {
+                finalMonthNum = (endYear - startYear) * 12 + (endMonth - startMonth) + 1;
+            }
+        } else {
+            if (endDay <= startDay) {
+                finalMonthNum = (endYear - startYear - 1) * 12 + (12 - startMonth + endMonth);
+            } else {
+                finalMonthNum = (endYear - startYear - 1) * 12 + (12 - startMonth + endMonth) + 1;
+            }
+        }
+
+        finalYearNum = Math.floor(finalMonthNum / 12);
+        if (finalYearNum > 0) {
+            finalMonthNum = finalMonthNum - finalYearNum * 12
+        }
+    }
+    return [finalYearNum, finalMonthNum]
+}

+ 463 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js

@@ -0,0 +1,463 @@
+$(function () {
+    // 后端数据结构
+    var areaData = {
+        'data': {
+            // 选择的数量
+            'area': {
+                '北京': [],
+                '河南': [
+                    '洛阳市',
+                    '驻马店市',
+                    '周口市',
+                    '郑州市'
+                ],
+                '湖南': ['长沙市'],
+                '澳门': [],
+                '甘肃': []
+            },
+            'buyset': {
+                // 购买的全省的数量(不带市)
+                'areacount': 5,
+                'buyerclasscount': 11,
+                // 购买的城市
+                'newcitys': []
+            }
+        },
+        'errMsg': '',
+        'success': true
+    };
+
+    // 已经购买过的城市数量
+    var alreadyBuy = {
+        country: 0,
+        province: 0,
+        city: {
+            // 一共买了多少个城市
+            totalCount: 0,
+            // 分布在几个省份
+            pCount: 0
+        }
+    }
+
+    // ----------------- 以下定义功能函数 ----------------------------
+    function createMoreCity(arr) {
+        var tempHtml = arr.map(function (v) {
+            return '<button class="city">' + v.name + '</button>'
+        }).join('')
+        return tempHtml
+    }
+
+    // 数组求和
+    function arrSum(arr) {
+        var sum = 0
+        arr.forEach(function (item, i) {
+            sum += item
+        })
+        return sum
+    }
+
+    // 是否锁定按钮
+    function isLockedTipButtons(f) {
+        $('.tips_btn button.save-btn').prop('disabled', f)
+    }
+
+    // 省下拉市事件
+    var isAnimating = false
+
+    function slideFunc() {
+        if (isAnimating) return
+        isAnimating = true
+        if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
+            $(this).children().children('i').removeClass('rotate-arrow')
+        } else {
+            $(this).children().children('i').addClass('rotate-arrow')
+        }
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).parent().siblings().children('.tab').removeClass('selected');
+        setTimeout(function () {
+            isAnimating = false
+        }, 500)
+    }
+
+    // 新增求值 ---- 统计数量,不做视图操作
+    function getResult() {
+        var selectedCount = {
+            country: 0,
+            province: 0,
+            city: {
+                // 一共选了多少个城市
+                totalCount: 0,
+                // 分布在几个省份
+                pCount: 0
+            }
+        }
+        // 获取所有点亮的城市的值
+        var selected = getActiveCityDetail()
+        if (Object.keys(selected).length === 0) {
+            isLockedTipButtons(true)
+        } else {
+            isLockedTipButtons(false)
+        }
+
+        //是否需要升级
+        if (needUpgrade(getBuySet(selected, areaData.data.industry), {
+            areacount: areaData.data.buyset.areacount,
+            citys: areaData.data.buyset.newcitys,
+            buyerclasscount: areaData.data.buyset.buyerclasscount
+        })[1]) {
+            if (areaData.data.isTrial) {
+                $(".result-selected .info-tip").text("已超出现订单购买范围,需购买");
+            }
+            $(".result-selected .info-tip").show();
+        } else {
+            $(".result-selected .info-tip").hide();
+        }
+
+        for (var p in selected) {
+            if (p === '全国') {
+                selectedCount = {
+                    country: -1,
+                    province: 0,
+                    city: {
+                        totalCount: 0,
+                        pCount: 0
+                    }
+                }
+                return setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
+            }
+
+            if (selected[p].length === 0) {
+                selectedCount.province++
+            } else {
+                selectedCount.city.pCount++
+                selected[p].forEach(function (item, index) {
+                    selectedCount.city.totalCount++
+                })
+            }
+        }
+        if ($.isEmptyObject(selected)) {
+        //    1. 隐藏提示,并清空已选择
+            $('.result .info-tip').hide().siblings('.info-overview').text('');
+        } else {
+            setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
+        }
+    }
+
+    // 参数1:selector 需要赋值的选择器
+    // 参数2:selectedData 数据
+    // 注意:selectedData的数据结构
+    function setDataInResult (selector ,selectedData) {
+        // selectedData = {
+        //     areacount: 2,
+        //     buyerclasscount: 2,
+        //     newcitys: []
+        // }
+        // 设置已选择区域
+        var citySum = arrSum(selectedData.citys);
+        var text = {
+            p: selectedData.areacount === 0 ? '' : selectedData.areacount + '个省',
+            c: citySum === 0 ? '' : citySum + '个市',
+            s: selectedData.citys.length === 1 ? '' : '(分布在' + selectedData.citys.length + '个省内)'
+        };
+
+        if (selectedData.areacount === -1) {
+            $(selector).text('全国')
+        } else {
+            var dunhao = '';
+            if (citySum !== 0 && selectedData.areacount !== 0) {
+                dunhao = '、'
+            }
+            if (citySum === 0 || citySum === 1) {
+                text.s = ''
+            }
+            $(selector).text(text.p + dunhao + text.c + text.s);
+        }
+    }
+
+    // 点亮的城市数量详情(需要省和城市名称)
+    function getActiveCityDetail() {
+        var isWholeCountry = $('.tab.whole input').is(':checked')
+        if (isWholeCountry) {
+            // 选择全国
+            var str = $('.area-list li .tab.whole .province').text().replace(/\s+ | [\r\n]/g, '')
+            var obj = {}
+            obj[str] = []
+            return obj
+        } else {
+            var arr = []
+            $('.area-list li:not(.index)').each(function (i, dom) {
+                var $dom = $(dom)
+                if ($dom.children('.tab').hasClass('whole')) return
+                var isMunicipality = $dom.find('.tab').hasClass('municipality')
+                var pName = $dom.find('.province').text().replace(/\s+ | [\r\n]/g, '')
+                var selectedObj = {
+                    name: pName,
+                    children: []
+                }
+
+                // 是否是直辖市或自治区
+                if (isMunicipality) {
+                    if ($dom.find('input:not([disabled])').is(':checked')) {
+                        arr.push(selectedObj)
+
+                    }
+                } else {
+                    var allCitylength = $dom.find('button').length
+
+                    if ($dom.find('button.active').length === allCitylength) {
+                        arr.push(selectedObj)
+                    } else {
+                        $dom.find('button.active').each(function (c, buttonDOM) {
+                            var cName = $(buttonDOM).text().replace(/\s+ | [\r\n]/g, '')
+                            selectedObj.children.push(cName)
+                        })
+                        if (selectedObj.children.length) {
+                            arr.push(selectedObj)
+                        }
+                    }
+                }
+            })
+
+            // 处理arr
+            // [
+            //     {
+            //         name: '安徽',
+            //         children: ["合肥市", "蚌埠市", "阜阳市"]
+            //     },
+            //     {
+            //         name: '海南',
+            //         children: ["三亚市", "文昌市"]
+            //     },
+            //     {
+            //         name: '河南',
+            //         children: ["郑州市", "信阳市"]
+            //     }
+            // ]
+            var selectedCityDetail = {}
+            arr.forEach(function (item, i) {
+                selectedCityDetail[item.name] = item.children
+            })
+            return selectedCityDetail
+        }
+    }
+
+    // 初始选择的城市恢复,根据传入的p恢复为Active蓝色按钮
+    // 需要放到init之后
+    function renderSelectedCityActive(p) {
+
+        if (Object.keys(p).length === 0) {
+            $('.area-list li:not(.index):eq(0)').find('input').trigger('click')
+            return
+        }
+
+        for (const k in p) {
+            if (k === '全国') {
+                $('.area-list li:not(.index):eq(0)').find('input').trigger('click')
+                return
+            }
+
+            if (p[k].length == 0) {
+                // 购买的省份
+                $('.province').each(function () {
+                    var t = $(this).text().trim();
+                    if (k == t && p[k].length == 0) {
+                        var li = $(this).parents('li')
+                        // 改变按钮状态
+                        li.find('.city').addClass('active')
+                        // 改变input的状态
+                        li.find('input.checkbox').prop('checked', true)
+                    }
+                })
+            } else {
+                $('.city').each(function () {
+                    var t = $(this).text().trim();
+                    p[k].forEach(v => {
+                        if (v !== t) return
+                        // 改变按钮状态
+                        $this = $(this)
+                        $this.addClass('active')
+                        // 改变input的样式
+                        $this.parents('li').find('input.checkbox').addClass('opt')
+                    })
+                })
+            }
+        }
+    }
+
+    function resetButtonLock(f) {
+        $('#cancel').prop('disabled', f)
+    }
+
+
+    // 根据数据进行求总数 --- 上方已购买数据信息的初始化
+    function initAlreadyBuy(buyset, citys) {
+        // 购买的全省的数量(不包含市)
+        alreadyBuy.province = buyset.areacount;
+        // 购买的城市总数量
+        alreadyBuy.city.pCount = citys.length
+        alreadyBuy.city.totalCount = arrSum(citys)
+
+        var text = {
+            p: alreadyBuy.province === 0 ? '' : alreadyBuy.province + '个省',
+            c: alreadyBuy.city.totalCount === 0 ? '' : alreadyBuy.city.totalCount + '个市',
+            s: alreadyBuy.city.pCount === 1 ? '' : '(分布在' + alreadyBuy.city.pCount + '个省内)'
+        }
+        if (buyset.areacount === -1) {
+            $('.result-purchased .result-info .buy-set-info').text('全国')
+        } else {
+            var dunhao = '';
+            if (alreadyBuy.city.totalCount !== 0 && alreadyBuy.province !== 0) {
+                dunhao = '、'
+            }
+            if (alreadyBuy.city.totalCount === 0 || alreadyBuy.city.totalCount === 1) {
+                text.s = ''
+            }
+            $('.result-purchased .result-info .buy-set-info').text(text.p + dunhao + text.c + text.s);
+        }
+    }
+
+    // 初始化方法
+    function init() {
+        var data = areaData.data
+        var buyset = data.buyset;
+        var citys = buyset.newcitys;
+        initAlreadyBuy(buyset, citys)
+        // 根据返回数据进行渲染(默认选中已选择的)
+        renderSelectedCityActive(data.area)
+        getResult()
+    }
+
+    // ----------------- 以下绑定事件 ----------------------------
+    // 0.渲染城市列表
+    $(".select-area-box ul li:not('.index')").each(function () {
+        var text = $(this).find(".province").text().trim()
+        var data = null
+        chinaMapJSON.some(function (v) {
+            data = v
+            return v.name.indexOf(text) !== -1
+        })
+        var box = $(this).find('div.tab_content')
+        var html = createMoreCity(data.city)
+        box.html(html)
+    })
+    // fastClick初始化: https://github.com/ftlabs/fastclick
+    FastClick.attach(document.body)
+    // 1.省下拉市
+    $(".select-area-box .tab:not(.municipality)").on('click', slideFunc)
+    // 2.点击全国按钮onchange事件;
+    $('.checkbox.other').on('change', function () {
+        var isChecked = $(this).is(':checked')
+        if (isChecked) {
+            $(this).prop('checked', true);
+            $('.checkbox:not(.other):not([disabled])').prop('checked', false).removeClass('opt');
+            $('.city:not([disabled])').removeClass('active');
+            $('.tab_content').slideUp();
+        }
+        getResult()
+    })
+    // 3.点击非全国按钮onchange事件
+    $('.checkbox:not(.other)').on('change', function () {
+        $('.checkbox.other').prop('checked', false);
+        var isChecked = $(this).is(':checked');
+        if (isChecked) {
+            $(this).prop('checked', true).removeClass('opt');
+            $(this).parents('li').find('.city').addClass('active');
+            // 控制点击checkbox时候是否展开下方的城市列表
+            // $(this).parent().parent('.tab:not(.municipality)').siblings('.tab_content').slideDown();
+        } else {
+            $(this).prop('checked', false);
+            $(this).parents('li').find('.city').removeClass('active');
+        }
+        getResult();
+    })
+    // 4.点击城市按钮触发的事件
+    $('.tab_content').on('click', '.city', function () {
+        // 全国取消选中
+        $('.checkbox.other').prop('checked', false);
+        $(this).toggleClass('active')
+        // 省下所有选中的地市数量
+        var activeCityLength = $(this).parent().find('.city.active').length;
+        // 省下一共有几个城市
+        var cityLength = $(this).parent().find('.city').length;
+        var oInput = $(this).parents('li').find('input.checkbox')
+
+        if (activeCityLength === cityLength) {//当选中的城市数量等于该省下所有城市总数时,即为全选
+            if ($(this).siblings('.city[disabled]').length === 0) {
+                oInput.removeClass('opt').prop('checked', true)
+            }
+        } else if (activeCityLength === 0) {
+            oInput.prop('checked', false).removeClass('opt')
+        } else {//半选
+            oInput.prop("checked", false).addClass('opt')
+        }
+        getResult();
+    })
+    // 5. 重置按钮点击事件
+    $('.reset-btn').on('click', function () {
+        alreadyBuy = {
+            country: 0,
+            province: 0,
+            city: {
+                // 一共买了多少个城市
+                totalCount: 0,
+                // 分布在几个省份
+                pCount: 0
+            }
+        }
+        $('.checkbox').prop('checked', false).removeAttr('disabled');
+        $('.city').removeClass('active');
+        $('input').removeClass('opt')
+        $('.tab_content').slideUp();
+        $('.tab .iconfont').removeClass('rotate-arrow')
+        init();
+    })
+
+    // 6.锚点跳转
+    $("body").on('click', '.slide a', function () {
+        var s = $(this).html()
+        if (s == '#') {
+            return;
+        }
+        document.querySelector('#' + s).scrollIntoView({
+            block: 'center'
+        });
+    })
+    // 阻止input checkbox选中取消 触发父元素下拉事件
+    $('.checkbox').click(function (e) {
+        e.stopPropagation();
+    })
+
+    // ----------------------- 以下数据交互 ------------------
+    function getDataWitXHR() {
+        $DoPost('/subscribepay/vipsubscribe/getSubBuyMsg', {}, function (res) {
+            if (!res.success) return
+            areaData.data = res.data
+            res.data.oldArea = res.data.area;
+            res.data.oldIndustry = res.data.industry;
+            sessionStorage.setItem('sub_vip_state', JSON.stringify(res.data))
+            init()
+        })
+    }
+
+    var subVipState = sessionStorage.getItem('sub_vip_state')
+    if (subVipState) {
+        areaData.data = JSON.parse(subVipState)
+        init()
+    } else {
+        getDataWitXHR()
+    }
+
+    // 确认按钮事件
+    $('.save-btn').on('click', function () {
+        // 获取点亮的城市详情
+        areaData.data.area = getActiveCityDetail()
+        sessionStorage.setItem('sub_vip_state', JSON.stringify(areaData.data))
+        history.back()
+    })
+
+    // 获取点亮的城市的列表详情(带省名和城市名)
+    // getActiveCityDetail()
+
+    // 回显为蓝色激活样式
+    // renderSelectedCityActive()
+})

+ 164 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_industry.js

@@ -0,0 +1,164 @@
+// 模拟数据
+var data = {
+    "data": {
+        "area": {
+            "安徽": [],
+            "福建": ['福州市', '莆田市'],
+            "广东": [],
+        },
+        "buyset": {
+            "areacount": 1,
+            "buyerclasscount": 3,
+            "citys": {
+                "贵州": 2,
+                "广东": 2,
+                "广西": 2,
+                "福建": 1,
+            }
+        },
+        "industry": [
+            "安监",
+            // "保监"
+        ],
+        "isTrial": false
+    },
+    "errMsg": "",
+    "success": true
+}
+var buyCount = data.data.buyset.buyerclasscount;//已购买的行业数量  -1是全部行业,正数为购买的行业数量
+var array = data.data.industry;//已选择的行业(数组)
+var result = [];//声明一个空数组为选择结果
+// 初始化行业数据,渲染到页面
+function initData() {
+    if (data.data.isTrial) {
+        $('.update_tips').text("已超出现订单购买范围,需购买")
+    }
+    buyCount = data.data.buyset.buyerclasscount;//已购买的行业数量  -1是全部行业,正数为购买的行业数量
+    array = data.data.industry;//已选择的行业(数组)
+    /* 已购买过的行业 */
+    if (buyCount == -1) {
+        $('.result_name').html('全部行业')
+    } else {
+        $('.result_name').html(buyCount + '个行业')
+    }
+    /* 已选择的行业 数组为空时即选择的全部行业 不为空时对应选择的结果 */
+    if (array.length == 0) {
+        $('.result_count').html('全部行业');
+        $('.industry_item.whole').addClass('active')
+    } else {
+        $('.result_count').html(array.length + '个行业');
+        $('.industry_item:not(.whole)').each(function () {
+            var text = $(this).text().trim()
+            for (var i = 0; i < array.length; i++) {
+                var element = array[i];
+                if (element == text) {
+                    $(this).addClass('active')
+                }
+            }
+        })
+    }
+    resultCount();
+}
+
+// 实时改变选择结果
+function resultCount() {
+    $('.result_count').empty();
+    var count = $('.list').find('.industry_item.active:not(.whole)').length;
+    if ($('.industry_item.whole').hasClass('active')) {
+        $('.result_count').html('全部行业');
+        result = [];
+        if (buyCount != -1) {
+            $('.update_tips').show();
+        } else {
+            $('.update_tips').hide();
+        }
+    } else {
+        var buttons = $('.select-area-box .list button:not(.whole)');
+        var canChangeArr = [];
+        buttons.each(function () {
+            if ($(this).hasClass('active')) {
+                canChangeArr.push($(this).text())
+            }
+        })
+        if (count > buyCount && buyCount != -1) {
+            $('.update_tips').show();
+        } else {
+            $('.update_tips').hide();
+        }
+        if(count>0){
+            $('.result_count').html(count + '个行业');
+        }else {
+            $('.result_count').html("");
+        }
+
+        if ($('.list').find('.industry_item.active:not(.whole)').length === 0) {
+            $('.save-btn').prop('disabled', true)
+        } else {
+            $('.save-btn').prop('disabled', false)
+        }
+        result = canChangeArr;
+    }
+}
+
+$(function () {
+
+    // 公共资源交易介绍提示框
+    $('#showTips').click(function (e) {
+        e.stopPropagation();
+        $('.tips_detail').slideToggle()
+    });
+    // 点击导航跳转
+    $("body").on('click', '.slide a', function () {
+        var s = $(this).html()
+        if (s == '#') {
+            return;
+        }
+        document.querySelector('#' + s).scrollIntoView({
+            block: 'center'
+        });
+    })
+    // 选择全部行业
+    $('.industry_item.whole').on('click', function () {
+        $(this).addClass('active').parents('.list').find('.industry_item:not(.whole)').removeClass('active');
+        resultCount();
+    })
+    // 选择非全部行业
+    $('.industry_item:not(.whole)').on('click', function () {
+        $('.industry_item.whole').removeClass('active');
+        $(this).toggleClass('active');
+        resultCount();
+    })
+
+    // 重置按钮事件
+    $('.reset-btn').on('click', function () {
+        $('.list').find('.industry_item').removeClass('active');
+        $('.update_tips').hide();
+        initData();
+    })
+    // 确认按钮事件
+    $('.save-btn').on('click', function () {
+        data.data.industry = result
+        sessionStorage.setItem('sub_vip_state', JSON.stringify(data.data))
+        history.back()
+    })
+
+
+    function getDataWitXHR() {
+        $DoPost('/subscribepay/vipsubscribe/getSubBuyMsg', {}, function (res) {
+            if (!res.success) return;
+            data.data = res.data;
+            res.data.oldArea = res.data.area;
+            res.data.oldIndustry = res.data.industry;
+            sessionStorage.setItem('sub_vip_state', JSON.stringify(res.data));
+            initData();
+        })
+    }
+
+    var subVipState = sessionStorage.getItem('sub_vip_state')
+    if (subVipState) {
+        data.data = JSON.parse(subVipState)
+        initData();
+    } else {
+        getDataWitXHR()
+    }
+})

+ 226 - 73
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/common.js

@@ -1,22 +1,26 @@
 //请求同意调用
-function $DoPost(url, param = {}, callback, async = true) {
+function $DoPost(url) {
+    var param = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+    var callback = arguments.length > 2 ? arguments[2] : undefined;
+    var async = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
     $.ajax({
         url: url + "?t=" + new Date().getTime(),
         type: "POST",
         data: param,
         async: async,
         dataType: "json",
-        success: function (r) {
-            callback(r)
+        success: function success(r) {
+            callback(r);
+
             if (r.error || r.errMsg) {
                 var errTip = r.error || r.errMsg;
                 weui.toast(errTip, {
                     duration: 2000,
-                    className: 'custom-toast',
+                    className: 'custom-toast'
                 });
             }
         }
-    })
+    });
 }
 
 //获取url参数
@@ -33,10 +37,10 @@ function getParam(name) {
 
 //省份 城市 分类
 function getAreaClassArr_index(area) {
-    let cityArr = [];//城市
-    let provinceArr = [];//省份
+    var cityArr = [];//城市
+    var provinceArr = [];//省份
     for (var i in area) {
-        let citys = area[i]
+        var citys = area[i]
         if (citys.length > 0) {
             cityArr = cityArr.concat(citys);
             provinceArr.push(i + "(" + cityArr.join("、") + ")")
@@ -52,10 +56,10 @@ function getAreaClassArr_index(area) {
 
 //省份 城市 分类
 function getAreaClassArr(area) {
-    let cityArr = [];//城市
-    let provinceArr = [];//省份
+    var cityArr = [];//城市
+    var provinceArr = [];//省份
     for (var i in area) {
-        let citys = area[i]
+        var citys = area[i]
         if (citys.length > 0) {
             cityArr = cityArr.concat(citys);
         } else {
@@ -76,16 +80,15 @@ function SortArr(arr) {
     return arr
 }
 
-//购买设置
-function getBuySet(area, industry) {
+//获取选择
+function getSelectBuyset(area, industry) {
     if (industry[0] === "全部行业") industry = [];
     if (area["全国"]) area = {};
     //计算地区数量
     var buyset = {
         "areacount": -1,  //省份数量
         "buyerclasscount": -1,
-        "citys": {  //购买省份中城市数量
-        }
+        "citys": [] //购买省份中城市数量
     };
     //行业
     if (industry.length != 0) {
@@ -95,32 +98,69 @@ function getBuySet(area, industry) {
     if (!$.isEmptyObject(area)) {
         buyset.areacount = 0;
         for (var i in area) {
-            let citys = area[i];
-            if (citys.length === 0) {
+            var citys = area[i];
+            var thisLen = citys.length;
+            if (thisLen === 0) {
+                buyset.areacount++
+            } else {
+                buyset.citys.push(thisLen)
+            }
+        }
+    }
+    return buyset
+}
+
+
+//购买设置 area map
+function getBuySet(area, industry, price) {
+    price = checkPrice(price);
+    if (industry[0] === "全部行业") industry = [];
+    if (area["全国"]) area = {};
+    //计算地区数量
+    var buyset = {
+        "areacount": -1,  //省份数量
+        "buyerclasscount": -1,
+        "citys": [] //购买省份中城市数量
+    };
+    //行业
+    if (industry.length != 0 && industry.length <= price.buyerClassMaxCount) {
+        buyset.buyerclasscount = industry.length
+    }
+    //地区
+    if (!$.isEmptyObject(area)) {
+        buyset.areacount = 0;
+        for (var i in area) {
+            var citys = area[i];
+            var thisLen = citys.length;
+            if (thisLen === 0 || thisLen > price.cityMaxCount) {
                 buyset.areacount++
             } else {
-                buyset.citys[i] = citys.length
+                buyset.citys.push(thisLen)
             }
         }
     }
+    if (buyset.areacount > price.provinceMaxCount) {
+        buyset.areacount = -1;
+        buyset.citys = [];
+    }
     return buyset
 }
 
 /* vip订阅价格
-	area:地区 {}
-	industry:行业 []
-	time[count,unit] count:时间长度 unit 1:年 2:月
-	price 价格表
+    area:地区 {}
+    industry:行业 []
+    time[count,unit] count:时间长度 unit 1:年 2:月
+    price 价格表
    return 价格(单位:分)
 */
+var priceData;
+
 function getsubVipOrderPrice(area, industry, t, price) {
-    return getsubVipOrderPriceBybuyset(getBuySet(area, industry), t, price)
+    price = checkPrice(price);
+    return getsubVipOrderPriceBybuyset(getBuySet(area, industry, price), t, price)
 }
 
-var priceData;
-
-//根据购买设置 获取支付金额
-function getsubVipOrderPriceBybuyset(buyset, t, price) {
+function checkPrice(price) {
     if (!price) {
         if (priceData) {
             price = priceData
@@ -137,25 +177,60 @@ function getsubVipOrderPriceBybuyset(buyset, t, price) {
                 }
             }, false)
         }
+    } else {
+        priceData = price
     }
-	var vipbuyset = JSON.parse(JSON.stringify(buyset));
-	
-	if (!$.isEmptyObject(vipbuyset.citys)) {
-		for (var i in vipbuyset.citys) {
-			if(vipbuyset.citys[i]>price.cityMaxCount){
-				vipbuyset.areacount++
-				delete vipbuyset.citys[i]
-			}
-		}
-	}
-    //当省份数量大于price.ProvinceMaxCount 按照全国计算
-    if (vipbuyset.areacount > price.provinceMaxCount) {
-        vipbuyset.areacount = -1
-    }
-    //当行业数量大于price.buyerClassMaxCount按照全行业
-    if (vipbuyset.buyerclasscount > price.buyerClassMaxCount) {
-        vipbuyset.buyerclasscount = -1
+    return price
+}
+
+//新旧buyset
+function getMergeNewBuyset(buyset, price) {
+    price = checkPrice(price);
+    if (buyset["newcitys"]) { //新buyset
+        return {
+            "areacount": buyset.areacount,  //省份数量
+            "buyerclasscount": buyset.buyerclasscount,
+            "citys": buyset.newcitys //购买省份中城市数量
+        }
+    } else { //旧buyset
+        var areaCount = buyset.areacount;
+        var buyerclasscount = buyset.buyerclasscount;
+        var oldCitys = buyset.citys;
+        var newCitys = [];
+
+        if (!$.isEmptyObject(oldCitys)) {
+            for (var i in oldCitys) {
+                var thisLen = oldCitys[i];
+                if (thisLen === 0 || thisLen > price.cityMaxCount) {
+                    areaCount++
+                } else {
+                    newCitys.push(thisLen)
+                }
+            }
+        }
+
+        //省份数量自动转换全国
+        if (areaCount > price.provinceMaxCount) {
+            areaCount = -1;
+            newCitys = [];
+        }
+        //行业数量自动转换全行业
+        if (buyerclasscount > price.buyerClassMaxCount) {
+            buyerclasscount = -1
+        }
+        return {
+            "areacount": areaCount,  //省份数量
+            "buyerclasscount": buyerclasscount,
+            "citys": newCitys //购买省份中城市数量
+        }
     }
+}
+
+//根据购买设置 获取支付金额
+function getsubVipOrderPriceBybuyset(buyset, t, price) {
+    //console.log("getsubVipOrderPriceBybuyset",buyset, t)
+    price = checkPrice(price);
+    var vipbuyset = JSON.parse(JSON.stringify(buyset));
     if (t[0] > price.monthMaxCount && t[1] === 2) t[0] = 10;//月份十个月以上价格一样
 
     if (vipbuyset.areacount === -1) {//计算全国套餐价格
@@ -176,9 +251,9 @@ function getsubVipOrderPriceBybuyset(buyset, t, price) {
                 if (vipbuyset.citys[i] > price.cityMaxCount) {
                     vipbuyset.areacount++;
                 } else {
-					thisPrice = vipbuyset.citys[i] * getSetMealPrice(2, vipbuyset.buyerclasscount, t[1], price) * t[0];
-				}
-			} else {//多城市 多行业
+                    thisPrice = vipbuyset.citys[i] * getSetMealPrice(2, vipbuyset.buyerclasscount, t[1], price) * t[0];
+                }
+            } else {//多城市 多行业
                 //var industry_Price = price.buyerClassPrice * vipbuyset.buyerclasscount;
                 //var city_Price = price.cityPrice * vipbuyset.citys[i];
                 //thisPrice = (industry_Price + city_Price) * t[0];
@@ -192,8 +267,9 @@ function getsubVipOrderPriceBybuyset(buyset, t, price) {
         }
         final_price += thisPrice;
     }
-    final_price += vipbuyset.areacount * getSetMealPrice(1, vipbuyset.buyerclasscount, t[1], price) * t[0]
-	return final_price / 100
+    final_price += vipbuyset.areacount * getSetMealPrice(1, vipbuyset.buyerclasscount, t[1], price) * t[0];
+    //console.log("getsubVipOrderPriceBybuyset-final_price",final_price)
+    return final_price / 100
 }
 
 //获取套餐价格
@@ -230,29 +306,106 @@ function getSetMealPrice(c, iCount, u, price) {
     }
 }
 
-//查看用户是否有未执行的订单
-function checkOrder(wz) {
-    var flag = false;
-    $.ajax({
-        type: 'post',
-        url: '/subscribepay/afterPay/checkOrder?t=' + new Date().getTime(),
-        data: {},
-        async: false,
-        dataType: 'json',
-        success: function (r) {
-            flag = r.flag;
-            if (r.flag) {
-                if (wz != 1) {
-                    weui.toast('订单尚未到期', {
-                        duration: 3000,
-                        className: 'custom-toast',
-                        callback: function () {
-                            console.log('close')
-                        }
-                    });
-                }
-            }
+// 时间格式化
+Date.prototype.pattern = function (fmt) {
+    var o = {
+        "y+": this.getFullYear(),
+        "M+": this.getMonth() + 1, //月份
+        "d+": this.getDate(), //日
+        "h+": this.getHours() % 12 == 0 ? 12 : this.getHours() % 12, //小时
+        "H+": this.getHours(), //小时
+        "m+": this.getMinutes(), //分
+        "s+": this.getSeconds(), //秒
+        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+        "S": this.getMilliseconds() //毫秒
+    };
+    var week = {
+        "0": "日",
+        "1": "一",
+        "2": "二",
+        "3": "三",
+        "4": "四",
+        "5": "五",
+        "6": "六"
+    };
+    if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+    }
+    if (/(E+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? "星期" : "周") : "") + week[this.getDay() + ""]);
+    }
+    for (var k in o) {
+        if (new RegExp("(" + k + ")").test(fmt)) {
+            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
         }
-    });
-    return flag
+    }
+    return fmt;
+}
+
+//value ;flag 1:年 2:月 endtime 结束时间
+function getVipEndDate(flag, value, endtime) {
+    var EndTime = new Date(endtime * 1000);
+    var startDay = EndTime.getDate();
+    var yearNum = EndTime.getFullYear();
+    var monthNum = EndTime.getMonth();
+    if (flag === 1) {//将年转换成月
+        //年
+        yearNum += value;
+    } else {
+        //月
+        if (monthNum + value > 11) {
+            monthNum = monthNum + value - 12;
+            yearNum++
+        } else {
+            monthNum += value
+        }
+    }
+    //获取当月最后一天
+    var lastDay = new Date(yearNum, monthNum + 1, 0).getDate();
+    if (startDay < lastDay) {
+        return new Date(yearNum, monthNum, startDay, 23, 59, 59).getTime() / 1000;
+    } else {
+        return new Date(yearNum, monthNum, lastDay, 23, 59, 59).getTime() / 1000;
+    }
+}
+// 格式化金钱的函数
+// s: 金额(number) 必传
+// n: 保留小数的位数(int:0-100)
+function formatMoney(s, n) {
+    if (n === undefined) {
+        n = -1
+    } else {
+        n = n > 0 && n <= 20 ? n : 2;
+    }
+    var intS = parseInt(s)
+    var point = '.'
+    var left;
+    var right;
+    s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
+    // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
+    if (n === -1) {
+        if (s === intS) {
+            n = 0
+            right = ''
+            point = ''
+        } else {
+            n = 2
+            s = s.toFixed(n);
+            right = s.split('.')[1];
+        }
+        s = s + ''
+        left = s.split('.')[0].split("").reverse();
+    } else {
+        s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
+        left = s.split('.')[0].split('').reverse();
+        right = s.split('.')[1];
+    }
+
+    t = "";
+    for (i = 0; i < left.length; i++) {
+        t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
+    }
+
+    var money = t.split('').reverse().join('') + point + right;
+    return money;
 }

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

@@ -0,0 +1,753 @@
+$(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 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);
+            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) {
+        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) {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务还有" + (day + 1) + "天到期,请及时续费!");
+                } else {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务还有" + (day + 1) + "天到期,请及时购买!");
+                }
+            } else {
+                if (!isTrail) {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务今天到期,请及时续费!");
+                } else {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务今天到期,请及时购买!");
+                }
+            }
+            $(".vip-header .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 = '开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。'
+        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)
+    })
+
+    $('.close-expire-remind').on("click", function () {
+        $(".expire-remind").hide();
+    });
+    // 阅读并接受协议前的模拟checkbox点击事件
+    if (sessionStorage.getItem("vip_index_read")) {
+        $('.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);
+    });
+
+    // 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')
+                }
+            });
+        }
+    })
+
+    //返回提示使用
+    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 {//提示是否保存
+                cancelTip(module);
+                //pushHistory();
+            }
+        }, false);
+    }
+
+    //保存取消提示 module 1 修改 2升级 3续费 4购买
+    function cancelTip(module) {
+        var content = "";
+        var labName = "";
+        if (module === 1) {
+            content = "所选订阅设置已做修改,返回后修改的设置将不做保存。";
+            labName = "保存修改";
+        } else if (module === 2) {
+            content = "所选订阅设置已超出购买范围,升级后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即升级"
+        } else if (module === 3) {
+            content = "所选订阅设置已超出购买范围,续费后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即续费"
+        } else {
+            content = "所选订阅设置已超出试用范围,购买后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即购买"
+        }
+
+        weui.dialog({
+            title: '提示信息',
+            content: content,
+            className: 'jy-dialog',
+            buttons: [
+                {
+                    label: labName,
+                    type: 'primary',
+                    onClick: function () {
+                        doSubmit();
+                    }
+                },
+                {
+                    label: '取消',
+                    type: 'default',
+                    onClick: function () {
+                        clearSessionStorage();
+                        window.history.go(-1);
+                        window.location.reload();
+                    }
+                }
+            ]
+        });
+    }
+
+    //展示订阅周期时间
+    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) {
+                $(".body-item.cycle .tip").text("购买订阅周期" + changeValue).show();
+            } else {
+                $(".body-item.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;
+        $('.body-item.cycle .buy-cycle').text(sDuration);
+    }
+
+    function initCycleSelector() {
+        $('.vip-body .body-item.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') + '年'
+            }
+            $('.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')) {
+                // 点的+
+                // 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) {
+        // 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('、'))
+        }
+
+        // 推送设置初始化
+        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')
+        }
+
+        //试用不展示续费
+        if (!state.isTrial) {
+            $(".vip-header .renew").show();
+        } else {
+            $(".vip-header .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) {
+            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);
+
+        if (status[0] === -2) {
+            weui.toast('订单冲突', {
+                duration: 3000,
+                className: 'jy-toast',
+            });
+            return
+        }
+        if (status[0] === -1) {
+            //直接修改
+            $(".vip-footer.modify").show();
+            initBack(1);
+            return
+        }
+
+        //区域需要升级
+        if (status[1]) {
+            if (reqData.isTrial) {
+                $(".body-item.area .tip").text("需购买");
+            }
+            $(".body-item.area .tip-need-upgrade").show();
+        }
+        //行业需要升级
+        if (status[2]) {
+            if (reqData.isTrial) {
+                $(".body-item.industry .tip").text("需购买");
+            }
+            $(".body-item.industry .tip-need-upgrade").show()
+        }
+
+        if (status[0] > 0) {
+            //需要付钱
+            $(".vip-footer.upgrade").show();
+            //价格展示
+            $(".vip-footer.upgrade .billing-price").text("¥" + formatMoney(status[0]));
+            submitPrice = status[0] * 10000 / 100
+        }
+
+        if (reqData.isTrial) {//试用购买
+            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()
+    }
+
+
+    //保存 or 升级
+    var submited = false;
+
+    function doSubmit() {
+        if (submited) {
+            return
+        }
+        submited = true;
+        setTimeout(function () {
+            submited = false;
+        }, 1000);
+
+        $DoPost('/subscribepay/vipsubscribe/saveChange', {
+            "area": reqData.area["全国"] ? '{}' : JSON.stringify(reqData.area),
+            "industry": reqData.industry.join(","),
+            "payWay": "wx_app",
+            "time": selectTime,
+            "price": submitPrice
+        }, function (r) {
+            if (r.success) {
+                if (r.data.needPay) {
+                    //创建支付订单
+                    window.location.replace("/jyapp/vipsubscribe/toSelectPayWay?orderCode=" + r.data.code + "&price=" + submitPrice);
+                } else {
+                    //订阅修改
+                    if (r.data.doSuccess) {
+                        clearSessionStorage();
+                        window.location.reload();
+                    } else {
+                        weui.toast('修改保存失败', {
+                            duration: 1500,
+                            className: 'jy-toast',
+                        });
+                    }
+                }
+            }
+        }, false);
+    }
+
+});
+
+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("payWay");
+
+}

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

@@ -487,7 +487,7 @@
 					if (checkOrder_bl){
 						return;
 					}*/
-					window.location.href="/jyapp/vipsubscribe/renewPayPage?orderCode="+orderCode;   
+					window.location.href="/jyapp/vipsubscribe/vipsubscribe_renew?orderCode="+orderCode;   
 				}else if (pattern==2){
 					window.location.href="/jyapp/vipsubscribe/vipsubscribe_new?orderCode="+orderCode;
 				}

+ 2 - 2
src/jfw/modules/app/src/web/templates/me/index.html

@@ -72,7 +72,7 @@
         <!-- 账号信息 -->
 		<div class="user">
             <div class="user_img">
-                <img id="head_img" src="" onerror="this.src='/images/wx/persional/my_head.png?v=2'" >
+                <img id="head_img" src="" onerror="this.src='/jyapp/images/persional/my_head.png?v=2'" >
             </div>
             <div class="user_info">
                 <span class="user_name" ></span>
@@ -232,7 +232,7 @@
 			$(".vip").on("click",function(){
 				$.post("/subscribepay/orderListDetails/isVip?v="+nowTimestamp,{},function(data){
 					if (data.isvip){
-						window.location.href="/jyapp/vipsubscribe/toSetPage";		//vip订阅入口  试用或正式vip
+						window.location.href="/jyapp/vipsubscribe/toSubVipSetPage";		//vip订阅入口  试用或正式vip
 					}else{
 						window.location.href="/jyapp/vipsubscribe/introducePage";		//vip订阅入口  非vip
 					}

+ 416 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/change_area.html

@@ -0,0 +1,416 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>区域选择</title>
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/change_area.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+    <style>
+        #choose_area .select-area-box .tab .province .checkbox[disabled] {
+            background-color: #E0E0E0;
+        }
+
+        #choose_area .result {
+            padding: 0;
+            border-bottom: 1px solid #e5e5e5;
+        }
+    </style>
+</head>
+
+<body>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    区域选择
+</div>
+<div class="app-layout-content-b">
+    <div id="choose_area">
+        <div class="result">
+            <div class="result-purchased result-item">
+                <span class="result-label">区域</span>
+                <span class="result-info">
+                    <p class="buy-set-info ellipsis"></p>
+                </span>
+            </div>
+            <div class="result-selected result-item">
+                <span class="result-label">已选择</span>
+                <span class="result-info">
+                    <p class="info-overview ellipsis"></p>
+                    <p class="info-tip ellipsis">已超出现订单购买范围,需升级</p>
+                </span>
+            </div>
+        </div>
+        <div class="form">
+            <div class="select-area-box" style="padding-bottom: 0;">
+                <ul class="area-list">
+                    <li>
+                        <div class="tab whole">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox other">全国
+                            </div>
+                        </div>
+                    </li>
+                    <li class="index" id="A">A</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">安徽
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">澳门
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="B">B</li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">北京
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="C">C</li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">重庆
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="F">F</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">福建
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="G">G</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">广东
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">广西
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">贵州
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">甘肃
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="H">H</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">河北
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">湖北
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">黑龙江
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">海南
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">河南
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">湖南
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <p class="index" id="J">J</p>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">吉林
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">江苏
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">江西
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="L">L</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">辽宁
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="N">N</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">内蒙古
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">宁夏
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="Q">Q</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">青海
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="S">S</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">山西
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">陕西
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">上海
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">山东
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">四川
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="T">T</li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">天津
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">台湾
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="X">X</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">西藏
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">新疆
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li>
+                        <div class="tab municipality">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">香港
+                            </div>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="Y">Y</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">云南
+                            </div>
+                            <span><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                    <li class="index" id="Z">Z</li>
+                    <li>
+                        <div class="tab">
+                            <div class="province">
+                                <input type="checkbox" class="checkbox">浙江
+                            </div>
+                            <span class="down-icon"><i class="icon iconfont">&#xe600;</i></span>
+                        </div>
+                        <div class="tab_content clearfix"></div>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <div class="tips_btn">
+            <div class="btns">
+                <button class="reset-btn" id="cancel">重置</button>
+                <button class="save-btn" id="enter">确认</button>
+            </div>
+        </div>
+        <div class="slide">
+            <a href="javascript:;">#</a>
+            <a href="javascript:;">A</a>
+            <a href="javascript:;">B</a>
+            <a href="javascript:;">C</a>
+            <a href="javascript:;">F</a>
+            <a href="javascript:;">G</a>
+            <a href="javascript:;">H</a>
+            <a href="javascript:;">J</a>
+            <a href="javascript:;">L</a>
+            <a href="javascript:;">N</a>
+            <a href="javascript:;">Q</a>
+            <a href="javascript:;">S</a>
+            <a href="javascript:;">T</a>
+            <a href="javascript:;">X</a>
+            <a href="javascript:;">Y</a>
+            <a href="javascript:;">Z</a>
+        </div>
+    </div>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/mapJSON.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/change_area.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+</div>
+</body>
+
+</html>

+ 277 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/change_industry.html

@@ -0,0 +1,277 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>采购单位行业选择</title>
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/change_industry.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+    <style>
+        html, body, main {
+            height: 100%;
+        }
+    </style>
+</head>
+
+<body>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    采购单位行业选择
+</div>
+<div class="app-layout-content-b">
+    <main class="choose_industry main">
+        <div class="result">
+            <span class="label">采购单位行业:</span>
+            <span class="result_name">全部行业</span>
+        </div>
+        <div class="result">
+            <span class="label">已选择:</span>
+            <span class="result_count"></span>
+            <p class="update_tips">已超出现订单购买范围,需升级</p>
+        </div>
+        <div class="form">
+            <div class="select-area-box">
+                <ul class="list">
+                    <li class="list_item" id="all">
+                        <div class="item_label"></div>
+                        <div class="item_industry_list">
+                            <button class="industry_item whole">全部行业</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="A">
+                        <div class="item_label">A</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">安监</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="B">
+                        <div class="item_label">B</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">保监</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="C">
+                        <div class="item_label">C</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">财政</button>
+                            <button class="industry_item">传媒</button>
+                            <button class="industry_item">城管</button>
+                            <button class="industry_item">采矿业</button>
+                            <button class="industry_item">出版广电</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="D">
+                        <div class="item_label">D</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">档案</button>
+                            <button class="industry_item">地震</button>
+                            <button class="industry_item">党委办</button>
+                            <button class="industry_item">电信行业</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="F">
+                        <div class="item_label">F</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">法院</button>
+                            <button class="industry_item">发改</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="G">
+                        <div class="item_label">G</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">工商</button>
+                            <button class="industry_item">工信</button>
+                            <button class="industry_item">国土</button>
+                            <button class="industry_item">公安</button>
+                            <button class="industry_item">国资委</button>
+                            <button class="industry_item">公共资源交易</button>
+                            <span class="wenhao">
+                                <i id="showTips" class="iconfont icon-wenhao show_tips"></i>
+                         </span>
+                            <div class="tips_detail" style="display: none;">
+                                订阅采购单位行业“公共资源交易”意味着订阅公共资源交易中心本单位采购的信息,并非所有单位通过公共资源交易中心发布的采购信息,敬请注意。
+                            </div>
+                        </div>
+                    </li>
+                    <li class="list_item" id="H">
+                        <div class="item_label">H</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">环保</button>
+                            <button class="industry_item">海关</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="J">
+                        <div class="item_label">J</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">教育</button>
+                            <button class="industry_item">军队</button>
+                            <button class="industry_item">交通</button>
+                            <button class="industry_item">纪委</button>
+                            <button class="industry_item">金融业</button>
+                            <button class="industry_item">建筑业</button>
+                            <button class="industry_item">检察院</button>
+                            <button class="industry_item">机关事务</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="K">
+                        <div class="item_label">K</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">科技</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="L">
+                        <div class="item_label">L</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">林业</button>
+                            <button class="industry_item">旅游</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="M">
+                        <div class="item_label">M</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">民政</button>
+                            <button class="industry_item">民宗</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="N">
+                        <div class="item_label">N</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">农业</button>
+                            <button class="industry_item">能源化工</button>
+                            <button class="industry_item">农林牧渔</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="P">
+                        <div class="item_label">P</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">批发零售</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="Q">
+                        <div class="item_label">Q</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">气象</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="R">
+                        <div class="item_label">R</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">人行</button>
+                            <button class="industry_item">人社</button>
+                            <button class="industry_item">人大</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="S">
+                        <div class="item_label">S</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">食药</button>
+                            <button class="industry_item">税务</button>
+                            <button class="industry_item">水利</button>
+                            <button class="industry_item">市政</button>
+                            <button class="industry_item">审计</button>
+                            <button class="industry_item">商务</button>
+                            <button class="industry_item">司法</button>
+                            <button class="industry_item">社会团体</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="T">
+                        <div class="item_label">T</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">统计</button>
+                            <button class="industry_item">统战</button>
+                            <button class="industry_item">体育</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="W">
+                        <div class="item_label">W</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">文化</button>
+                            <button class="industry_item">卫生</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="X">
+                        <div class="item_label">X</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">学校</button>
+                            <button class="industry_item">宣传</button>
+                            <button class="industry_item">信息技术</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="Y">
+                        <div class="item_label">Y</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">医疗</button>
+                            <button class="industry_item">银监</button>
+                            <button class="industry_item">运输物流</button>
+                        </div>
+                    </li>
+                    <li class="list_item" id="Z">
+                        <div class="item_label">Z</div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">质监</button>
+                            <button class="industry_item">组织</button>
+                            <button class="industry_item">政协</button>
+                            <button class="industry_item">住建</button>
+                            <button class="industry_item">证监</button>
+                            <button class="industry_item">政府办</button>
+                            <button class="industry_item">制造业</button>
+                            <button class="industry_item">政务中心</button>
+                            <button class="industry_item">住宿餐饮</button>
+                        </div>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <div class="slide">
+            <a href="javascript:;">#</a>
+            <a href="javascript:;">A</a>
+            <a href="javascript:;">B</a>
+            <a href="javascript:;">C</a>
+            <a href="javascript:;">D</a>
+            <a href="javascript:;">E</a>
+            <a href="javascript:;">F</a>
+            <a href="javascript:;">G</a>
+            <a href="javascript:;">H</a>
+            <a href="javascript:;">I</a>
+            <a href="javascript:;">J</a>
+            <a href="javascript:;">K</a>
+            <a href="javascript:;">L</a>
+            <a href="javascript:;">M</a>
+            <a href="javascript:;">N</a>
+            <a href="javascript:;">O</a>
+            <a href="javascript:;">P</a>
+            <a href="javascript:;">Q</a>
+            <a href="javascript:;">R</a>
+            <a href="javascript:;">S</a>
+            <a href="javascript:;">T</a>
+            <a href="javascript:;">U</a>
+            <a href="javascript:;">V</a>
+            <a href="javascript:;">W</a>
+            <a href="javascript:;">X</a>
+            <a href="javascript:;">Y</a>
+            <a href="javascript:;">Z</a>
+        </div>
+        <div class="tips_btn">
+            <div class="btns">
+                <button class="reset-btn">重置</button>
+                <button class="save-btn">确认</button>
+            </div>
+        </div>
+    </main>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/change_industry.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+</div>
+</body>
+
+</html>

+ 294 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/change_time.html

@@ -0,0 +1,294 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>订阅周期</title>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/change_time.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+</head>
+
+<body>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    订阅周期
+</div>
+<div class="app-layout-content-b">
+    <div class="vip_extend_cycle">
+        <div class="extend_content">
+            <!-- 订阅周期 -->
+            <div class="extend_item">
+                <div class="item_top">
+                    <div class="label">订阅周期</div>
+                    <div class="value">
+                        <span>3个月</span>
+                    </div>
+                </div>
+                <div class="item_bottom">有效日期:<span>2019年8月1日-2019年8月7日</span></div>
+            </div>
+            <!-- 修改订阅周期 -->
+            <ul class="ul_box">
+                <li class="li_box">
+                    <label class="radio_parent not_extend_label" for="notExtend">
+                        <input class="radio" type="radio" name="cycle" id="notExtend" value="不延长周期" checked>
+                        <div class="text">不延长周期</div>
+                    </label>
+                </li>
+                <li class="li_box">
+                    <div class="top">
+                        <label class="radio_parent is_extend_label" for="isExtend">
+                            <input class="radio" type="radio" name="cycle" value="延长周期" id="isExtend">
+                            <div class="text">延长周期</div>
+                        </label>
+                        <div class="switch_box">
+                            <div class="date_tab">
+                                <span class="date_tab_item active">月</span>
+                                <span class="date_tab_item">年</span>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="bottom">
+                        <div class="con">
+                            <div class="month">
+                                <button class="weui-btn weui-btn_plain-default minus" type="button">
+                                    <div class="jy_icon decrease"></div>
+                                </button>
+                                <button class="month_number">1</button>
+                                <button class="weui-btn weui-btn_plain-default add" type="button">
+                                    <div class="jy_icon increase"></div>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="con" style="display: none;">
+                            <div class="year">
+                                <span class="year_number on" data-id="1">1年</span>
+                                <span class="year_number" data-id="2">2年</span>
+                                <span class="year_number" data-id="3">3年</span>
+                            </div>
+                        </div>
+                    </div>
+
+                </li>
+            </ul>
+        </div>
+        <div class="tips_btn">
+            <div class="btns">
+                <button class="reset-btn" id="cancel">取消</button>
+                <button class="save-btn" id="enter">确认</button>
+            </div>
+        </div>
+    </div>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script>
+        $(function () {
+            function initButton() {
+                if ($('.month_number').text().trim() === 1) {
+                    $('.minus').attr('disabled', true)
+                } else if ($('.month_number').text().trim() === 12) {
+                    $('.add').attr('disabled', true)
+                }
+            }
+
+
+            function flushShowTime(start, end, flag, value) {
+                var endCopy = end;
+                var now = Math.floor(new Date().getTime() / 1000);
+                if (flag && value) {
+                    if (isTrial) {
+                        end = now;
+                        start = now;
+                    }
+
+                    end = getVipEndDate(flag, value, end);
+                    var showValue = flag === 1 ? value + "年" : value + "个月";
+                    $(".item_top .value span").show().text(showValue);
+                } else {
+                    if (isTrial) {
+                        $(".item_top .value span").show().text("试用7天");
+                    } else {
+                        $(".item_top .value span").hide();
+                    }
+                }
+                var dStart = new Date(start * 1000).pattern('yyyy年MM月dd日');
+                var dEnd = new Date(end * 1000).pattern('yyyy年MM月dd日');
+                var sDuration = dStart + ' - ' + dEnd;
+                $('.extend_item .item_bottom span').text(sDuration);
+                //超过三年提示
+                var MaxEnd = getVipEndDate(1, 3, now);
+                if (end > MaxEnd) {
+                    var timeShow = getDateSub(now, endCopy);
+                    var showTipText = "<div style='white-space: nowrap;'>最长订阅周期不可超过3年</div>剩余周期:";
+                    if (timeShow[0] !== 0) {
+                        showTipText += timeShow[0] + "年"
+                    }
+                    if (timeShow[1] !== 0) {
+                        showTipText += timeShow[1] + "个月"
+                    }
+                    weui.toast(showTipText, {
+                        duration: 3000,
+                        className: 'custom-toast',
+                    });
+                    $("#enter").attr("disabled", "disabled");
+                } else {
+                    $("#enter").removeAttr("disabled");
+                }
+            }
+
+
+            var startTime = 0;
+            var endTime = 0;
+
+            var subVipState = sessionStorage.getItem('sub_vip_state');
+            var reqData = JSON.parse(subVipState);
+            var isTrial = reqData.isTrial;
+            var change = sessionStorage.getItem("vip_change_time");
+            startTime = reqData.startTime;
+            endTime = reqData.endTime;
+
+            if (isTrial) {
+                $(".ul_box .li_box:eq(0)").hide();
+                $("#isExtend").hide();
+                $(".radio_parent.is_extend_label .text").text("购买周期");
+                //默认选中一个月
+                if (!change) {
+                    change = "1个月"
+                }
+            }
+
+            // 切换年月
+            $('.date_tab').on('click', '.date_tab_item', function () {
+                var i = $(this).index();
+                $(this).addClass('active').siblings().removeClass('active');
+                $('.bottom .con').eq(i).show().siblings().hide();
+                if (i === 0) {
+                    flushShowTime(startTime, endTime, 2, parseInt($('.month_number').text().trim()));
+                } else {
+                    flushShowTime(startTime, endTime, 1, parseInt($('.year_number.on').text().trim()));
+                }
+            });
+            // 选择不延长周期
+            $('.not_extend_label').on('change', '#notExtend', function () {
+                $('.switch_box').hide();
+                $('.bottom').hide();
+                $(".item_top .value span").hide();
+                flushShowTime(startTime, endTime);
+            });
+            // 选择延长周期
+            $('.is_extend_label').on('change', '#isExtend', function () {
+                $('.switch_box').show();
+                $('.bottom').show();
+                if ($(".switch_box .active").index() === 0) {
+                    flushShowTime(startTime, endTime, 2, parseInt($('.month_number').text().trim()));
+                } else {
+                    flushShowTime(startTime, endTime, 1, parseInt($('.year_number.on').text().trim()));
+                }
+            });
+            // 减法计算
+            $('.minus').click(function () {
+                var monthNumber = Number($('.month_number').text().trim());
+                $('.add').removeAttr('disabled');
+                monthNumber--;
+                $('.month_number').html(monthNumber)
+                if (monthNumber <= 1) {
+                    monthNumber = 1;
+                    $('.month_number').html(monthNumber)
+                    $(this).attr('disabled', true)
+                }
+                flushShowTime(startTime, endTime, 2, parseInt($('.month_number').text().trim()));
+            })
+            // 加法计算
+            $('.add').click(function () {
+                var monthNumber = Number($('.month_number').text().trim());
+                $('.minus').removeAttr('disabled');
+                monthNumber++;
+                $('.month_number').html(monthNumber);
+                if (monthNumber >= 11) {
+                    monthNumber = 11;
+                    $('.month_number').html(monthNumber);
+                    $(this).attr('disabled', true)
+                }
+                flushShowTime(startTime, endTime, 2, parseInt($('.month_number').text().trim()));
+            });
+            // 年份切换
+            $('.year').on('click', '.year_number', function () {
+                $(this).addClass('on').siblings().removeClass('on');
+                flushShowTime(startTime, endTime, 1, parseInt($('.year_number.on').text().trim()));
+            });
+
+            $("#cancel").click(function () {
+                window.history.go(-1);
+            });
+
+            // 提交修改
+            $('#enter').click(function () {
+                var isExtend = $('input[name="cycle"]:checked').val();
+                var monthParent = $('.month').parent('.con');
+                var yearParent = $('.year').parent('.con');
+                var monthNum = $('.month_number').text().trim();
+                var yearNum = $('.year_number.on').text().trim();
+                if (isExtend === "不延长周期") {
+                    console.log("提交的内容为:" + isExtend);
+                    sessionStorage.removeItem("vip_change_time");
+                } else {
+                    if (!monthParent.is(':hidden')) {
+                        console.log("提交的内容为:" + isExtend + monthNum + '个月');
+                        sessionStorage.setItem("vip_change_time", monthNum + '个月');
+                    }
+                    if (!yearParent.is(':hidden')) {
+                        console.log("提交的内容为:" + isExtend + yearNum);
+                        sessionStorage.setItem("vip_change_time", yearNum);
+                    }
+                }
+                window.history.go(-1);
+            });
+
+
+            //回显
+            if (!change) {
+                console.log("不延长");
+                //不延长
+                flushShowTime(startTime, endTime);
+                $("#notExtend").trigger("click");
+            } else {
+                $("#isExtend").trigger("click");
+                //延长
+                if (change.indexOf("月") > -1) {
+                    $(".date_tab span:eq(0)").trigger("click");
+                    var monthNum = parseInt(change.replace("个月", ""));
+                    $(".month_number").text(monthNum);
+                    if (monthNum === 1) {
+                        $('.minus').attr("disabled", "disabled");
+                    }
+                    if (monthNum === 11) {
+                        $('.add').attr("disabled", "disabled");
+                    }
+                    flushShowTime(startTime, endTime, 2, monthNum);
+                } else {
+                    $(".date_tab span:eq(1)").trigger("click");
+                    var yearNum = parseInt(change.replace("年", ""));
+                    $(".year_number:eq(" + (yearNum - 1) + ")").trigger("click");
+                    flushShowTime(startTime, endTime, 1, yearNum);
+                }
+            }
+            initButton();
+        })
+    </script>
+</div>
+</body>
+
+</html>

+ 14 - 14
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html

@@ -362,7 +362,7 @@
         <div class="tips_btn">
             <div class="tips_discount">
                 <div class="tips_d_money" style="display: none">&yen;38</div>
-                <div class="tips_d_text">已选择4个市,建议购买“全省”</div>
+                <!--<div class="tips_d_text">已选择4个市,建议购买“全省”</div>-->
             </div>
             <div class="btns">
                 <button class="reset-btn" disabled>重置</button>
@@ -468,7 +468,7 @@
                         $(dom).addClass('active').attr('disabled', !canClick).parents().siblings('.tab')
                             .addClass('selected').children('.province').children('.checkbox').attr({
                             "checked": true
-                        }).addClass('half');
+                        }).addClass('opt');
                     }
                 })
             })
@@ -477,7 +477,7 @@
             //如果选中所有,则转为全国
             if ($(".city").length == $(".city.active").length) {
                 $(".checkbox.other").trigger("click");
-                $(".checkbox").removeClass("half");
+                $(".checkbox").removeClass("opt");
                 return
             }
             var tmpSelect = {};
@@ -487,7 +487,7 @@
             var val = $('.other').parents('.province').text().trim();
             if ($('.other').is(':checked')) {
                 data = [{name: val, children: []}] //全国
-                $(".tips_d_text").slideUp();
+                //$(".tips_d_text").slideUp();
             }
             $(".tab_content").find(".city.active:not('[disabled]')").each(function () {
                 var length = $(this).parent('.tab_content').find('.city').length; //省份下城市的length
@@ -574,7 +574,7 @@
             }
 
             //提示
-            if (!this.vipSubisTrial) {
+            /*if (!this.vipSubisTrial) {
                 if (selectCityMax > 2) {
                     $('.tips_btn .tips_d_text').text("已选择" + selectCityMax + "个市,建议购买“全省”").slideDown();
                 } else {
@@ -584,7 +584,7 @@
                         $(".tips_d_text").slideUp();
                     }
                 }
-            }
+            }*/
             this.selectObj = tmpSelect;
             console.log("this.selectObj:", tmpSelect)
             $('.result_name').append(html)
@@ -694,18 +694,18 @@
                     $(".province input").prop('checked', false);
                     $(".city").removeClass('active');
                     $(this).prop('checked', true);
-                    $(".checkbox").removeClass("half");
+                    $(".checkbox").removeClass("opt");
                 } else {
                     $(".checkbox.other").prop('checked', false);
                     if (!$(this).is(':checked')) {
-                        if ($(this).hasClass("half")) {//判断当前是否是半选
-                            $(this).prop("checked", true).removeClass("half");
+                        if ($(this).hasClass("opt")) {//判断当前是否是半选
+                            $(this).prop("checked", true).removeClass("opt");
                             $(this).parent().parent().siblings('.tab_content').children('.city').addClass('active');
                         } else {
                             $(this).parent().parent().siblings('.tab_content').children('.city').removeClass('active');
                             if ($(".province .checkbox:checked").length == 0) {//若没有省份被选中 则选中全国
                                 //$(".checkbox.other").prop('checked', true);
-                                $(".checkbox").removeClass("half");
+                                $(".checkbox").removeClass("opt");
                             }
                         }
                     } else {
@@ -726,13 +726,13 @@
                     window.input = input
                     input.prop('checked', true)
                     if (isActive != $(this).parent().find('.city').length) {//是否全选
-                        $(this).parent('div').siblings('.tab').find('.province .checkbox').addClass('half');
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').addClass('opt');
                     } else {
-                        $(this).parent('div').siblings('.tab').find('.province .checkbox').removeClass('half');
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').removeClass('opt');
                     }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
-                        'checked', false).removeClass('half');
+                        'checked', false).removeClass('opt');
                 }
                 //AreaChoose.isAllSelected()
                 AreaChoose.getResult($(this).parent('div').siblings('.tab').find('.province').text()) //出入选择的省份
@@ -759,7 +759,7 @@
                 'input').prop({
                 'checked': false,
                 "disabled": false
-            }).removeClass('half');
+            }).removeClass('opt');
             $('.tab_content').find('.city').removeClass('active').attr({
                 "disabled": false,
                 "checked": false

+ 3 - 3
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry.html

@@ -242,7 +242,7 @@
         <div class="tips_btn">
             <div class="tips_discount">
                 <div class="tips_d_money" style="display: none">&yen;38</div>
-                <div class="tips_d_text">已选择4个行业,建议购买“全部行业”</div>
+                <!--<div class="tips_d_text">已选择4个行业,建议购买“全部行业”</div>-->
             </div>
             <div class="btns">
                 <button class="reset-btn" disabled>重置</button>
@@ -291,11 +291,11 @@
         })
 
         // 显示隐藏优惠tips
-        if (selectedArr.length >= 4 && !vipSubisTrial && !notShowTip) {
+        /*if (selectedArr.length >= 4 && !vipSubisTrial && !notShowTip) {
             $('.tips_btn .tips_d_text').text("已选择" + selectedArr.length + "个行业,建议购买“全部行业”").slideDown()
         } else {
             $('.tips_btn .tips_d_text').slideUp()
-        }
+        }*/
 
         if (selectedArr.length > 0) {//是否已选择
             selectedIndustryArr = selectedArr

+ 152 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/payway_select.html

@@ -0,0 +1,152 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>升级</title>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/payway_select.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+</head>
+
+<body>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    升级
+</div>
+<div class="app-layout-content-b">
+    <div class="vip-check-out">
+        <div class="ck-body">
+            <div class="price">¥366.50</div>
+            <div class="weui-cells weui-cells_checkbox pay-mode">
+                <label class="weui-cell weui-check__label wx_label" for="wx">
+                    <div class="weui-cell__bd">
+                        <i class="icon-wx"></i>
+                        <p>微信支付</p>
+                    </div>
+                    <div class="weui-cell__hd">
+                        <input type="radio" class="weui-check" name="way" value="wx_app" id="wx" checked>
+                        <i class="weui-icon-checked"></i>
+                    </div>
+                </label>
+                <label class="weui-cell weui-check__label zfb_label" for="zfb">
+                    <div class="weui-cell__bd">
+                        <i class="icon-zfb"></i>
+                        <p>支付宝支付</p>
+                    </div>
+                    <div class="weui-cell__hd">
+                        <input type="radio" class="weui-check" name="way" value="ali_app" id="zfb">
+                        <i class="weui-icon-checked"></i>
+                    </div>
+                </label>
+            </div>
+        </div>
+        <div class="ck-footer">
+            <div class="button-group">
+                <!-- <button class="button-l reset">取消</button> -->
+                <button class="button-r confirm">确认支付</button>
+            </div>
+        </div>
+    </div>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <script>
+        $(function () {
+            var ordercode = getParam("orderCode");
+            var showPrice = getParam("price");
+            if (!ordercode || !showPrice) {
+                $(".confirm").attr("disabled", "disabled");
+                showToast('参数异常')
+            }
+            $(".price").text("¥" + formatMoney(parseInt(showPrice) / 100));
+
+            $('.ck-footer .confirm').on('click', function () {
+                var payway = $('input:radio[name="way"]:checked').val();
+                $.post("/subscribepay/vipsubscribe/orderToPay", {
+                    orderCode: ordercode,
+                    payway: payway
+                }, function (r) {
+                    if (r.success) {
+                        if (payway === "wx_app") {
+                            JyObj.wxPay(r.data.res)
+                        } else {
+                            JyObj.aliPay(r.data.res)
+                        }
+                        checkpay(ordercode)
+                    } else {
+                        showToast(r.errMsg)
+                    }
+                })
+            });
+
+            var interval;
+
+            function checkpay(orderid) {
+                if (interval) {
+                    clearInterval(interval);
+                }
+                interval = setInterval(function () {
+                    $.post("/jypay/isPaySuccess", {code: orderid}, function (r) {
+                        if (r.success) {
+                            clearSessionStorage();
+                            window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + orderid);
+                        }
+                    });
+                    if (canpay && mySysIsIos()) {
+                        clearInterval(interval);
+                    }
+                }, 2000)
+            }
+
+            function payCallBack(status) {
+                switch (status) {
+                    case "0"://支付取消
+                        clearInterval(interval);
+                        break;
+                    case "1"://支付完成
+
+                        break;
+                    case "-1"://支付失败
+                        clearInterval(interval);
+                        break;
+                }
+            }
+
+            function showToast(content) {
+                weui.toast(content, {
+                    duration: 1500,
+                    className: 'jy-toast',
+                });
+            }
+
+            function clearSessionStorage() {
+                sessionStorage.removeItem("vipSubSelectArea");
+                sessionStorage.removeItem("vipSubSelectIndustry");
+                sessionStorage.removeItem("vipSubSelectTime");
+                sessionStorage.removeItem("vipSub_read");
+                sessionStorage.removeItem("historypushDataCache");
+                sessionStorage.removeItem("endTime");
+                sessionStorage.removeItem("payWay");
+                sessionStorage.To_introducePage = 2;
+                //订阅首页
+                sessionStorage.removeItem("sub_vip_state");
+                sessionStorage.removeItem("vip_index_read");
+                sessionStorage.removeItem("vip_change_time");
+            }
+        })
+    </script>
+</div>
+</body>
+
+</html>

+ 1 - 5
src/jfw/modules/app/src/web/templates/vipsubscribe/renew_notice.html

@@ -230,11 +230,7 @@
 			}
 			
 			$(".renew_service").on("click",function(){
-				let flags = checkOrder();
-				if(flags){
-					return
-				};
-				window.location.replace("/jyapp/vipsubscribe/renewPayPage");
+				window.location.replace("/jyapp/vipsubscribe/vipsubscribe_renew");
 			});
 			$(".aginBuy").on("click",function(){
 				window.location.replace("/jyapp/vipsubscribe/vipsubscribe_new?orderCode="+orderCode);

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

@@ -841,7 +841,7 @@
 		}
 		function toWillExpire(){
 			sessionStorage.removeItem("vipSubBuySet");
-			window.location.href="/jyapp/vipsubscribe/vipsubscribe_willExpire"
+			window.location.href="/jyapp/vipsubscribe/vipsubscribe_renew"
 		}
 	    
     </script>

+ 241 - 234
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index.html

@@ -1,28 +1,32 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
-	{{include "/common/meta.html"}}
+    {{include "/common/meta.html"}}
     <title>VIP订阅首页</title>
-	{{include "/common/nnc.html"}}
+    {{include "/common/nnc.html"}}
     <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}2">
 </head>
 
 <body style="visibility:hidden;">
-	<div class="app-layout-header">
-		<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
-		VIP订阅
-	</div>
-	
-	<div class="app-layout-content-b">
-	  <div class="vip_index">
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    VIP订阅
+</div>
+
+<div class="app-layout-content-b">
+    <div class="vip_index">
         <div class="header" style="display: none;">
-            <img class="header_left" src="/jyapp/vipsubscribe/image/left.png?v={{Msg "seo" "version"}}" alt="" onclick="javascript:history.back(-1);">
+            <img class="header_left" src="/jyapp/vipsubscribe/image/left.png?v={{Msg "seo" "version"}}" alt=""
+                 onclick="javascript:history.back(-1);">
             <h3 class="header_title">VIP订阅</h3>
             <span class="header_right"></span>
         </div>
@@ -38,11 +42,11 @@
                 <div class="s_info_top">
                     <p class="s_i_item" style="margin-bottom: .1rem;">
                         <label>已购买区域:</label>
-						<span class="expand-box area expanded">
+                        <span class="expand-box area expanded">
                             <span class="_area"></span>
                             <span class="iconfont icon-arrow"></span>
                         </span>
-<!--                        <span class="_area"></span>-->
+                        <!--                        <span class="_area"></span>-->
                     </p>
                     <p class="s_i_item" style="margin-bottom: .1rem;">
                         <label>已购买行业:</label>
@@ -50,7 +54,7 @@
                             <span class="_buyerClass"></span>
                             <span class="iconfont icon-arrow"></span>
                         </span>
-<!--                        <span class="_buyerClass"></span>-->
+                        <!--                        <span class="_buyerClass"></span>-->
                     </p>
                     <p class="s_i_item" style="margin-bottom: .1rem;">
                         <label>订阅周期:</label>
@@ -78,7 +82,7 @@
                             <span>关键词</span>
                         </div>
                         <a href="/jyapp/vipsubscribe/toSetKeyWordPage" class="media_right" id="keywords">
-                            
+
                         </a>
                     </div>
                     <div class="media_list">
@@ -99,7 +103,7 @@
                         <div class="media_left">
                             <img src="/jyapp/vipsubscribe/image/frame.png?v={{Msg "seo" "version"}}" alt="">
                             <span>项目匹配</span>
-							<i class="iconfont icon-wenhao "></i>
+                            <i class="iconfont icon-wenhao "></i>
                         </div>
                         <div class="media_switch">
                             <div class="weui-cell__ft">
@@ -125,7 +129,7 @@
                 <div>
                     <i class="icon iconfont" id="close_renew">&#xe61a;</i>
                     <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时续费!</span>
-      				<span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
+                    <span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
                     <a onclick="rebuy()">去续费</a>
                 </div>
             </div>
@@ -133,8 +137,8 @@
             <div class="nv_renew_toast" style="display: none;">
                 <div>
                     <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
-	      			<span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
-	      			<span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
+                    <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
+                    <span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
                     <a href="/jyapp/vipsubscribe/vipsubscribe_new">去购买</a>
                 </div>
             </div>
@@ -148,228 +152,231 @@
         <div class="custom-dialog" style="display: none;">
             <div class="weui-mask weui-animate-fade-in"></div>
             <div class="weui-dialog weui-animate-fade-in">
-                <div class="weui-dialog__hd"><strong class="weui-dialog__title" style="font-weight: bold;">项目匹配</strong></div>
-                <div class="weui-dialog__bd" style="line-height: .4rem;padding: .37rem .45rem;font-size: 14px;text-align: left;color: #686868;">开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。</div>
-                <div class="weui-dialog__ft" style="border-top: 1px solid #eee;padding-bottom: .2rem;padding-top: .2rem;"> 
-                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" style="background: #fff;color: #2CB7CA;text-align: center;margin-right: unset;">我知道了</a>
+                <div class="weui-dialog__hd"><strong class="weui-dialog__title" style="font-weight: bold;">项目匹配</strong>
+                </div>
+                <div class="weui-dialog__bd"
+                     style="line-height: .4rem;padding: .37rem .45rem;font-size: 14px;text-align: left;color: #686868;">
+                    开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。
+                </div>
+                <div class="weui-dialog__ft"
+                     style="border-top: 1px solid #eee;padding-bottom: .2rem;padding-top: .2rem;">
+                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary"
+                       style="background: #fff;color: #2CB7CA;text-align: center;margin-right: unset;">我知道了</a>
                 </div>
             </div>
         </div>
-    </div>  
-	</div>
-	<script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    </div>
+</div>
+<script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
 <!--    <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
-    <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    <script>
-		var checkedflag = true;
-        $(function () {
-			var isinitpage = false;
-			$(window).bind("pageshow", function(event){
-				if(event.originalEvent.persisted){
-					getuserinfo();
-					isinitpage = true;
-				}
-			});
-			//
-			if(!isinitpage){
-            	getuserinfo();
-			}
-            //
-			$("i.icon-wenhao").on("click",function(){
-                $('.custom-dialog').show()
-                $('.weui-dialog__btn_primary').on('click', function () {
-                    $('.custom-dialog').hide()
-                })
-			})
-            $('.switch').on('click', function (e) {
-                console.log($(this).hasClass('checked'))
-                let that = this;
-                let hasChecked = $(this).hasClass('checked');
-                if (hasChecked == false) {
-                    $(that).addClass('checked');
-                    weui.toast('项目匹配已开启',{
-                        duration: 1000,
-                        className: 'custom-toast',
-                    })
-					setprojectmatch(1);
-                } else {
-                    $(that).removeClass('checked');
-                    $('.custom-dialog').hide()
-                    // $('#auto_renew').hide(500);
-                    weui.toast('项目匹配已关闭',{
-                        duration: 1000,
-                        className: 'custom-toast',
-                    })
-					setprojectmatch(0);
-                }
-            })
-            
-            $('#close_renew').on('click', () => {
-                $('.renew_toast').hide()
-            })
-            $('#nv_close_renew').on('click', () => {
-                $('.nv_renew_toast').hide();
-				$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/jyapp/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>');
-				$(".tabbar").show();
-            })
-			// 点击扩大
-            // 给两个按钮绑定统一事件
-            $('.subscribe_info .expand-box.area .icon-arrow, .subscribe_info .expand-box.trade .icon-arrow').on('click', function() {
-                $(this).parent().toggleClass('expanded')
-                // 改变isOpen中的this指向,将其指向当前点击的元素,并调用
-                // isOpen.apply(this)
+<script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+<script>
+    var checkedflag = true;
+    $(function () {
+        var isinitpage = false;
+        $(window).bind("pageshow", function (event) {
+            if (event.originalEvent.persisted) {
+                getuserinfo();
+                isinitpage = true;
+            }
+        });
+        //
+        if (!isinitpage) {
+            getuserinfo();
+        }
+        //
+        $("i.icon-wenhao").on("click", function () {
+            $('.custom-dialog').show()
+            $('.weui-dialog__btn_primary').on('click', function () {
+                $('.custom-dialog').hide()
             })
-            // 改变isOpen中的this指向,将其指向选中的元素,并调用
-            isOpen.apply($('.subscribe_info .expand-box.area .icon-arrow'))
-            isOpen.apply($('.subscribe_info .expand-box.trade .icon-arrow'))
-            function isOpen(){
-                // console.log(this)
-                let boxHeight = $(this).siblings().height();
-                let minHeight = $(this).siblings().css('min-height')  // 18px
+        })
+        $('.switch').on('click', function (e) {
+            console.log($(this).hasClass('checked'))
+            let that = this;
+            let hasChecked = $(this).hasClass('checked');
+            if (hasChecked == false) {
+                $(that).addClass('checked');
+                weui.toast('项目匹配已开启', {
+                    duration: 1000,
+                    className: 'custom-toast',
+                })
+                setprojectmatch(1);
+            } else {
+                $(that).removeClass('checked');
+                $('.custom-dialog').hide()
+                // $('#auto_renew').hide(500);
+                weui.toast('项目匹配已关闭', {
+                    duration: 1000,
+                    className: 'custom-toast',
+                })
+                setprojectmatch(0);
+            }
+        })
 
-                let rows = Math.ceil(Math.round(boxHeight)/ parseFloat(minHeight));
-                
-                console.log(`高度:${boxHeight},最小高度:${minHeight},行数:${rows}`);
-                
-                if (rows > 2) {
-                    $(this).parent().removeClass('expanded')
-                    $(this).show()
-                } else {
-                    $(this).parent().addClass('expanded')
-                    $(this).hide()
+        $('#close_renew').on('click', () => {
+            $('.renew_toast').hide()
+        })
+        $('#nv_close_renew').on('click', () => {
+            $('.nv_renew_toast').hide();
+            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/jyapp/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>');
+            $(".tabbar").show();
+        })
+        // 点击扩大
+        // 给两个按钮绑定统一事件
+        $('.subscribe_info .expand-box.area .icon-arrow, .subscribe_info .expand-box.trade .icon-arrow').on('click', function () {
+            $(this).parent().toggleClass('expanded')
+            // 改变isOpen中的this指向,将其指向当前点击的元素,并调用
+            // isOpen.apply(this)
+        })
+        // 改变isOpen中的this指向,将其指向选中的元素,并调用
+        isOpen.apply($('.subscribe_info .expand-box.area .icon-arrow'))
+        isOpen.apply($('.subscribe_info .expand-box.trade .icon-arrow'))
+
+        function isOpen() {
+            // console.log(this)
+            let boxHeight = $(this).siblings().height();
+            let minHeight = $(this).siblings().css('min-height')  // 18px
+
+            let rows = Math.ceil(Math.round(boxHeight) / parseFloat(minHeight));
+
+            console.log(`高度:${boxHeight},最小高度:${minHeight},行数:${rows}`);
+
+            if (rows > 2) {
+                $(this).parent().removeClass('expanded')
+                $(this).show()
+            } else {
+                $(this).parent().addClass('expanded')
+                $(this).hide()
+            }
+        }
+    })
+
+    //
+    function getuserinfo() {
+        weui.loading();
+        //获取用户信息
+        $.ajax({
+            type: "POST",
+            url: "/subscribepay/afterPay/getUserInfo",
+            data: {},
+            dataType: "json",
+            async: false,
+            success: function (r) {
+                if (r.userData) {
+                    var _userData = r.userData;
+                    var _vipData = _userData["o_vipjy"];
+                    var _vipstatus = _userData["i_vip_status"];
+                    // console.log(_userData)
+                    if (_vipstatus && _vipstatus == "1") {
+                        if (parseInt(_vipData["expRemind"]) > 1) {
+                            $(".to_expired").show();
+                            $(".renew_day").text(_vipData["expRemind"]);
+                            $(".nv_renew_toast").show();
+                            $(".tabbar").hide();
+                        } else if (parseInt(_vipData["expRemind"]) > 0) {
+                            $(".to_expired").show();
+                            $(".nv_renew_toast").find(".other").hide();
+                            $(".nv_renew_toast").find(".today").show();
+                            $(".nv_renew_toast").show();
+                            $(".tabbar").hide();
+                        } else {
+                            $(".to_expired").hide();
+                            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/jyapp/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>')
+                        }
+                        $('.free7days_pic').text("VIP订阅服务");
+                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
+                    } else {
+                        if (parseInt(_vipData["expRemind"]) > 1) {
+                            $(".to_expired").show();
+                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
+                            $(".renew_toast").show();
+                        } else if (parseInt(_vipData["expRemind"]) > 0) {
+                            $(".to_expired").show();
+                            $(".renew_toast").find(".other").hide();
+                            $(".renew_toast").find(".today").show();
+                            $(".renew_toast").show();
+                        } else {
+                            $(".to_expired").hide();
+                        }
+                        $(".tabbar").html('<a onclick="upgrade()" class="update_btn">升级</a><a onclick="rebuy()" class="renew_btn">续费</a>')
+                        $('.free7days_pic').text("已开通VIP订阅服务");
+                        $('.free7days_pic').append("<style>.free7days_pic::after{display:none}</style>");
+                    }
+                    if (_vipData) {
+                        if (Number(_vipData["i_projectmatch"]) == 1) {
+                            $('.switch').addClass('checked')
+                        } else {
+                            $('.switch').removeClass('checked')
+                        }
+                        //地区
+                        var area = _vipData["o_area"];
+                        $("._area").text(area);
+                        //行业
+                        var buyerclass = _vipData["a_buyerclass"];
+                        if (buyerclass > 0) {
+                            $("._buyerClass").text(buyerclass + "个行业");
+                        } else {
+                            $("._buyerClass").text("全部行业");
+                        }
+                        $("._cycleCount").text(_vipData["cycle"]);
+                        $("._activeDate").text(_userData["l_vip_starttime"] + " - " + _userData["l_vip_endtime"]);
+                        if (_vipData["a_infotype"] == "") {
+                            _vipData["a_infotype"] = "全部类型"
+                        }
+                        $("#infoType").text(_vipData["a_infotype"]);
+                        var pushText = "实时推送"
+                        if (_vipData["i_ratemode"] == "4") {
+                            pushText = "每月推送"
+                        } else if (_vipData["i_ratemode"] == "3") {
+                            pushText = "每周推送"
+                        } else if (_vipData["i_ratemode"] == "2") {
+                            pushText = "每日推送"
+                        }
+                        $("#pushSet").text(pushText);
+                        var a_items = _vipData["a_items"]
+                        var s_items = ""
+                        if (a_items != undefined && a_items.length > 0) {
+                            for (var i = 0; a_items.length - 1 >= i; i++) {
+                                if (s_items != "") {
+                                    s_items += "、"
+                                }
+                                s_items += a_items[i]["s_item"]
+                            }
+                        }
+                        $("#keywords").text(s_items);
+                    }
+                    $("body").css("visibility", "");
+                    weui.loading().hide();
                 }
             }
         })
-		//
-		function getuserinfo(){
-			weui.loading();
-			//获取用户信息
-			$.ajax({  
-             	type: "POST",  
-             	url: "/subscribepay/afterPay/getUserInfo",   
-             	data: {},  
-             	dataType: "json",  
-				async:false,
-             	success: function(r){
-                	if(r.userData){
-                   		var _userData = r.userData;
-                   		var _vipData = _userData["o_vipjy"];
-                   		var _vipstatus = _userData["i_vip_status"];
-                   		// console.log(_userData)
-	                   if(_vipstatus&&_vipstatus=="1"){
-							if(parseInt(_vipData["expRemind"])>1){
-	                            $(".to_expired").show();
-								$(".renew_day").text(_vipData["expRemind"]);
-	                            $(".nv_renew_toast").show();
-								$(".tabbar").hide();
-	                        }else if(parseInt(_vipData["expRemind"])>0){
-	                            $(".to_expired").show();
-								$(".nv_renew_toast").find(".other").hide();
-								$(".nv_renew_toast").find(".today").show();
-	                            $(".nv_renew_toast").show();
-								$(".tabbar").hide();
-	                        }else{
-	                            $(".to_expired").hide();
-								$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/jyapp/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>')
-	                        }
-							$('.free7days_pic').text("VIP订阅服务");
-	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
-	                   }else{
-							if(!checkOrder(1)){
-								if(parseInt(_vipData["expRemind"])>1){
-		                            $(".to_expired").show();
-		                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
-		                            $(".renew_toast").show();
-		                        }else if(parseInt(_vipData["expRemind"])>0){
-		                            $(".to_expired").show();
-									$(".renew_toast").find(".other").hide();
-									$(".renew_toast").find(".today").show();
-		                            $(".renew_toast").show();
-		                        }else{
-		                            $(".to_expired").hide();
-		                        }
-							}else{
-	                            $(".to_expired").hide();
-	                        }
-							$(".tabbar").html('<a onclick="upgrade()" class="update_btn">升级</a><a onclick="rebuy()" class="renew_btn">续费</a>')
-							$('.free7days_pic').text("已开通VIP订阅服务");
-	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:none}</style>");
-	                   }
-	                   if(_vipData){
-	                   		if(Number(_vipData["i_projectmatch"])==1){
-								$('.switch').addClass('checked')
-							}else{
-				                $('.switch').removeClass('checked')
-				            }
-							//地区
-							var area = _vipData["o_area"];
-	                        $("._area").text(area);
-							//行业
-							var buyerclass =  _vipData["a_buyerclass"];
-							if (buyerclass >0){
-	                        	$("._buyerClass").text(buyerclass+"个行业");
-							}else{
-	                        	$("._buyerClass").text("全部行业");
-							}
-	                        $("._cycleCount").text(_vipData["cycle"]);
-	                        $("._activeDate").text(_userData["l_vip_starttime"]+" - "+_userData["l_vip_endtime"]);
-	                        if(_vipData["a_infotype"]==""){
-	                            _vipData["a_infotype"]="全部类型"
-	                        }
-	                        $("#infoType").text(_vipData["a_infotype"]);
-	                        var pushText = "实时推送"
-	                        if(_vipData["i_ratemode"]=="4"){
-	                            pushText = "每月推送"
-	                        }else if(_vipData["i_ratemode"]=="3"){
-	                            pushText = "每周推送"
-	                        }else if(_vipData["i_ratemode"]=="2"){
-	                            pushText = "每日推送"
-	                        }
-	                        $("#pushSet").text(pushText);
-	                        var a_items = _vipData["a_items"]
-	                        var s_items = ""
-	                        if (a_items!=undefined &&a_items.length>0){
-	                            for (var i = 0; a_items.length - 1 >= i ; i++) {
-	                                if(s_items!=""){
-	                                    s_items += "、"
-	                                }
-	                                s_items  += a_items[i]["s_item"]
-	                            }
-	                        }
-	                        $("#keywords").text(s_items);
-                   		}
-						$("body").css("visibility","");
-		            	weui.loading().hide();
-					}
-				}
-           })
-		}
-		//
-		function setprojectmatch(index){
-			if(checkedflag){
-				checkedflag = false;
-				$.post("/subscribepay/afterPay/setUserInfo",{pageType:"projectMatch",pmindex:index},function(r){
-	                if(r.flag){
-						checkedflag=true;
-	                   console.log("保存成功")
-	               }
-	            })
-			}
-		}
-		//
-		function upgrade(){
-			if(!checkOrder()){
-				window.location.href="/jyapp/vipsubscribe/toUpgradePage"
-			}
-		}
-		//
-		function rebuy(){
-			if(!checkOrder()){
-				window.location.href="/jyapp/vipsubscribe/renewPayPage"
-			}
-		}
-    </script>
-	{{include "/common/baiducc.html"}}
+    }
+
+    //
+    function setprojectmatch(index) {
+        if (checkedflag) {
+            checkedflag = false;
+            $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
+                if (r.flag) {
+                    checkedflag = true;
+                    console.log("保存成功")
+                }
+            })
+        }
+    }
+
+    //
+    function upgrade() {
+        window.location.href = "/jyapp/vipsubscribe/toUpgradePage"
+    }
+
+    //
+    function rebuy() {
+        window.location.href = "/jyapp/vipsubscribe/vipsubscribe_renew"
+    }
+</script>
+{{include "/common/baiducc.html"}}
 </body>
 
 </html>

+ 407 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -0,0 +1,407 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>VIP订阅</title>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/vip_index_new.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+    <style>
+        .jy-switch:before {
+            background-color: #fbfbfb;
+        }
+
+        .vip-header .header-renew .renew-r {
+            width: auto;
+            padding: 0 .1rem;
+        }
+    </style>
+</head>
+
+<body class="no-touch">
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    VIP订阅
+</div>
+<div class="app-layout-content-b">
+    <div class="vip-upgrade">
+        <div class="vip-header">
+            <div class="header-renew trail" style="display: none">
+                <div class="renew-l">
+                    <div class="vip-logo"></div>
+                    <div class="vip-text free7days">VIP订阅服务</div>
+                </div>
+                <a href="/jyapp/vipsubscribe/vipsubscribe_new" class="renew-r">去购买</a>
+            </div>
+            <div class="header-renew renew" style="display: none">
+                <div class="renew-l">
+                    <div class="vip-logo"></div>
+                    <div class="vip-text">VIP订阅服务</div>
+                </div>
+                <a href="/jyapp/vipsubscribe/vipsubscribe_renew" class="renew-r">续费</a>
+            </div>
+            <!-- 到期提醒 -->
+            <div class="expire-remind" style="display: none">
+                <i class="icon iconfont icon-guanbi close-expire-remind"></i>
+                <span class="remind-text">VIP订阅服务试用即将过期,请及时购买!</span>
+                <a class="remind-link"></a>
+            </div>
+        </div>
+        <ul class="vip-body">
+            <li class="body-item area">
+                <a class="item-container" href="/jyapp/vipsubscribe/toChangeArea">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">区域</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="buy-set-area text ellipsis">0个省、0个市(分布在0个省内)</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item">
+                        <span class="sub-l">已选择:</span>
+                        <span class="sub-r">
+                            <span class="text selected-area">0个省、0个市(分布在0个省内)</span>
+                            <span class="tip-need-upgrade tip">需升级</span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item industry">
+                <a class="item-container" href="/jyapp/vipsubscribe/toChangeIndustry">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">采购单位行业</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="buy-set-industry industry-text ellipsis">0个行业</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item">
+                        <span class="sub-l">已选择:</span>
+                        <span class="sub-r">
+                            <span class="text selected-industry">0个行业</span>
+                            <span class="tip-need-upgrade tip">需升级</span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item cycle">
+                <a class="item-container" href="/jyapp/vipsubscribe/toChangeTime">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">订阅周期</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="buy-cycle text ellipsis">0</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item">
+                        <!-- 此处空span占位 -->
+                        <span class="sub-l"></span>
+                        <span class="sub-r">
+                            <span class=""></span>
+                            <span class="extend-cycle tip">延长订阅周期</span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item keywords">
+                <a class="item-container" href="/jyapp/vipsubscribe/toSetKeyWordPage">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="leading jy-icon-keywords"></span>
+                            <span class="item-label">关键词</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="keywords-text ellipsis">未分类</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item info-type">
+                <a class="item-container" href="/jyapp/vipsubscribe/toSetInfoTypePage">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="leading jy-icon-info-type"></span>
+                            <span class="item-label">信息类型</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="info-type-text ellipsis">全部类型</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item push-setting">
+                <a class="item-container" href="/jyapp/vipsubscribe/toSetPushSetPage">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="leading jy-icon-push-setting"></span>
+                            <span class="item-label">推送设置</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="push-setting-text ellipsis">实时推送</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item project-match">
+                <a class="item-container" href="javascript:;">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="leading jy-icon-project-match"></span>
+                            <span class="item-label">
+                                <span class="label-text">项目匹配</span>
+                                <i class="iconfont icon-bangzhu"></i>
+                            </span>
+                        </span>
+                        <span class="item-r media_switch">
+                            <div class="weui-cell__ft">
+                                <button class="jy-switch switch checked"></button>
+                            </div>
+                        </span>
+                    </div>
+                </a>
+            </li>
+        </ul>
+        <!-- 升级 -->
+        <div class="vip-footer upgrade">
+            <div class="footer-preview-container">
+                <div class="clause-box">
+                    <span class="checkbox"></span>
+                    <span class="clause-read" style="flex: 1">我已阅读,理解并接受<a
+                                href="/front/staticPage/wx-serviceterms.html">《剑鱼标讯线上购买与服务条款》</a></span>
+                </div>
+                <div class="price-preview">
+                    <span class="preview-label">价格:</span>
+                    <span class="preview-content">
+                        <span class="billing-list-btn"></span>
+                        <span class="billing-price">¥366.50</span>
+                    </span>
+                </div>
+            </div>
+            <div class="footer-button-group">
+                <button class="button-l reset">取消</button>
+                <button class="button-r confirm" disabled>立即升级</button>
+            </div>
+        </div>
+        <!-- 修改 -->
+        <div class="vip-footer modify">
+            <div class="footer-button-group">
+                <button class="button-l reset">取消</button>
+                <button class="button-r confirm">保存修改</button>
+            </div>
+        </div>
+    </div>
+
+    <!-- 计费清单picker -->
+    <!-- 计费清单picker -->
+    <div class="billing-list-container" style="display: none;">
+        <div class="weui-mask weui-animate-fade-in"></div>
+        <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up">
+            <div class="weui-half-screen-dialog__hd">
+                <div class="dialog_hd__l"></div>
+                <div class="dialog_hd__title">计费清单</div>
+                <div class="dialog_hd__close iconfont icon-guanbi"></div>
+            </div>
+            <div class="weui-half-screen-dialog__bd valuation_list">
+                <div class="va-list-container">
+                    <ul class="list-content">
+                        <!--<li class="list-item">
+                            <div class="item-top">
+                                <div class="item-header">
+                                    <span class="header-label">有效日期:</span>
+                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                                </div>
+                                <div class="item-body">
+                                    <div class="b-item body-area">
+                                        <div class="body-area-title text-title">区域</div>
+                                        <div class="body-area-sub">1个省、3个市(分布在2个省内)</div>
+                                    </div>
+                                    <div class="b-item body-industry">
+                                        <div class="body-industry-title text-title">采购单位行业</div>
+                                        <div class="body-industry-sub">3个行业</div>
+                                    </div>
+                                    <div class="vp-type">
+                                        <div class="vp-type-text">升级</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="item-footer">
+                                <span class="footer-label">小计:</span>
+                                <span class="footer-content text-title">¥223.8</span>
+                            </div>
+                        </li>
+                        <li class="list-item">
+                            <div class="item-top">
+                                <div class="item-header">
+                                    <span class="header-label">有效日期:</span>
+                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                                </div>
+                                <div class="item-body vp-oneline">
+                                    <div class="b-item body-area">
+                                        <div class="body-area-title text-title">区域</div>
+                                        <div class="body-area-sub">1个省、3个市(分布在2个省内)</div>
+                                    </div>
+                                    <div class="vp-type">
+                                        <div class="vp-type-text">续续费</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="item-footer">
+                                <span class="footer-label">小计:</span>
+                                <span class="footer-content text-title">¥223.8</span>
+                            </div>
+                        </li>
+                        <li class="list-item">
+                            <div class="item-top">
+                                <div class="item-header">
+                                    <span class="header-label">有效日期:</span>
+                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                                </div>
+                                <div class="item-body">
+                                    <div class="b-item body-area">
+                                        <div class="body-area-title text-title">区域</div>
+                                        <div class="body-area-sub">1个省、3个市(分布在2个省内)</div>
+                                    </div>
+                                    <div class="b-item body-industry">
+                                        <div class="body-industry-title text-title">采购单位行业</div>
+                                        <div class="body-industry-sub">3个行业</div>
+                                    </div>
+                                    <div class="vp-type">
+                                        <div class="vp-type-text">升级</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="item-footer">
+                                <span class="footer-label">小计:</span>
+                                <span class="footer-content text-title">¥223.8</span>
+                            </div>
+                        </li>
+                        <li class="list-item">
+                            <div class="item-top">
+                                <div class="item-header">
+                                    <span class="header-label">有效日期:</span>
+                                    <span class="header-content ellipsis">(1个月)2019年12月1日-2019年12月31日</span>
+                                </div>
+                                <div class="item-body vp-oneline">
+                                    <div class="b-item body-industry">
+                                        <div class="body-industry-title text-title">采购单位行业</div>
+                                        <div class="body-industry-sub">3个行业</div>
+                                    </div>
+                                    <div class="vp-type">
+                                        <div class="vp-type-text">升级</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="item-footer">
+                                <span class="footer-label">小计:</span>
+                                <span class="footer-content text-title">¥223.8</span>
+                            </div>
+                        </li>-->
+                    </ul>
+                </div>
+            </div>
+            <div class="weui-half-screen-dialog__ft">
+                <div class="va-total-container">
+                    <span class="total-label">共计:</span>
+                    <span class="total-price">¥223.8</span>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- 选择订阅周期picker -->
+    <div class="js_dialog time_cycle" id="time_cycle" style="display: none;">
+        <div class="weui-mask"></div>
+        <div class="box">
+            <div class="box_hd">
+                <h3>订阅周期</h3>
+                <span class="cancel">取消</span>
+            </div>
+            <div class="box_bd">
+                <!-- <div class="tips monthly_tips" style="display: none">
+                    3-6个月6折,大于6个月5折
+                </div>
+                <div class="tips yearly_tips" style="display: none">
+                    1-2年5折,3年4折
+                </div> -->
+                <div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”更换算哦~</div>
+                <div class="computed_price">¥58.0</div>
+                <div class="bd_select">
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label monthly_label" for="monthly">
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check monthly" name="time" value="month" id="monthly"
+                                       checked/>
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                            <div class="weui-cell__bd">
+                                <p>按月订阅</p>
+                            </div>
+                        </label>
+                        <div class="number_box active" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
+                             data-numbox-max="12">
+                            <button class="weui-btn weui-btn_plain-default" type="button" disabled>
+                                <div class="jy_icon decrease"></div>
+                            </button>
+                            <span class="month_number">1</span>
+                            <button class="weui-btn weui-btn_plain-default add" type="button">
+                                <div class="jy_icon increase"></div>
+                            </button>
+                        </div>
+                    </div>
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label yearly_label" for="yearly">
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check yearly" name="time" value="year" id="yearly"/>
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                            <div class="weui-cell__bd">
+                                <p>按年订阅</p>
+                            </div>
+                        </label>
+                        <div class="number_box" id="number_box_year" style="border: 0;">
+                            <span class="year_number" data-id="1">1年</span>
+                            <span class="year_number" data-id="2">2年</span>
+                            <span class="year_number" data-id="3">3年</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="form-btn">
+                <button class="btn enter" id="enter_period">确认</button>
+            </div>
+        </div>
+    </div>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/vip_index_new.js?v=15{{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+</div>
+</body>
+<script>
+    $(window).bind("pageshow", function (event) {
+        if (event.originalEvent.persisted) {
+            window.location.reload();
+        }
+    });
+</script>
+</html>

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

@@ -59,7 +59,7 @@
         })
         //设置关键词
         $(".right_btn").on("click", function () {
-            window.location.href = '/jyapp/vipsubscribe/toSetPage'
+            window.location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
         })
 
         var orderCode = decodeURIComponent(getParam("orderCode"));

+ 855 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -0,0 +1,855 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <title>VIP订阅</title>
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/vip_purchase.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+</head>
+<body>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    VIP订阅
+</div>
+<div class="app-layout-content-b">
+    <div>
+        <div class="vip_purchase">
+            <div class="choose_condition">
+                <ul class="chooseList">
+                    <li class="choose_item">
+                        <a href="/jyapp/vipsubscribe/toChooseArea">
+                            <span class="label">区域</span>
+                            {{if not .T.isTrial }}
+                                <input type="text" disabled value="" placeholder="1个市"
+                                       class="info choose_area">
+                            {{else}}
+                                <input type="text" disabled value="" placeholder="选择全国、省份、地市" class="info choose_area">
+                            {{end}}
+                            <i class="iconfont icon-arrow"></i>
+                        </a>
+                        <p class="add_tips area_warn" style="display: none;">请选择区域</p>
+                        <!-- 无选择时不显示 -->
+                        <p class="add_tips area" style="display:none">已选择 0 个省级区域、0 个地市</p>
+                    </li>
+                    <li class="choose_item">
+                        <a href="/jyapp/vipsubscribe/toChooseIndustry">
+                            <span class="label" style="white-space: nowrap;">采购单位行业</span>
+                            {{if not .T.isTrial }}
+                                <input type="text" disabled value="" placeholder="1个行业"
+                                       class="info choose_industry">
+                            {{else}}
+                                <input type="text" disabled value="" placeholder="选择采购单位行业"
+                                       class="info choose_industry">
+                            {{end}}
+                            <i class="iconfont icon-arrow"></i>
+                        </a>
+                        <!-- 无选择时不显示 -->
+                        <p class="add_tips industry_warn" style="display: none;">请选择行业</p>
+                        <p class="add_tips industry" style="display:none">已选择 0 个行业</p>
+                    </li>
+                    <li class="choose_item select_cycle">
+                        <!-- 需要选择订阅周期就用a标签,div.class="free-7day"隐藏 opacity: 1 !important; -->
+                        <!-- 需要选择试用就用div标签,a标签隐藏 -->
+                        {{if not .T.isTrial }}
+                            <a href="javascript:;">
+                                <span class="label">订阅周期</span>
+                                <span class="show_time">一个月</span>
+                                <input type="text" readonly="readonly" disabled style="display:none;" value="1个月"
+                                       class="info choose_time">
+                                <i class="iconfont icon-arrow"></i>
+                            </a>
+                        {{else}}
+                            <div class="free-7day">
+                                <span class="label">订阅周期</span>
+                                <i class="info">免费试用7天</i>
+                            </div>
+                        {{end}}
+
+                    </li>
+                </ul>
+                <div class="pay_mode">
+                    {{if not .T.isTrial }}
+                        <div class="select_payment choose_item">
+                            <a href="javascript:;">
+                                <span class="label">支付方式</span>
+                                <span class="info choose_way">微信支付</span>
+                                <i class="iconfont icon-arrow"></i>
+                            </a>
+                        </div>
+                    {{end}}
+                    <div class="vip_rules">
+                        <!--
+                          <div class="auto_renew weui-cells_checkbox radio-form">
+                              <label class="weui-cell weui-check__label" for="auto-renew">
+                                  <div class="weui-cell__hd">
+                                      <input type="checkbox" class="weui-check" name="autoRenewService" id="auto-renew" />
+                                      <i class="weui-icon-checked"></i>
+                                  </div>
+                                  <div class="weui-cell__bd read">
+                                      <p>开通自动续费,根据当前订阅条件,服务到期时系统将为您自动续费</p>
+                                  </div>
+                              </label>
+                          </div>
+                        -->
+                        <div class="vip_prise_table">
+                            <table class="monthly">
+                                <caption class="table_title">- VIP订阅价格 -</caption>
+                                <tr>
+                                    <td colspan="2">按月购买</td>
+                                </tr>
+                                <tr>
+                                    <td><span>5.8</span>元 月/市/行业</td>
+                                    <td><span>18</span>元 月/市/全行业</td>
+                                </tr>
+                                <tr>
+                                    <td><span>11.8</span>元 月/省/行业</td>
+                                    <td><span>38</span>元 月/省/全行业</td>
+                                </tr>
+                                <tr>
+                                    <td><span>118</span>元 月/全国/行业</td>
+                                    <td><span>388</span>元 月/全国/全行业</td>
+                                </tr>
+                            </table>
+                            <table class="yearly">
+                                <tr>
+                                    <td colspan="2">按年购买</td>
+                                </tr>
+                                <tr>
+                                    <td><span>58</span>元 年/市/行业</td>
+                                    <td><span>180</span>元 年/市/全行业</td>
+                                </tr>
+                                <tr>
+                                    <td><span>118</span>元 年/省/行业</td>
+                                    <td><span>380</span>元 年/省/全行业</td>
+                                </tr>
+                                <tr>
+                                    <td><span>1180</span>元 年/全国/行业</td>
+                                    <td><span>3880</span>元 年/全国/全行业</td>
+                                </tr>
+                            </table>
+                            <dl class="tips">
+                                <dt>购买须知:</dt>
+                                <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
+                                <dd>用户最多购买/续费3年套餐;</dd>
+                                <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
+                                <dd>3个市及以上即为全省,10个省及以上即为全国。4个行业及以上即为全行业。</dd>
+
+
+                            </dl>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="fixed-bottom-box">
+                <div class="weui-cells weui-cells_checkbox radio-form">
+                    <label class="weui-cell weui-check__label" for="buy">
+                        <div class="weui-cell__hd">
+                            <input type="checkbox" class="weui-check" name="buyService" id="buy"/>
+                            <i class="weui-icon-checked"></i>
+                        </div>
+                        <div class="weui-cell__bd read">
+                            <p>
+                                我已阅读,理解并接受
+                                <a href="/front/staticPage/wx-serviceterms.html">
+                                    《剑鱼标讯线上购买与服务条款》
+                                </a>
+                            </p>
+                        </div>
+                    </label>
+                </div>
+                <div class="price">
+                    <!-- <strong>&yen;1,300.00</strong> -->
+                    <strong>&yen;5.80</strong>
+                </div>
+                <div class="form-btn">
+                    <button class="btn enter" disabled id="payHandle">去支付</button>
+                </div>
+            </div>
+
+            <!-- 选择行业 -->
+            <div class="js_dialog time_cycle" id="time_cycle" style="display: none;">
+                <div class="weui-mask"></div>
+                <div class="box">
+                    <div class="box_hd">
+                        <h3>订阅周期</h3>
+                        <span class="cancel">取消</span>
+                    </div>
+                    <div class="box_bd">
+                        <!-- <div class="tips monthly_tips" style="display: none">
+                                3-6个月6折,大于6个月5折
+                            </div>
+                            <div class="tips yearly_tips" style="display: none">
+                                1-2年5折,3年4折
+                            </div> -->
+                        <!--<div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”</div>-->
+                        <div class="computed_price"></div>
+                        <div class="bd_select">
+                            <div class="weui-cells weui-cells_checkbox choose-form">
+                                <label class="weui-cell weui-check__label monthly_label" for="monthly">
+                                    <div class="weui-cell__hd">
+                                        <input type="radio" class="weui-check monthly" name="time" value="month"
+                                               id="monthly"/>
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>按月订阅</p>
+                                    </div>
+                                </label>
+                                <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
+                                     data-numbox-max="12">
+                                    <button class="weui-btn weui-btn_plain-default" type="button" disabled>
+                                        <div class="jy_icon decrease"></div>
+                                    </button>
+                                    <span class="month_number">1</span>
+                                    <button class="weui-btn weui-btn_plain-default add" type="button">
+                                        <div class="jy_icon increase"></div>
+                                    </button>
+                                </div>
+                            </div>
+                            <div class="weui-cells weui-cells_checkbox choose-form">
+                                <label class="weui-cell weui-check__label yearly_label" for="yearly">
+                                    <div class="weui-cell__hd">
+                                        <input type="radio" class="weui-check yearly" name="time" value="year"
+                                               id="yearly" checked/>
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>按年订阅</p>
+                                    </div>
+                                </label>
+                                <div class="number_box" id="number_box_year" style="border: 0;">
+                                    <span class="year_number" data-id="1">1年</span>
+                                    <span class="year_number" data-id="2">2年</span>
+                                    <span class="year_number" data-id="3">3年</span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="form-btn">
+                        <button class="btn enter" id="enter_period">确认</button>
+                    </div>
+                </div>
+            </div>
+            <!-- 选择支付方式 -->
+            <div class="js_dialog pay_way" id="pay_way" style="display: none;">
+                <div class="weui-mask"></div>
+                <div class="box">
+                    <div class="box_hd">
+                        <span></span>
+                        <h3>支付方式</h3>
+                        <span class="cancel">取消</span>
+                    </div>
+                    <div class="box_bd">
+                        <div class="weui-cells weui-cells_checkbox choose-form">
+                            <label class="weui-cell weui-check__label wx_label" for="wx">
+                                <div class="weui-cell__bd read">
+                                    <p><img src="/jyapp/vipsubscribe/image/weixin.png?v={{Msg "seo" "version"}}">微信支付
+                                    </p>
+                                </div>
+                                <div class="weui-cell__hd">
+                                    <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
+                                    <i class="weui-icon-checked"></i>
+                                </div>
+                            </label>
+                            <label class="weui-cell weui-check__label zfb_label" for="zfb">
+                                <div class="weui-cell__bd read">
+                                    <p><img src="/jyapp/vipsubscribe/image/zhifubao.png?v={{Msg "seo" "version"}}">支付宝支付
+                                    </p>
+                                </div>
+                                <div class="weui-cell__hd">
+                                    <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
+                                    <i class="weui-icon-checked"></i>
+                                </div>
+                            </label>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+        <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+        <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+        <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+        <script>
+            $(window).bind("pageshow", function (event) {
+                if (event.originalEvent.persisted) {
+                    window.location.reload();
+                }
+            });
+            //微信支付start
+            {{if not .T.isTrial }}
+            sessionStorage.removeItem("vipSubisTrial");//非试用界面
+            {{else}}
+            sessionStorage.setItem("vipSubisTrial", "1");//试用界面
+            //试用用户
+            {{end}}
+            var purchase = {
+                areaSelect: {"一个省": ["一个市"]},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
+                industrySelect: ["一个行业"],// 已选择行业 一个行业(计算价格临时变量)
+                timeSelect: [1, 2],//已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
+                price: {}, //价格
+                nowBuyset: {},
+                vipSubisTrial: false,
+                payWay: "wx_app",
+                initData: function () {
+                    //已选择
+                    try {
+                        if (sessionStorage.getItem("vipSubSelectArea")) {
+                            this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
+                        }
+                        if (sessionStorage.getItem("vipSubSelectIndustry")) {
+                            this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
+                        }
+                        if (sessionStorage.getItem("payWay")) {
+                            if (sessionStorage.getItem("payWay").indexOf("ali") > -1) {
+                                this.payWay = "ali_app";
+                                $("#zfb").prop("checked", true);
+                                $(".choose_way").text("支付宝支付");
+                            }
+                        }
+                        {{if eq .T.orderType 5 }}
+                        $('#payHandle').text("立即续费");
+                        //即将到期 回显已购买
+                        if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                            $DoPost("/subscribepay/vipsubscribe/getSubBuyMsg", {}, function (r) {
+                                if (r.success) {
+                                    if (!$.isEmptyObject(r.data.area)) {
+                                        purchase.areaSelect = r.data.area
+                                    } else {
+                                        purchase.areaSelect = {"全国": []}
+                                    }
+                                    if (r.data.industry.length != 0) {
+                                        purchase.industrySelect = r.data.industry
+                                    } else {
+                                        purchase.industrySelect = ["全部行业"]
+                                    }
+                                    sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                                    sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                                }
+                            }, false)
+                        }
+                        {{end}}
+                        {{if .T.again}}    //再次购买回显
+                        {{if eq .T.again 1 }}
+                        var orderCode = getParam("orderCode")
+                        if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                            $DoPost("/subscribepay/orderListDetails/getVipOrderInfo", {"orderCode": orderCode}, function (r) {
+                                if (!$.isEmptyObject(r.data.area)) {
+                                    purchase.areaSelect = r.data.area
+                                } else {
+                                    purchase.areaSelect = {"全国": []}
+                                }
+                                if (r.data.industry.length != 0) {
+                                    purchase.industrySelect = r.data.industry
+                                } else {
+                                    purchase.industrySelect = ["全部行业"]
+                                }
+//                          if (r.timeSelect!=undefined&&r.company!=undefined){
+//                         		purchase.timeSelect=[r.timeSelect,r.company];
+//                          }
+                                $(".weui-icon-checked").click();
+                                sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                                sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                                //sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+
+                            }, false)
+                        }
+                        {{end}}
+                        {{end}}
+                        if (sessionStorage.getItem("vipSubSelectTime")) {
+                            this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
+                        }
+                        //是否已经点击已读
+                        if (sessionStorage.getItem("vipSub_read") == "true") $("#buy").prop("checked", true);
+                        //是否试用界面
+                        if (sessionStorage.getItem("vipSubisTrial")) this.vipSubisTrial = true;
+
+                        //加载价格
+                        $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
+                            if (r) {
+                                purchase.price = r;
+                            }
+                        }, false)
+
+                    } catch (e) {
+                        console.log(e)
+                    }
+                    this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect, this.price);
+                },
+                showArea: function () {
+                    if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["一个省"]) { //有选择
+                        if (this.nowBuyset.areacount === -1) {
+                            $(".choose_area").val("全国");
+                        } else {
+                            var tipTxt = "已选择 ";
+                            if (this.nowBuyset.areacount > 0) tipTxt += this.nowBuyset.areacount + " 个省";
+                            var count = 0;
+                            this.nowBuyset.citys.forEach(function (item, index) {
+                                count += item;
+                            });
+                            if (count > 0) {
+                                if (this.nowBuyset.areacount > 0) tipTxt += "、";
+                                tipTxt += count + " 个市";
+                                if (this.nowBuyset.citys.length > 1) tipTxt += "(分布在" + this.nowBuyset.citys.length + "个省内)"
+                            }
+                            $(".choose_area").val(tipTxt);
+                        }
+                    } else {
+                        $(".choose_area").val("");
+                        //是否勾选已阅读
+                        if (sessionStorage.getItem("vipSub_read") == "true") {
+                            $(".area_warn").css("display", "");
+                        }
+                    }
+                },
+                showPrice: function () {
+                    $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
+                    $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
+                    $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
+                    $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
+                    $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
+                    $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
+
+                    $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
+                    $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
+                    $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
+                    $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
+                    $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
+                    $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
+                },
+                showIndustry: function () {
+                    if (this.industrySelect.length > 0 && this.industrySelect[0] != "一个行业") { //选择有行业信息
+                        if (this.nowBuyset.buyerclasscount == -1) {
+                            $(".choose_industry").val("全部行业");
+                        } else {
+                            var tipTxt = "已选择 ";
+                            $(".choose_industry").val(tipTxt + this.nowBuyset.buyerclasscount + " 个行业");
+                        }
+                    } else {
+                        $(".choose_industry").val("");
+                        //是否勾选已阅读
+                        if (sessionStorage.getItem("vipSub_read") == "true") {
+                            $(".industry_warn").css("display", "");
+                        }
+                    }
+                },
+                showTime: function () {
+                    var tmp = this.timeSelect[0];
+                    if (this.timeSelect[1] == 1) {
+                        tmp += "年";
+                        $("#yearly").prop('checked', true);
+                        $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active");
+                        //$(".number_box:eq(1)").addClass("active");
+                    } else {
+                        tmp += "个月";
+                        $("#monthly").prop('checked', true);
+                        $(".number_box:eq(0)").addClass("active");
+                        $("#number_box_month .month_number").text(this.timeSelect[0]);
+                        /*if (this.timeSelect[0] >= 10) {
+                            $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
+                        }*/
+                        if (this.timeSelect[0] == 1) {
+                            $('#number_box_month button:eq(0)').attr("disabled", "disabled");
+                        } else {
+                            $('#number_box_month button:eq(0)').removeAttr("disabled");
+                        }
+                    }
+                    $(".choose_item .show_time").text(tmp);
+                    $(".info.choose_time").val(tmp);
+                },
+                flushPrice: function (time, flag) {
+                    if (this.vipSubisTrial) {
+                        $('.price strong').text('¥0.00');
+                    } else {
+                        var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
+                        //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
+                        var showPrice = formatMoney(price);
+                        if (flag === 1) {
+                            $('.price strong').text('¥' + showPrice);
+                        } else if (flag === 2) {
+                            $('.computed_price').html('¥' + showPrice);
+                        } else {
+                            $('.price strong').text('¥' + showPrice);
+                            $('.computed_price').html('¥' + showPrice);
+                        }
+
+                    }
+                }
+            };
+
+
+            $(function () {
+                purchase.initData();
+                purchase.showArea();
+                purchase.showIndustry();
+                purchase.showPrice();
+                purchase.showTime();
+                purchase.flushPrice(purchase.timeSelect);
+                checkOk();
+                var time_limit;//定义一个周期变量
+                /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
+                $('.weui-mask').click(hideDialog);
+                $('.cancel').click(hideDialog);
+
+                /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
+                // 选择订阅周期
+                $('.select_cycle a').click(function (e) {
+                    $('#time_cycle').show(200);
+                });
+
+
+                /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
+                $('.select_payment .choose_way').click(function () {
+                    $('#pay_way').show(200);
+                });
+                // 对支付方式选择的input绑定点击事件
+                $('#pay_way input:radio[name="way"]').click(function () {
+                    var checkValue = $('input:radio[name="way"]:checked').val();
+                    $('.pay_way').hide(200);
+                    $('.pay_mode .select_payment .choose_way.info').html(checkValue);
+                    if (checkValue === "微信支付") {
+                        purchase.payWay = "wx_app"
+                    } else {
+                        purchase.payWay = "ali_app"
+                    }
+                    sessionStorage.setItem("payWay", purchase.payWay);
+                });
+                // 对订阅时间选择的input绑定点击事件
+                $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+                    // 解除确认按钮的锁定
+                    $('#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')) {
+                        if (currentNum == 11) { //12个月自动跳转1年
+                            $("#number_box_year .year_number:eq(0)").trigger("click");
+                            return
+                        }
+                        // 点的+
+                        // 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);
+                    purchase.timeSelect_tmp = [Number(currentNum), 2];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                    //var price = (5.8 * currentNum).toFixed(1);
+                    //$('.computed_price').html('¥' + price)
+                    var firstButton = $('#number_box_month button:first');
+                    var lastButton = $('#number_box_month button:last');
+                    /*if (currentNum >= 10) {
+                        $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
+                    } else {
+                        $('.profit_tips').hide();
+                    }*/
+                    // 如果为操作后的结果为1,则锁定减号按钮
+                    if (currentNum === data.numboxMin) {
+                        firstButton.attr('disabled', true)
+                    } else {
+                        firstButton.removeAttr('disabled')
+                    }
+                    // 如果为操作后的结果为12,则锁定加号按钮
+                    if (currentNum === data.numboxMax) {
+                        lastButton.attr('disabled', true)
+                    } else {
+                        lastButton.removeAttr('disabled')
+                    }
+                });
+
+                /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
+                $('#number_box_year').on('click', 'span', function (e) {
+                    console.log(e.target.dataset.id);
+                    $('#number_box_month').removeClass('active');
+                    var id = e.target.dataset.id;
+                    //$('.profit_tips').hide();
+                    $(this).addClass('active').siblings().removeClass('active');
+                    $('#yearly').prop('checked', true);
+                    $("#monthly").prop('checked', false);
+
+                    // 渲染结果 保留一位小数
+                    //var result = (Number(id) * 58).toFixed(1);
+                    //$('.computed_price').html('¥' + result)
+                    purchase.timeSelect_tmp = [Number(id), 1]
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                });
+
+                /* -------- 选择按月订阅  radio触发的事件------- */
+                $('#monthly').on('change', function (e) {
+                    var isChecked = $(this).is(':checked');
+                    var val = $('.month_number').text();
+                    /*if (val >= 10) {
+                        $('.profit_tips').show()
+                    }*/
+                    if (!isChecked) {
+                        $('#number_box_month button').attr('disabled', true)
+                    }
+                    //var result = (Number(val) * 5.8).toFixed(1);
+                    //$('.computed_price').html('¥' + result);
+                    purchase.timeSelect_tmp = [Number(val), 2];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+
+                });
+                /* -------- 选择按年订阅  radio触发的事件------- */
+                $('#yearly').on('change', function (e) {
+                    //$('.profit_tips').hide();
+                    // console.log($(this).is(':checked'))
+                    var isChecked = $(this).is(':checked');
+                    // 按年订阅默认选择1年
+                    var val = 1;
+                    //$('.computed_price').html('¥' + Number(val) * 58)
+                    if (isChecked) {
+                        $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
+                    }
+                    purchase.timeSelect_tmp = [Number(val), 1];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                });
+
+                // 确认订阅周期
+                $('#enter_period').on('click', function () {
+                    var val;
+                    $('input[name="time"]').each(function (i, v) {
+                        var isChecked = $(v).is(':checked');
+                        if ($(v).is(':checked') === true && $('.year_number').hasClass('active')) {
+                            val = $('.active').html();
+                            $('#time_cycle').hide(function () {
+                                $('.choose_time').val(val);
+                                $('.show_time').text(val);
+                            });
+                            purchase.timeSelect_tmp = [parseInt(val[0]), 1]
+                        } else if ($(v).is(':checked') === true) {
+                            val = $('.month_number').html();
+                            $('#time_cycle').hide(function () {
+                                $('.choose_time').val(val + '个月');
+                                $('.show_time').text(val + '个月');
+                            });
+                            purchase.timeSelect_tmp = [parseInt(val), 2]
+                        }
+                    });
+                    purchase.timeSelect = purchase.timeSelect_tmp;
+                    purchase.flushPrice(purchase.timeSelect, 1);
+                    sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+                });
+                $("input").bind("input propertychange change", function (event) {
+                    checkOk();
+                });
+
+                $('#payHandle').click(function () {
+                    $("#payHandle").attr("disabled", "disabled");
+                    //支付请求
+                    var area = purchase.areaSelect;
+                    var industry = purchase.industrySelect;
+                    if (area["全国"]) {
+                        area = {};
+                    }
+                    if (industry.length === 1 && industry[0] === "全部行业") {
+                        industry = [];
+                    }
+                    {{if not .T.isTrial}}
+                    //付费用户
+                    var param = {
+                        "area": JSON.stringify(area),
+                        "industry": industry.join(","),
+                        "time": $(".info:eq(2)").val().trim(),
+                        "payWay": purchase.payWay,
+                        "orderType":{{.T.orderType}},
+                    };
+                    $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
+                        if (r.success) {
+                            try {
+                                if (param.payWay === "wx_app") {
+                                    JyObj.wxPay(r.data.res)
+                                } else {
+                                    JyObj.aliPay(r.data.res)
+                                }
+                                checkpay(r.data.code)
+                            } catch (e) {
+                                showToast(e)
+                            }
+                        }
+                        $("#payHandle").removeAttr("disabled")
+                    });
+
+                    {{else}}
+                    //试用用户
+                    $DoPost("/subscribepay/order/trialPay", {
+                        "area": JSON.stringify(area),
+                        "industry": industry.join(",")
+                    }, function (r) {
+                        if (r.success) {
+                            clearSessionStorage();
+                            $("#payHandle").attr("disabled", "disabled");
+                            window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + r.data.code);
+                        }
+                    });
+                    {{end}}
+                })
+
+            });
+
+            // 隐藏dialog选择框
+            function hideDialog() {
+                $('#pay_way').hide(200);
+                $('#time_cycle').hide(200);
+            }
+
+
+            //app支付 公共方法
+            //查询是否支付完成
+            var interval;
+
+            function checkpay(orderid) {
+                if (interval) {
+                    clearInterval(interval);
+                }
+                interval = setInterval(function () {
+                    $.post("/jypay/isPaySuccess", {code: orderid}, function (r) {
+                        if (r.success) {
+                            clearSessionStorage();
+                            window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + orderid);
+                        }
+                    });
+                    if (canpay && mySysIsIos()) {
+                        clearInterval(interval);
+                    }
+                }, 2000)
+            }
+
+            function payCallBack(status) {
+                switch (status) {
+                    case "0"://支付取消
+                        clearInterval(interval);
+                        break;
+                    case "1"://支付完成
+
+                        break;
+                    case "-1"://支付失败
+                        clearInterval(interval);
+                        break;
+                }
+            }
+
+            function showToast(content) {
+                weui.toast(content, {
+                    duration: 2000,
+                    className: 'custom-toast',
+                });
+            }
+
+            //app支付 公共方法 结束
+
+
+            //是否可点击
+            function checkOk() {
+                var area = $(".info:eq(0)").val().trim();
+                var industry = $(".info:eq(1)").val().trim();
+                var checked = $('#buy').prop('checked');
+                if (area != '' && industry != '' && checked == true) {
+                    $("#payHandle").removeAttr('disabled');
+                } else {
+                    $("#payHandle").attr({
+                        'disabled': 'true'
+                    });
+                }
+                if (checked) {
+                    if (area === '') {
+                        $(".area_warn").css("display", "block");
+                    }
+                    if (industry === "") {
+                        $(".industry_warn").css("display", "block");
+                    }
+                }
+                // else {
+                //     $(".area_warn").css("display", "");
+                //     $(".industry_warn").css("display", "");
+                // }
+
+                sessionStorage.setItem("vipSub_read", checked)
+
+            }
+
+            function clearSessionStorage() {
+                sessionStorage.removeItem("vipSubSelectArea");
+                sessionStorage.removeItem("vipSubSelectIndustry");
+                sessionStorage.removeItem("vipSubSelectTime");
+                sessionStorage.removeItem("vipSub_read");
+                sessionStorage.removeItem("historypushDataCache");
+                sessionStorage.removeItem("payWay");
+                sessionStorage.To_introducePage = 2;
+                //订阅首页
+                sessionStorage.removeItem("sub_vip_state");
+                sessionStorage.removeItem("vip_index_read");
+                sessionStorage.removeItem("vip_change_time");
+            }
+
+            /******* 获取url参数(正则)********/
+            function getParam(name) {
+                var search = document.location.search;
+                // alert(search);
+                var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+                var matcher = pattern.exec(search);
+                var items = null;
+                if (null != matcher) {
+                    try {
+                        items = decodeURIComponent(decodeURIComponent(matcher[1]));
+                    } catch (e) {
+                        try {
+                            items = decodeURIComponent(matcher[1]);
+                        } catch (e) {
+                            items = matcher[1];
+                        }
+                    }
+                }
+                return items;
+            };
+
+        </script>
+    </div>
+</div>
+</body>
+
+</html>

+ 0 - 808
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase_willExpire.html

@@ -1,808 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-    <meta charset="utf-8">
-    <meta name="viewport"
-          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
-    <title>VIP订阅</title>
-    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
-    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/vip_purchase.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
-    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
-</head>
-<body>
-<div class="app-layout-header">
-    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
-    VIP订阅
-</div>
-<div class="app-layout-content-b">
-    <div class="vip_purchase">
-        <div class="choose_condition">
-            <ul class="chooseList">
-                <li class="choose_item">
-                    <a href="/jyapp/vipsubscribe/toChooseArea">
-                        <span class="label">区域</span>
-                        <input type="text" disabled value="" placeholder="1个市"
-                               class="info choose_area">
-                        <i class="iconfont icon-arrow"></i>
-                    </a>
-                    <!-- 无选择时不显示 -->
-                    <p class="add_tips area" style="display:none">已选择 0 个省级区域、0 个地市</p>
-                </li>
-                <li class="choose_item">
-                    <a href="/jyapp/vipsubscribe/toChooseIndustry">
-                        <span class="label">行业</span>
-                        <input type="text" disabled value="" placeholder="1个行业"
-                               class="info choose_industry">
-                        <i class="iconfont icon-arrow"></i>
-                    </a>
-                    <!-- 无选择时不显示 -->
-                    <p class="add_tips industry" style="display:none">已选择 0 个行业</p>
-                </li>
-                <li class="choose_item select_cycle">
-                    <!-- 需要选择订阅周期就用a标签,div.class="free-7day"隐藏 opacity: 1 !important; -->
-                    <!-- 需要选择试用就用div标签,a标签隐藏 -->
-                    <a href="javascript:;">
-                        <span class="label">订阅周期</span>
-                        <span class="show_time">一个月</span>
-                        <input type="text" readonly="readonly" disabled style="display:none;" value="1个月"
-                               class="info choose_time">
-                        <i class="iconfont icon-arrow"></i>
-                    </a>
-                </li>
-            </ul>
-            <div class="pay_mode">
-                <div class="select_payment choose_item">
-                    <a href="javascript:;">
-                        <span class="label">支付方式</span>
-                        <span class="info choose_way" style="width: 6rem;">微信支付</span>
-                        <!--<i class="iconfont"></i>-->
-                    </a>
-                </div>
-                <div class="vip_rules">
-                    <div class="vip_prise_table">
-                        <table class="monthly">
-                            <caption class="table_title">- VIP订阅价格 -</caption>
-                            <tr>
-                                <td colspan="2">按月购买</td>
-                            </tr>
-                            <tr>
-                                <td><span>5.8</span>元 月/市/行业</td>
-                                <td><span>18</span>元 月/市/全行业</td>
-                            </tr>
-                            <tr>
-                                <td><span>11.8</span>元 月/省/行业</td>
-                                <td><span>38</span>元 月/省/全行业</td>
-                            </tr>
-                            <tr>
-                                <td><span>118</span>元 月/全国/行业</td>
-                                <td><span>388</span>元 月/全国/全行业</td>
-                            </tr>
-                        </table>
-                        <table class="yearly">
-                            <tr>
-                                <td colspan="2">按年购买</td>
-                            </tr>
-                            <tr>
-                                <td><span>58</span>元 年/市/行业</td>
-                                <td><span>180</span>元 年/市/全行业</td>
-                            </tr>
-                            <tr>
-                                <td><span>118</span>元 年/省/行业</td>
-                                <td><span>380</span>元 年/省/全行业</td>
-                            </tr>
-                            <tr>
-                                <td><span>1180</span>元 年/全国/行业</td>
-                                <td><span>3880</span>元 年/全国/全行业</td>
-                            </tr>
-                        </table>
-                        <dl class="tips">
-                            <dt>购买须知:</dt>
-                            <dd>套餐周期内,不支持套餐降级,即将到期时续费可降级;</dd>
-                            <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
-                        </dl>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="fixed-bottom-box">
-            <div class="weui-cells weui-cells_checkbox radio-form">
-                <label class="weui-cell weui-check__label" for="buy">
-                    <div class="weui-cell__hd">
-                        <input type="checkbox" class="weui-check" name="buyService" id="buy"/>
-                        <i class="weui-icon-checked"></i>
-                    </div>
-                    <div class="weui-cell__bd read">
-                        <p>
-                            我已阅读,理解并接受
-                            <a href="/jyapp/front/staticPage/wx-serviceterms.html">
-                                《剑鱼标讯线上购买与服务条款》
-                            </a>
-                        </p>
-                    </div>
-                </label>
-            </div>
-            <div class="price">
-                <!-- <strong>&yen;1,300.00</strong> -->
-                <strong>&yen;5.80</strong>
-            </div>
-            <div class="form-btn">
-                <button class="btn enter" disabled id="payHandle">立即续费</button>
-            </div>
-        </div>
-
-        <!-- 选择行业 -->
-        <div class="js_dialog time_cycle" id="time_cycle" style="display: none;">
-            <div class="weui-mask"></div>
-            <div class="box">
-                <div class="box_hd">
-                    <h3>订阅周期</h3>
-                    <span class="cancel">取消</span>
-                </div>
-                <div class="box_bd">
-                    <div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”</div>
-                    <div class="computed_price">¥58.0</div>
-                    <div class="bd_select">
-                        <div class="weui-cells weui-cells_checkbox choose-form">
-                            <label class="weui-cell weui-check__label monthly_label" for="monthly">
-                                <div class="weui-cell__hd">
-                                    <input type="radio" class="weui-check monthly" name="time" value="month"
-                                           id="monthly"/>
-                                    <i class="weui-icon-checked"></i>
-                                </div>
-                                <div class="weui-cell__bd">
-                                    <p>按月订阅</p>
-                                </div>
-                            </label>
-                            <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
-                                 data-numbox-max="12">
-                                <button class="weui-btn weui-btn_plain-default" type="button" disabled>
-                                    <div class="jy_icon decrease"></div>
-                                </button>
-                                <span class="month_number">1</span>
-                                <button class="weui-btn weui-btn_plain-default add" type="button">
-                                    <div class="jy_icon increase"></div>
-                                </button>
-                            </div>
-                        </div>
-                        <div class="weui-cells weui-cells_checkbox choose-form">
-                            <label class="weui-cell weui-check__label yearly_label" for="yearly">
-                                <div class="weui-cell__hd">
-                                    <input type="radio" class="weui-check yearly" name="time" value="year"
-                                           id="yearly" checked/>
-                                    <i class="weui-icon-checked"></i>
-                                </div>
-                                <div class="weui-cell__bd">
-                                    <p>按年订阅</p>
-                                </div>
-                            </label>
-                            <div class="number_box" id="number_box_year" style="border: 0;">
-                                <span class="year_number" data-id="1">1年</span>
-                                <span class="year_number" data-id="2">2年</span>
-                                <span class="year_number" data-id="3">3年</span>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="form-btn">
-                    <button class="btn enter" id="enter_period">确认</button>
-                </div>
-            </div>
-        </div>
-        <!-- 选择支付方式 -->
-        <div class="js_dialog pay_way" id="pay_way" style="display: none;">
-            <div class="weui-mask"></div>
-            <div class="box">
-                <div class="box_hd">
-                    <span></span>
-                    <h3>支付方式</h3>
-                    <span class="cancel">取消</span>
-                </div>
-                <div class="box_bd">
-                    <div class="weui-cells weui-cells_checkbox choose-form">
-                        <label class="weui-cell weui-check__label wx_label" for="wx">
-                            <div class="weui-cell__bd read">
-                                <p><img src="/jyapp/vipsubscribe/image/weixin.png?v={{Msg "seo" "version"}}">微信支付</p>
-                            </div>
-                            <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
-                                <i class="weui-icon-checked"></i>
-                            </div>
-                        </label>
-                        <label class="weui-cell weui-check__label zfb_label" for="zfb">
-                            <div class="weui-cell__bd read">
-                                <p><img src="/jyapp/vipsubscribe/image/zhifubao.png?v={{Msg "seo" "version"}}">支付宝支付</p>
-                            </div>
-                            <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
-                                <i class="weui-icon-checked"></i>
-                            </div>
-                        </label>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
-    {{include "/common/weixin.html"}}
-    <script>
-        $(window).bind("pageshow", function (event) {
-            if (event.originalEvent.persisted) {
-                window.location.reload();
-            }
-        });
-        //微信支付start
-        try {
-            var signature = {{.T.signature}};
-            var isConfigSuccess = true;
-            var id = {{.T._id}}
-            if (signature && signature.length == 4) {
-                wx.config({
-                    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                    appId: signature[0], // 必填,公众号的唯一标识
-                    timestamp: signature[1], // 必填,生成签名的时间戳
-                    nonceStr: signature[2], // 必填,生成签名的随机串
-                    signature: signature[3],// 必填,签名,见附录1
-                    jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-                });
-                wx.ready(function () {
-                    if (!isConfigSuccess) {
-                        return;
-                    }
-                    wx.hideAllNonBaseMenuItem();
-                });
-                wx.error(function (res) {
-                    //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                    //alert(res);
-                    isConfigSuccess = false;
-                });
-            }
-
-            //调用微信支付接口
-            function onBridgeReady(res, ordercode) {
-                WeixinJSBridge.invoke('getBrandWCPayRequest', {
-                        "appId": res["appId"],
-                        "timeStamp": res["timestamp"],
-                        "nonceStr": res["nonceStr"],
-                        "package": res["prepayId"],
-                        "signType": res["signType"],
-                        "paySign": res["sign"]
-                    },
-                    function (r) {
-                        if (r.err_msg == "get_brand_wcpay_request:ok") {
-                            setTimeout(function () {
-                                clearSessionStorage();
-                                window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + ordercode);
-                            }, 500)
-                        } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
-                            console.log("支付已取消")
-                        } else {
-                            weui.toast("系统异常,请稍微再试", {
-                                duration: 2000,
-                                className: 'custom-toast',
-                            });
-                        }
-                    });
-            }
-
-            //微信支付end
-        } catch (e) {
-            console.log(e)
-        }
-        sessionStorage.removeItem("vipSubisTrial");//非试用界面
-        var purchase = {
-            areaSelect: {},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
-            areaSelectFlushed: false,
-            industrySelect: [],// 已选择行业 一个行业(计算价格临时变量)
-            industrySelectFlushed: false,
-            timeSelect: [1, 2],//已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
-            buyset: {},
-            price: {}, //价格
-            vipSubisTrial: false,
-            initData: function () {
-                //已选择
-                try {
-                    if (sessionStorage.getItem("vipSubSelectArea")) {
-                        this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
-                    }
-                    if (sessionStorage.getItem("vipSubSelectIndustry")) {
-                        this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
-                    }
-                    if (sessionStorage.getItem("vipSubBuySet")) {
-                        this.buyset = JSON.parse(sessionStorage.getItem("vipSubBuySet"));
-                    }
-                    if (!sessionStorage.getItem("vipSubBuySet")) {
-                        $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
-                            if (r.success) {
-                                if (!$.isEmptyObject(r.data.area)) {
-                                    purchase.areaSelect = r.data.area
-                                } else {
-                                    purchase.areaSelect = {"全国": []}
-                                }
-                                if (r.data.industry.length != 0) {
-                                    purchase.industrySelect = r.data.industry
-                                } else {
-                                    purchase.industrySelect = ["全部行业"]
-                                }
-                                if (!$.isEmptyObject(r.data.buyset)) {
-                                    purchase.buyset = r.data.buyset
-                                }
-                                sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
-                                sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
-                                sessionStorage.setItem("vipSubSelectArea_buyed", JSON.stringify(purchase.areaSelect));
-                                sessionStorage.setItem("vipSubSelectIndustry_buyed", JSON.stringify(purchase.industrySelect));
-                                sessionStorage.setItem("vipSubBuySet", JSON.stringify(purchase.buyset))
-                            }
-                        }, false)
-                    }
-                    if (sessionStorage.getItem("vipSubSelectTime")) {
-                        this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
-                    }
-                    //是否已经点击已读
-                    if (sessionStorage.getItem("vipSub_read") == "true") $("#buy").prop("checked", true);
-                    //是否试用界面
-                    if (sessionStorage.getItem("vipSubisTrial")) this.vipSubisTrial = true;
-
-                    //加载价格
-                    $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
-                        if (r) {
-                            purchase.price = r;
-                        }
-                    }, false)
-
-                } catch (e) {
-                    console.log(e)
-                }
-            },
-            showArea: function () {
-                if (!this.areaSelectFlushed) {
-                    if (this.buyset.areacount == -1) {
-                        $(".choose_area").val("全国");
-                    } else {
-                        let tipTxt = "已购买 ";
-                        if (this.buyset.areacount != 0) tipTxt += this.buyset.areacount + " 个省级区域";
-                        if (!$.isEmptyObject(this.buyset.citys)) {
-                            if (this.buyset.areacount != 0) tipTxt += "、";
-                            let cityCount = 0;
-                            for (var i in this.buyset.citys) {
-                                cityCount += this.buyset.citys[i];
-                            }
-                            tipTxt += cityCount + " 个地市";
-                        }
-                        $(".choose_area").val(tipTxt);
-                    }
-                } else {
-                    let cityArr = [];//城市
-                    let provinceArr = [];//省份
-                    let data = this.areaSelect;
-                    for (var i in data) {
-                        let citys = data[i];
-                        if (citys.length > 0) {
-                            cityArr = cityArr.concat(citys);
-                        } else {
-                            provinceArr.push(i)
-                        }
-                    }
-
-                    if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["全国"]) { //选择有行业信息 且不是全国
-                        var tipTxt = "已购买 ";
-                        if (provinceArr.length > 0) tipTxt += provinceArr.length + " 个省级区域";
-                        if (cityArr.length > 0) {
-                            if (provinceArr.length > 0) tipTxt += "、";
-                            tipTxt += cityArr.length + " 个地市";
-                        }
-                        $(".choose_area").val(tipTxt);
-                        //$(".add_tips.area").text(tipTxt).css("display", "");
-                    } else if (!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"]) {
-                        $(".choose_area").val("全国");
-                    }
-                }
-            },
-            showPrice: function () {
-                $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
-                $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
-                $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
-                $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
-                $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
-                $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
-
-                $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
-                $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
-                $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
-                $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
-                $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
-                $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
-            },
-            showIndustry: function () {
-                if (!this.industrySelectFlushed) {
-                    if (this.buyset.buyerclasscount == -1) {
-                        $(".choose_industry").val("全部行业");
-                    } else {
-                        $(".choose_industry").val("已购买 " + this.buyset.buyerclasscount + " 个行业");
-                    }
-                } else {
-                    let data = this.industrySelect;
-                    if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                        $(".choose_industry").val("已购买 " + this.industrySelect.length + " 个行业");
-                    } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
-                        $(".choose_industry").val("全部行业");
-                    } else {
-                        $(".choose_industry").val("");
-                    }
-                }
-            },
-            showTime: function () {
-                let tmp = this.timeSelect[0];
-                if (this.timeSelect[1] == 1) {
-                    tmp += "年";
-                    $("#yearly").prop('checked', true);
-                    $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active");
-                    //$(".number_box:eq(1)").addClass("active");
-                } else {
-                    tmp += "个月";
-                    $("#monthly").prop('checked', true);
-                    $(".number_box:eq(0)").addClass("active");
-                    $("#number_box_month .month_number").text(this.timeSelect[0]);
-                    if (this.timeSelect[0] >= 10) {
-                        $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
-                    }
-                    if (this.timeSelect[0] == 1) {
-                        $('#number_box_month button:eq(0)').attr("disabled", "disabled");
-                    } else {
-                        $('#number_box_month button:eq(0)').removeAttr("disabled");
-                    }
-                }
-                $(".choose_item .show_time").text(tmp);
-                $(".info.choose_time").val(tmp);
-            },
-            flushPrice: function (time, flag) {
-                if (this.vipSubisTrial) {
-                    $('.price strong').text('¥0.00');
-                } else {
-                    let price;
-                    if (this.industrySelectFlushed && this.areaSelectFlushed) { //地区和行业都已选择
-                        price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
-                    } else if (this.industrySelectFlushed) { //仅选择了行业
-                        mBuyset = getBuySet({}, this.industrySelect);
-                        mBuyset.citys = this.buyset.citys;
-                        mBuyset.areacount = this.buyset.areacount;
-                        price = getsubVipOrderPriceBybuyset(mBuyset, time, this.price)
-                    } else if (this.areaSelectFlushed) { //仅选择了地区
-                        mBuyset = getBuySet(this.areaSelect, []);
-                        mBuyset.buyerclasscount = this.buyset.buyerclasscount;
-                        price = getsubVipOrderPriceBybuyset(mBuyset, time, this.price);
-                    } else { //都未选择
-                        price = getsubVipOrderPriceBybuyset(this.buyset, time, this.price);
-                    }
-                    if (flag === 1) {
-                        $('.price strong').text('¥' + price);
-                    } else if (flag === 2) {
-                        $('.computed_price').html('¥' + price);
-                    } else {
-                        $('.price strong').text('¥' + price);
-                        $('.computed_price').html('¥' + price);
-                    }
-                }
-            },
-            flushCheck: function () {//检测是否修改
-                //地区是否改变
-                this.areaSelectFlushed = !this.theSameAs_area();
-                if (!this.areaSelectFlushed) {
-                    sessionStorage.setItem("areaSelectNotFlushed", "1")
-                } else {
-                    sessionStorage.removeItem("areaSelectNotFlushed");
-                }
-                //行业是否改变
-                this.industrySelectFlushed = !this.theSame_industry();
-                if (!this.industrySelectFlushed) {
-                    sessionStorage.setItem("industrySelectNotFlushed", "1")
-                } else {
-                    sessionStorage.removeItem("industrySelectNotFlushed");
-                }
-            },
-            theSameAs_area: function () {
-                if (!sessionStorage.getItem("vipSubSelectArea_buyed")) {
-                    return false
-                }
-                let Area_buyed = JSON.parse(sessionStorage.getItem("vipSubSelectArea_buyed"));
-                let tmp1 = getAreaClassArr(Area_buyed);
-                let tmp2 = getAreaClassArr(purchase.areaSelect);
-                return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
-            },
-            theSame_industry: function () {
-                if (!sessionStorage.getItem("vipSubSelectIndustry_buyed")) {
-                    return false
-                }
-                let industry_buyed = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry_buyed"));
-                return JSON.stringify(industry_buyed.sort()) === JSON.stringify(purchase.industrySelect.sort());
-            }
-        };
-
-
-        $(function () {
-            purchase.initData();
-            purchase.flushCheck();
-            purchase.showArea();
-            purchase.showIndustry();
-            purchase.showPrice();
-            purchase.showTime();
-            purchase.flushPrice(purchase.timeSelect);
-            checkOk();
-            var time_limit;//定义一个周期变量
-            /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
-            $('.weui-mask').click(hideDialog);
-            $('.cancel').click(hideDialog);
-
-            /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
-            // 选择订阅周期
-            $('.select_cycle a').click(function (e) {
-                $('#time_cycle').show(200);
-            });
-
-
-            /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
-            // 对支付方式选择的input绑定点击事件
-            $('#pay_way input:radio[name="way"]').click(function () {
-                var checkValue = $('input:radio[name="way"]:checked').val();
-                $('.pay_way').hide(200);
-                $('.pay_mode .select_payment .choose_way.info').html(checkValue);
-            });
-            // 对订阅时间选择的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')) {
-                    if (currentNum == 11) { //12个月自动跳转1年
-                        $("#number_box_year .year_number:eq(0)").trigger("click");
-                        return
-                    }
-                    // 点的+
-                    // 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);
-                purchase.timeSelect_tmp = [Number(currentNum), 2];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-                //var price = (5.8 * currentNum).toFixed(1);
-                //$('.computed_price').html('¥' + price)
-                var firstButton = $('#number_box_month button:first');
-                var lastButton = $('#number_box_month button:last');
-                if (currentNum >= 10) {
-                    $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
-                } else {
-                    $('.profit_tips').hide();
-                }
-                // 如果为操作后的结果为1,则锁定减号按钮
-                if (currentNum === data.numboxMin) {
-                    firstButton.attr('disabled', true)
-                } else {
-                    firstButton.removeAttr('disabled')
-                }
-                // 如果为操作后的结果为12,则锁定加号按钮
-                if (currentNum === data.numboxMax) {
-                    lastButton.attr('disabled', true)
-                } else {
-                    lastButton.removeAttr('disabled')
-                }
-            });
-
-            /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
-            $('#number_box_year').on('click', 'span', function (e) {
-                console.log(e.target.dataset.id);
-                $('#number_box_month').removeClass('active');
-                let id = e.target.dataset.id;
-                $('.profit_tips').hide();
-                $(this).addClass('active').siblings().removeClass('active');
-                $('#yearly').prop('checked', true);
-                $("#monthly").prop('checked', false);
-
-                // 渲染结果 保留一位小数
-                //let result = (Number(id) * 58).toFixed(1);
-                //$('.computed_price').html('¥' + result)
-                purchase.timeSelect_tmp = [Number(id), 1]
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-            });
-
-            /* -------- 选择按月订阅  radio触发的事件------- */
-            $('#monthly').on('change', function (e) {
-                let isChecked = $(this).is(':checked');
-                let 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')
-                }
-                //let result = (Number(val) * 5.8).toFixed(1);
-                //$('.computed_price').html('¥' + result);
-                purchase.timeSelect_tmp = [Number(val), 2];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-
-            });
-            /* -------- 选择按年订阅  radio触发的事件------- */
-            $('#yearly').on('change', function (e) {
-                $('.profit_tips').hide();
-                // console.log($(this).is(':checked'))
-                let isChecked = $(this).is(':checked');
-                // 按年订阅默认选择1年
-                let val = 1;
-                //$('.computed_price').html('¥' + Number(val) * 58)
-                if (isChecked) {
-                    $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
-                }
-                purchase.timeSelect_tmp = [Number(val), 1];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-            });
-
-            // 确认订阅周期
-            $('#enter_period').on('click', function () {
-                var val;
-                $('input[name="time"]').each(function (i, v) {
-                    let isChecked = $(v).is(':checked');
-                    if ($(v).is(':checked') === true && $('.year_number').hasClass('active')) {
-                        val = $('.active').html();
-                        $('#time_cycle').hide(function () {
-                            $('.choose_time').val(val)
-                            $('.show_time').text(val);
-                        });
-                        purchase.timeSelect_tmp = [parseInt(val[0]), 1]
-                    } else if ($(v).is(':checked') === true) {
-                        val = $('.month_number').html();
-                        $('#time_cycle').hide(function () {
-                            $('.choose_time').val(val + '个月')
-                            $('.show_time').text(val + '个月');
-                        });
-                        purchase.timeSelect_tmp = [parseInt(val), 2]
-                    }
-                });
-                purchase.timeSelect = purchase.timeSelect_tmp;
-                purchase.flushPrice(purchase.timeSelect, 1);
-                sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
-            });
-            $("input").bind("input propertychange change", function (event) {
-                checkOk();
-            });
-
-            $('#payHandle').click(function () {
-                $("#payHandle").attr("disabled", "disabled");
-                //支付请求
-                var area = purchase.areaSelect;
-                var industry = purchase.industrySelect;
-                if (area["全国"]) {
-                    area = {};
-                }
-                if (industry.length == 1 && industry[0] == "全部行业") {
-                    industry = [];
-                }
-                //付费用户
-                var param = {
-                    "area": JSON.stringify(area),
-                    "industry": industry.join(","),
-                    "time": $(".info:eq(2)").val().trim(),
-                    "payWay": "wx_js",
-                    "orderType": 5,
-                    "selected": JSON.stringify([sessionStorage.getItem("areaSelectNotFlushed") != "1", sessionStorage.getItem("industrySelectNotFlushed") != "1"]),
-                };
-                $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
-                    if (r.success) {
-                        //唤起app支付
-                        try {
-                            if (pay_way == "wx_app") {
-                                JyObj.wxPay(r.data.res);
-                            } else {
-                                JyObj.aliPay(r.data.res)
-                            }
-                            //校验是否支付完成
-                            checkpay(r.data.code);
-                        } catch (e) {
-                            alert(e)
-                        }
-                    }
-                    $("#payHandle").removeAttr("disabled")
-                });
-            })
-
-        });
-
-        //校验是否支付
-        var interval;
-
-        function checkpay(orderid) {
-            if (interval) {
-                clearInterval(interval);
-            }
-            interval = setInterval(function () {
-                $.post("/jypay/isPaySuccess", {code: orderid}, function (r) {
-                    if (r.success) {
-                        clearInterval(interval);
-                        clearSessionStorage();
-                        window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + orderid);
-                    }
-                });
-            }, 2000)
-        }
-
-        // 隐藏dialog选择框
-        function hideDialog() {
-            $('#pay_way').hide(200);
-            $('#time_cycle').hide(200);
-        }
-
-        //是否可点击
-        function checkOk() {
-            var area = $(".info:eq(0)").val().trim();
-            var industry = $(".info:eq(1)").val().trim();
-            var checked = $('#buy').prop('checked');
-            if (area != '' && industry != '' && checked == true) {
-                $("#payHandle").removeAttr('disabled');
-            } else {
-                $("#payHandle").attr({
-                    'disabled': 'true'
-                });
-            }
-            sessionStorage.setItem("vipSub_read", checked)
-        }
-
-        function clearSessionStorage() {
-            sessionStorage.removeItem("vipSubSelectArea");
-            sessionStorage.removeItem("vipSubSelectIndustry");
-            sessionStorage.removeItem("vipSubSelectTime");
-            sessionStorage.removeItem("vipSub_read");
-            sessionStorage.removeItem("historypushDataCache");
-            sessionStorage.To_introducePage = 2;
-        }
-
-    </script>
-</div>
-</body>
-
-</html>

+ 831 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html

@@ -0,0 +1,831 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>VIP订阅续费</title>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <script src="/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/css/base2.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/vip_renew.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
+    <style>
+        .vip-header {
+            display: none;
+            padding: .26rem .3rem;
+            font-size: .26rem;
+            color: #FE737A;
+        }
+    </style>
+</head>
+<body class="no-touch">
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    VIP订阅续费
+</div>
+<div class="app-layout-content-b">
+    <div class="vip-renew">
+        <div class="vip-header">
+            <span class="header-left">提示:</span>
+            <span class="header-right">您的VIP订阅服务即将到期,为不影响您的使用。请立即续费</span>
+        </div>
+        <ul class="vip-body">
+            <li class="body-item area">
+                <a class="item-container" href="/jyapp/vipsubscribe/toChooseArea">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">区域</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="selected-area-name ellipsis"></span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item text selected-area"></div>
+                </a>
+            </li>
+            <li class="body-item industry">
+                <a class="item-container" href="/jyapp/vipsubscribe/toChooseIndustry">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">采购单位行业</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="selected-industry-name industry-text ellipsis"></span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item text selected-industry-count"></div>
+                </a>
+            </li>
+            <li class="body-item select_cycle">
+                <a class="item-container" href="javascript:;">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="item-label">延长订阅周期</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="buy-cycle text ellipsis">6个月</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                    <div class="sub-item text">
+                        <span class="sub-l">有效日期:</span>
+                        <span class="sub-r">
+                            <span class="ellipsis">
+                                (<span class="month">3个月</span>)<span class="duration"></span>
+                            </span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+            <li class="body-item pay-mode">
+                <a class="item-container" href="javascript:;">
+                    <div class="item">
+                        <span class="item-l">
+                            <span class="leading"></span>
+                            <span class="item-label">支付方式</span>
+                        </span>
+                        <span class="item-r">
+                            <span class="pay-mode-text">微信支付</span>
+                            <span class="iconfont icon-arrow"></span>
+                        </span>
+                    </div>
+                </a>
+            </li>
+        </ul>
+        <div class="vip-footer renew">
+            <div class="footer-preview-container">
+                <div class="clause-box">
+                    <span class="checkbox"></span>
+                    <span class="clause-read">我已阅读,理解并接受<a
+                                href="/front/staticPage/wx-serviceterms.html">《剑鱼标讯线上购买与服务条款》</a></span>
+                </div>
+                <div class="price-preview">
+                    <span class="preview-label"></span>
+                    <span class="preview-content">
+                        <span class="billing-list-btn"></span>
+                        <span class="billing-price"></span>
+                    </span>
+                </div>
+            </div>
+            <div class="footer-button-group">
+                <!--<button class="button-l reset">取消</button>-->
+                <button class="button-r confirm" disabled>确认支付</button>
+            </div>
+        </div>
+    </div>
+
+    <!-- 计费清单picker -->
+    <div class="billing-list-container" style="display: none;">
+        <div class="weui-mask weui-animate-fade-in"></div>
+        <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up">
+            <div class="weui-half-screen-dialog__hd">
+                <div class="dialog_hd__l"></div>
+                <div class="dialog_hd__title">计算标准</div>
+                <div class="dialog_hd__close iconfont icon-guanbi"></div>
+            </div>
+            <div class="weui-half-screen-dialog__bd">
+                <div class="vip_prise_table">
+                    <table class="monthly">
+                        <div class="table_title">
+                            <div class="line"></div>
+                            <div class="title">VIP订阅价格</div>
+                            <div class="line"></div>
+                        </div>
+                        <tr>
+                            <td colspan="2">按月购买</td>
+                        </tr>
+                        <tr>
+                            <td>5.8元 月/市/行业</td>
+                            <td>18元 月/市/全行业</td>
+                        </tr>
+                        <tr>
+                            <td>11.8元 月/省/行业</td>
+                            <td>38元 月/省/全行业</td>
+                        </tr>
+                        <tr>
+                            <td>118元 月/全国/行业</td>
+                            <td>388元 月/全国/全行业</td>
+                        </tr>
+                    </table>
+                    <table class="yearly">
+                        <tr>
+                            <td colspan="2">按年购买</td>
+                        </tr>
+                        <tr>
+                            <td>58元 年/市/行业</td>
+                            <td>180元 年/市/全行业</td>
+                        </tr>
+                        <tr>
+                            <td>118元 年/省/行业</td>
+                            <td>380元 年/省/全行业</td>
+                        </tr>
+                        <tr>
+                            <td>1180元 年/全国/行业</td>
+                            <td>3880元 年/全国/全行业</td>
+                        </tr>
+                    </table>
+                    <div class="tips">
+                        <dt>购买须知:</dt>
+                        <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
+                        <dd>用户最多购买/续费3年套餐;</dd>
+                        <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
+                        <dd>3个市及以上即为全省,10个省及以上即为全国。4个行业及以上即为全行业。</dd>
+
+                    </div>
+                </div>
+            </div>
+            <div class="weui-half-screen-dialog__ft"></div>
+        </div>
+    </div>
+    <!-- 选择订阅周期picker -->
+    <div class="js_dialog time_cycle" id="time_cycle" style="display: none;">
+        <div class="weui-mask"></div>
+        <div class="box">
+            <div class="box_hd">
+                <h3>订阅周期</h3>
+                <span class="cancel">取消</span>
+            </div>
+            <div class="box_bd">
+                <!--<div class="tips profit_tips">已选择10个月,建议“按年订阅”更换算哦~</div>-->
+                <div class="computed_price"></div>
+                <div class="bd_select">
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label monthly_label" for="monthly">
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check monthly" name="time" value="month" id="monthly"
+                                       checked/>
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                            <div class="weui-cell__bd">
+                                <p>按月订阅</p>
+                            </div>
+                        </label>
+                        <div class="number_box active" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
+                             data-numbox-max="12">
+                            <button class="weui-btn weui-btn_plain-default" type="button" disabled>
+                                <div class="jy_icon decrease"></div>
+                            </button>
+                            <span class="month_number">1</span>
+                            <button class="weui-btn weui-btn_plain-default add" type="button">
+                                <div class="jy_icon increase"></div>
+                            </button>
+                        </div>
+                    </div>
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label yearly_label" for="yearly">
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check yearly" name="time" value="year" id="yearly"/>
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                            <div class="weui-cell__bd">
+                                <p>按年订阅</p>
+                            </div>
+                        </label>
+                        <div class="number_box" id="number_box_year" style="border: 0;">
+                            <span class="year_number" data-id="1">1年</span>
+                            <span class="year_number" data-id="2">2年</span>
+                            <span class="year_number" data-id="3">3年</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="form-btn">
+                <button class="btn enter" id="enter_period">确认</button>
+            </div>
+        </div>
+    </div>
+    <!-- 选择支付方式 -->
+    <div class="js_dialog pay_way" id="pay_way" style="display: none;">
+        <div class="weui-mask"></div>
+        <div class="box">
+            <div class="box_hd">
+                <span></span>
+                <h3>支付方式</h3>
+                <span class="cancel">取消</span>
+            </div>
+            <div class="box_bd">
+                <div class="weui-cells weui-cells_checkbox choose-form">
+                    <label class="weui-cell weui-check__label wx_label" for="wx">
+                        <div class="weui-cell__bd read">
+                            <i class="icon-wx"></i>
+                            <p>微信支付</p>
+                        </div>
+                        <div class="weui-cell__hd">
+                            <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
+                            <i class="weui-icon-checked"></i>
+                        </div>
+                    </label>
+                    <label class="weui-cell weui-check__label zfb_label" for="zfb">
+                        <div class="weui-cell__bd read">
+                            <i class="icon-zfb"></i>
+                            <p>支付宝支付</p>
+                        </div>
+                        <div class="weui-cell__hd">
+                            <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
+                            <i class="weui-icon-checked"></i>
+                        </div>
+                    </label>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
+    <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script>
+        $(window).bind("pageshow", function (event) {
+            if (event.originalEvent.persisted) {
+                window.location.reload();
+            }
+        });
+
+        var purchase = {
+            areaSelect: {"一个省": ["一个市"]},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
+            industrySelect: ["一个行业"],// 已选择行业 一个行业(计算价格临时变量)
+            timeSelect: [1, 2],//已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
+            timeValue: "一个月",
+            endTime: "",
+            price: {}, //价格
+            nowBuyset: {},
+            timeCheckOk: false,
+            payWay: "wx_app",
+            initData: function () {
+                //已选择
+                try {
+                    if (sessionStorage.getItem("vipSubSelectArea")) {
+                        this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
+                    }
+                    if (sessionStorage.getItem("vipSubSelectIndustry")) {
+                        this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
+                    }
+                    if (sessionStorage.getItem("endTime")) {
+                        this.endTime = parseInt(sessionStorage.getItem("endTime"))
+                    }
+                    //即将到期 回显已购买
+                    if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                        $DoPost("/subscribepay/vipsubscribe/getSubBuyMsg", {}, function (r) {
+                            if (r.success) {
+                                if (!$.isEmptyObject(r.data.area)) {
+                                    purchase.areaSelect = r.data.area
+                                } else {
+                                    purchase.areaSelect = {"全国": []}
+                                }
+                                if (r.data.industry.length != 0) {
+                                    purchase.industrySelect = r.data.industry
+                                } else {
+                                    purchase.industrySelect = ["全部行业"]
+                                }
+                                if (r.data.endTime) {
+                                    purchase.endTime = r.data.endTime;
+                                }
+                                sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                                sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                                sessionStorage.setItem("endTime", JSON.stringify(purchase.endTime))
+                                sessionStorage.setItem("vipSub_read", true);
+                            }
+                        }, false)
+                    }
+                    if (sessionStorage.getItem("vipSubSelectTime")) {
+                        this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
+                    }
+
+                    //加载价格
+                    $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
+                        if (r) {
+                            purchase.price = r;
+                        }
+                    }, false)
+
+                } catch (e) {
+                    console.log(e)
+                }
+                this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect, this.price);
+
+                if (sessionStorage.getItem("payWay")) {
+                    if (sessionStorage.getItem("payWay").indexOf("ali") > -1) {
+                        this.payWay = "ali_app";
+                        $("#zfb").prop("checked", true);
+                        $(".pay-mode-text").text("支付宝支付");
+                    }
+                }
+            },
+            showArea: function () {
+                if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["一个省"]) { //有选择
+                    if (this.nowBuyset.areacount === -1) {
+                        $(".selected-area").text("全国");
+                    } else {
+                        var tipTxt = "";
+                        if (this.nowBuyset.areacount > 0) tipTxt += this.nowBuyset.areacount + " 个省";
+                        var count = 0;
+                        this.nowBuyset.citys.forEach(function (item, index) {
+                            count += item;
+                        });
+                        if (count > 0) {
+                            if (this.nowBuyset.areacount > 0) tipTxt += "、";
+                            tipTxt += count + " 个市";
+                            if (this.nowBuyset.citys.length > 1) tipTxt += "(分布在" + this.nowBuyset.citys.length + "个省内)"
+                        }
+                        $(".selected-area").text(tipTxt);
+                    }
+                } else {
+                    $(".selected-area").text("");
+                }
+            },
+            showPrice: function () {
+                $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
+                $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
+                $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
+                $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
+                $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
+                $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
+
+                $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
+                $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
+                $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
+                $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
+                $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
+                $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
+            },
+            showIndustry: function () {
+                if (this.industrySelect.length > 0 && this.industrySelect[0] !== "一个行业") { //选择有行业信息
+                    if (this.nowBuyset.buyerclasscount === -1) {
+                        $(".selected-industry-count").text("全部行业");
+                    } else {
+                        var tipTxt = "";
+                        $(".selected-industry-count").text(tipTxt + this.nowBuyset.buyerclasscount + " 个行业");
+                    }
+                } else {
+                    $(".selected-industry-count").text("");
+                }
+            },
+            showTime: function () {
+                var tmp = this.timeSelect[0];
+                if (this.timeSelect[1] === 1) {
+                    tmp += "年";
+                    $("#yearly").prop('checked', true);
+                    //$('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').trigger("click");
+                    $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active")
+                    //$(".number_box:eq(1)").addClass("active");
+                } else {
+                    tmp += "个月";
+                    $("#monthly").prop('checked', true);
+                    $(".number_box:eq(0)").addClass("active");
+                    $("#number_box_month .month_number").text(this.timeSelect[0]);
+                    //if (this.timeSelect[0] >= 10) {
+                    //    $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
+                    //}
+                    if (this.timeSelect[0] === 1) {
+                        $('#number_box_month button:eq(0)').attr("disabled", "disabled");
+                    } else {
+                        $('#number_box_month button:eq(0)').removeAttr("disabled");
+                    }
+                }
+                this.timeValue = tmp;
+                this.flushSelectTime();
+            },
+            flushPrice: function (time, flag) {
+                //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
+                var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
+                var showPrice = formatMoney(price);
+                if (flag === 1) {
+                    $('.billing-price').text('¥' + showPrice);
+                } else if (flag === 2) {
+                    $('.computed_price').html('¥' + showPrice);
+                } else {
+                    $('.billing-price').text('¥' + showPrice);
+                    $('.computed_price').html('¥' + showPrice);
+                }
+            },
+            flushSelectTime() {
+                $(".select_cycle .month").text(this.timeValue);
+                if (this.endTime) {
+                    var time1 = new Date(this.endTime * 1000).pattern('yyyy年MM月dd日');
+                    var end = getVipEndDate(this.timeSelect[1], this.timeSelect[0], this.endTime);
+                    var time2 = new Date(end * 1000).pattern('yyyy年MM月dd日');
+                    $(".select_cycle .duration").text(time1 + "-" + time2);
+                    $(".select_cycle .duration").show();
+                    //是否超过三年
+                    var now = Math.floor(new Date().getTime() / 1000);
+                    var MaxEnd = getVipEndDate(1, 3, now);
+                    if (end > MaxEnd) {
+                        var timeShow = getDateSub(now, this.endTime);
+                        var showTipText = "<div style='white-space: nowrap;'>最长订阅周期不可超过3年</div>剩余周期:";
+                        if (timeShow[0] !== 0) {
+                            showTipText += timeShow[0] + "年"
+                        }
+                        if (timeShow[1] !== 0) {
+                            showTipText += timeShow[1] + "个月"
+                        }
+                        weui.toast(showTipText, {
+                            duration: 3000,
+                            className: 'jy-toast',
+                        });
+                        this.timeCheckOk = false;
+                    } else {
+                        this.timeCheckOk = true;
+                    }
+                    this.flushSubmit();
+
+                } else {
+                    $(".select_cycle .duration").hide();
+                }
+
+            },
+            showTip() {//是否展示即将到期
+                var timeSub = this.endTime * 1000 - new Date().getTime();
+                if (timeSub > 0 && timeSub < 60 * 60 * 24 * 1000 * 3) {
+                    $(".vip-header").show();
+                }
+            },
+            flushSubmit() {//是否可提交
+                if (this.timeCheckOk && sessionStorage.getItem("vipSub_read")) {
+                    $('.vip-footer.renew .confirm').prop('disabled', false)
+                } else {
+                    $('.vip-footer.renew .confirm').prop('disabled', true)
+                }
+            }
+        };
+
+
+        $(function () {
+            purchase.initData();
+            purchase.showArea();
+            purchase.showIndustry();
+            purchase.showPrice();
+            purchase.showTime();
+            purchase.showTip();
+            purchase.flushPrice(purchase.timeSelect);
+            purchase.flushSubmit();
+            var time_limit;//定义一个周期变量
+            /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
+            $('.weui-mask').click(hideDialog);
+            $('.cancel').click(hideDialog);
+
+            /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
+            // 选择订阅周期
+            $('.select_cycle a').click(function (e) {
+                $('#time_cycle').show(200);
+            });
+
+
+            /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
+            $('.vip-body .pay-mode').on('click', function () {
+                pickerShow('#pay_way', true)
+            });
+
+            $('#pay_way input:radio[name="way"]').click(function () {
+                var checkValue = $('input:radio[name="way"]:checked').val();
+                pickerShow('#pay_way', false)
+                $('.vip-body .pay-mode .pay-mode-text').text(checkValue);
+                if (checkValue === "微信支付") {
+                    purchase.payWay = "wx_app"
+                } else {
+                    purchase.payWay = "ali_app"
+                }
+                sessionStorage.setItem("payWay", purchase.payWay);
+            });
+
+
+            // 对订阅时间选择的input绑定点击事件
+            $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+                // 解除确认按钮的锁定
+                $('#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')) {
+                    if (currentNum == 11) { //12个月自动跳转1年
+                        $("#number_box_year .year_number:eq(0)").trigger("click");
+                        return
+                    }
+                    // 点的+
+                    currentNum = currentNum >= data.numboxMax ? data.numboxMax : currentNum + data
+                        .numboxStep;
+                } else {
+                    // 点的-
+                    currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data
+                        .numboxStep;
+                }
+                $number.text(currentNum);
+                purchase.timeSelect_tmp = [Number(currentNum), 2];
+                purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                //var price = (5.8 * currentNum).toFixed(1);
+                //$('.computed_price').html('¥' + price)
+                var firstButton = $('#number_box_month button:first');
+                var lastButton = $('#number_box_month button:last');
+                /*if (currentNum >= 10) {
+                    $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
+                } else {
+                    $('.profit_tips').hide();
+                }*/
+                // 如果为操作后的结果为1,则锁定减号按钮
+                if (currentNum === data.numboxMin) {
+                    firstButton.attr('disabled', true)
+                } else {
+                    firstButton.removeAttr('disabled')
+                }
+                // 如果为操作后的结果为12,则锁定加号按钮
+                if (currentNum === data.numboxMax) {
+                    lastButton.attr('disabled', true)
+                } else {
+                    lastButton.removeAttr('disabled')
+                }
+            });
+
+            /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
+            $('#number_box_year').on('click', 'span', function (e) {
+                console.log(e.target.dataset.id);
+                $('#number_box_month').removeClass('active');
+                var id = e.target.dataset.id;
+                //$('.profit_tips').hide();
+                $(this).addClass('active').siblings().removeClass('active');
+                $('#yearly').prop('checked', true);
+                $("#monthly").prop('checked', false);
+
+                // 渲染结果 保留一位小数
+                //var result = (Number(id) * 58).toFixed(1);
+                //$('.computed_price').html('¥' + result)
+                purchase.timeSelect_tmp = [Number(id), 1];
+                purchase.flushPrice(purchase.timeSelect_tmp, 2);
+            });
+
+            /* -------- 选择按月订阅  radio触发的事件------- */
+            $('#monthly').on('change', function (e) {
+                var isChecked = $(this).is(':checked');
+                var val = $('.month_number').text();
+                /*if (val >= 10) {
+                    $('.profit_tips').show()
+                }*/
+                if (!isChecked) {
+                    $('#number_box_month button').attr('disabled', true)
+                }
+                //var result = (Number(val) * 5.8).toFixed(1);
+                //$('.computed_price').html('¥' + result);
+                purchase.timeSelect_tmp = [Number(val), 2];
+                purchase.flushPrice(purchase.timeSelect_tmp, 2);
+
+            });
+            //计价清单
+            $('.billing-list-btn').on('click', function () {
+                pickerShow('.billing-list-container', true)
+            })
+            // 计算标准隐藏
+            $('.billing-list-container .dialog_hd__close').on('click', function () {
+                pickerShow('.billing-list-container', false)
+            })
+
+            $('.checkbox').on('click', function () {
+                $(this).toggleClass('checked')
+                var state = $(this).hasClass('checked');
+                sessionStorage.setItem("vipSub_read", state);
+                purchase.flushSubmit();
+                //$('.vip-footer.renew .confirm').prop('disabled', !state)
+            });
+            //是否点击已读
+            if (sessionStorage.getItem("vipSub_read")) {
+                $('.checkbox').addClass("checked");
+            }
+
+            /* -------- 选择按年订阅  radio触发的事件------- */
+            $('#yearly').on('change', function (e) {
+                //$('.profit_tips').hide();
+                // console.log($(this).is(':checked'))
+                var isChecked = $(this).is(':checked');
+                // 按年订阅默认选择1年
+                var val = 1;
+                //$('.computed_price').html('¥' + Number(val) * 58)
+                if (isChecked) {
+                    $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
+                }
+                purchase.timeSelect_tmp = [Number(val), 1];
+                purchase.flushPrice(purchase.timeSelect_tmp, 2);
+            });
+
+            // 确认订阅周期
+            $('#enter_period').on('click', function () {
+                var val;
+                var selectedDOM = $('#time_cycle input[name=time]:checked');
+                if (selectedDOM.val() === 'year') {
+                    val = $('#number_box_year .year_number.active').attr('data-id');
+                    purchase.timeSelect_tmp = [parseInt(val), 1];
+                    $('#time_cycle').hide(function () {
+                        purchase.timeValue = val + "年";
+                        purchase.flushSelectTime()
+                    });
+                } else if (selectedDOM.val() === 'month') {
+                    val = $('#number_box_month .month_number').text();
+                    purchase.timeSelect_tmp = [parseInt(val), 2];
+                    $('#time_cycle').hide(function () {
+                        purchase.timeValue = val + "个月";
+                        purchase.flushSelectTime()
+                    });
+                }
+
+                purchase.timeSelect = purchase.timeSelect_tmp;
+                purchase.flushPrice(purchase.timeSelect, 1);
+                sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+            });
+            $('.vip-footer.renew .confirm').click(function () {
+                $('.vip-footer.renew .confirm').attr("disabled", "disabled");
+                //支付请求
+                var area = purchase.areaSelect;
+                var industry = purchase.industrySelect;
+                if (area["全国"]) {
+                    area = {};
+                }
+                if (industry.length === 1 && industry[0] === "全部行业") {
+                    industry = [];
+                }
+                //付费用户
+                var param = {
+                    "area": JSON.stringify(area),
+                    "industry": industry.join(","),
+                    "time": purchase.timeValue.trim(),
+                    "payWay": purchase.payWay,
+                    "orderType": 5,
+                };
+                $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
+                    if (r.success) {
+                        try {
+                            if (param.payWay === "wx_app") {
+                                JyObj.wxPay(r.data.res)
+                            } else {
+                                JyObj.aliPay(r.data.res)
+                            }
+                            checkpay(r.data.code)
+                        } catch (e) {
+                            showToast(e)
+                        }
+                    }
+                }, false);
+                $('.vip-footer.renew .confirm').removeAttr("disabled");
+            })
+
+        });
+
+        // 隐藏dialog选择框
+        function hideDialog() {
+            $('#pay_way').hide(200);
+            $('#time_cycle').hide(200);
+        }
+
+        function clearSessionStorage() {
+            sessionStorage.removeItem("vipSubSelectArea");
+            sessionStorage.removeItem("vipSubSelectIndustry");
+            sessionStorage.removeItem("vipSubSelectTime");
+            sessionStorage.removeItem("vipSub_read");
+            sessionStorage.removeItem("historypushDataCache");
+            sessionStorage.removeItem("endTime");
+            sessionStorage.removeItem("payWay");
+            sessionStorage.To_introducePage = 2;
+            //订阅首页
+            sessionStorage.removeItem("sub_vip_state");
+            sessionStorage.removeItem("vip_index_read");
+            sessionStorage.removeItem("vip_change_time");
+        }
+
+        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);
+            }
+        }
+
+        //app支付 公共方法
+        //查询是否支付完成
+        var interval;
+
+        function checkpay(orderid) {
+            if (interval) {
+                clearInterval(interval);
+            }
+            interval = setInterval(function () {
+                $.post("/jypay/isPaySuccess", {code: orderid}, function (r) {
+                    if (r.success) {
+                        clearSessionStorage();
+                        window.location.replace("/jyapp/vipsubscribe/toPaySuccessPage?orderCode=" + orderid);
+                    }
+                });
+                if (canpay && mySysIsIos()) {
+                    clearInterval(interval);
+                }
+            }, 2000)
+        }
+
+        function payCallBack(status) {
+            switch (status) {
+                case "0"://支付取消
+                    clearInterval(interval);
+                    break;
+                case "1"://支付完成
+
+                    break;
+                case "-1"://支付失败
+                    clearInterval(interval);
+                    break;
+            }
+        }
+
+        function showToast(content) {
+            weui.toast(content, {
+                duration: 2000,
+                className: 'custom-toast',
+            });
+        }
+
+        //app支付 公共方法 结束
+
+    </script>
+</div>
+</body>
+
+</html>

文件差异内容过多而无法显示
+ 1370 - 1313
src/jfw/modules/app/src/web/templates/weixin/historypush.html


+ 7 - 7
src/jfw/modules/app/src/web/templates/weixin/treasure_box.html

@@ -7,9 +7,9 @@
         content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>百宝箱</title>
-    <script src="/js/rem.js"></script>
-    <link rel="stylesheet" type="text/css" href="/css/wx/base.css" />
-    <link rel="stylesheet" href="/css/wx/treasure_box.css?v=05">
+    <script src="/jyapp/js/rem.js"></script>
+    <link rel="stylesheet" type="text/css" href="/jyapp/css/wx/base.css" />
+    <link rel="stylesheet" href="/jyapp/css/wx/treasure_box.css?v=05">
 	{{include "/common/weixin.html"}}
 </head>
 <body>
@@ -21,7 +21,7 @@
         <div class="main">
             <div class="vip_subscribe">
                 <div class="title vip">
-                    <img src="/images/syzindex/treasure_vip.png" alt="">
+                    <img src="/jyapp/images/syzindex/treasure_vip.png" alt="">
                     <a>
                         <h7>VIP订阅</h7>
                         <p>更多招标信息,重要项目不遗漏</p>
@@ -52,7 +52,7 @@
             </div>
             <div class="data_export">
                 <div class="title toSieve">
-                    <img src="/images/syzindex/treasure_data.png" alt="">
+                    <img src="/jyapp/images/syzindex/treasure_data.png" alt="">
                     <a>
                         <h7>数据导出</h7>
                         <p>导出任意条件的招标数据,按条数付费</p>
@@ -75,7 +75,7 @@
             </div>
         </div>
     </div>
-    <script src="/js/jquery-3.2.1.min.js"></script>
+    <script src="/jyapp/js/jquery-3.2.1.min.js"></script>
     <script>
       	
 		$(function(){
@@ -83,7 +83,7 @@
 			$(".vip").on("click",function(){
 				$.post("/subscribepay/orderListDetails/isVip?v="+nowTimestamp,{},function(data){
 					if (data.isvip){
-						window.location.href="/jyapp/vipsubscribe/toSetPage";		//vip订阅入口  试用或正式vip
+						window.location.href="/jyapp/vipsubscribe/toSubVipSetPage";		//vip订阅入口  试用或正式vip
 					}else{
 						window.location.href="/jyapp/vipsubscribe/introducePage";		//vip订阅入口  非vip
 					}

+ 0 - 1
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -20,7 +20,6 @@ type AfterPay struct {
 	getPushView    xweb.Mapper `xweb:"/afterPay/getPushView"`    //VIP推送预览
 	updateUserTips xweb.Mapper `xweb:"/afterPay/updateUserTips"` //修改用户未分类关键词提醒
 	directSubKWS   xweb.Mapper `xweb:"/afterPay/directSubKWS"`   //搜索列表直接订阅关键词
-	checkOrder     xweb.Mapper `xweb:"/afterPay/checkOrder"`     //是否有未执行的订单
 	fastImport     xweb.Mapper `xweb:"/afterPay/fastImport"`     //快速导入关键词
 	modification   xweb.Mapper `xweb:"/afterPay/modification"`   //关键词修改记录
 }

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

@@ -177,8 +177,8 @@ func (this *SubVipPayOrder) CreateOrder() {
 //支付已创建订单
 func (this *SubVipPayOrder) OrderToPay() {
 	orderCode := qutil.ObjToString(this.GetString("orderCode"))
+	payway := qutil.ObjToString(this.GetString("payway"))
 	userId := qutil.ObjToString(this.GetSession("userId"))
-	payway := qutil.ObjToString(this.GetSession("payway"))
 	r := func() *entity.FuncResult {
 		if payway == "" {
 			payway = qutil.ObjToString(this.GetString("pay_way")) //app用户

+ 0 - 27
src/web/staticres/vipsubscribe/js/common.js

@@ -306,33 +306,6 @@ function getSetMealPrice(c, iCount, u, price) {
     }
 }
 
-//查看用户是否有未执行的订单
-function checkOrder(wz) {
-    var flag = false;
-    $.ajax({
-        type: 'post',
-        url: '/subscribepay/afterPay/checkOrder?t=' + new Date().getTime(),
-        data: {},
-        async: false,
-        dataType: 'json',
-        success: function (r) {
-            flag = r.flag;
-            if (r.flag) {
-                if (wz != 1) {
-                    weui.toast('订单尚未到期', {
-                        duration: 3000,
-                        className: 'custom-toast',
-                        callback: function () {
-                            console.log('close')
-                        }
-                    });
-                }
-            }
-        }
-    });
-    return flag
-}
-
 // 时间格式化
 Date.prototype.pattern = function (fmt) {
     var o = {

+ 14 - 14
src/web/templates/weixin/historypush.html

@@ -4,7 +4,11 @@
     <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
     <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
     <meta HTTP-EQUIV="expires" CONTENT="0">
-    <title>招标订阅</title>
+    {{if .T.isVip}}
+        <title>VIP订阅</title>
+    {{else}}
+        <title>标讯订阅</title>
+    {{end}}
     {{include "/common/inc.html"}}
     <link href="{{Msg "seo" "cdn"}}/css/dropload.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link href="{{Msg "seo" "cdn"}}/css/wxlist.css?v={{Msg "seo" "version"}}" rel="stylesheet">
@@ -288,15 +292,13 @@
                 }
                 if (parseInt(isOnTail) != 1) {
                     $('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
-                    if (!checkOrder(1)) {
-                        if (parseInt(isExpire) > 1) {
-                            $(".renew_toast .isExpire").text(parseInt(isExpire));
-                            $(".renew_toast").show();
-                        } else if (parseInt(isExpire) > 0) {
-                            $(".renew_toast").find(".other").hide();
-                            $(".renew_toast").find(".today").show();
-                            $(".renew_toast").show();
-                        }
+                    if (parseInt(isExpire) > 1) {
+                        $(".renew_toast .isExpire").text(parseInt(isExpire));
+                        $(".renew_toast").show();
+                    } else if (parseInt(isExpire) > 0) {
+                        $(".renew_toast").find(".other").hide();
+                        $(".renew_toast").find(".today").show();
+                        $(".renew_toast").show();
                     }
                 } else {
                     $('.filter_tab').css("font-size", "14px");
@@ -721,10 +723,8 @@
 
         //续费
         function torepay() {
-            if (!checkOrder()) {
-                setSessionStorage();
-                window.location.href = "/weixin/pay/vipsubscribe_renew";
-            }
+            setSessionStorage();
+            window.location.href = "/weixin/pay/vipsubscribe_renew";
         }
 
         //购买

+ 1 - 5
src/web/templates/weixin/vipsubscribe/renew_notice.html

@@ -216,11 +216,7 @@
 			}
 			
 			$(".renew_service").on("click",function(){
-				var flags = checkOrder();
-				if(flags){
-					return
-				};
-				window.location.replace("/weixin/pay/renewPayPage");
+				window.location.replace("/weixin/pay/vipsubscribe_renew");
 			});
 			$(".aginBuy").on("click",function(){
 				window.location.replace("/weixin/pay/vipsubscribe_new?orderCode="+orderCode);

+ 335 - 324
src/web/templates/weixin/vipsubscribe/vip_index.html

@@ -3,8 +3,9 @@
 
 <head>
     <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
-    <meta name="apple-mobile-web-app-status-bar-style" content="#34355A" />
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
+    <meta name="apple-mobile-web-app-status-bar-style" content="#34355A"/>
     <meta name="theme-color" content="#34355A">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>VIP订阅首页</title>
@@ -13,368 +14,378 @@
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}22">
 </head>
 
 <body style="visibility:hidden;">
-    <div class="vip_index">
-        <div class="header" style="display: none;">
-            <img class="header_left" src="/vipsubscribe/image/left.png?v={{Msg "seo" "version"}}" alt="" onclick="javascript:history.back(-1);">
-            <h3 class="header_title">VIP订阅</h3>
-            <span class="header_right"></span>
-        </div>
-        <div class="content">
-            <div class="vip_info">
-                <div class="service">
-                    <div class="s_left">
-                        <span class="free7days_pic"></span>
-                        <!-- <div class="already">
+<div class="vip_index">
+    <div class="header" style="display: none;">
+        <img class="header_left" src="/vipsubscribe/image/left.png?v={{Msg "seo" "version"}}" alt=""
+             onclick="javascript:history.back(-1);">
+        <h3 class="header_title">VIP订阅</h3>
+        <span class="header_right"></span>
+    </div>
+    <div class="content">
+        <div class="vip_info">
+            <div class="service">
+                <div class="s_left">
+                    <span class="free7days_pic"></span>
+                    <!-- <div class="already">
                             <img src="/vipsubscribe/image/v.png?v={{Msg "seo" "version"}}" alt="">
                             <h4>已开通VIP订阅服务</h4>
                         </div> -->
-                    </div>
                 </div>
             </div>
-            <div class="subscribe_info">
-                <div class="s_info_top">
-                    <p class="s_i_item" style="margin-bottom: .1rem;">
-                        <label>已购买区域:</label>
-						<span class="expand-box area expanded">
+        </div>
+        <div class="subscribe_info">
+            <div class="s_info_top">
+                <p class="s_i_item" style="margin-bottom: .1rem;">
+                    <label>已购买区域:</label>
+                    <span class="expand-box area expanded">
                             <span class="_area"></span>
                             <span class="iconfont icon-arrow"></span>
                         </span>
-<!--                        <span class="_area"></span>-->
-                    </p>
-                    <p class="s_i_item" style="margin-bottom: .1rem;">
-                        <label>已购买行业:</label>
-                        <span class="expand-box trade expanded">
+                    <!--                        <span class="_area"></span>-->
+                </p>
+                <p class="s_i_item" style="margin-bottom: .1rem;">
+                    <label>已购买行业:</label>
+                    <span class="expand-box trade expanded">
                             <span class="_buyerClass"></span>
                             <span class="iconfont icon-arrow"></span>
                         </span>
-<!--                        <span class="_buyerClass"></span>-->
-                    </p>
-                    <p class="s_i_item" style="margin-bottom: .1rem;">
-                        <label>订阅周期:</label>
-                        <span class="_cycleCount"></span>
-                    </p>
-                    <p class="s_i_item">
-                        <label>有效日期:</label>
-                        <span class="_activeDate"></span>
-                    </p>
-                    <div class="to_expired" style="display: none;">
-                        <div class="e_circle">即将到期</div>
-                    </div>
-                </div>
-                <!-- 如果用户同时购买全国和全行业 则隐藏修改功能 -->
-                <div class="s_info_bottom">
-                    <span onclick="window.location.href='/front/vipsubscribe/toEditSubPage'">修改</span>
-                    <i class="iconfont icon-arrow"></i>
+                    <!--                        <span class="_buyerClass"></span>-->
+                </p>
+                <p class="s_i_item" style="margin-bottom: .1rem;">
+                    <label>订阅周期:</label>
+                    <span class="_cycleCount"></span>
+                </p>
+                <p class="s_i_item">
+                    <label>有效日期:</label>
+                    <span class="_activeDate"></span>
+                </p>
+                <div class="to_expired" style="display: none;">
+                    <div class="e_circle">即将到期</div>
                 </div>
             </div>
-            <div class="panel">
-                <div class="media">
-                    <div class="media_list">
-                        <div class="media_left">
-                            <img src="/vipsubscribe/image/keyword.png?v={{Msg "seo" "version"}}" alt="">
-                            <span>关键词</span>
-                        </div>
-                        <a href="/front/vipsubscribe/toSetKeyWordPage" class="media_right" id="keywords">
-                            
-                        </a>
+            <!-- 如果用户同时购买全国和全行业 则隐藏修改功能 -->
+            <div class="s_info_bottom">
+                <span onclick="window.location.href='/front/vipsubscribe/toEditSubPage'">修改</span>
+                <i class="iconfont icon-arrow"></i>
+            </div>
+        </div>
+        <div class="panel">
+            <div class="media">
+                <div class="media_list">
+                    <div class="media_left">
+                        <img src="/vipsubscribe/image/keyword.png?v={{Msg "seo" "version"}}" alt="">
+                        <span>关键词</span>
                     </div>
-                    <div class="media_list">
-                        <div class="media_left">
-                            <img src="/vipsubscribe/image/type.png?v={{Msg "seo" "version"}}" alt="">
-                            <span>信息类型</span>
-                        </div>
-                        <a href="/front/vipsubscribe/toSetInfoTypePage" class="media_right" id="infoType"></a>
+                    <a href="/front/vipsubscribe/toSetKeyWordPage" class="media_right" id="keywords">
+
+                    </a>
+                </div>
+                <div class="media_list">
+                    <div class="media_left">
+                        <img src="/vipsubscribe/image/type.png?v={{Msg "seo" "version"}}" alt="">
+                        <span>信息类型</span>
                     </div>
-                    <div class="media_list">
-                        <div class="media_left">
-                            <img src="/vipsubscribe/image/set.png?v={{Msg "seo" "version"}}" alt="">
-                            <span>推送设置</span>
-                        </div>
-                        <a href="/front/vipsubscribe/toSetPushSetPage" class="media_right" id="pushSet"></a>
+                    <a href="/front/vipsubscribe/toSetInfoTypePage" class="media_right" id="infoType"></a>
+                </div>
+                <div class="media_list">
+                    <div class="media_left">
+                        <img src="/vipsubscribe/image/set.png?v={{Msg "seo" "version"}}" alt="">
+                        <span>推送设置</span>
                     </div>
-                    <div class="media_list" style="margin-top:.2rem;margin-bottom: .2rem;" id="auto_renew">
-                        <div class="media_left">
-                            <img src="/vipsubscribe/image/frame.png?v={{Msg "seo" "version"}}" alt="">
-                            <span>项目匹配</span>
-							<i class="iconfont icon-wenhao "></i>
-                        </div>
-                        <div class="media_switch">
-                            <div class="weui-cell__ft">
-                                <button class="custom-switch switch"></button>
-                            </div>
-                        </div>
+                    <a href="/front/vipsubscribe/toSetPushSetPage" class="media_right" id="pushSet"></a>
+                </div>
+                <div class="media_list" style="margin-top:.2rem;margin-bottom: .2rem;" id="auto_renew">
+                    <div class="media_left">
+                        <img src="/vipsubscribe/image/frame.png?v={{Msg "seo" "version"}}" alt="">
+                        <span>项目匹配</span>
+                        <i class="iconfont icon-wenhao "></i>
                     </div>
-                    <div class="media_list" style="margin-top:.2rem;margin-bottom: .98rem;display: none;">
-                        <div class="media_left">
-                            <img src="/vipsubscribe/image/data.png?v={{Msg "seo" "version"}}" alt="">
-                            <span>数据报告</span>
+                    <div class="media_switch">
+                        <div class="weui-cell__ft">
+                            <button class="custom-switch switch"></button>
                         </div>
-                        <a href="#" class="media_right">
-                            <span class="weui-badge">2</span>
-                        </a>
                     </div>
                 </div>
-            </div>
-        </div>
-        <div class="footer">
-            <!-- 续费提醒 -->
-            <div class="renew_toast" style="display: none;">
-                <div>
-                    <i class="icon iconfont" id="close_renew">&#xe61a;</i>
-                    <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时续费!</span>
-      				<span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
-                    <a onclick="rebuy()">去续费</a>
+                <div class="media_list" style="margin-top:.2rem;margin-bottom: .98rem;display: none;">
+                    <div class="media_left">
+                        <img src="/vipsubscribe/image/data.png?v={{Msg "seo" "version"}}" alt="">
+                        <span>数据报告</span>
+                    </div>
+                    <a href="#" class="media_right">
+                        <span class="weui-badge">2</span>
+                    </a>
                 </div>
             </div>
-            <!-- 试用用户-去购买提醒 -->
-            <div class="nv_renew_toast" style="display: none;">
-                <div>
-                    <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
-	      			<span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
-	      			<span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
-                    <a href="/weixin/pay/vipsubscribe_new">去购买</a>
-                </div>
+        </div>
+    </div>
+    <div class="footer">
+        <!-- 续费提醒 -->
+        <div class="renew_toast" style="display: none;">
+            <div>
+                <i class="icon iconfont" id="close_renew">&#xe61a;</i>
+                <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时续费!</span>
+                <span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
+                <a onclick="rebuy()">去续费</a>
             </div>
-            <!-- 升级 续费 -->
-            <div class="tabbar">
-                <a onclick="upgrade()" class="update_btn">升级</a>
-                <a onclick="rebuy()" class="renew_btn">续费</a>
+        </div>
+        <!-- 试用用户-去购买提醒 -->
+        <div class="nv_renew_toast" style="display: none;">
+            <div>
+                <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
+                <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
+                <span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
+                <a href="/weixin/pay/vipsubscribe_new">去购买</a>
             </div>
         </div>
-        <!-- 项目匹配提醒 -->
-        <div class="custom-dialog" style="display: none;">
-            <div class="weui-mask weui-animate-fade-in"></div>
-            <div class="weui-dialog weui-animate-fade-in">
-                <div class="weui-dialog__hd"><strong class="weui-dialog__title" style="font-weight: bold;">项目匹配</strong></div>
-                <div class="weui-dialog__bd" style="line-height: .4rem;padding: .37rem .45rem;font-size: 14px;text-align: left;color: #686868;">开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。</div>
-                <div class="weui-dialog__ft" style="border-top: 1px solid #eee;padding-bottom: .2rem;padding-top: .2rem;"> 
-                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" style="background: #fff;color: #2CB7CA;text-align: center;margin-right: unset;">我知道了</a>
-                </div>
+        <!-- 升级 续费 -->
+        <div class="tabbar">
+            <a onclick="upgrade()" class="update_btn">升级</a>
+            <a onclick="rebuy()" class="renew_btn">续费</a>
+        </div>
+    </div>
+    <!-- 项目匹配提醒 -->
+    <div class="custom-dialog" style="display: none;">
+        <div class="weui-mask weui-animate-fade-in"></div>
+        <div class="weui-dialog weui-animate-fade-in">
+            <div class="weui-dialog__hd"><strong class="weui-dialog__title" style="font-weight: bold;">项目匹配</strong>
+            </div>
+            <div class="weui-dialog__bd"
+                 style="line-height: .4rem;padding: .37rem .45rem;font-size: 14px;text-align: left;color: #686868;">
+                开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。
+            </div>
+            <div class="weui-dialog__ft" style="border-top: 1px solid #eee;padding-bottom: .2rem;padding-top: .2rem;">
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary"
+                   style="background: #fff;color: #2CB7CA;text-align: center;margin-right: unset;">我知道了</a>
             </div>
         </div>
     </div>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+</div>
+<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
 <!--    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-	{{include "/common/weixin.html"}}
-	<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}11"></script>
-    <script>
-		initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avatar}});
-		var checkedflag = true;
-        $(function () {
-			var isinitpage = false;
-			$(window).bind("pageshow", function(event){
-				if(event.originalEvent.persisted){
-					getuserinfo();
-					isinitpage = true;
-				}
-			});
-			//
-			if(!isinitpage){
-            	getuserinfo();
-			}
-            //
-			$("i.icon-wenhao").on("click",function(){
-                $('.custom-dialog').show()
-                $('.weui-dialog__btn_primary').on('click', function () {
-                    $('.custom-dialog').hide()
-                })
-			})
-            $('.switch').on('click', function (e) {
-                console.log($(this).hasClass('checked'))
-                var that = this;
-                var hasChecked = $(this).hasClass('checked');
-                if (hasChecked == false) {
-                    $(that).addClass('checked');
-                    weui.toast('项目匹配已开启',{
-                        duration: 1000,
-                        className: 'custom-toast',
-                    })
-					setprojectmatch(1);
-                } else {
-                    $(that).removeClass('checked');
-                    $('.custom-dialog').hide()
-                    // $('#auto_renew').hide(500);
-                    weui.toast('项目匹配已关闭',{
-                        duration: 1000,
-                        className: 'custom-toast',
-                    })
-					setprojectmatch(0);
-                }
-            })
-            
-            $('#close_renew').on('click',function () {
-                $('.renew_toast').hide()
-            })
-            $('#nv_close_renew').on('click',function ()  {
-                $('.nv_renew_toast').hide();
-				$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>');
-				$(".tabbar").show();
-            })
-			// 点击扩大
-            // 给两个按钮绑定统一事件
-            $('.subscribe_info .expand-box.area .icon-arrow, .subscribe_info .expand-box.trade .icon-arrow').on('click', function() {
-                $(this).parent().toggleClass('expanded')
-                // 改变isOpen中的this指向,将其指向当前点击的元素,并调用
-                // isOpen.apply(this)
+<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+{{include "/common/weixin.html"}}
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}11"></script>
+<script>
+    initShare({{.T.signature}},{{.T.openid}}, 2, "jy_extend",{{.T.nickname}},{{.T.avatar}});
+    var checkedflag = true;
+    $(function () {
+        var isinitpage = false;
+        $(window).bind("pageshow", function (event) {
+            if (event.originalEvent.persisted) {
+                getuserinfo();
+                isinitpage = true;
+            }
+        });
+        //
+        if (!isinitpage) {
+            getuserinfo();
+        }
+        //
+        $("i.icon-wenhao").on("click", function () {
+            $('.custom-dialog').show()
+            $('.weui-dialog__btn_primary').on('click', function () {
+                $('.custom-dialog').hide()
             })
-            // 改变isOpen中的this指向,将其指向选中的元素,并调用
-            isOpen.apply($('.subscribe_info .expand-box.area .icon-arrow'))
-            isOpen.apply($('.subscribe_info .expand-box.trade .icon-arrow'))
-            function isOpen(){
-                // console.log(this)
-                var boxHeight = $(this).siblings().height();
-                var minHeight = $(this).siblings().css('min-height')  // 18px
+        })
+        $('.switch').on('click', function (e) {
+            console.log($(this).hasClass('checked'))
+            var that = this;
+            var hasChecked = $(this).hasClass('checked');
+            if (hasChecked == false) {
+                $(that).addClass('checked');
+                weui.toast('项目匹配已开启', {
+                    duration: 1000,
+                    className: 'custom-toast',
+                })
+                setprojectmatch(1);
+            } else {
+                $(that).removeClass('checked');
+                $('.custom-dialog').hide()
+                // $('#auto_renew').hide(500);
+                weui.toast('项目匹配已关闭', {
+                    duration: 1000,
+                    className: 'custom-toast',
+                })
+                setprojectmatch(0);
+            }
+        })
 
-                var rows = Math.ceil(Math.round(boxHeight)/ parseFloat(minHeight));
+        $('#close_renew').on('click', function () {
+            $('.renew_toast').hide()
+        })
+        $('#nv_close_renew').on('click', function () {
+            $('.nv_renew_toast').hide();
+            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>');
+            $(".tabbar").show();
+        })
+        // 点击扩大
+        // 给两个按钮绑定统一事件
+        $('.subscribe_info .expand-box.area .icon-arrow, .subscribe_info .expand-box.trade .icon-arrow').on('click', function () {
+            $(this).parent().toggleClass('expanded')
+            // 改变isOpen中的this指向,将其指向当前点击的元素,并调用
+            // isOpen.apply(this)
+        })
+        // 改变isOpen中的this指向,将其指向选中的元素,并调用
+        isOpen.apply($('.subscribe_info .expand-box.area .icon-arrow'))
+        isOpen.apply($('.subscribe_info .expand-box.trade .icon-arrow'))
 
-                if (rows > 2) {
-                    $(this).parent().removeClass('expanded')
-                    $(this).show()
-                } else {
-                    $(this).parent().addClass('expanded')
-                    $(this).hide()
+        function isOpen() {
+            // console.log(this)
+            var boxHeight = $(this).siblings().height();
+            var minHeight = $(this).siblings().css('min-height')  // 18px
+
+            var rows = Math.ceil(Math.round(boxHeight) / parseFloat(minHeight));
+
+            if (rows > 2) {
+                $(this).parent().removeClass('expanded')
+                $(this).show()
+            } else {
+                $(this).parent().addClass('expanded')
+                $(this).hide()
+            }
+        }
+    })
+
+    //
+    function getuserinfo() {
+        weui.loading();
+        //获取用户信息
+        $.ajax({
+            type: "POST",
+            url: "/subscribepay/afterPay/getUserInfo",
+            data: {},
+            dataType: "json",
+            async: false,
+            success: function (r) {
+                if (r.userData) {
+                    var _userData = r.userData;
+                    var _vipData = _userData["o_vipjy"];
+                    var _vipstatus = _userData["i_vip_status"];
+                    // console.log(_userData)
+                    if (_vipstatus && _vipstatus == "1") {
+                        if (parseInt(_vipData["expRemind"]) > 1) {
+                            $(".to_expired").show();
+                            $(".renew_day").text(_vipData["expRemind"]);
+                            $(".nv_renew_toast").show();
+                            $(".tabbar").hide();
+                        } else if (parseInt(_vipData["expRemind"]) > 0) {
+                            $(".to_expired").show();
+                            $(".nv_renew_toast").find(".other").hide();
+                            $(".nv_renew_toast").find(".today").show();
+                            $(".nv_renew_toast").show();
+                            $(".tabbar").hide();
+                        } else {
+                            $(".to_expired").hide();
+                            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>')
+                        }
+                        $('.free7days_pic').text("VIP订阅服务");
+                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
+                    } else {
+                        if (!checkOrder(1)) {
+                            if (parseInt(_vipData["expRemind"]) > 1) {
+                                $(".to_expired").show();
+                                $(".renew_day").text(parseInt(_vipData["expRemind"]))
+                                $(".renew_toast").show();
+                            } else if (parseInt(_vipData["expRemind"]) > 0) {
+                                $(".to_expired").show();
+                                $(".renew_toast").find(".other").hide();
+                                $(".renew_toast").find(".today").show();
+                                $(".renew_toast").show();
+                            } else {
+                                $(".to_expired").hide();
+                            }
+                        } else {
+                            $(".to_expired").hide();
+                        }
+                        $(".tabbar").html('<a onclick="upgrade()" class="update_btn">升级</a><a onclick="rebuy()" class="renew_btn">续费</a>')
+                        $('.free7days_pic').text("已开通VIP订阅服务");
+                        $('.free7days_pic').append("<style>.free7days_pic::after{display:none}</style>");
+                    }
+                    if (_vipData) {
+                        if (Number(_vipData["i_projectmatch"]) == 1) {
+                            $('.switch').addClass('checked')
+                        } else {
+                            $('.switch').removeClass('checked')
+                        }
+                        //地区
+                        var area = _vipData["o_area"];
+                        $("._area").text(area);
+                        //行业
+                        var buyerclass = _vipData["a_buyerclass"];
+                        if (buyerclass > 0) {
+                            $("._buyerClass").text(buyerclass + "个行业");
+                        } else {
+                            $("._buyerClass").text("全部行业");
+                        }
+                        $("._cycleCount").text(_vipData["cycle"]);
+                        $("._activeDate").text(_userData["l_vip_starttime"] + " - " + _userData["l_vip_endtime"]);
+                        if (_vipData["a_infotype"] == "") {
+                            _vipData["a_infotype"] = "全部类型"
+                        }
+                        $("#infoType").text(_vipData["a_infotype"]);
+                        var pushText = "实时推送"
+                        if (_vipData["i_ratemode"] == "4") {
+                            pushText = "每月推送"
+                        } else if (_vipData["i_ratemode"] == "3") {
+                            pushText = "每周推送"
+                        } else if (_vipData["i_ratemode"] == "2") {
+                            pushText = "每日推送"
+                        }
+                        $("#pushSet").text(pushText);
+                        var a_items = _vipData["a_items"]
+                        var s_items = ""
+                        if (a_items != undefined && a_items.length > 0) {
+                            for (var i = 0; a_items.length - 1 >= i; i++) {
+                                if (s_items != "") {
+                                    s_items += "、"
+                                }
+                                s_items += a_items[i]["s_item"]
+                            }
+                        }
+                        $("#keywords").text(s_items);
+                    }
+                    $("body").css("visibility", "");
+                    weui.loading().hide();
                 }
             }
         })
-		//
-		function getuserinfo(){
-			weui.loading();
-			//获取用户信息
-			$.ajax({  
-             	type: "POST",  
-             	url: "/subscribepay/afterPay/getUserInfo",   
-             	data: {},  
-             	dataType: "json",  
-				async:false,
-             	success: function(r){
-                	if(r.userData){
-                   		var _userData = r.userData;
-                   		var _vipData = _userData["o_vipjy"];
-                   		var _vipstatus = _userData["i_vip_status"];
-                   		// console.log(_userData)
-	                   if(_vipstatus&&_vipstatus=="1"){
-							if(parseInt(_vipData["expRemind"])>1){
-	                            $(".to_expired").show();
-								$(".renew_day").text(_vipData["expRemind"]);
-	                            $(".nv_renew_toast").show();
-								$(".tabbar").hide();
-	                        }else if(parseInt(_vipData["expRemind"])>0){
-	                            $(".to_expired").show();
-								$(".nv_renew_toast").find(".other").hide();
-								$(".nv_renew_toast").find(".today").show();
-	                            $(".nv_renew_toast").show();
-								$(".tabbar").hide();
-	                        }else{
-	                            $(".to_expired").hide();
-								$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>')
-	                        }
-							$('.free7days_pic').text("VIP订阅服务");
-	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
-	                   }else{
-							if(!checkOrder(1)){
-								if(parseInt(_vipData["expRemind"])>1){
-		                            $(".to_expired").show();
-		                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
-		                            $(".renew_toast").show();
-		                        }else if(parseInt(_vipData["expRemind"])>0){
-		                            $(".to_expired").show();
-									$(".renew_toast").find(".other").hide();
-									$(".renew_toast").find(".today").show();
-		                            $(".renew_toast").show();
-		                        }else{
-		                            $(".to_expired").hide();
-		                        }
-							}else{
-	                            $(".to_expired").hide();
-	                        }
-							$(".tabbar").html('<a onclick="upgrade()" class="update_btn">升级</a><a onclick="rebuy()" class="renew_btn">续费</a>')
-							$('.free7days_pic').text("已开通VIP订阅服务");
-	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:none}</style>");
-	                   }
-	                   if(_vipData){
-	                   		if(Number(_vipData["i_projectmatch"])==1){
-								$('.switch').addClass('checked')
-							}else{
-				                $('.switch').removeClass('checked')
-				            }
-							//地区
-							var area = _vipData["o_area"];
-	                        $("._area").text(area);
-							//行业
-							var buyerclass =  _vipData["a_buyerclass"];
-							if (buyerclass >0){
-	                        	$("._buyerClass").text(buyerclass+"个行业");
-							}else{
-	                        	$("._buyerClass").text("全部行业");
-							}
-	                        $("._cycleCount").text(_vipData["cycle"]);
-	                        $("._activeDate").text(_userData["l_vip_starttime"]+" - "+_userData["l_vip_endtime"]);
-	                        if(_vipData["a_infotype"]==""){
-	                            _vipData["a_infotype"]="全部类型"
-	                        }
-	                        $("#infoType").text(_vipData["a_infotype"]);
-	                        var pushText = "实时推送"
-	                        if(_vipData["i_ratemode"]=="4"){
-	                            pushText = "每月推送"
-	                        }else if(_vipData["i_ratemode"]=="3"){
-	                            pushText = "每周推送"
-	                        }else if(_vipData["i_ratemode"]=="2"){
-	                            pushText = "每日推送"
-	                        }
-	                        $("#pushSet").text(pushText);
-	                        var a_items = _vipData["a_items"]
-	                        var s_items = ""
-	                        if (a_items!=undefined &&a_items.length>0){
-	                            for (var i = 0; a_items.length - 1 >= i ; i++) {
-	                                if(s_items!=""){
-	                                    s_items += "、"
-	                                }
-	                                s_items  += a_items[i]["s_item"]
-	                            }
-	                        }
-	                        $("#keywords").text(s_items);
-                   		}
-						$("body").css("visibility","");
-		            	weui.loading().hide();
-					}
-				}
-           })
-		}
-		//
-		function setprojectmatch(index){
-			if(checkedflag){
-				checkedflag = false;
-				$.post("/subscribepay/afterPay/setUserInfo",{pageType:"projectMatch",pmindex:index},function(r){
-	                if(r.flag){
-						checkedflag=true;
-	                   console.log("保存成功")
-	               }
-	            })
-			}
-		}
-		//
-		function upgrade(){
-			if(!checkOrder()){
-				window.location.href="/weixin/pay/toUpgradePage"
-			}
-		}
-		//
-		function rebuy(){
-			if(!checkOrder()){
-                window.location.href="/weixin/pay/vipsubscribe_renew"
-			}
-		}
-    </script>
-	{{include "/common/baiducc.html"}}
+    }
+
+    //
+    function setprojectmatch(index) {
+        if (checkedflag) {
+            checkedflag = false;
+            $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
+                if (r.flag) {
+                    checkedflag = true;
+                    console.log("保存成功")
+                }
+            })
+        }
+    }
+
+    //
+    function upgrade() {
+        window.location.href = "/weixin/pay/toUpgradePage"
+    }
+
+    //
+    function rebuy() {
+        window.location.href = "/weixin/pay/vipsubscribe_renew"
+    }
+</script>
+{{include "/common/baiducc.html"}}
 </body>
 
 </html>

部分文件因为文件数量过多而无法显示