Переглянути джерело

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

wcj 5 роки тому
батько
коміт
27bbb43d87
72 змінених файлів з 6795 додано та 3263 видалено
  1. 0 4
      src/dataexport.json
  2. 0 16
      src/jfw/front/dataExport.go
  3. 73 0
      src/jfw/front/jylog.go
  4. 7 6
      src/jfw/front/shorturl.go
  5. 2 2
      src/jfw/front/swordfish.go
  6. 2 10
      src/jfw/front/ws_dataExport.go
  7. 4 16
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  8. 2 10
      src/jfw/modules/app/src/app/front/ws_dataExport.go
  9. 0 4
      src/jfw/modules/app/src/dataexport.json
  10. 8 2
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css
  11. 608 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css
  12. 2 2
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_industry.css
  13. 111 110
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/trial_info.css
  14. 140 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_service_expire.css
  15. 5 11
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_subscribe_edit.css
  16. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/banxuan.png
  17. 383 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js
  18. 759 704
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html
  19. 1 1
      src/jfw/modules/app/src/web/templates/me/login.html
  20. 27 16
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html
  21. 8 8
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry.html
  22. 61 4
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry_upgrade.html
  23. 405 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/edit_city_new.html
  24. 130 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe.html
  25. 415 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe_industry.html
  26. 70 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe_success.html
  27. 37 24
      src/jfw/modules/app/src/web/templates/vipsubscribe/renew_notice.html
  28. 14 6
      src/jfw/modules/app/src/web/templates/vipsubscribe/renew_pay.html
  29. 62 30
      src/jfw/modules/app/src/web/templates/vipsubscribe/trial_info.html
  30. 19 12
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  31. 370 190
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html
  32. 6 1
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  33. 0 0
      src/jfw/modules/subscribepay/src/dataexport.json
  34. 7 5
      src/jfw/modules/subscribepay/src/entity/dataExportSearch.go
  35. 114 48
      src/jfw/modules/subscribepay/src/entity/dataexport.go
  36. 7 5
      src/jfw/modules/subscribepay/src/entity/subscribeVip.go
  37. 31 26
      src/jfw/modules/subscribepay/src/service/afterPay.go
  38. 78 11
      src/jfw/modules/subscribepay/src/service/commonAction.go
  39. 16 5
      src/jfw/modules/subscribepay/src/service/dataExportPay_pc.go
  40. 91 39
      src/jfw/modules/subscribepay/src/service/vipRenewUpgrade.go
  41. 3 0
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  42. 2 0
      src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go
  43. 2 6
      src/jfw/public/dataexport.go
  44. 10 5
      src/jfw/public/historypush.go
  45. 8 2
      src/web/staticres/vipsubscribe/css/choose_area.css
  46. 2 1
      src/web/staticres/vipsubscribe/css/choose_area_new.css
  47. 140 0
      src/web/staticres/vipsubscribe/css/vip_service_expire.css
  48. 23 0
      src/web/staticres/vipsubscribe/js/common.js
  49. 128 86
      src/web/staticres/vipsubscribe/js/editArea.js
  50. 73 0
      src/web/staticres/vipsubscribe/js/mapArea.js
  51. 21 1
      src/web/templates/pc/biddetail.html
  52. 18 0
      src/web/templates/pc/biddetail_rec.html
  53. 487 446
      src/web/templates/pc/createOrderPage.html
  54. 853 823
      src/web/templates/weixin/dataExport/dataExport_payOrder.html
  55. 147 2
      src/web/templates/weixin/dataExport/dataExport_toMyOrder.html
  56. 1 1
      src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html
  57. 93 63
      src/web/templates/weixin/historypush.html
  58. 24 9
      src/web/templates/weixin/vipsubscribe/choose_area.html
  59. 11 5
      src/web/templates/weixin/vipsubscribe/choose_area_upgrade.html
  60. 85 9
      src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html
  61. 3 5
      src/web/templates/weixin/vipsubscribe/edit_city_new.html
  62. 1 1
      src/web/templates/weixin/vipsubscribe/edit_subscribe.html
  63. 392 389
      src/web/templates/weixin/vipsubscribe/edit_subscribe_industry.html
  64. 3 1
      src/web/templates/weixin/vipsubscribe/edit_subscribe_success.html
  65. 20 6
      src/web/templates/weixin/vipsubscribe/renew_notice.html
  66. 14 8
      src/web/templates/weixin/vipsubscribe/renew_pay.html
  67. 17 5
      src/web/templates/weixin/vipsubscribe/vip_index.html
  68. 55 7
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  69. 15 8
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  70. 7 1
      src/web/templates/weixin/vipsubscribe/vip_seniorset.html
  71. 61 45
      src/web/templates/weixin/vipsubscribe/vip_upgrade.html
  72. 1 0
      src/web/templates/weixin/wxkeyset/index.html

+ 0 - 4
src/dataexport.json

@@ -1,8 +1,4 @@
 {
-    "unitPrice_normal": 1,
-    "unitPrice_senior": 2,
-    "discount": 0.01,
-    "orderMinPrice": 0.001,
     "msgMaxCount": 20000,
     "font": {
         "enabled": true,

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

@@ -523,24 +523,8 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 	}
 	d.T["_id"] = _id
 	d.T["msgCount"] = msgCount
-	d.T["msgMaxCount"] = public.ExConf.MsgMaxCount
-	d.T["discount"] = public.ExConf.Discount
-	d.T["discount10"] = public.ExConf.Discount * 10
-	d.T["unitPrice_normal"] = public.ExConf.UnitPrice_normal
-	d.T["unitPrice_senior"] = public.ExConf.UnitPrice_senior
-	d.T["unitPrice_normal_final"] = (public.ExConf.UnitPrice_normal * 100) * (public.ExConf.Discount * 100) / 10000
-	d.T["unitPrice_senior_final"] = (public.ExConf.UnitPrice_senior * 100) * (public.ExConf.Discount * 100) / 10000
-	d.T["orderMinPrice"] = public.ExConf.OrderMinPrice
 	incurKey := fmt.Sprintf("PreviewData_%s_%d", d.GetSession("userId"), time.Now().Day())
 	d.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
-	//	go func() {
-	//		orderdata := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
-	//			"order_code": "143049462075",
-	//		}, "id,filter,user_mail,user_phone,product_type,data_spec,filter_id,order_code,data_count,order_status,order_money,prepay_id,applybill_type,applybill_company,applybill_taxnum", "")
-	//		tt := time.Now()
-	//		pay_time := util.FormatDate(&tt, util.Date_Full_Layout)
-	//		go public.SendMailToBJFinance(orderdata, pay_time, 2, config.GmailAuth)
-	//	}()
 	d.Render("/pc/createOrderPage.html", &d.T)
 	return nil
 }

+ 73 - 0
src/jfw/front/jylog.go

@@ -0,0 +1,73 @@
+package front
+
+/**
+日志文件自动切换,默认保留15天内日志
+**/
+
+import (
+	"log"
+	"os"
+	"path/filepath"
+	"regexp"
+	"time"
+
+	"github.com/go-xweb/xweb"
+	"github.com/robfig/cron"
+)
+
+//日志格式
+var fileReg = regexp.MustCompile("^(\\d{4}_[0-9_]{14})\\.log$")
+
+//当前日志文件句柄
+var LogFile *os.File
+
+//时间格式
+var FMT = "2006_01_02_15_04_05"
+
+//日志目录
+var LogPath = "./jylog"
+
+func init() {
+	os.Mkdir(LogPath, os.ModePerm)
+	//默认保留15天内的日志,-1为永久保留
+	initLog(15)
+}
+
+func initLog(saveDay int) {
+	go logfile()
+	task := cron.New()
+	task.Start()
+	task.AddFunc("0 0 0 * * ?", func() {
+		go logfile()
+		time.Sleep(50 * time.Second)
+		if saveDay > 0 {
+			filepath.Walk(LogPath, func(path string, info os.FileInfo, err error) error {
+				str := fileReg.FindStringSubmatch(info.Name())
+				if len(str) == 2 {
+					t, er := time.ParseInLocation(FMT, str[1], time.Local)
+					if er == nil {
+						if (time.Now().Unix()-t.Unix())/86400 > int64(saveDay) {
+							log.Println("delete log file:", path, os.Remove(path))
+						}
+					}
+				}
+				return nil
+			})
+		}
+	})
+}
+
+//创建并切换输出文件
+func logfile() {
+	now := time.Now().Format(FMT)
+	file, _ := os.Create(LogPath + "/" + now + ".log")
+	log.SetOutput(file)
+	xweb.RootApp().Logger.SetOutput(file)
+	go func(file *os.File) {
+		time.Sleep(5 * time.Second)
+		if LogFile != nil {
+			LogFile.Close()
+		}
+		LogFile = file
+	}(file)
+}

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

@@ -90,6 +90,12 @@ func (s *Short) Article(stype, id string) error {
 		data1, _ := mongodb.FindOneByField("user", bson.M{"s_m_openid": ssOpenid}, `{"_id":1}`)
 		userId = util.BsonIdToSId((*data1)["_id"])
 	}
+	//判断用户是否是vip
+	res, _ := public.MQFW.FindById("user", userId, nil)
+	if util.IntAll((*res)["i_vip_status"]) == 1 || util.IntAll((*res)["i_vip_status"]) == 2 {
+		isVip = true
+	}
+	s.T["isVip"] = isVip
 	if bm {
 		//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
 		if ssOpenid != nil && ssOpenid != "" {
@@ -130,12 +136,7 @@ func (s *Short) Article(stype, id string) error {
 		} else {
 			s.T["openid"] = se.EncodeString(myopenid) //"-1"
 		}
-		//判断用户是否是vip
-		res, _ := public.MQFW.FindById("user", userId, nil)
-		if util.IntAll((*res)["i_vip_status"]) == 1 || util.IntAll((*res)["i_vip_status"]) == 2 {
-			isVip = true
-		}
-		s.T["isVip"] = isVip
+
 		mynickname, _ := s.GetSession("s_nickname").(string)
 		myavatar, _ := s.GetSession("s_avatar").(string)
 		s.T["nickname"] = mynickname

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

@@ -2350,7 +2350,7 @@ func (f *Front) HasPushHistory() {
 	//获取时间
 	var formatTime string
 	selectTime := f.GetString("selectTime")
-	log.Println(selectTime, "---", f.GetString("area"))
+	//	log.Println(selectTime, "---", f.GetString("area"))
 	lenStr := len([]rune(selectTime))
 	if selectTime != "" {
 		if selectTime != "undefined" && lenStr >= 10 {
@@ -2370,7 +2370,7 @@ func (f *Front) HasPushHistory() {
 	hasKeyFlag := false
 	isVipFlag := false
 	isPassCount := false
-	isExpire := 0
+	isExpire := -1
 	tedayNum := time.Unix(time.Now().Unix(), 1).Format("20060102")
 	isOnTail := 0
 	if util.IntAll((*user)["i_vip_status"]) == 1 || util.IntAll((*user)["i_vip_status"]) == 2 {

+ 2 - 10
src/jfw/front/ws_dataExport.go

@@ -219,16 +219,8 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 		w.T["phone"] = phone
 	}
 	w.T["_id"] = w.GetString("id")
-	w.T["msgCount"] = msgCount                                                                                      //信息总量
-	w.T["msgMaxCount"] = public.ExConf.MsgMaxCount                                                                  //规定信息最大总量
-	w.T["discount"] = public.ExConf.Discount                                                                        //折扣:0.5
-	w.T["discount10"] = public.ExConf.Discount * 10                                                                 //折扣:5折
-	w.T["unitPrice_normal"] = public.ExConf.UnitPrice_normal                                                        //标准字段-原价每条价格
-	w.T["unitPrice_senior"] = public.ExConf.UnitPrice_senior                                                        //高级字段-原价每条价格
-	w.T["unitPrice_normal_final"] = (public.ExConf.UnitPrice_normal * 100) * (public.ExConf.Discount * 100) / 10000 //标准字段折扣后的价格
-	w.T["unitPrice_senior_final"] = (public.ExConf.UnitPrice_senior * 100) * (public.ExConf.Discount * 100) / 10000 //高级字段折扣后的价格
-	w.T["orderMinPrice"] = public.ExConf.OrderMinPrice                                                              //最低售价
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day())                          //每日限制预览次数
+	w.T["msgCount"] = msgCount                                                             //信息总量
+	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day()) //每日限制预览次数
 	w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 
 	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())

+ 4 - 16
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -27,9 +27,7 @@ type Subscribepay struct {
 
 	//修改
 	toEditSubPage       xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubPage"`       //订阅收费修改页面
-	toEditSubProvPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubProvPage"`   //订阅收费修改省份
-	toEditSubAllArea    xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubAllArea"`    //订阅收费全国修改
-	toEditSubCityPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubCityPage"`   //订阅收费修改城市
+	toEditSubAreaPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubAreaPage"`   //订阅收费修改地区
 	toEditSubInduPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubInduPage"`   //订阅收费修改行业
 	submitEditSubFinish xweb.Mapper `xweb:"/jyapp/vipsubscribe/submitEditSubFinish"` //订阅收费修改成功
 
@@ -153,19 +151,9 @@ func (s *Subscribepay) ToEditSubPage() {
 	s.Render("/vipsubscribe/edit_subscribe.html")
 }
 
-//修改订阅省份
-func (s *Subscribepay) ToEditSubProvPage() {
-	s.Render("/vipsubscribe/edit_subscribe_province.html")
-}
-
-//修改订阅城市
-func (s *Subscribepay) ToEditSubCityPage() {
-	s.Render("/vipsubscribe/edit_subscribe_city.html")
-}
-
-//购买全国修改
-func (s *Subscribepay) ToEditSubAllArea() {
-	s.Render("/vipsubscribe/edit_subscribe_allArea.html")
+//合并后修改地区
+func (s *Subscribepay) ToEditSubAreaPage() {
+	s.Render("/vipsubscribe/edit_city_new.html")
 }
 
 //修改订阅行业

+ 2 - 10
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -311,16 +311,8 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 		w.T["dataspec"] = spec
 	}
 	w.T["_id"] = w.GetString("id")
-	w.T["msgCount"] = msgCount                                                                                      //信息总量
-	w.T["msgMaxCount"] = public.ExConf.MsgMaxCount                                                                  //规定信息最大总量
-	w.T["discount"] = public.ExConf.Discount                                                                        //折扣:0.5
-	w.T["discount10"] = public.ExConf.Discount * 10                                                                 //折扣:5折
-	w.T["unitPrice_normal"] = public.ExConf.UnitPrice_normal                                                        //标准字段-原价每条价格
-	w.T["unitPrice_senior"] = public.ExConf.UnitPrice_senior                                                        //高级字段-原价每条价格
-	w.T["unitPrice_normal_final"] = (public.ExConf.UnitPrice_normal * 100) * (public.ExConf.Discount * 100) / 10000 //标准字段折扣后的价格
-	w.T["unitPrice_senior_final"] = (public.ExConf.UnitPrice_senior * 100) * (public.ExConf.Discount * 100) / 10000 //高级字段折扣后的价格
-	w.T["orderMinPrice"] = public.ExConf.OrderMinPrice                                                              //最低售价
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day())                          //每日限制预览次数
+	w.T["msgCount"] = msgCount                                                             //信息总量
+	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day()) //每日限制预览次数
 	w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 
 	w.Render("/dataExport/dataExport_payOrder.html", &w.T)

+ 0 - 4
src/jfw/modules/app/src/dataexport.json

@@ -1,8 +1,4 @@
 {
-    "unitPrice_normal": 1,
-    "unitPrice_senior": 2,
-    "discount": 0.01,
-    "orderMinPrice": 0.001,
     "msgMaxCount": 20000,
     "font": {
         "enabled": true,

+ 8 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css

@@ -494,16 +494,22 @@
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
   border: 0;
-  background: url(../image/xuanzhong.png) no-repeat center center;
+  background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
   border: 0;
-  background: url(../image/active_disabled.png) no-repeat center center;
+  background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
+#choose_area .select-area-box .tab .province .checkbox.half:checked {
+  border: 0 !important;
+  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+  background-size: cover !important;
+}
+
 #choose_area .select-area-box label::after {
   font-size: 14px;
   float: right;

+ 608 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css

@@ -0,0 +1,608 @@
+@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_area {
+  display: flex;
+  justify-content: space-between;
+  flex-direction: column;
+  overflow: hidden;
+  height: 100%;
+}
+
+#choose_area .form {
+  flex: 1;
+  overflow-y: scroll;
+}
+
+#choose_area .optional_count, #choose_area .all_area {
+  height: .88rem;
+  line-height: .88rem;
+  padding: 0 .3rem;
+  font-size: .3rem;
+  color: #1d1d1d;
+}
+
+#choose_area .optional_count em, #choose_area .all_area em {
+  color: #2cb7ca;
+}
+
+#choose_area .result {
+  position: relative;
+  padding: .2rem .3rem;
+  font-size: .26rem;
+  text-align: justify;
+}
+
+#choose_area .result .result_text {
+  position: relative;
+  min-height: 19px;
+}
+
+#choose_area .result .line_two {
+  text-overflow: ellipsis;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+
+#choose_area .result .detail, #choose_area .result .packup {
+  display: inline-block;
+  width: 1.5rem;
+  padding-right: 0.1rem;
+  text-align: right;
+  color: #2cb7ca;
+  font-size: .26rem;
+  z-index: 999;
+}
+
+#choose_area .result .detail {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
+}
+
+#choose_area .result .packup {
+  position: absolute;
+  right: 0.3rem;
+  bottom: 0;
+  margin-top: .1rem;
+}
+
+#choose_area .select-area-box {
+  padding-bottom: .94rem;
+}
+
+#choose_area .select-area-box .tab {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  color: #1d1d1d;
+  background: #fff;
+  font-size: .3rem;
+  padding: .2rem .5rem;
+  border-bottom: 1px solid #e0e0e0;
+  box-sizing: border-box;
+}
+
+#choose_area .select-area-box .tab .province {
+  display: flex;
+  align-items: center;
+}
+
+#choose_area .select-area-box .tab .province .checkbox {
+  width: .4rem;
+  height: .4rem;
+  border: 1px solid #ddd;
+  border-radius: 50%;
+  margin-right: .2rem;
+  -webkit-appearance: none;
+  background: #fff;
+}
+
+#choose_area .select-area-box .tab .province .checkbox:checked {
+  border: 0;
+  background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+#choose_area .select-area-box .tab .province .checkbox[disabled] {
+  border: 0;
+  background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+#choose_area .select-area-box .tab .province .checkbox.half {
+  border: 0 !important;
+  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+  background-size: cover !important;
+}
+
+#choose_area .select-area-box .tab .province .checkbox.half[disabled] {
+  border: 0 !important;
+  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+  background-size: cover !important;
+}
+
+#choose_area .select-area-box .tab .optional {
+  color: #2CB7CA;
+  font-size: 0.28rem;
+  margin-left: -2.8rem;
+}
+
+#choose_area .select-area-box label::after {
+  font-size: 14px;
+  float: right;
+  margin-right: 15px;
+}
+
+#choose_area .select-area-box .tab_content {
+  display: none;
+  font-size: .28rem;
+  padding: .1rem .3rem;
+  text-align: center;
+}
+
+#choose_area .select-area-box .tab_content .city {
+  float: left;
+  padding: .1rem .2rem;
+  background: #fff;
+  margin: .1rem 0 .1rem .1rem;
+  border-radius: 0.04rem;
+  font-size: .28rem;
+}
+
+#choose_area .select-area-box .tab_content .active {
+  background: #2cb7ca;
+  color: #fff;
+}
+
+#choose_area .select-area-box .tab_content .active[disabled] {
+  background: #BFBFC3;
+  color: #fff;
+}
+
+#choose_area .select-area-box .tab_content .city[disabled] {
+  background: #BFBFC3;
+  color: #fff;
+}
+
+#choose_area .select-area-box .index {
+  padding: .3rem .3rem .1rem .3rem;
+  font-size: .32rem;
+}
+
+#choose_area .slide {
+  background: transparent;
+  position: fixed;
+  right: 0;
+  top: 50%;
+  height: 8.5rem;
+  width: .4rem;
+  font-size: .26rem;
+  text-align: center;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  padding: .1rem 0;
+  align-items: center;
+  margin-top: -4.25rem;
+  z-index: 9999;
+}
+
+#choose_area .slide a {
+  margin-bottom: .1rem;
+}

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

@@ -407,8 +407,8 @@
   padding: .2rem .3rem;
   background:rgba(245,244,249,1);
   z-index:999;
-  position: fixed;
-  width:100%;	 
+  /* position: fixed; */
+  width:100%;
 }
 
 .choose_industry .form {

+ 111 - 110
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/trial_info.css

@@ -1,189 +1,190 @@
 
 .trial_info {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding-bottom: .94rem;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+    height: 100%;
+    overflow-x: hidden;
+    background: #34355A;
 }
 
 .trial_info .form {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  justify-content: space-between;
-  flex-direction: column;
+    flex: 1;
+    width: 100%;
+    overflow-y: scroll;
 }
 
 .trial_info .trial_body {
-  overflow-y: scroll;
-  flex: 1;
-  background: #34355A;
+    background: #34355A;
 }
 
 .trial_info .trial_body .banner {
-  display: flex;
-  flex-direction: column;
-  justify-content: flex-end;
-  width: 100%;
-  height: 4.24rem;
-  background: url(../image/trial_banner.png) no-repeat center center;
-  background-size: 100% 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-end;
+    width: 100%;
+    height: 4.24rem;
+    background: url(../image/trial_banner.png) no-repeat center center;
+    background-size: 100% 100%;
 }
 
 .trial_info .trial_body .banner .shadow {
-  width: 100%;
-  height: 1.4rem;
-  background: linear-gradient(180deg, rgba(52, 53, 90, 0) 0%, #34355a 100%);
+    width: 100%;
+    height: 1.4rem;
+    background: linear-gradient(180deg, rgba(52, 53, 90, 0) 0%, #34355a 100%);
 }
 
 .trial_info .trial_body .form_title {
-  width: 100%;
-  background: transparent;
-  margin-top: -0.72rem;
-  margin-bottom: .26rem;
-  color: #CFAD89;
-  text-align: center;
-  font-size: .3rem;
+    width: 100%;
+    background: transparent;
+    margin-top: -0.72rem;
+    margin-bottom: .26rem;
+    color: #CFAD89;
+    text-align: center;
+    font-size: .3rem;
 }
 
 .trial_info .trial_body .perfect {
-  width: 100%;
-  text-align: center;
-  font-size: .3rem;
-  color: #fff;
-  margin-top: -0.72rem;
-  margin-bottom: 0.32rem;
+    width: 100%;
+    text-align: center;
+    font-size: .3rem;
+    color: #fff;
+    margin-top: -0.72rem;
+    margin-bottom: 0.32rem;
 }
 
 .trial_info .trial_body .form_info {
-  padding: 0 .3rem;
+    padding: 0 .3rem;
 }
 
 .trial_info .trial_body .form_info .form_top, .trial_info .trial_body .form_info .form_bottom {
-  padding: 0.08rem 0;
-  background: #fff;
-  border-radius: 0.06rem;
+    padding: 0.08rem 0;
+    background: #fff;
+    border-radius: 0.06rem;
 }
 
 .trial_info .trial_body .form_info .form_item {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 0.26rem .3rem;
-  position: relative;    
-  height: 1rem;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0.26rem .3rem;
+    position: relative;
+    height: 1rem;
 }
 
 .trial_info .trial_body .form_info .form_item input {
-  flex: 1;
-  font-size: .32rem;
+    flex: 1;
+    font-size: .32rem;
 }
 
 .trial_info .trial_body .form_info .form_item input::placeholder {
-  color: #888;
-  font-size: .32rem;
+    color: #888;
+    font-size: .32rem;
 }
 
 .trial_info .trial_body .form_info .form_item .code_btn {
-  color: #888;
-  font-size: .32rem;
-  background: transparent;
+    color: #888;
+    font-size: .32rem;
+    background: transparent;
 }
 
 .trial_info .trial_body .form_info .form-item-textarea {
-  display: flex;
-  align-items: center;
-  padding: 0.06rem .3rem;
-  position: relative;
-  line-height: normal;
-  height: auto;
-  min-height: .94rem;
-  height: 1rem;
+    display: flex;
+    align-items: center;
+    padding: 0.06rem .3rem;
+    position: relative;
+    line-height: normal;
+    height: auto;
+    min-height: .94rem;
+    height: 1rem;
 }
 
 .trial_info .trial_body .form_info .form-item-textarea textarea {
-  width: 100%;
-  resize: none;
-  font-size: .32rem;
+    width: 100%;
+    resize: none;
+    font-size: .32rem;
 }
 
 .trial_info .trial_body .form_info .form-item-textarea textarea::placeholder {
-  color: #888;
-  font-size: .32rem;
-  line-height: 1.3;
+    color: #888;
+    font-size: .32rem;
+    line-height: 1.3;
 }
 
-.trial_info .trial_body .form_info .form_item_line:after, .trial_info .trial_body .form_info .form-item-textarea:after {
-  position: absolute;
-  content: '';
-  left: 0;
-  bottom: 0;
-  width: calc(100% - 0.3rem);
-  height: 1px;
-  margin-left: .3rem;
-  background-color: #E0E0E0;
-  transform-origin: 0 0;
-  transform: scaleY(0.8);
+.trial_info .trial_body .form_info .form_item_line:after,
+.trial_info .trial_body .form_info .form-item-textarea:after {
+    position: absolute;
+    content: '';
+    left: 0;
+    bottom: 0;
+    width: calc(100% - 0.3rem);
+    height: 1px;
+    margin-left: .3rem;
+    background-color: #E0E0E0;
+    transform-origin: 0 0;
+    transform: scaleY(0.8);
 }
 
 .trial_info .trial_body .form_info .form_bottom {
-  margin-top: .26rem;
+    margin-top: .26rem;
 }
 
 .trial_info .trial_body .explain {
-  color: #CFAD89;
+    color: #CFAD89;
 }
 
 .trial_info .trial_body .explain .explain_title {
-  padding: .56rem .3rem .24rem;
-  font-size: .3rem;
-  text-align: center;
+    padding: .56rem .3rem .24rem;
+    font-size: .3rem;
+    text-align: center;
 }
 
 .trial_info .trial_body .explain .explain_item {
-  padding: 0 .3rem;
-  font-size: .24rem;
+    padding: 0 .3rem;
+    font-size: .24rem;
 }
 
 .trial_info .trial_btn > button {
-  width: 100%;
-  height: .94rem;
-  line-height: .94rem;
-  text-align: center;
-  font-size: .36rem;
-  background: #2CB7CA;
-  color: #fff;
+    width: 100%;
+    height: .94rem;
+    line-height: .94rem;
+    text-align: center;
+    font-size: .36rem;
+    background: #2CB7CA;
+    color: #fff;
 }
 
 .trial_info .trial_btn > button:disabled {
-  opacity: 0.4;
+    opacity: 0.4;
 }
 
 .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%);
+    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;
+    display: none;
 }
 
 .custom-toast .weui-toast__content {
-  margin: 0;
+    margin: 0;
 }
 
-.trial_info .trial_btn{
-	position: fixed;
-	bottom: 0;
-	width: 100%;
-	background: #fff;
+.trial_info .trial_btn {
+    /*position: fixed;*/
+    /*bottom: 0;*/
+    width: 100%;
+    background: #fff;
 }

+ 140 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_service_expire.css

@@ -318,3 +318,143 @@
   color: #2cb7ca;
   background-color: transparent;
 }
+
+.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%);
+  z-index: 99999;
+}
+
+.custom-toast .weui-icon_toast {
+  display: none;
+}
+
+.custom-toast .weui-toast__content {
+  margin: 0;
+}

+ 5 - 11
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_subscribe_edit.css

@@ -393,19 +393,10 @@
   position: relative;
   background: #fff;
   padding: .32rem .3rem;
+  border-top: .01rem solid #CECECE;
+  border-bottom: .01rem solid #CECECE;
 }
 
-.vip_subscribe_edit .edit_content .edit_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_subscribe_edit .edit_content .edit_item .item_top {
   display: flex;
@@ -426,6 +417,9 @@
 .vip_subscribe_edit .edit_content .edit_item .item_bottom {
   color: #686868;
   font-size: .26rem;
+  flex: 1;
+  text-align: right;
+  padding-right: .2rem;
 }
 
 .vip_subscribe_edit .edit_tips {

BIN
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/banxuan.png


+ 383 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js

@@ -0,0 +1,383 @@
+// 后端数据结构
+var areaData = {
+    "data": {
+        "area": {
+            // "北京": [],
+            // "河南": [
+            //     "洛阳市",
+            //     "驻马店市",
+            //     "周口市",
+            //     // "郑州市"
+            // ],
+            // "澳门": [],
+            // "甘肃": []
+        },
+        "buyset": {
+            "areacount": -1,
+            "buyerclasscount": 11,
+            "citys": {
+                //   "河南": 4
+            }
+        },
+        "industry": [
+            "党委办",
+            "公共资源交易",
+            "公安",
+            "出版广电",
+            "国资委",
+            "地震",
+            "安监",
+            "工商",
+            "法院",
+            "电信行业",
+            "财政"
+        ]
+    },
+    "errMsg": "",
+    "success": true
+}
+
+//加载数据
+function getData() {
+    $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
+        if (r.success) {
+            areaData = r;
+        }
+    }, false);
+}
+
+// 渲染城市方法
+function createMoreCity(arr) {
+    var tempHtml = arr.map(function (v) {
+        return '<button class="city">' + v.name + '</button>'
+    }).join('')
+    return tempHtml
+}
+
+// 省下拉市事件
+function slideFun(obj) {
+    if (obj.next('.tab_content:not(:animated)').css("display") == "block") {
+        obj.children().children('i').css({
+            "display": "inline-block",
+            "transform": "rotate(0)"
+        })
+    } else {
+        obj.children().children('i').css({
+            "display": "inline-block",
+            "transform": "rotate(-180deg)"
+        })
+    }
+    obj.toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+    obj.parent().siblings().children('.tab').removeClass('selected');
+}
+
+var obj
+
+// 改变选择结果方法
+function getResult() {
+    obj = {};
+    //$('.result_name').empty();
+    $('.province').each(function () {
+        let provinceText = $(this).text().trim();//省份名称
+        let isChecked = $(this).children('.checkbox').is(':checked');
+        let isHalf = $(this).children('.checkbox').hasClass('half');
+        let arr = [];
+        if (isChecked) {
+            obj[provinceText] = [];
+        } else if (isHalf && !isChecked) {
+            let $that = $(this);
+            obj[$that.text().trim()] = [];
+            $that.parent().siblings().find('.city').each(function () {
+                let parent = $(this).parent().siblings().find('.province').text().trim();
+                if ($(this).is('.active') && parent == $that.text().trim()) {
+                    arr.push($(this).text().trim())
+                }
+            })
+            obj[$that.text().trim()] = arr
+        }
+    })
+    $('count').html($('.checkbox:not(.other):checked').length);
+    //$('.result_name').append(getAreaClassArr_index(obj).join("、"));
+//校验是否修改
+    if (theSameAs(obj) || $.isEmptyObject(obj)) {
+        $('#enter').attr("disabled", "disabled");
+    } else {
+        $('#enter').removeAttr("disabled");
+    }
+}
+
+// 初始化页面方法
+function init() {
+    let p = areaData.data.area;
+    let count = areaData.data.buyset.citys;
+    // 1.渲染城市列表
+    $(".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)
+    })
+    // 2.当areacount == -1时,全国为选中状态,为正数时为选中的省份数目,全国选项不显示
+    let pLength = Object.keys(areaData.data.area).length;
+    let cLength = Object.keys(areaData.data.buyset.citys).length
+    console.log(pLength, cLength)
+    if (areaData.data.buyset.areacount == -1 && pLength == 0 && cLength == 0) {
+        // 当购买的全国切选中的是全国时
+        // $('.optional_count').html("可选择全部区域")
+        //$('.all_area').show()
+        $('.optional_count').hide()
+        $('.total').html('34')
+        $('.count').html('34')
+        $('.tab.whole').parent('li').show();
+        $('.checkbox.other').prop('checked', true);
+        // $('.checkbox:not(.other)').attr('disabled',true)
+        //$('.result_name').append(`<span>全国</span>`);
+    } else if (areaData.data.buyset.areacount == -1 && pLength != 0) {
+        // 当购买的全国而没有选择全国,选择部分省市时
+        //$('.all_area').show();
+        $('.province').removeAttr('data-count');
+        $('.optional_count').hide();
+        $('.total').html('34');
+        initResult()
+    } else {
+        //$('.all_area').hide()
+        $('.optional_count').show()
+        $('.total').html(areaData.data.buyset.areacount)
+        $('.tab.whole').parent('li').hide();
+        // $('.checkbox.other').attr('disabled',true);
+        initResult()
+    }
+
+}
+
+function initResult() {
+    let isAll = areaData.data.buyset.areacount;
+    let p = areaData.data.area;
+    let count = areaData.data.buyset.citys;
+    // 渲染已选择结果
+    for (const k in p) {
+        console.log(p[k], k)
+        if (p[k].length == 0) {
+            $('.province').each(function () {
+                let t = $(this).text().trim();
+                if (k == t && p[k].length == 0) {
+                    // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
+                    if (isAll != -1) {
+                        $(this).parent().siblings().children('.city').addClass('active').attr('disabled', true);
+                        $(this).parent('.tab').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
+                    } else {
+                        $(this).parent().siblings().children('.city').addClass('active').removeAttr('disabled')
+                    }
+                    $(this).children('.checkbox').prop('checked', true)
+                }
+            })
+        } else {
+            console.log(k, p[k].length)
+            $('.city').each(function () {
+                let t = $(this).text().trim();
+                p[k].forEach(v => {
+                    // console.log(v,t)
+                    if (v == t) {
+                        let that = $(this).parents('li').find('.tab:not(.municipality)');
+                        console.log("v==t")
+                        // 如果是可修改城市的省份,则可以进行下拉展示
+                        that.bind('click', function () {
+                            slideFun($(this));
+                        })
+                        $(this).addClass('active').parent().siblings('.tab').find('input').addClass('half');
+                        return;
+                    }
+                })
+            })
+            for (const c in count) {
+                if (p[k].length >= count[c]) {
+                    if (isAll != -1) {
+                        $('.city:not(.active)').attr('disabled', true)
+                    } else {
+                        $('.city:not(.active)').removeAttr('disabled')
+                    }
+                }
+            }
+        }
+    }
+    // 添加可选择城市文字 和自定义属性值
+    if (areaData.data.buyset.areacount != -1) {
+        for (const c in count) {
+            $('.province').each(function () {
+                let t = $(this).text().trim();
+                if (c == t) {
+                    $(this).attr("data-count", count[c]);
+                    $(this).after(`<em class="optional">可选择 ${count[c]} 个市</em>`)
+                    let that = $(this).parent('.tab:not(.municipality)');
+                    that.bind('click', function () {
+                        slideFun($(this));
+                    })
+                }
+            })
+        }
+    }
+    //$('.result_name').append(getAreaClassArr_index(areaData.data.area).join("、"));
+    $('.count').html($('.checkbox:not(.other):checked').length)
+    // 如果选中的省份数量等于购买的省份数量,则将其他未选中的省份禁用
+    if ($('.checkbox:not(.other):checked').length == $('.total').html()) {
+        $('.checkbox:not(:checked)').attr('disabled', true);
+    }
+    $('#enter').attr("disabled", "disabled");
+}
+
+$(function () {
+    // 省下拉事件
+    $('.tab:not(.municipality)').on('click', function () {
+        if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
+            $(this).children().children('i').css({
+                "display": "inline-block",
+                "transform": "rotate(0)"
+            })
+        } else {
+            $(this).children().children('i').css({
+                "display": "inline-block",
+                "transform": "rotate(-180deg)"
+            })
+        }
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).parent().siblings().children('.tab').removeClass('selected');
+    });
+    getData();
+    // 初始化
+    init();
+    /**** 点击checkbox实现onchange事件 *****/
+    // 1.点击全国按钮onchange事件;
+    $('.checkbox.other').on('change', function () {
+        let isChecked = $(this).is(':checked');
+        if (isChecked) {
+            $('.count').html('34')
+            $('.checkbox:not(.other)').prop('checked', false).removeClass('half')
+            $('.city').removeClass('active');
+            $('.tab_content').slideUp()
+            getResult()
+        } else {
+            $('.checkbox:not(.other)').removeAttr('disabled')
+            $('.city').removeAttr('disabled')
+            getResult()
+        }
+    })
+    // 2.点击非全国按钮onchange事件;
+    $('.checkbox:not(.other)').on('change', function () {
+        $('.checkbox.other').prop('checked', false);
+        let checkedLength = $('.checkbox:checked').length;
+        let totalLength = $('.total').text();
+        $('.count').html(checkedLength)
+        if (checkedLength < totalLength) {
+            $('.checkbox:not(.other)').removeAttr('disabled')
+            getResult()
+        } else {
+            $('.checkbox:not(:checked)').attr('disabled', true)
+            getResult()
+        }
+        if ($(this).is(':checked')) {
+            if (areaData.data.buyset.areacount != -1) {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active').attr('disabled', true);
+            } else {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active');
+            }
+            getResult()
+        } else {
+            $(this).prop('checked', false).removeClass('half').parent().parent().siblings().find('.city').removeClass('active').removeAttr('disabled');
+            getResult()
+        }
+
+    })
+    // 3.点击半选按钮触发的事件
+    $('.checkbox.half').on('change', function () {
+        console.log($(this).is(':checked'))
+        if ($(this).is(':checked')) {
+            if (areaData.data.buyset.areacount != -1) {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active').attr('disabled', true);
+            } else {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active');
+            }
+            getResult()
+        } else {
+            $(this).prop('checked', false);
+            $(this).parent().parent().siblings().find('.city').removeClass('active').removeAttr('disabled');
+            $(this).parent().siblings('.optional').show();
+            getResult()
+        }
+    })
+    // 4.点击城市按钮触发的事件
+    $('.tab_content').on('click', '.city', function () {
+        let count = $(this).parent().siblings().find('.province').attr('data-count');
+        $(this).toggleClass('active');
+        $('.checkbox.other').prop('checked', false);
+        var isActive = $(this).parent().find('.city.active').length
+        let cityLength = $(this).parent().find('.city').length
+        if (isActive === cityLength) {//当选中的城市数量等于该省下所有城市总数时,即为全选
+            var oInput = $(this).parents('li').find('input.checkbox')
+            oInput.removeClass('half').prop('checked', true)
+            getResult()
+        } else {//半选
+            $(this).parents('li').find('input.checkbox').addClass('half').prop("checked", false)
+            if (isActive > 0 && isActive != count) {
+                $(this).parents('li').find('input.checkbox').addClass('half');
+                $(this).parent('div').find('.city:not(.active)').removeAttr('disabled')
+                getResult()
+            } else if (isActive > 0 && isActive == count) {
+                $(this).parents('li').find('input.checkbox').addClass('half');
+                $(this).parent('div').find('.city:not(.active)').attr('disabled', true)
+                getResult()
+            } else {
+                $(this).parent('div').find('.city:not(.active)').removeAttr('disabled')
+                $(this).parents('li').find('input.checkbox').removeClass('half').prop('checked', false)
+                getResult()
+            }
+        }
+    })
+    // 阻止input checkbox选中取消 触发父元素下拉事件
+    $('.checkbox').click(function (e) {
+        e.stopPropagation();
+    })
+    // 锚点跳转
+    $("body").on('click', '.slide a', function () {
+        var s = $(this).html()
+        if (s == '#') {
+            return;
+        }
+        document.querySelector('#' + s).scrollIntoView({
+            block: 'center'
+        });
+    })
+    // 取消按钮事件 返回上一页
+    $('#cancel').click(function () {
+        // window.history.go(-1)
+        //$('.result_name').empty()
+        $('.checkbox').prop('checked', false).removeAttr('disabled');
+        $('.city').removeClass('active');
+        $('.tab_content').slideUp();
+        $('.optional').remove()
+        init();
+    })
+    // 确定修改事件
+    $('#enter').click(function () {
+        $('#enter').attr("disabled", "disabled");
+        $DoPost("/subscribepay/editSub/submit", {
+            "type": "area",
+            "value": JSON.stringify(obj)
+        }, function (r) {
+            if (r.success) {
+                window.location.replace('/front/vipsubscribe/submitEditSubFinish');
+            }
+            $('#enter').removeAttr("disabled");
+        }, false);
+    })
+});
+
+function theSameAs(select) {
+    let tmp1 = getAreaClassArr(select);
+    let tmp2 = getAreaClassArr(areaData.data.area);
+    return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
+}

+ 759 - 704
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -1,60 +1,62 @@
 <html>
-	<head>
-		{{include "/common/meta.html"}}
-		<title>数据导出</title>
-		<link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-		<link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-        <link rel="stylesheet" href="/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" type="text/css" href="/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" type="text/css" href="/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" href="/jyapp/dataExport/css/pay_order.css?v={{Msg "seo" "version"}}21">
-        <script src="/jyapp/js/jquery-3.2.1.min.js"></script>
-        <script src="/jyapp/dataExport/js/weui.min.js"></script>
-		{{include "/common/js.html"}}
-		<style>
-		#pay_order{
-		    position: absolute;
-		    top: 0px;
-		    overflow-y: auto;
-		    bottom: 0px;
-		    left: 0px;
-		    right: 0px;
-		}
-		.weui-check__label:active {
-		    background-color: #fff;
-		}
-		#code{
-			margin-left: -0.2rem;
-		}
-		</style>
-	</head>
-  <body>
-	<div class="loading_" style="display:none;">
-		<p><span></span></p>
-	</div>
-	<div class="app-layout-header">
-		<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
-		数据导出
-	</div>
-	<div class="app-layout-content-b">
-		<div id="pay_order">
-		<main class="main">
-			<div class="progress">
-				<div class="p-item">
-					<p class="p-item-icon">
-						<i class="icon iconfont">&#xe606;</i>
-					</p>
-					<span class="active">条件筛选</span>
-					<div class="line" style="background: #2CB7CA"></div>
-				</div>
+<head>
+    {{include "/common/meta.html"}}
+    <title>数据导出</title>
+    <link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" href="/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/jyapp/dataExport/css/pay_order.css?v={{Msg "seo" "version"}}21">
+    <script src="/jyapp/js/jquery-3.2.1.min.js"></script>
+    <script src="/jyapp/dataExport/js/weui.min.js"></script>
+    {{include "/common/js.html"}}
+    <style>
+        #pay_order {
+            position: absolute;
+            top: 0px;
+            overflow-y: auto;
+            bottom: 0px;
+            left: 0px;
+            right: 0px;
+        }
+
+        .weui-check__label:active {
+            background-color: #fff;
+        }
+
+        #code {
+            margin-left: -0.2rem;
+        }
+    </style>
+</head>
+<body>
+<div class="loading_" style="display:none;">
+    <p><span></span></p>
+</div>
+<div class="app-layout-header">
+    <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+    数据导出
+</div>
+<div class="app-layout-content-b">
+    <div id="pay_order">
+        <main class="main">
+            <div class="progress">
+                <div class="p-item">
+                    <p class="p-item-icon">
+                        <i class="icon iconfont">&#xe606;</i>
+                    </p>
+                    <span class="active">条件筛选</span>
+                    <div class="line" style="background: #2CB7CA"></div>
+                </div>
 
-				<div class="p-item">
-					<p class="p-item-icon">
-						<i class="icon iconfont">&#xe617;</i>
-					</p>
-					<span class="active">支付订单</span>
-					<div class="line"></div>
-				</div>
+                <div class="p-item">
+                    <p class="p-item-icon">
+                        <i class="icon iconfont">&#xe617;</i>
+                    </p>
+                    <span class="active">支付订单</span>
+                    <div class="line"></div>
+                </div>
 
                 <div class="p-item">
                     <p class="p-item-icon icon-gray">
@@ -101,36 +103,38 @@
                 </div>
                 <div class="form-item phone-number">
                     <div class="form-control">
-<!--                            <label for="">手机号:</label>-->
+                        <!--                            <label for="">手机号:</label>-->
                         <div class="input">
                             <input type="text" class="phone_input" maxlength="11" placeholder="手机号" id="phone_input">
-				<div id="devinput" style="top: -0.05rem;">
-					<i class="icon iconfont phone_check_ok"></i>
-					<span class="phone_err_msg">手机号不正确</span>
-				</div>
+                            <div id="devinput" style="top: -0.05rem;">
+                                <i class="icon iconfont phone_check_ok"></i>
+                                <span class="phone_err_msg">手机号不正确</span>
+                            </div>
                         </div>
                     </div>
                 </div>
                 <p class="msg">*数据导出将发送至邮箱</p>
                 <div class="form-item" id="verify">
                     <div class="form-control">
-<!--                            <label for="">邮箱:</label>-->
+                        <!--                            <label for="">邮箱:</label>-->
                         <div class="input" id="email-input">
                             <input type="text" class="email_input" placeholder="邮箱">
-				<div id="devinput">
-					<i class="icon iconfont email_check_ok"></i>
-					<span class="email_err_msg">邮箱不正确</span>
-				</div>
+                            <div id="devinput">
+                                <i class="icon iconfont email_check_ok"></i>
+                                <span class="email_err_msg">邮箱不正确</span>
+                            </div>
                         </div>
                     </div>
-                    <div class="form-control verification" style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;">
-<!--                            <label for="">验证码:</label>-->
+                    <div class="form-control verification"
+                         style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;">
+                        <!--                            <label for="">验证码:</label>-->
                         <div class="input" id="codeinput">
-                            <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6" placeholder="验证码">
-				<div id="devinput">
-					<i class="icon iconfont code_check_ok"></i>
-					<span class="code_err_msg">验证码错误</span>
-				</div>
+                            <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6"
+                                   placeholder="验证码">
+                            <div id="devinput">
+                                <i class="icon iconfont code_check_ok"></i>
+                                <span class="code_err_msg">验证码错误</span>
+                            </div>
                             <button type="button" class="sendCode" disabled id="sendCode">发送验证码</button>
                         </div>
                     </div>
@@ -138,18 +142,21 @@
                 <div class="form-item" style="margin-top: .2rem;">
                     <div class="way">
                         <span>支付方式</span>
-                        <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i class="iconfont icon-arrow icon-right"></i></div>
+                        <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i
+                                    class="iconfont icon-arrow icon-right"></i></div>
                     </div>
                 </div>
-                <p class="msg">购买须知:最低起售{{.T.orderMinPrice}}元;标准字段包:原价{{.T.unitPrice_normal}}元/条、{{.T.discount10}}折价{{.T.unitPrice_normal_final}}元/条计费;高级字段包:原价{{.T.unitPrice_senior}}元/条、{{.T.discount10}}折价{{.T.unitPrice_senior_final}}元/条计费;</p>
-                
+                <p class="msg">购买须知:最低起售<span></span>元;标准字段包:原价<span></span>元/条、<span></span>
+                    折价<span></span>元/条计费;高级字段包:原价<span></span>元/条、<span></span>
+                    折价<span></span>元/条计费;</p>
+
             </div>
         </main>
-		<div class="fixed-bottom-box" id="bottombox">
+        <div class="fixed-bottom-box" id="bottombox">
             <div class="weui-cells weui-cells_checkbox radio-form">
                 <label class="weui-cell weui-check__label" for="s11">
                     <div class="weui-cell__hd">
-                        <input type="checkbox" class="weui-check" name="checkbox1" id="s11" />
+                        <input type="checkbox" class="weui-check" name="checkbox1" id="s11"/>
                         <i class="weui-icon-checked"></i>
                     </div>
                     <div class="weui-cell__bd read">
@@ -179,7 +186,8 @@
                         </li>
                         <li>
                             <label>·高级字段包</label>
-                            <p>公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
+                            <p>
+                                公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
                         </li>
                     </ul>
                 </div>
@@ -188,7 +196,7 @@
                 </div>
             </div>
         </div>
-        <!-- 选择支付方式  --> 
+        <!-- 选择支付方式  -->
         <div class="js_dialog pay_way" id="pay_way" style="display: none;">
             <div class="weui-mask"></div>
             <div class="box">
@@ -204,7 +212,7 @@
                                 <p><img src="/jyapp/dataExport/images/weixin.png">微信支付</p>
                             </div>
                             <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked />
+                                <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
                                 <i class="weui-icon-checked"></i>
                             </div>
                         </label>
@@ -213,7 +221,7 @@
                                 <p><img src="/jyapp/dataExport/images/zhifubao.png">支付宝支付</p>
                             </div>
                             <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb" />
+                                <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
                                 <i class="weui-icon-checked"></i>
                             </div>
                         </label>
@@ -221,644 +229,691 @@
                 </div>
             </div>
         </div>
-	</div>
-	</div>
+    </div>
+</div>
+
+<script>
+    var userId ={{session "userId"}}
+    var id = {{.T._id}}
+    var msgCount = {{.T.msgCount}}
+
+    var finishEmailVerity = false;
+    var readClause = false;
+    var dataType = 1;
+    var finishPhoneVerity = false;
+
+    var msgMaxCount, discount, unitPrice_normal, unitPrice_senior, orderMinPrice;
+    //
+    var email_lastInput = {{.T.email}}
+    var email_lastVerity = {{.T.timeSpaceing}}
+    var previewDataTime = {{.T.PreviewData}}
+    var phone_lastInput = {{.T.phone}}
+    var payway ={{.T.payway}}
+    var dataspec ={{.T.dataspec}}
+    //可以支付
+    var canpay = true;
+    //订单编号
+    var order_code = ""
+    //
+    var regInt = /[0-9]/;
+    var lstimes = 0;
+    //
+    var pay_way = "wx_app"
+
+    function accMul(arg1, arg2) {
+        var m = 0,
+            s1 = arg1.toString(),
+            s2 = arg2.toString();
+        try {
+            m += s1.split(".")[1].length
+        } catch (e) {
+        }
+        try {
+            m += s2.split(".")[1].length
+        } catch (e) {
+        }
+        return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) /
+            Math.pow(10, 2);
+    }
+
+    //
+    function FormatNum(n) {
+        if (n >= 1000) {
+            return Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3)
+        }
+        return n
+    }
+
+    //
+    function ChangePayMoney() {
+        var shouldPay = 0;
+        var beforePay = 0;
+        if (dataType == 1) {
+            beforePay = accMul(unitPrice_normal, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        } else if (dataType == 2) {
+            beforePay = accMul(unitPrice_senior, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        }
+        shouldPay = shouldPay > orderMinPrice ? shouldPay : orderMinPrice;
+        beforePay = beforePay > orderMinPrice ? beforePay : orderMinPrice;
+        $(".pay_discount").text("¥" + shouldPay);
+        $(".pay_before").text("¥" + beforePay)
+    }
 
-		<script>
-			var userId={{session "userId"}}
-			var id = {{.T._id}}
-			var msgCount = {{.T.msgCount}}
-			var msgMaxCount = {{.T.msgMaxCount}}
-			var discount = {{.T.discount}}
-			var unitPrice_normal = {{.T.unitPrice_normal}}
-			var unitPrice_senior = {{.T.unitPrice_senior}}
-			var orderMinPrice = {{.T.orderMinPrice}}
-			var finishEmailVerity = false;
-			var readClause = false;
-			var dataType = 1;
-			var finishPhoneVerity = false;
-			//
-			var email_lastInput = {{.T.email}}
-			var email_lastVerity = {{.T.timeSpaceing}}
-			var previewDataTime = {{.T.PreviewData}}
-			var phone_lastInput = {{.T.phone}}
-			var payway ={{.T.payway}}
-			var dataspec={{.T.dataspec}}
-			//可以支付
-			var canpay = true;
-			//订单编号
-			var order_code = ""
-			//
-			var regInt = /[0-9]/;
-			var lstimes =0;
-			//
-      		var pay_way="wx_app"
-			function accMul(arg1, arg2) {
-				var m = 0,
-					s1 = arg1.toString(),
-					s2 = arg2.toString();
-				try {
-					m += s1.split(".")[1].length
-				} catch (e) {}
-				try {
-					m += s2.split(".")[1].length
-				} catch (e) {}
-				return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) /
-					Math.pow(10, 2);
-			}
-			//
-			function FormatNum(n) {
-				if (n >= 1000) {
-					return Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3)
-				}
-				return n
-			}
-			//
-			function ChangePayMoney() {
-				var shouldPay = 0;
-				var beforePay = 0;
-				if (dataType == 1) {
-					beforePay = accMul(unitPrice_normal, msgCount)
-					shouldPay = accMul(beforePay, discount)
-				} else if (dataType == 2) {
-					beforePay = accMul(unitPrice_senior, msgCount)
-					shouldPay = accMul(beforePay, discount)
-				}
-				shouldPay = shouldPay > orderMinPrice ? shouldPay : orderMinPrice;
-				beforePay = beforePay > orderMinPrice ? beforePay : orderMinPrice;
-				$(".pay_discount").text("¥" + shouldPay);
-				$(".pay_before").text("¥" + beforePay)
-			}
-			//
-			function toRead(){
-				event.preventDefault();
-				if(regInt.test($(".sendCode").text())){
-					var email_input = $(".email_input").val().replace(/\s*/g, "");
+    //
+    function toRead() {
+        event.preventDefault();
+        if (regInt.test($(".sendCode").text())) {
+            var email_input = $(".email_input").val().replace(/\s*/g, "");
 //					if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
 //						sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
 //					}
-				}
-				if($("#phone_input").val()){
-					sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
-				}
-				sessionStorage.email_lastVerity=email_lastVerity;
-				window.location.href="/jyapp/front/staticPage/dataExport_serviceterms.html";
-			}
-			$(function() {     
-				if(sessionStorage.pay_way){
-					if(sessionStorage.pay_way=="ali_app"){
-						$(".payment").text("支付宝支付");
-					}
-				}
-				//记录用户上次付款信息
-				if(payway){
-					if(payway=="ali"){
-						$("#zfb").prop("checked",true);
-						$(".payment").text("支付宝支付");
-						sessionStorage.pay_way="ali_app"
-					}else if (payway=="wx"){
-						$("#wx").prop("checked",true);
-						$(".payment").text("微信支付");
-						sessionStorage.pay_way="wx_app"
-					}
-				}
-				//记录用户上次选择的字段包  1标准2高级
-				if(dataspec){
-					if(dataspec=="1"){
-						$(".choose").children().eq(0).addClass("active");
-						$(".choose").children().eq(1).removeClass("active");
-						dataType=1;
-					}else if(dataspec=="2"){
-						$(".choose").children().eq(1).addClass("active");
-						$(".choose").children().eq(0).removeClass("active");
-						dataType=2;
-					}
-					ChangePayMoney();
-				}
-				
-				if(sessionStorage.index=="1"){
-            		$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
-            		dataType=2;
-            	}
-				ChangePayMoney();
+        }
+        if ($("#phone_input").val()) {
+            sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
+        }
+        sessionStorage.email_lastVerity = email_lastVerity;
+        window.location.href = "/jyapp/front/staticPage/dataExport_serviceterms.html";
+    }
+
+    $(function () {
+        //加载价格
+        $.ajax({
+            url: "/jypay/dataexport/getPrice",
+            type: "POST",
+            async: false,
+            dataType: "json",
+            success: function (r) {
+                if (r) {
+                    discount = r.discount;
+                    msgMaxCount = r.unitPrice_normal;
+                    orderMinPrice = r.orderMinPrice;
+                    unitPrice_normal = r.unitPrice_normal;
+                    unitPrice_senior = r.unitPrice_senior;
+                }
+            }
+        });
 
-				//软键盘弹起 
-				var oHeight = $(document).height(); //浏览器当前的高度
-				var mainHeight=$(".main").height();
-				
-				$(window).resize(function(){
-					 if($(document).height() < oHeight){
-					   $("#bottombox").css("position","static");
-					  $("#pay_order").css("padding-bottom","0rem");
-					}else{
-					    $("#bottombox").css("position","fixed");
-					    $("#pay_order").css("padding-bottom","2.7rem");
-					}
-			   	});
-			   //	alert(sessionStorage.getItem("send_email_"+userId)!=null)
-			 //  	alert(sessionStorage.getItem("send_code_"+userId)!=null)
-			 //  	alert(sessionStorage.getItem("send_email_"+userId)==null)
-			 //  	alert(localStorage.getItem("new_email_"+userId)!=null)
-			   	//缓存  1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
-			   	if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+userId)!=null)){
-			   		//alert("1")
-			   		$(".email_check_ok").hide();
-					$(".email_input").parents('div.form-control').siblings().slideDown();
-			   		$(".email_input").val(sessionStorage.getItem("send_email_"+userId));
-		   			lstimes = parseInt(sessionStorage.getItem("send_code_"+userId));
-					$(".verity_input").removeAttr("readonly");
-					lstimes = lstimes -  Date.parse(new Date())/1000 + 60*5;
-					if (lstimes>0){
-						sendemailTimer(lstimes);
-					}
-					//.getItem("new_email_"+userId)!=null)
-			   	}else if((sessionStorage.getItem("send_email_"+userId)==null)&&(localStorage.getItem("new_email_"+userId)!=null)){
-			   		//alert("2")
-			   		$(".email_check_ok").show();
-					$(".email_input").val(localStorage.getItem("new_email_"+userId));
-					finishEmailVerity = true;
-			   	}else if (email_lastInput!=""){
-			   		//alert("~~")
-			   		$(".email_check_ok").show();
-					$(".email_input").val(email_lastInput);
-					finishEmailVerity = true;
-			   	}else{
-		   			$(".email_input").val("");
-			   	}
-				
-				if (email_lastVerity > 0) {
-					sendemailTimer(email_lastVerity);
-				}
-				
-				if (sessionStorage.getItem("order_phone"+{{.T._id}})!=null){
-					if((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone"+{{.T._id}})))){
-						$(".phone_check_ok").show();
-						$(".phone_input").val(sessionStorage.getItem("order_phone"+{{.T._id}}));
-						finishPhoneVerity=true;
-					}else{
-						$(".phone_err_msg").show();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity = false;
-						$(".toPay").attr("disabled", "disabled");
-					}
-				}else if(phone_lastInput!=""){
-					$(".phone_check_ok").show();
-					$(".phone_input").val(phone_lastInput);
-					finishPhoneVerity=true;
-				}
-				
-				if(readClause&&finishPhoneVerity&&finishEmailVerity){
-					$(".toPay").removeAttr("disabled")
-				}
-				
-				//缓存判断是否点击我已阅读
-				if((sessionStorage.readClause=="true")&&finishPhoneVerity&&finishEmailVerity){
-					$(".toPay").removeAttr("disabled")
-					readClause=true;
-				}
-				//
-				$('#choose_way').click(function() {
-					$('.pay_way').slideDown('slow')
-					if(sessionStorage.pay_way=="ali_app"){
-						$("#zfb").prop("checked",true);
-						$("#wx").prop("checked",false);
-						 pay_way=sessionStorage.pay_way;
-					}
-				})
-				/* 选择支付方式*/
-				$('input:radio[name="way"]').click(function() {
-					var checkValue = $('input:radio[name="way"]:checked').val();
-			          if(checkValue=="微信支付"){
-			            pay_way="wx_app";
-			          }else{
-			            pay_way="ali_app";
-			          }
-					$('.pay_way').hide(200)
-					sessionStorage.pay_way=pay_way;
-					$('.payment').html(checkValue)
-				});
-				$(".cancel").click(function() {
-					$('.pay_way').hide(200)
-				})
-				//数据展示
-				if (sessionStorage.getItem("order_spec" + {{.T._id}}) != null) {
-					dataType = sessionStorage.getItem("order_spec" + {{.T._id}});
-				}
-				if (dataType == 1) {
-					$(".switch-dataType .bz").addClass("active")
-					$(".switch-dataType .gj").removeClass("active")
-				} else {
-					$(".switch-dataType .bz").removeClass("active")
-					$(".switch-dataType .gj").addClass("active")
-				}
-				//
-				$('.choose .choose-item').each(function() {
-					var index = $(this).index();
-					$(this).click(function() {
-						//类型切换
-						$(this).addClass("active").siblings().removeClass("active");
-						if (index == 0) {
-							dataType = 1;
-						} else if (index == 1) {
-							dataType = 2;
-						}
-						sessionStorage.index=index;
-						ChangePayMoney();
-					})
-				})
-				$('.tips-icon').on('click', function() {
-					$('#tipDialog').show(200);
-					$('.weui-dialog__btn_primary').click(function() {
-						$('#tipDialog').hide(200);
-					})
-				});
-				//手机号输入监控
-				var Verification = {
-					//手机号验证
-					isPhone: function(value) {
-						return /^[1][3-9][0-9]{9}$/.test(value);
-					}
-				};
-				$(".phone_input").on("input propertychange", function() {
-					var phone_input = $(this).val().replace(/\s*/g, "");
-					if (phone_input.length == 11) {
-						if (Verification.isPhone(phone_input)) {
-							$.post("/jyapp/front/dataExport/checkPhoneVerify", {
-								"phone": phone_input
-							}, function(data) {
-								if (data.success) {
-									$(".phone_check_ok").show();
-									$(".phone_err_msg").hide();
-									finishPhoneVerity = true;
-									if (readClause && finishEmailVerity) {
-										$(".toPay").removeAttr("disabled")
-									}
-								} else {
-									$(".phone_err_msg").show();
-									$(".phone_check_ok").hide();
-									finishPhoneVerity = false;
-									$(".toPay").attr("disabled", "disabled");
-								}
-							})
-						} else {
-							$(".phone_err_msg").show();
-							$(".phone_check_ok").hide();
-							finishPhoneVerity = false;
-							$(".toPay").attr("disabled", "disabled");
-						}
-					} else {
-						$(".phone_err_msg").hide();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity = false;
-						$(".toPay").attr("disabled", "disabled");
-						sessionStorage.removeItem("ischecked");
-					}
-				}).blur(function() {
-					var phone_input = $(this).val().replace(/\s*/g, "");
-					if (phone_input.length != 11&&phone_input.length!=0) {
-						$(".phone_err_msg").show();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity = false;
-						$(".toPay").attr("disabled", "disabled");
-					}
-				});
-				//邮箱输入监控
-				$(".email_input").on("input propertychange", function() {
-					var email_input = $(this).val().replace(/\s*/g, "");
-					if (email_input.indexOf("@") > 0) {
-						if (email_input != email_lastInput) {
-							$(this).parents('div.form-control').siblings().slideDown();
-							if (email_lastVerity > 0) {
-								$("#sendCode").prop("disabled", true);
-								//返回后验证码可输入  sessionStorage
-								if((localStorage.getItem("new_email_"+userId)!=null)&&(localStorage.getItem("new_email_"+userId)==email_input)){
-									$(".verity_input").prop("readonly", false);
-								}else{
-									if(email_lastVerity>0){
-										$(".verity_input").removeAttr("readonly");
-									}else if(lstimes>0){
-										$(".verity_input").removeAttr("readonly");
-									}else{
-										$(".verity_input").attr("readonly", true);
-									}
-								}
-							}else{ //app杀掉进程的 新用户  ↓
-								$(".verity_input").prop("readonly", false);
-								$("#sendCode").prop("disabled", true);
-							}
-							finishEmailVerity = false;
-							$(".toPay").prop("disabled", "disabled");
-							if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)) {
-								lstimes_ = parseInt(sessionStorage.getItem("send_code_"+userId));
-								lstimes_ = lstimes_ -  Date.parse(new Date())/1000 + 60*5;
-								if (lstimes_>0) {
-									$("#sendCode").prop("disabled", true);
-								}else{
-									$("#sendCode").prop("disabled", false);
-								}
-								$(".email_err_msg").hide();
-								$(".email_check_ok").hide();
-							} else {
-								$("#sendCode").prop("disabled", true);
-								$(".email_check_ok").hide();
-								$(".email_err_msg").hide();
-							}
-						}else {
-							finishEmailVerity = true;
-							if (readClause && finishPhoneVerity) {
-								$(".toPay").removeAttr("disabled")
-							}
-							$("#sendCode").attr("disabled", "disabled");
-							$(".verity_input").attr("readonly", true);
-							$(".email_err_msg").hide();
-							$(".email_check_ok").show();
-							sessionStorage.removeItem("ischecked");
-							//验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
-							localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
-							sessionStorage.removeItem("send_email_"+userId);
-							$(this).parents('div.form-control').siblings().slideUp();
-						}
-					} else {
-						$(this).parents('div.form-control').siblings().slideUp();
-						$("#sendCode").attr("disabled", "disabled");
-						$(".verity_input").attr("readonly", true);
-						$(".email_err_msg").hide();
-						$(".email_check_ok").hide();
-					}
-				}).blur(function() {
-					var email = $(".email_input").val().replace(/\s*/g, "");
-					if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)&&( $(".email_input").val().length!=0)) {
-						$(".email_err_msg").show();
-						$(".email_check_ok").hide();
-						return
-					}
-					if($(".email_input").val()==email){
-						return;
-					}
-					$("#sendCode").removeAttr("disabled");
-					$(".email_check_ok").hide();
-					$(".email_err_msg").hide();
-				}).on("focus",function(){
-			   		  this.scrollIntoView();
-				});
-				//点击发送验证码-邮箱验证
-				var canVerify = true;
-				$(".sendCode").on("click", function() {
-					var email = $(".email_input").val().replace(/\s*/g, "");
-					if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
-						$(".email_err_msg").show();
-						$(".email_check_ok").hide();
-						return
-					}
-					if (!canVerify) {
-						return
-					}
-					canVerify = false;
-					$.post("/jyapp/front/dataExport/sendMailVerify", {
-						"email": email
-					}, function(data) {
-						canVerify = true;
-						if (data.success) {
-							if (data.errCode == 4) {
-								EasyAlert.show(data.errMsg, "", 3000);
-								finishEmailVerity = true;
-								$(".email_check_ok").show();
-								if(readClause&&finishPhoneVerity){
-									$(".toPay").removeAttr("disabled")
-								}
-								$(".email_input").parents('div.form-control').siblings().slideUp();
-							} else {
-								$(".toPay").attr("disabled", "disabled");
-								finishEmailVerity = false;
-								//发送成功
-								sendemailTimer(60 * 5);
-								$(".verity_input").removeAttr("readonly");;
-								$(".sendCode").attr("disabled", "disabled");
-								$(".email_input").attr("readonly", true);
-								sessionStorage.setItem("send_code_"+userId, Date.parse(new Date())/1000);
-								//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							}
-						} else {
-							EasyAlert.show(data.errMsg, "", 3000)
-							if (data.errCode == 2) {
-								sendemailTimer(data.time);
-								$(".sendCode").attr("disabled", "disabled");
-								$(".email_input").attr("readonly", true);
-								//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							}
-						}
-					}, "json")
-				});
-				//校验验证码
-				$(".verity_input").bind("input propertychange",function(){
-					var verity=$(this).val()
-					var email=$(".email_input").val().replace(/\s*/g,"");
-					if(verity.length==6){
-						$.post("/jyapp/front/dataExport/checkMailVerify",{"emailVerity":verity,"email":email},function(data){
-							if(data.success){
-								finishEmailVerity=true;
-								if(readClause&&finishPhoneVerity){
-									$(".toPay").removeAttr("disabled")
-								}
-								$(".email_check_ok").show();
-								$(".email_err_msg").hide();
-								$(".verity_input").val("");
-								$(".verity_input").attr("readonly", true);
-								$(".email_input").parents('div.form-control').siblings().slideUp();
-								sessionStorage.setItem("EmailVerity_"+{{.T._id}},"T");
-								//验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
-								localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
-								sessionStorage.removeItem("send_email_"+userId);
-							} else {
-								EasyAlert.show("验证码错误", "", 3000);
-							}
-						})
-					} else {
-						$(".email_err_msg").hide();
-					}
-					//防遮挡
-				}).on("focus",function(){
-			   		 var target = this;
-			   		setTimeout(function(){
-			   		  	target.scrollIntoViewIfNeeded();
-			   		},600)
-				})
+        //数据规格
+        $(".initial:eq(0)").text(unitPrice_normal + "元/条");
+        $(".current:eq(0)").text(unitPrice_normal * discount + "元/条");
+        $(".initial:eq(1)").text(unitPrice_senior + "元/条");
+        $(".current:eq(1)").text(unitPrice_senior * discount + "元/条");
+        //购买须知
+        $(".msg span:eq(0)").text(orderMinPrice);
+        $(".msg span:eq(1)").text(unitPrice_normal);
+        $(".msg span:eq(2)").text(discount * 10);
+        $(".msg span:eq(3)").text(discount * unitPrice_normal);
 
-				//点击阅读条款
-				$(".fixed-bottom-box .weui-check").on("click", function() {
-					if ($(this).is(":checked")) {
-						if (finishEmailVerity && finishPhoneVerity) {
-							sessionStorage.setItem("ischecked","ischecked");
-							readClause = true;
-							sessionStorage.readClause="true";
-							$(".toPay").removeAttr("disabled")
-						}else{
-							readClause=true;
-							sessionStorage.readClause="true";
-							$(".toPay").attr("disabled","disabled");
-						}
-					} else {
-						sessionStorage.removeItem("ischecked");
-						readClause = false;
-						sessionStorage.readClause="false";
-						$(".toPay").attr("disabled", "disabled");
-					}
-				})
+        $(".msg span:eq(4)").text(unitPrice_senior);
+        $(".msg span:eq(5)").text(discount * 10);
+        $(".msg span:eq(6)").text(discount * unitPrice_senior);
+
+
+        if (sessionStorage.pay_way) {
+            if (sessionStorage.pay_way == "ali_app") {
+                $(".payment").text("支付宝支付");
+            }
+        }
+        //记录用户上次付款信息
+        if (payway) {
+            if (payway == "ali") {
+                $("#zfb").prop("checked", true);
+                $(".payment").text("支付宝支付");
+                sessionStorage.pay_way = "ali_app"
+            } else if (payway == "wx") {
+                $("#wx").prop("checked", true);
+                $(".payment").text("微信支付");
+                sessionStorage.pay_way = "wx_app"
+            }
+        }
+        //记录用户上次选择的字段包  1标准2高级
+        if (dataspec) {
+            if (dataspec == "1") {
+                $(".choose").children().eq(0).addClass("active");
+                $(".choose").children().eq(1).removeClass("active");
+                dataType = 1;
+            } else if (dataspec == "2") {
+                $(".choose").children().eq(1).addClass("active");
+                $(".choose").children().eq(0).removeClass("active");
+                dataType = 2;
+            }
+            ChangePayMoney();
+        }
+
+        if (sessionStorage.index == "1") {
+            $(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
+            dataType = 2;
+        }
+        ChangePayMoney();
 
-				//数据浏览
-				$(".dataPreview").on("tap",function(){
-					if(previewDataTime<50){
-						previewDataTime++
-						if(regInt.test($(".sendCode").text())){
-							var email_input = $(".email_input").val().replace(/\s*/g, "");
+        //软键盘弹起
+        var oHeight = $(document).height(); //浏览器当前的高度
+        var mainHeight = $(".main").height();
+
+        $(window).resize(function () {
+            if ($(document).height() < oHeight) {
+                $("#bottombox").css("position", "static");
+                $("#pay_order").css("padding-bottom", "0rem");
+            } else {
+                $("#bottombox").css("position", "fixed");
+                $("#pay_order").css("padding-bottom", "2.7rem");
+            }
+        });
+        //	alert(sessionStorage.getItem("send_email_"+userId)!=null)
+        //  	alert(sessionStorage.getItem("send_code_"+userId)!=null)
+        //  	alert(sessionStorage.getItem("send_email_"+userId)==null)
+        //  	alert(localStorage.getItem("new_email_"+userId)!=null)
+        //缓存  1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
+        if ((sessionStorage.getItem("send_email_" + userId) != null) && (sessionStorage.getItem("send_code_" + userId) != null)) {
+            //alert("1")
+            $(".email_check_ok").hide();
+            $(".email_input").parents('div.form-control').siblings().slideDown();
+            $(".email_input").val(sessionStorage.getItem("send_email_" + userId));
+            lstimes = parseInt(sessionStorage.getItem("send_code_" + userId));
+            $(".verity_input").removeAttr("readonly");
+            lstimes = lstimes - Date.parse(new Date()) / 1000 + 60 * 5;
+            if (lstimes > 0) {
+                sendemailTimer(lstimes);
+            }
+            //.getItem("new_email_"+userId)!=null)
+        } else if ((sessionStorage.getItem("send_email_" + userId) == null) && (localStorage.getItem("new_email_" + userId) != null)) {
+            //alert("2")
+            $(".email_check_ok").show();
+            $(".email_input").val(localStorage.getItem("new_email_" + userId));
+            finishEmailVerity = true;
+        } else if (email_lastInput != "") {
+            //alert("~~")
+            $(".email_check_ok").show();
+            $(".email_input").val(email_lastInput);
+            finishEmailVerity = true;
+        } else {
+            $(".email_input").val("");
+        }
+
+        if (email_lastVerity > 0) {
+            sendemailTimer(email_lastVerity);
+        }
+
+        if (sessionStorage.getItem("order_phone" +{{.T._id}}) != null) {
+            if ((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone" +{{.T._id}})))) {
+                $(".phone_check_ok").show();
+                $(".phone_input").val(sessionStorage.getItem("order_phone" +{{.T._id}}));
+                finishPhoneVerity = true;
+            } else {
+                $(".phone_err_msg").show();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+            }
+        } else if (phone_lastInput != "") {
+            $(".phone_check_ok").show();
+            $(".phone_input").val(phone_lastInput);
+            finishPhoneVerity = true;
+        }
+
+        if (readClause && finishPhoneVerity && finishEmailVerity) {
+            $(".toPay").removeAttr("disabled")
+        }
+
+        //缓存判断是否点击我已阅读
+        if ((sessionStorage.readClause == "true") && finishPhoneVerity && finishEmailVerity) {
+            $(".toPay").removeAttr("disabled")
+            readClause = true;
+        }
+        //
+        $('#choose_way').click(function () {
+            $('.pay_way').slideDown('slow')
+            if (sessionStorage.pay_way == "ali_app") {
+                $("#zfb").prop("checked", true);
+                $("#wx").prop("checked", false);
+                pay_way = sessionStorage.pay_way;
+            }
+        })
+        /* 选择支付方式*/
+        $('input:radio[name="way"]').click(function () {
+            var checkValue = $('input:radio[name="way"]:checked').val();
+            if (checkValue == "微信支付") {
+                pay_way = "wx_app";
+            } else {
+                pay_way = "ali_app";
+            }
+            $('.pay_way').hide(200)
+            sessionStorage.pay_way = pay_way;
+            $('.payment').html(checkValue)
+        });
+        $(".cancel").click(function () {
+            $('.pay_way').hide(200)
+        })
+        //数据展示
+        if (sessionStorage.getItem("order_spec" + {{.T._id}}) != null) {
+            dataType = sessionStorage.getItem("order_spec" + {{.T._id}});
+        }
+        if (dataType == 1) {
+            $(".switch-dataType .bz").addClass("active")
+            $(".switch-dataType .gj").removeClass("active")
+        } else {
+            $(".switch-dataType .bz").removeClass("active")
+            $(".switch-dataType .gj").addClass("active")
+        }
+        //
+        $('.choose .choose-item').each(function () {
+            var index = $(this).index();
+            $(this).click(function () {
+                //类型切换
+                $(this).addClass("active").siblings().removeClass("active");
+                if (index == 0) {
+                    dataType = 1;
+                } else if (index == 1) {
+                    dataType = 2;
+                }
+                sessionStorage.index = index;
+                ChangePayMoney();
+            })
+        })
+        $('.tips-icon').on('click', function () {
+            $('#tipDialog').show(200);
+            $('.weui-dialog__btn_primary').click(function () {
+                $('#tipDialog').hide(200);
+            })
+        });
+        //手机号输入监控
+        var Verification = {
+            //手机号验证
+            isPhone: function (value) {
+                return /^[1][3-9][0-9]{9}$/.test(value);
+            }
+        };
+        $(".phone_input").on("input propertychange", function () {
+            var phone_input = $(this).val().replace(/\s*/g, "");
+            if (phone_input.length == 11) {
+                if (Verification.isPhone(phone_input)) {
+                    $.post("/jyapp/front/dataExport/checkPhoneVerify", {
+                        "phone": phone_input
+                    }, function (data) {
+                        if (data.success) {
+                            $(".phone_check_ok").show();
+                            $(".phone_err_msg").hide();
+                            finishPhoneVerity = true;
+                            if (readClause && finishEmailVerity) {
+                                $(".toPay").removeAttr("disabled")
+                            }
+                        } else {
+                            $(".phone_err_msg").show();
+                            $(".phone_check_ok").hide();
+                            finishPhoneVerity = false;
+                            $(".toPay").attr("disabled", "disabled");
+                        }
+                    })
+                } else {
+                    $(".phone_err_msg").show();
+                    $(".phone_check_ok").hide();
+                    finishPhoneVerity = false;
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            } else {
+                $(".phone_err_msg").hide();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+                sessionStorage.removeItem("ischecked");
+            }
+        }).blur(function () {
+            var phone_input = $(this).val().replace(/\s*/g, "");
+            if (phone_input.length != 11 && phone_input.length != 0) {
+                $(".phone_err_msg").show();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+            }
+        });
+        //邮箱输入监控
+        $(".email_input").on("input propertychange", function () {
+            var email_input = $(this).val().replace(/\s*/g, "");
+            if (email_input.indexOf("@") > 0) {
+                if (email_input != email_lastInput) {
+                    $(this).parents('div.form-control').siblings().slideDown();
+                    if (email_lastVerity > 0) {
+                        $("#sendCode").prop("disabled", true);
+                        //返回后验证码可输入  sessionStorage
+                        if ((localStorage.getItem("new_email_" + userId) != null) && (localStorage.getItem("new_email_" + userId) == email_input)) {
+                            $(".verity_input").prop("readonly", false);
+                        } else {
+                            if (email_lastVerity > 0) {
+                                $(".verity_input").removeAttr("readonly");
+                            } else if (lstimes > 0) {
+                                $(".verity_input").removeAttr("readonly");
+                            } else {
+                                $(".verity_input").attr("readonly", true);
+                            }
+                        }
+                    } else { //app杀掉进程的 新用户  ↓
+                        $(".verity_input").prop("readonly", false);
+                        $("#sendCode").prop("disabled", true);
+                    }
+                    finishEmailVerity = false;
+                    $(".toPay").prop("disabled", "disabled");
+                    if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)) {
+                        lstimes_ = parseInt(sessionStorage.getItem("send_code_" + userId));
+                        lstimes_ = lstimes_ - Date.parse(new Date()) / 1000 + 60 * 5;
+                        if (lstimes_ > 0) {
+                            $("#sendCode").prop("disabled", true);
+                        } else {
+                            $("#sendCode").prop("disabled", false);
+                        }
+                        $(".email_err_msg").hide();
+                        $(".email_check_ok").hide();
+                    } else {
+                        $("#sendCode").prop("disabled", true);
+                        $(".email_check_ok").hide();
+                        $(".email_err_msg").hide();
+                    }
+                } else {
+                    finishEmailVerity = true;
+                    if (readClause && finishPhoneVerity) {
+                        $(".toPay").removeAttr("disabled")
+                    }
+                    $("#sendCode").attr("disabled", "disabled");
+                    $(".verity_input").attr("readonly", true);
+                    $(".email_err_msg").hide();
+                    $(".email_check_ok").show();
+                    sessionStorage.removeItem("ischecked");
+                    //验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
+                    localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    sessionStorage.removeItem("send_email_" + userId);
+                    $(this).parents('div.form-control').siblings().slideUp();
+                }
+            } else {
+                $(this).parents('div.form-control').siblings().slideUp();
+                $("#sendCode").attr("disabled", "disabled");
+                $(".verity_input").attr("readonly", true);
+                $(".email_err_msg").hide();
+                $(".email_check_ok").hide();
+            }
+        }).blur(function () {
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email) && ($(".email_input").val().length != 0)) {
+                $(".email_err_msg").show();
+                $(".email_check_ok").hide();
+                return
+            }
+            if ($(".email_input").val() == email) {
+                return;
+            }
+            $("#sendCode").removeAttr("disabled");
+            $(".email_check_ok").hide();
+            $(".email_err_msg").hide();
+        }).on("focus", function () {
+            this.scrollIntoView();
+        });
+        //点击发送验证码-邮箱验证
+        var canVerify = true;
+        $(".sendCode").on("click", function () {
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
+                $(".email_err_msg").show();
+                $(".email_check_ok").hide();
+                return
+            }
+            if (!canVerify) {
+                return
+            }
+            canVerify = false;
+            $.post("/jyapp/front/dataExport/sendMailVerify", {
+                "email": email
+            }, function (data) {
+                canVerify = true;
+                if (data.success) {
+                    if (data.errCode == 4) {
+                        EasyAlert.show(data.errMsg, "", 3000);
+                        finishEmailVerity = true;
+                        $(".email_check_ok").show();
+                        if (readClause && finishPhoneVerity) {
+                            $(".toPay").removeAttr("disabled")
+                        }
+                        $(".email_input").parents('div.form-control').siblings().slideUp();
+                    } else {
+                        $(".toPay").attr("disabled", "disabled");
+                        finishEmailVerity = false;
+                        //发送成功
+                        sendemailTimer(60 * 5);
+                        $(".verity_input").removeAttr("readonly");
+                        ;
+                        $(".sendCode").attr("disabled", "disabled");
+                        $(".email_input").attr("readonly", true);
+                        sessionStorage.setItem("send_code_" + userId, Date.parse(new Date()) / 1000);
+                        //发送验证码后 sessionStorage邮箱
+                        sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    }
+                } else {
+                    EasyAlert.show(data.errMsg, "", 3000)
+                    if (data.errCode == 2) {
+                        sendemailTimer(data.time);
+                        $(".sendCode").attr("disabled", "disabled");
+                        $(".email_input").attr("readonly", true);
+                        //发送验证码后 sessionStorage邮箱
+                        sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    }
+                }
+            }, "json")
+        });
+        //校验验证码
+        $(".verity_input").bind("input propertychange", function () {
+            var verity = $(this).val()
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (verity.length == 6) {
+                $.post("/jyapp/front/dataExport/checkMailVerify", {
+                    "emailVerity": verity,
+                    "email": email
+                }, function (data) {
+                    if (data.success) {
+                        finishEmailVerity = true;
+                        if (readClause && finishPhoneVerity) {
+                            $(".toPay").removeAttr("disabled")
+                        }
+                        $(".email_check_ok").show();
+                        $(".email_err_msg").hide();
+                        $(".verity_input").val("");
+                        $(".verity_input").attr("readonly", true);
+                        $(".email_input").parents('div.form-control').siblings().slideUp();
+                        sessionStorage.setItem("EmailVerity_" +{{.T._id}}, "T");
+                        //验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
+                        localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                        sessionStorage.removeItem("send_email_" + userId);
+                    } else {
+                        EasyAlert.show("验证码错误", "", 3000);
+                    }
+                })
+            } else {
+                $(".email_err_msg").hide();
+            }
+            //防遮挡
+        }).on("focus", function () {
+            var target = this;
+            setTimeout(function () {
+                target.scrollIntoViewIfNeeded();
+            }, 600)
+        })
+
+        //点击阅读条款
+        $(".fixed-bottom-box .weui-check").on("click", function () {
+            if ($(this).is(":checked")) {
+                if (finishEmailVerity && finishPhoneVerity) {
+                    sessionStorage.setItem("ischecked", "ischecked");
+                    readClause = true;
+                    sessionStorage.readClause = "true";
+                    $(".toPay").removeAttr("disabled")
+                } else {
+                    readClause = true;
+                    sessionStorage.readClause = "true";
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            } else {
+                sessionStorage.removeItem("ischecked");
+                readClause = false;
+                sessionStorage.readClause = "false";
+                $(".toPay").attr("disabled", "disabled");
+            }
+        })
+
+        //数据浏览
+        $(".dataPreview").on("tap", function () {
+            if (previewDataTime < 50) {
+                previewDataTime++
+                if (regInt.test($(".sendCode").text())) {
+                    var email_input = $(".email_input").val().replace(/\s*/g, "");
 //							if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
 //								sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
 //							}
-						}
-						if($("#phone_input").val()){
-							sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
-						}
-						if ($(".fixed-bottom-box .weui-check").is(":checked")) {
-							if (finishEmailVerity && finishPhoneVerity) {
-								sessionStorage.setItem("ischecked","ischecked");
-								readClause = true;
-								sessionStorage.readClause="true";
-								$(".toPay").removeAttr("disabled")
-							}else{
-								readClause=true;
-								sessionStorage.readClause="true";
-								$(".toPay").attr("disabled","disabled");
-							}
-						} else {
-							sessionStorage.removeItem("ischecked");
-							readClause = false;
-							sessionStorage.readClause="false";
-							$(".toPay").attr("disabled", "disabled");
-						}
-						sessionStorage.email_lastVerity=email_lastVerity;
-						window.location.href="/jyapp/front/dataExport/previewData/"+{{.T._id}}+"?dataType="+dataType;
-					}else{
-						EasyAlert.show("预览数据次数超出今日上限!","",3000);
-					}
-				})
+                }
+                if ($("#phone_input").val()) {
+                    sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
+                }
+                if ($(".fixed-bottom-box .weui-check").is(":checked")) {
+                    if (finishEmailVerity && finishPhoneVerity) {
+                        sessionStorage.setItem("ischecked", "ischecked");
+                        readClause = true;
+                        sessionStorage.readClause = "true";
+                        $(".toPay").removeAttr("disabled")
+                    } else {
+                        readClause = true;
+                        sessionStorage.readClause = "true";
+                        $(".toPay").attr("disabled", "disabled");
+                    }
+                } else {
+                    sessionStorage.removeItem("ischecked");
+                    readClause = false;
+                    sessionStorage.readClause = "false";
+                    $(".toPay").attr("disabled", "disabled");
+                }
+                sessionStorage.email_lastVerity = email_lastVerity;
+                window.location.href = "/jyapp/front/dataExport/previewData/"+{{.T._id}}+
+                "?dataType=" + dataType;
+            } else {
+                EasyAlert.show("预览数据次数超出今日上限!", "", 3000);
+            }
+        })
 
-				//确认支付
-				$(".toPay").on("click", function() {
-					if (!finishEmailVerity || !readClause || !canpay || !finishPhoneVerity) {
-						return
-					}
-					$(".loading_").show();
-					canpay = false;
-					var param = {};
-					param.pay_way = pay_way;
-					if (sessionStorage.pay_way){
-						param.pay_way=sessionStorage.pay_way;
-						pay_way=sessionStorage.pay_way;
-					}
-					param.data_spec = dataType == 2 ? "senior" : "standard";
-					param.id = {{.T._id}}
-					param.sourcePage = "weixin"
-					//先去创建预支付订单
-					/*-----------------*/
-					$.post("/jypay/dataExport/app/createOrder", param, function(data) {
-						if (data.success) {
-							localStorage.setItem("new_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							try {
-				                if(pay_way=="wx_app"){
-				                	localStorage.setItem({{.T._id}},"wx");
-				                  	JyObj.wxPay(data.data);
-				                }else{
-				                	localStorage.setItem({{.T._id}},"ali");
-				                  	JyObj.aliPay(data.data);
-				                }
-				                checkPaySuccess(data.order);
-							} catch (e) {
-								alert(e);
-							}
-						}
-			            $(".loading_").hide();
-			            canpay = true;
-					})
-				})
+        //确认支付
+        $(".toPay").on("click", function () {
+            if (!finishEmailVerity || !readClause || !canpay || !finishPhoneVerity) {
+                return
+            }
+            $(".loading_").show();
+            canpay = false;
+            var param = {};
+            param.pay_way = pay_way;
+            if (sessionStorage.pay_way) {
+                param.pay_way = sessionStorage.pay_way;
+                pay_way = sessionStorage.pay_way;
+            }
+            param.data_spec = dataType == 2 ? "senior" : "standard";
+            param.id = {{.T._id}}
+                param.sourcePage = "weixin"
+            //先去创建预支付订单
+            /*-----------------*/
+            $.post("/jypay/dataExport/app/createOrder", param, function (data) {
+                if (data.success) {
+                    localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    try {
+                        if (pay_way == "wx_app") {
+                            localStorage.setItem({{.T._id}}, "wx");
+                            JyObj.wxPay(data.data);
+                        } else {
+                            localStorage.setItem({{.T._id}}, "ali");
+                            JyObj.aliPay(data.data);
+                        }
+                        checkPaySuccess(data.order);
+                    } catch (e) {
+                        alert(e);
+                    }
+                }
+                $(".loading_").hide();
+                canpay = true;
+            })
+        })
         var interval
+
         //支付完成跳转
-        function checkPaySuccess(orderCode){
-          if(interval){
-            clearInterval(interval);
-          }
-         interval=setInterval(function() {
-            $.post("/jypay/isPaySuccess", {
-							code: orderCode
-						}, function(r) {
-								if (r.success) {
-						            //清除我已阅读缓存
-							    sessionStorage.removeItem("readClause");
-								  sessionStorage.removeItem("index");
-									sessionStorage.removeItem("pay_way");
-									sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
-									sessionStorage.removeItem("ischecked");
-									clearInterval(interval);
-									setTimeout(function(){
-										window.location.replace("/jyapp/front/dataExport/paySuccessPage?code=" + r.orderCode+"&email="+r.email+"&payTime="+r.payTime+"&pay_way="+r.pay_way);
-									},500)
-								}
-							})
-         },1000)
+        function checkPaySuccess(orderCode) {
+            if (interval) {
+                clearInterval(interval);
+            }
+            interval = setInterval(function () {
+                $.post("/jypay/isPaySuccess", {
+                    code: orderCode
+                }, function (r) {
+                    if (r.success) {
+                        //清除我已阅读缓存
+                        sessionStorage.removeItem("readClause");
+                        sessionStorage.removeItem("index");
+                        sessionStorage.removeItem("pay_way");
+                        sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
+                        sessionStorage.removeItem("ischecked");
+                        clearInterval(interval);
+                        setTimeout(function () {
+                            window.location.replace("/jyapp/front/dataExport/paySuccessPage?code=" + r.orderCode + "&email=" + r.email + "&payTime=" + r.payTime + "&pay_way=" + r.pay_way);
+                        }, 500)
+                    }
+                })
+            }, 1000)
         }
-			})
-			//倒计时
-			function sendemailTimer(t) {
-				$(".sendCode").text("" + t + "s");
-				$(".sendCode").attr("disabled", "disabled");
-				r = setInterval(function() {
-					t--;
-					$(".sendCode").text("" + t + "s")
-					if (t <= 0) {
-						clearInterval(r)
-						$(".sendCode").text("发送验证码");
-						if (!finishEmailVerity) {
-							$(".verity_input").attr("readonly", true);
-							$(".sendCode").removeAttr("disabled");
-							$(".email_input").removeAttr("readonly");
-							$(".sendCode").css("color", "#2CB7CA");
-						}
-					}
-				}, 1000)
-			}
-			//提示框
-			var EasyAlert = {
-				timeout: null,
-				waitTime: 1000,
-				show: function(text, css, waitTime) {
-					if (this.timeout != null) {
-						clearTimeout(this.timeout);
-						this.hide();
-						this.timeout = null;
-					}
-					var thisClass = this;
-					this.timeout = setTimeout(function() {
-						thisClass.hide();
-						thisClass.timeout = null;
-					}, waitTime ? waitTime : this.waitTime);
-					$("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
-					$("#easyAlert").css({
-						"left": "50%",
-						"margin-top": -($("#easyAlert").outerHeight() / 2),
-						"margin-left": -($("#easyAlert").outerWidth() / 2)
-					}).show();
-				},
-				hide: function() {
-					$("#easyAlert").remove();
-				}
-			}
-			//
-            function showToast (content) {
-              EasyAlert.show(content,"",3000);
+    })
+
+    //倒计时
+    function sendemailTimer(t) {
+        $(".sendCode").text("" + t + "s");
+        $(".sendCode").attr("disabled", "disabled");
+        r = setInterval(function () {
+            t--;
+            $(".sendCode").text("" + t + "s")
+            if (t <= 0) {
+                clearInterval(r)
+                $(".sendCode").text("发送验证码");
+                if (!finishEmailVerity) {
+                    $(".verity_input").attr("readonly", true);
+                    $(".sendCode").removeAttr("disabled");
+                    $(".email_input").removeAttr("readonly");
+                    $(".sendCode").css("color", "#2CB7CA");
+                }
             }
-		</script>
+        }, 1000)
+    }
+
+    //提示框
+    var EasyAlert = {
+        timeout: null,
+        waitTime: 1000,
+        show: function (text, css, waitTime) {
+            if (this.timeout != null) {
+                clearTimeout(this.timeout);
+                this.hide();
+                this.timeout = null;
+            }
+            var thisClass = this;
+            this.timeout = setTimeout(function () {
+                thisClass.hide();
+                thisClass.timeout = null;
+            }, waitTime ? waitTime : this.waitTime);
+            $("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
+            $("#easyAlert").css({
+                "left": "50%",
+                "margin-top": -($("#easyAlert").outerHeight() / 2),
+                "margin-left": -($("#easyAlert").outerWidth() / 2)
+            }).show();
+        },
+        hide: function () {
+            $("#easyAlert").remove();
+        }
+    }
+
+    //
+    function showToast(content) {
+        EasyAlert.show(content, "", 3000);
+    }
+</script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}
-	</body>
+</body>
 </html>

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/login.html

@@ -285,7 +285,7 @@
 		}
 		function loginByWeixinCallBack222(){
 			//var wxSign = "D00THAAVRlVFXBkKUlRUQQMHBwFGWUNXSVZdQFRbHQtSVEcbUWhUdEQFEwsjTHliRFswBAcIXBFVZAVXPyZITElWQFlVF05NQVlUTQUGV1RMDkgPVRAHVVIBEU1cTBYdVV4TD1YNEl5VEVcBVABFWhILBBcHVgkEElkRWlxCBVQAABBbRExJVkZJQVBWVUAT";
-			var wxSign="D00THAAVRlVFXBkKUlRUQQUABAdFXkZaSVZdQFRbHQtSVEdWHhJERhEdGQpHThAFUlASXEZaABELBgVTQFxHXwYXBVICVkdNXEwXHVYSCxdFWkZdXUMCBgkGTFpFX1VBAgEFDExXR0xJVkFZVltWVVJXVhYHVQACRVcRVwcRA1QIVEVfE1ZURwcFAQEXDBFWB1YeEkVMBApSVFUJ";
+			var wxSign="D00THAAVRlVFXBkKUlRUQQUEAAZFV0FYSVZdQFRbHQtSVEdWHhJERhEdGQpHThAFVVRMXhJZBxELBgVTQF5HCgZEAAgIVkBNXEwXHVYSCxdbBgNZJD0EYVtSIg5HRTUuBnJ8cBMLX10IPHloVmEzOxNaXBsBc1kaOw4nLSMfSmV0UwU9IF01PUBmXwNCBAcMR1gQQ1hSGk1KTF0WClFSVxAMFV4GF1AAAFcXDUALUEdWCQcCQg5CXAcSEBwTQQ0fFUxfRk8=";
       		$.ajax({
 				url: "/jyapp/free/login",
 				type: "post",

+ 27 - 16
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>
@@ -466,15 +466,16 @@
                         $(dom).addClass('active').attr('disabled', !canClick).parents().siblings('.tab')
                             .addClass('selected').children('.province').children('.checkbox').attr({
                             "checked": true
-                        })
+                        }).addClass('half');
                     }
                 })
             })
         },
-        getResult: function (changeCity) {   /* 选中结果 */
+        getResult: function (changeCity, isFirst) {   /* 选中结果 */
             //如果选中所有,则转为全国
             if ($(".city").length == $(".city.active").length) {
                 $(".checkbox.other").trigger("click");
+                $(".checkbox").removeClass("half");
                 return
             }
             var tmpSelect = {};
@@ -573,10 +574,10 @@
             //提示
             if (!this.vipSubisTrial) {
                 if (selectCityMax > 2) {
-                    $('.tips_btn .tips_d_text').text("已选择" + selectCityMax + "个市,建议购买“全省”更划算哦~").slideDown();
+                    $('.tips_btn .tips_d_text').text("已选择" + selectCityMax + "个市,建议购买“全省”").slideDown();
                 } else {
-                    if (selectProvince > 9) {
-                        $('.tips_btn .tips_d_text').text("已选择" + selectProvince + "个省,建议购买“全国”更划算哦~").slideDown()
+                    if (selectProvince > 9 && !isFirst) {
+                        $('.tips_btn .tips_d_text').text("已选择" + selectProvince + "个省,建议购买“全国”").slideDown()
                     } else {
                         $(".tips_d_text").slideUp();
                     }
@@ -614,7 +615,7 @@
         isOpen: function () {
             let pHeight = $('.result_text').height();
             let minHeight = $('.result_text').css('min-height');
-            let    rows = Math.round(Math.round(pHeight) / parseFloat(minHeight));
+            let rows = Math.round(Math.round(pHeight) / parseFloat(minHeight));
             console.log("高度:" + pHeight, "最小高度" + minHeight, "行数:" + rows);
             $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             if (rows == 1) {
@@ -680,12 +681,19 @@
                     $(".province input").prop('checked', false);
                     $(".city").removeClass('active');
                     $(this).prop('checked', true);
+                    $(".checkbox").removeClass("half");
                 } else {
                     $(".checkbox.other").prop('checked', false);
-                    if ($(this).is(':checked') == false) {
-                        $(this).parent().parent().siblings('.tab_content').children('.city').removeClass('active');
-                        if ($(".province .checkbox:checked").length == 0) {//若没有省份被选中 则选中全国
-                            $(".checkbox.other").prop('checked', true);
+                    if (!$(this).is(':checked')) {
+                        if ($(this).hasClass("half")) {//判断当前是否是半选
+                            $(this).prop("checked", true).removeClass("half");
+                            $(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");
+                            }
                         }
                     } else {
                         $(this).parent().parent().siblings('.tab_content').children('.city').addClass('active');
@@ -703,14 +711,17 @@
                     var input = $(this).parents('li').find('input.checkbox')
                     window.input = input
                     input.prop('checked', true)
-                    AreaChoose.isAllSelected()
-                    AreaChoose.getResult()
+                    if (isActive != $(this).parent().find('.city').length) {//是否全选
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').addClass('half');
+                    } else {
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').removeClass('half');
+                    }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
                         'checked', false)
-                    AreaChoose.isAllSelected()
-                    AreaChoose.getResult()
                 }
+                AreaChoose.isAllSelected()
+                AreaChoose.getResult($(this).parent('div').siblings('.tab').find('.province').text()) //出入选择的省份
             })
 
             $('.other').on('change', function () { //选择全国
@@ -764,7 +775,7 @@
         //AreaChoose.getNationwide();//默认选中全国
         AreaChoose.showSelected(true);//回显已选择
         /* 判断已购买的城市 在不在 全部城市里面,在,将按钮置灰,不可点击 */
-        AreaChoose.getResult();
+        AreaChoose.getResult("", true);
         AreaChoose.inintClick();
     })
 </script>

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

@@ -216,6 +216,8 @@
         <div class="slide">
             <a href="javascript:;">#</a>
             <a href="javascript:;">A</a>
+            <a href="javascript:;">A</a>
+            <a href="javascript:;">A</a>
             <a href="javascript:;">B</a>
             <a href="javascript:;">C</a>
             <a href="javascript:;">D</a>
@@ -240,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>
@@ -276,7 +278,7 @@
         industryItemContainer.html(buttonArr.join(''))
     }
 
-    function findSelectedIndustry() {
+    function findSelectedIndustry(notShowTip) {
         var buttons = $('.select-area-box .list button');
         // 找到已选择的数组(有active类的数组)
         var selectedArr = [];
@@ -289,8 +291,8 @@
         });
 
         // 显示隐藏优惠tips
-        if (selectedArr.length >= 4 && !vipSubisTrial) {
-            $('.tips_btn .tips_d_text').text("已选择" + selectedArr.length + "个行业,建议购买“全部行业”更划算哦~").slideDown()
+        if (selectedArr.length >= 4 && !vipSubisTrial && !notShowTip) {
+            $('.tips_btn .tips_d_text').text("已选择" + selectedArr.length + "个行业,建议购买“全部行业”").slideDown()
         } else {
             $('.tips_btn .tips_d_text').slideUp()
         }
@@ -316,8 +318,6 @@
             // 除全部行业外所有按钮都被选中了
             $('#all button').trigger('click');
         }
-        //调整高度
-        $(".select-area-box .list").css("margin-top", $(".result").height() + 20);
     }
 
     function showSelect(arr, canclick) {
@@ -373,7 +373,7 @@
     });
 
     var selectedIndustryArr = ["一个行业"]; //已选择行业
-    var selectedAreaObj = {"一个省": ["一个市"]} ;//计算价格临时变量
+    var selectedAreaObj = {"一个省": ["一个市"]};//计算价格临时变量
     var timeSelect = [1, 2];//计算价格临时变量 timeSelect[0]时长  timeSelect[1] 1:年 2:月
     var vipSubisTrial = false;
     $(function () {
@@ -394,7 +394,7 @@
         }
         //已选择
         showSelect(selectedIndustryArr, true);
-        findSelectedIndustry();
+        findSelectedIndustry(true);
     })
 </script>
 </body>

+ 61 - 4
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry_upgrade.html

@@ -292,10 +292,45 @@
                         }
                     }
                 })
-                
+                if(selectedArr.length > 0){
+                	let adds = selectedArr.length+buyIndustryLen
+                	if(buyset !== "全部行业"){
+                		if(adds <= buyset){
+	                		$(".addUpgrade").hide();
+		            		buyLen = adds;
+		            		$(".buyset").text("已购买:"+buyLen+"/"+buyset+"个行业");
+		            		$(".tips_btn .btns .save-btn").attr("disabled","disabled");
+							$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
+		            	}else{
+		            		let add = adds - buyset;
+		            		$(".addUpgrade").text("已新增:"+add+"个行业");
+		            		$(".addUpgrade").show();
+		            		$(".tips_btn .btns .save-btn").removeAttr("disabled");
+							$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+		            	}
+                	}else{
+                		let adds = buyIndustry.length + selectedArr.length
+                		$(".buyset").text("已购买:"+adds+"/"+buyset);
+                	}
+                }else{
+                	if(buyset !== "全部行业"){
+                		$(".buyset").text("已购买:"+buyIndustryLen+"/"+buyset+"个行业")
+                	}else{
+                		$(".buyset").text("已购买:"+buyIndustryLen+"/"+buyset)
+                	}
+                }
+                for(var i in selectedArr){
+                	if(selectedArr[i] === "全部行业"){
+                		$(".buyset").text("已购买:"+buyIndustry.length+"/"+buyset+"个行业");
+                		$(".addUpgrade").text("已新增:全部行业");
+                		$(".addUpgrade").show();
+                		$(".tips_btn .btns .save-btn").removeAttr("disabled");
+						$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+                	}
+                }
                 // 显示隐藏优惠tips
                 if (selectedArr.length >= 4 && !vipSubisTrial) {
-                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”更划算哦~");
+                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()
@@ -310,6 +345,7 @@
 //                  var allButton = $('#all button')
 //                  allButton.trigger('click')
 //                  $('.result .result_name').text(allButton.text())
+					$(".addUpgrade").hide();
 					$(".tips_btn .btns .save-btn").attr("disabled","disabled");
 					$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
                 }
@@ -359,7 +395,6 @@
             
             // 每个button的点击事件
             $('.select-area-box .list').on('click', 'button', function (e) {
-                $('.tips_btn .btns button').removeAttr('disabled')
 
                 $(this).toggleClass('active')
                 // 如果点击全部行业,则其他所有按钮都取消active
@@ -389,7 +424,16 @@
 
              // 确认按钮事件
             $('.save-btn').on('click', function () {
-                console.log(selectedIndustryArr)
+            	var selectedIndustrysArr = ["全部行业"];
+        		if(selectedIndustryArr[0] !== "全部行业"){
+        			let reduce = buyset - buyIndustry.length
+        			if(reduce > 0){
+        				selectedIndustrysArr = selectedIndustryArr.slice(0, -reduce);
+        			}else{
+        				selectedIndustrysArr = selectedIndustryArr;
+        			}
+        		}
+        		sessionStorage.setItem("vipSubSelectIndustryAdd",JSON.stringify(selectedIndustrysArr));
                 sessionStorage.setItem("vipSubSelectIndustryUpgrade",JSON.stringify(selectedIndustryArr));
                 history.go(-1);
             })
@@ -399,6 +443,9 @@
             var timeSelect = [1,2]//计算价格临时变量 timeSelect[0]时长  timeSelect[1] 1:年 2:月
             var vipSubisTrial = false;
             var buyIndustry = "";//已购买
+            var buyIndustryLen = 0;
+            var buyset = "";
+            var buyLen = 0;
             $(function(){
               try{
                 if(sessionStorage.getItem("vipSubSelectIndustryUpgrade")){
@@ -416,6 +463,16 @@
                 $DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
                 	if(data){
 		            	buyIndustry = data.buyerclass;
+		            	buyLen = buyIndustry.length
+		            	buyIndustryLen = buyIndustry.length;
+		            	buyset = Number(data.buyset.buyerclasscount);
+		            	console.log(buyset)
+		            	if(buyset === -1){
+		            		buyset = "全部行业";
+		            		$(".buyset").text("已购买:"+buyLen+"/"+buyset);
+		            	}else{
+		            		$(".buyset").text("已购买:"+buyLen+"/"+buyset+"个行业");
+		            	}
                 	}
                 },false);
                 if(checkObj(buyIndustry)){

+ 405 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/edit_city_new.html

@@ -0,0 +1,405 @@
+<!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/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/public.css"> -->
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/choose_area_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>
+        html, body {
+            height: 100%;
+        }
+
+        .checkbox[disabled] {
+            background: none no-repeat center center #E0E0E0 !important;
+        }
+    </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">
+        <!--<p class="all_area" style="display: none;"> 可选择全部区域</p>-->
+        <p class="optional_count"> 可选择省数量:<em class="count"></em> / <span class="total"></span></p>
+        <!--<div class="result">
+            <p>已选择:<span class="result_name"></span></p>
+        </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>
+</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/editArea.js?v={{Msg "seo" "version"}}"></script>
+<script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+</body>
+
+</html>

+ 130 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe.html

@@ -0,0 +1,130 @@
+<!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>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/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/vip_subscribe_edit.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_subscribe_edit">
+        <div class="edit_content">
+            <!-- 购买的全国则不显示可修改区域 -->
+            <div class="title"></div>
+            <a data_href="/jyapp/vipsubscribe/toEditSubAreaPage" class="edit_item area">
+                <div class="item_top">
+                    <span>区域</span>
+                    <div class="item_bottom"></div>
+                    <i class="iconfont icon-arrow"></i>
+                </div>
+            </a>
+            <!-- 购买的全行业则不显示可修改行业 -->
+            <div class="title"></div>
+            <a data_href="/jyapp/vipsubscribe/toEditSubInduPage" class="edit_item industry">
+                <div class="item_top">
+                    <span>行业</span>
+                    <div class="item_bottom"></div>
+                    <i class="iconfont icon-arrow"></i>
+                </div>
+            </a>
+        </div>
+        <!--
+         <div class="edit_tips">
+             <div class="edit_count">总共可修改次数:<em>3</em> / 3</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();
+        }
+    });
+    var EditSub = {
+        reqData: {},
+        init: function () {
+            this.getData();
+            this.showData();//初始化页面展示
+            this.initClick();//初始化点击事件
+        },
+        getData: function () {
+            //加载数据
+            $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
+                if (r.success) {
+                    EditSub.reqData = r.data;
+                }
+            }, false)
+        },
+        showData: function () {
+            //判断是否可编辑
+            if (this.reqData.buyset.areacount === -1) { //显示编辑全国
+                $(".edit_item.area .item_bottom").text("已购买全国");
+            } else {
+                //展示已选择省份 和 城市
+                let cityCount = 0;
+                if (!$.isEmptyObject(this.reqData.buyset.citys)) { //显示编辑市
+                    for (var i in this.reqData.buyset.citys) {
+                        cityCount += this.reqData.buyset.citys[i]
+                    }
+                    $(".city").css("display", "");
+                    $(".edit_item.city span").text(cityCount + "个市");
+                }
+                let descText = "";
+                if (this.reqData.buyset.areacount > 0) {
+                    descText = "已购买" + this.reqData.buyset.areacount + "个省级区域"
+                }
+                if (cityCount > 0) {
+                    if (this.reqData.buyset.areacount > 0) {
+                        descText += "、"
+                    }
+                    descText += cityCount + "个地级市"
+                }
+                $(".edit_item.area .item_bottom").text(descText);
+            }
+
+            //行业展示                 
+            if (this.reqData.buyset.buyerclasscount === -1) {
+                $(".edit_item.industry .item_bottom").text("已购买全行业");
+            } else {
+                $(".edit_item.industry .item_bottom").text("已购买" + this.reqData.buyset.buyerclasscount + "个行业");
+            }
+
+        },
+        initClick: function () {
+            $(".edit_item").on("click", function () {
+                window.location.href = $(this).attr("data_href");
+            });
+            //提交
+        },
+        showTip: function (msg) {
+            weui.toast(msg, {
+                duration: 2000,
+                className: 'custom-toast',
+            });
+        }
+    };
+    $(function () {
+        EditSub.init();
+    });
+</script>
+</body>
+</html>

+ 415 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe_industry.html

@@ -0,0 +1,415 @@
+<!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" href="/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <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/choose_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"}}"/>
+</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">
+        <p class="optional_count" style="background: rgba(245,244,249,1);"> 可选择行业数量: <em class="count"></em> / <span
+                    class="total"></span></p>
+        <!--<div class="result" style="display: block;">
+            <span class="label">已选择:</span>
+            <span class="result_name">全部行业</span>
+        </div>-->
+        <div class="form">
+            <div class="select-area-box">
+                <ul class="list">
+                    <li class="list_item" id="all" style="display:none">
+                        <div class="item_label"></div>
+                        <div class="item_industry_list">
+                            <button class="industry_item">全部行业</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>
+                        </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:;">F</a>
+            <a href="javascript:;">G</a>
+            <a href="javascript:;">H</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:;">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:;">W</a>
+            <a href="javascript:;">X</a>
+            <a href="javascript:;">Y</a>
+            <a href="javascript:;">Z</a>
+        </div>
+        <!-- <div class="bottom_button">
+            <button class="reset-btn left_btn" disabled>重置</button>
+            <button class="save-btn right_btn" disabled>确认</button>
+        </div> -->
+        <div class="tips_btn">
+            <div class="btns">
+                <button class="reset-btn" id="cancel">取消</button>
+                <button disabled class="save-btn" id="enter">确认修改</button>
+            </div>
+        </div>
+    </main>
+</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>
+    //加载数据
+    var EditIndustry = {
+        reqData: {},
+        selectlast: [],
+        init: function () {
+            this.getData();
+            this.showData();//初始化页面展示
+            this.initClick();//初始化点击事件
+        },
+        getData: function () {
+            //加载数据
+            $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
+                if (r.success) {
+                    EditIndustry.reqData = r.data;
+                }
+            }, false)
+            if (this.reqData.industry.length == 0 && this.reqData.buyset.buyerclasscount == -1) {
+                this.reqData.industry = ["全部行业"]
+            }
+        },
+        showData: function () {
+            this.selectlast = this.reqData.industry;
+
+            //$('.result .result_name').html(this.reqData.industry.join('、'));
+
+            $('.industry_item').each(function () {
+                let text = $(this).text();
+                EditIndustry.reqData.industry.forEach(v => {
+                    if (v.trim() == text.trim()) {
+                        $(this).addClass('active')
+                    }
+                })
+            });
+
+            if (this.reqData.buyset.buyerclasscount != -1) { //非全部行业 展示数量
+                $('.total').html(this.reqData.buyset.buyerclasscount);
+                $('.count').html(this.reqData.industry.length);
+                if (this.reqData.industry.length >= this.reqData.buyset[2]) {
+                    $('.industry_item:not(.active)').attr('disabled', true);
+                }
+            } else {
+                $("#all").css("display", "");
+                $(".optional_count").css("display", "none");
+            }
+            EditIndustry.findSelectedIndustry(true);
+        },
+        initClick: function () {
+            // 点击导航跳转
+            $("body").on('click', '.slide a', function () {
+                var s = $(this).html()
+                if (s == '#') {
+                    return;
+                }
+                document.querySelector('#' + s).scrollIntoView({block: 'center'});
+            })
+            // 每个button的点击事件
+            $('.select-area-box .list').on('click', 'button', function (e) {
+                if ($(this).text() == "全部行业") {
+                    if ($(this).hasClass('active')) {
+                        return
+                    }
+                    if (EditIndustry.reqData.buyset.buyerclasscount != -1) { //购买不是全部行业 不能点击
+                        EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                        return
+                    }
+                    $('.select-area-box .list button').removeClass('active');
+                    $('#all button').addClass('active');
+                    $('#enter').removeAttr('disabled');
+                } else {
+                    $(this).toggleClass('active')
+                    if ($(".industry_item.active").length == 0) {//如果没有行业被选中 则选中全部行业
+                        if (EditIndustry.reqData.buyset.buyerclasscount == -1) {
+                            $('#all button').addClass('active');
+                        } else {
+                            $('#enter').attr('disabled', 'disabled');//选择空不能提交
+                        }
+                    } else {
+                        $('#all button').removeClass('active');
+                        $('#enter').removeAttr('disabled');
+                    }
+                }
+
+                EditIndustry.findSelectedIndustry(false);
+            })
+            // 取消按钮事件 返回上一页
+            $('#cancel').click(function () {
+                window.history.go(-1);
+            })
+            // 确定修改事件
+            $('#enter').click(function () {
+                $("#enter").attr("disabled", "disabled");
+                //更新对象
+                if (EditIndustry.reqData.buyset.buyerclasscount == -1 && EditIndustry.reqData.industry[0] == "全部行业") {
+                    EditIndustry.reqData.industry = [];
+                }
+                console.log("final select ", EditIndustry.reqData)
+                $DoPost("/subscribepay/editSub/submit", {
+                    "type": "industry",
+                    "value": JSON.stringify(EditIndustry.reqData.industry)
+                }, function (r) {
+                    if (r.success) {
+                        window.location.replace('/jyapp/vipsubscribe/submitEditSubFinish');
+                    }
+                }, false)
+                $("#enter").removeAttr("disabled");
+            })
+        },
+        showTip: function (msg) {
+            weui.toast(msg, {
+                duration: 2000,
+                className: 'custom-toast',
+            });
+        },
+        findSelectedIndustry: function (isInit) {
+            var buttons = $('.select-area-box .list button')
+            // 找到已选择的数组(有active类的数组)
+            var selectedArr = []
+            buttons.each(function () {
+                if ($(this).hasClass('active')) {
+                    selectedArr.push($(this).text())
+                }
+            })
+            if (selectedArr.length == $('.select-area-box .list button').length - 1) {//选中了全部行业
+                $('#all button').trigger('click');
+                return
+            }
+            var selectCount = selectedArr.length
+            $('.count').html(selectCount);
+            // 显示隐藏优惠tips
+            if (selectedArr.length >= EditIndustry.reqData.buyset.buyerclasscount && EditIndustry.reqData.buyset.buyerclasscount != -1) {
+                if (!isInit) {
+                    EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                }
+                $('.industry_item:not(.active)').attr('disabled', 'disabled');
+            } else {
+                $('.industry_item:not(.active)').removeAttr('disabled')
+            }
+            this.reqData.industry = selectedArr;
+            var selectedStr = selectedArr.join('、')
+            //$('.result .result_name').text(selectedStr)
+            if (this.noChange(this.reqData.industry, EditIndustry.selectlast) || this.reqData.industry.length == 0) {
+                $('#enter').attr('disabled', 'disabled');
+            } else {
+                $('#enter').removeAttr('disabled');
+            }
+        },
+        noChange: function (arr1, arr2) {
+            return JSON.stringify(arr1.sort()) === JSON.stringify(arr2.sort());
+        }
+    }
+    $(function () {
+        EditIndustry.init();
+    })
+
+</script>
+</body>
+</html>

+ 70 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe_success.html

@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>VIP订阅修改</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/public.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/vipsubscribe/css/edit_success.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="edit_success">
+        <div><i class="icon iconfont success">&#xe612;</i></div>
+        <p>修改成功</p>
+        <button class="public_btn" id="back">返回<em class="time"></em></button>
+    </div>
+</div>
+<script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+<script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
+<script>
+
+    $(function () {
+//              timer($('.time'),()=>{
+//                  window.history.go(-1); 
+//              })
+        countDown();
+        $('#back').click(function () {
+            window.history.go(-1);
+        })
+    })
+    var time = 3;
+
+    function countDown() {
+        if (time == 0) {
+            $('.time').html('');
+            window.history.go(-1);
+        } else {
+            $('.time').html('(' + time + ')');
+            time--;
+            setTimeout(() => {
+                countDown()
+            }, 1000)
+        }
+    }
+
+    function timer(obj, callback) {
+        let t = 3;
+        let timer = setInterval(() => {
+            t--;
+            obj.html(t)
+            if (t == 1) {
+                callback()
+            }
+        }, 1000);
+    }
+</script>
+</body>
+</html>

+ 37 - 24
src/jfw/modules/app/src/web/templates/vipsubscribe/renew_notice.html

@@ -53,8 +53,9 @@
                 </div>
             </div>
 			<div class="renew_box">
-                <button style="display: none;" class="renew_service" onclick="window.location.href='/jyapp/vipsubscribe/renewPayPage'">续费</button>
-                <button style="display: none;" class="free_service" onclick="window.location.href='/jyapp/swordfish/historypush'">使用免费订阅</button>
+                <button style="display: none;" class="renew_service" onclick="window.location.href='/weixin/pay/renewPayPage'">续费</button>
+                <button style="display: none;" class="aginBuy" onclick="window.location.href='/weixin/pay/vipsubscribe_willExpire'">再次购买</button>
+                <button style="display: none;" class="free_service" onclick="window.location.href='/swordfish/historypush'">使用免费订阅</button>
             </div>
 		</div>
 		</div>
@@ -79,39 +80,44 @@
 						var buyerclass = r.buyerclass
 						var exprie = {{.T.exprie}};
 						var vipStatus = Number(r.vipStatus);
-						var areaArr = [];
-					    var areaHtml = "";
+						var areaHtml = "";
+					    var provinceArr = [];
+					    var cityArr = [];
 					    var buyerclassArr = [];
 					    var buyerclassHtml = "";
 					    var endstime = new Date(ends).getTime();
 						if (area !== "" && area !== undefined){
 					    	for(var province in area){
 					    		var citys = area[province]
-			//		    		console.log(citys);
+				//	    		console.log(citys);
 					    		if(citys.length===0){
-					    			areaArr.push(province);
+					    			provinceArr.push(province);
 					    		}else{
 					    			for(var i in citys){
-					    				areaArr.push(citys[i]);
+					    				var city = citys[i];
+					    				cityArr.push(city);
 					    			}
 					    		}
 					    	}
-					    	areaHtml = areaArr.toString().replace(/,/g, "、");
-					    	if(checkObj(area)){
+					    	var provinceLen = provinceArr.length;
+					 		var cityLen = cityArr.length;
+					    	areaHtml = provinceLen+"个省级区域、"+cityLen+"个市";
+					    	
+							if(checkObj(area)){
 								areaHtml = "全国";
 							}
-					    	$('.area-list').text(areaHtml);
+					    	$(".area-list").text(areaHtml);
 					    }
 					    if(buyerclass !== "" && buyerclass !== undefined){
 					    	for(var i in buyerclass){
 					    		var industry = buyerclass[i];
 					    		buyerclassArr.push(industry);
+					    		buyerclassHtml = buyerclassArr.length+"个行业";
 					    	}
-					    	buyerclassHtml = buyerclassArr.toString().replace(/,/g, "、");
 					    	if(checkObj(buyerclass)){
 					    		buyerclassHtml = "全行业";
 					    	}
-							$('.industry-list').text(buyerclassHtml);
+					    	$('.industry-list').text(buyerclassHtml);
 					    }
 					    if(starts !== "" && ends !== ""){
 					    	let start = starts.toString().replace(/-/g, ".");
@@ -132,8 +138,9 @@
 						    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
 					    	}
 					    }else{
-					    	$(".renew_service").show();
-					    	$(".free_service").show();
+//					    	$(".renew_service").show();
+					    	$(".aginBuy").show();
+					  	  	$(".free_service").show();
 					    }
 					}
 				});
@@ -147,8 +154,9 @@
 					    var exprie = {{.T.exprie}};
 					    var vipStatus = Number(data.vipStatus);
 					    //
-					    var areaArr = [];
 					    var areaHtml = "";
+					    var provinceArr = [];
+					    var cityArr = [];
 					    var buyerclassArr = [];
 					    var buyerclassHtml = "";
 				//	    var dateName = "";
@@ -156,31 +164,35 @@
 					    if (area !== "" && area !== undefined){
 					    	for(var province in area){
 					    		var citys = area[province]
-			//		    		console.log(citys);
+				//	    		console.log(citys);
 					    		if(citys.length===0){
-					    			areaArr.push(province);
+					    			provinceArr.push(province);
 					    		}else{
 					    			for(var i in citys){
-					    				areaArr.push(citys[i]);
+					    				var city = citys[i];
+					    				cityArr.push(city);
 					    			}
 					    		}
 					    	}
-					    	areaHtml = areaArr.toString().replace(/,/g, "、");
-					    	if(checkObj(area)){
+					    	var provinceLen = provinceArr.length;
+					 		var cityLen = cityArr.length;
+					    	areaHtml = provinceLen+"个省级区域、"+cityLen+"个市";
+					    	
+							if(checkObj(area)){
 								areaHtml = "全国";
 							}
-					    	$('.area-list').text(areaHtml);
+					    	$(".area-list").text(areaHtml);
 					    }
 					    if(buyerclass !== "" && buyerclass !== undefined){
 					    	for(var i in buyerclass){
 					    		var industry = buyerclass[i];
 					    		buyerclassArr.push(industry);
+					    		buyerclassHtml = buyerclassArr.length+"个行业";
 					    	}
-					    	buyerclassHtml = buyerclassArr.toString().replace(/,/g, "、");
 					    	if(checkObj(buyerclass)){
 					    		buyerclassHtml = "全行业";
 					    	}
-							$('.industry-list').text(buyerclassHtml);
+					    	$('.industry-list').text(buyerclassHtml);
 					    }
 				//	    if(cycleunit !== "" && cycleunit !== undefined){
 				//	    	if(cycleunit === 1){
@@ -201,7 +213,8 @@
 					    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
 					    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
 					    }else{
-					    	$(".renew_service").show();
+//					    	$(".renew_service").show();
+							$(".aginBuy").show();
 					    	$(".free_service").show();
 					    }
 					}

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

@@ -528,6 +528,8 @@
         //
         var area = "";
 	    var buyerclass = "";
+	    var areas = "";
+	    var industrys = "";
 	    var cycleunit = "";
 	    var cyclecount = "";
 	    var startTime = "";
@@ -541,13 +543,15 @@
             if (data) {
                 area = data.area;
 			    buyerclass = data.buyerclass;
+			    areas = data.allarea;
+			    industrys = data.allindustry;
 			    cyclecount = data.cyclecount;
 			    startTime = data.start;
 			    starts = data.starttime;
 			    endTime = data.end;
 			    ends = data.endtime;
-			    monthPrice = getsubVipOrderPrice(area, buyerclass, [1, 2]);
-			    yearPrice = getsubVipOrderPrice(area, buyerclass, [1, 1]);
+			    monthPrice = getsubVipOrderPrice(areas, industrys, [1, 2]);
+			    yearPrice = getsubVipOrderPrice(areas, industrys, [1, 1]);
 			    //
 			    var areaArr = [];
 			    var areaHtml = "";
@@ -718,6 +722,9 @@
                 $('#number_box_year span').removeClass('active');
                 $(".month_number").text(cyclecount);
                 dateName = cyclecount + "个月";
+                if(cyclecount > 1){
+                	$('#number_box_month button:first').removeAttr("disabled");
+                }
 //              $('.choose_item.select_cycle .info').attr('placeholder', dateName);
                 $('.choose_item.select_cycle .info').val(dateName);
 	 		}
@@ -757,10 +764,10 @@
             }
 	        $(".save_renew").attr("disabled","disabled");
 	    	var param = {
-	    		"area": JSON.stringify(area),
-	    		"industry": buyerclass.toString(),
+	    		"area": JSON.stringify(areas),
+	    		"industry": industrys.toString(),
 	    		"time": $('.choose_item.select_cycle .info').val(),
-	    		"payWay": payType,
+	    		"payWay":payType,
 	    		"pay_source": "Renew",
 	    		"endtime": ends,
 	    	}
@@ -780,8 +787,9 @@
                         alert(e)
                     }
                     clearSessionStorage();
+                    $(".save_renew").removeAttr("disabled");
                 } else {
-                    $(".save_renew").removeAttr("disabled")
+                    $(".save_renew").removeAttr("disabled");
                 }
             });
 	    });

+ 62 - 30
src/jfw/modules/app/src/web/templates/vipsubscribe/trial_info.html

@@ -24,7 +24,7 @@
 </div>
 <div class="app-layout-content-b">
     <div class="trial_info">
-        <form class="form" id="formInfo">
+        <form class="form">
             <div class="trial_body">
                 <div class="banner">
                     <div class="shadow"></div>
@@ -61,7 +61,7 @@
                                 <button class="code_btn" type="button">获取验证码</button>
                             </div>
                         </div>
-                        <div class="form_bottom ">
+                        <div class="form_bottom">
                             <div class="form_item form_item_line">
                                 <input type="text" id="" placeholder="输入公司名称" class="company input"
                                        onchange="check_company($(this))"></input>
@@ -79,13 +79,12 @@
                     <p class="explain_item">3、如用户在试用期间购买付费套餐,则试用权限在购买支付后自动失效。</p>
                 </div>
             </div>
-            <div class="trial_btn">
-                <!-- 未完善个人信息展示的按钮 type类型为submit-->
-                <button class="btn" type="submit">立即免费试用</button>
-                <!-- 已完善过个人信息 展示的按钮 type类型为button -->
-            </div>
-
         </form>
+        <div class="trial_btn">
+            <!-- 未完善个人信息展示的按钮 type类型为submit-->
+            <button class="btn" type="submit">立即免费试用</button>
+            <!-- 已完善过个人信息 展示的按钮 type类型为button -->
+        </div>
     </div>
 </div>
 <script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
@@ -95,8 +94,19 @@
 <script src="/jyapp/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
 <script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
 <script>
+
+    //解决android 键盘遮挡输入框
+    window.addEventListener("resize", function () {
+        if (document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA") {
+            window.setTimeout(function () {
+                //document.activeElement.scrollIntoViewIfNeeded();
+                document.activeElement.scrollIntoView({block: "center"});
+            }, 200);
+        }
+    });
     {{if not .T.trialSign }}
     $(function () {
+        //initScroll()
         scrollView("input");
         $(".btn").text("申请免费试用").attr("disabled", "disabled");
         //获取用户信息
@@ -105,24 +115,24 @@
                 $(".phone").val(r.phoneNum);
                 check_tel($('.phone'), $('.code_btn'), false);
             }
-        })
+        });
 
         //实时校验
         $('.name').bind("input propertychang", function (event) {
             check_name($(this), false);
-        })
+        });
         $('.phone').bind("input propertychang", function (event) {
             check_tel($(this), $('.code_btn'), false);
-        })
+        });
         $('.imgcode').bind("input propertychang", function (event) {
             check_imgcode($(this), $('.code_btn'), false)
-        })
+        });
         $('.phonecode').bind("input propertychang", function (event) {
             check_phonecode($(this), false)
-        })
+        });
         $('.company').bind("input propertychang", function (event) {
             check_company($(this))
-        })
+        });
 
         //刷新验证码
         $(".checkCode").on("click", function () {
@@ -157,9 +167,9 @@
                     }
                 })
             }
-        })
+        });
         //提交
-        $('#formInfo').submit(function (e) {
+        $(".btn").on("click", function (e) {
             var name = $('.name').val();
             var tel = $('.phone').val();
             var code = $('.phonecode').val();
@@ -171,50 +181,72 @@
                 code: code,
                 company: company,
                 job: job
-            }
+            };
             // ajax提交成功后跳转至vip购买页
             $DoPost("/subscribepay/trial/submitApply", post_data, function (r) {
                 if (r.success) {
                     window.location.replace("/jyapp/vipsubscribe/vipsubscribe_trial");
                 }
-            })
-            return false;
+            });
         });
     });
 
+    // 解决移动端软键盘弹起遮挡输入框及ios下软键盘关闭后底部留白问题
     function scrollView(obj) {
-        var view_height = $(document.body).height()
+        let u = navigator.userAgent, app = navigator.appVersion;
+        let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
+
+        var view_height = $(document.body).height();
 
         function change() {
             $(document.body).height(view_height)
         }
 
-        change();
-        window.addEventListener('resize', change);
+        // 给所有input绑定一个focus事件,用来判断键盘弹起。执行完成就解绑该事件
+        function focusOnce() {
+            $('.' + obj).on('focus', function (e) {
+                e.target.scrollIntoView({"block": "center"})
+                $('.' + obj).off('focus')
+            })
+        }
+
+
+        if (isAndroid) {
+            // 在安卓中键盘弹起会触发window.resize事件
+            // ios中则不会触发window.resize事件
+            change();
+            window.addEventListener('resize', change);
+        } else {
+            // 进入页面绑定,触发一次就解绑
+            focusOnce()
+        }
+
+
         $('.' + obj).on('blur', function (e) {
             setTimeout(() => {
                 let dom = document.activeElement;
-                // console.dir(dom);
                 if (dom.className.includes(obj)) {
-                    let u = navigator.userAgent, app = navigator.appVersion;
-                    let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
                     if (isAndroid) {
                         dom.scrollIntoView({"block": "center"})
+                    } else {
+                        // dom.scrollIntoView({"block": "bottom"})
                     }
-
                 } else {
-                    window.scroll(0, 0)
+                    window.scroll(0, 0);
+                    // 当页面上没有获得焦点的input时候就说明键盘收起来了。
+                    // 给input绑定focus事件用来监听其弹起
+                    focusOnce()
                 }
             }, 50)
         })
     }
-    
     {{else}}
-    $('#formInfo').submit(function (e) {
+    $(".btn").on("click", function (e) {
         window.location.replace("/jyapp/vipsubscribe/vipsubscribe_trial");
-        return false;
     });
     {{end}}
+
+
 </script>
 </body>
 

+ 19 - 12
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -130,8 +130,7 @@
                         </table>
                         <dl class="tips">
                             <dt>购买须知:</dt>
-                            <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
-                            <dd>用户最多购买/续费3年套餐;</dd>
+                            <dd>套餐周期内,不支持套餐降级,即将到期时续费可降级;</dd>
                             <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
                         </dl>
                     </div>
@@ -179,7 +178,7 @@
                         <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="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">
@@ -351,9 +350,9 @@
                 }
             }
 
-            if (!$.isEmptyObject(data) && !this.areaSelect["一个省"]) {
+            /*if (!$.isEmptyObject(data) && !this.areaSelect["一个省"]) {
                 $(".choose_area").val(provinceArr.join(" ") + " " + cityArr.join(" "));
-            }
+            }*/
 
             if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["全国"] && !this.areaSelect["一个省"]) { //选择有行业信息 且不是全国
                 var tipTxt = "已选择 ";
@@ -362,7 +361,12 @@
                     if (provinceArr.length > 0) tipTxt += "、";
                     tipTxt += cityArr.length + " 个地市";
                 }
-                $(".add_tips.area").text(tipTxt).css("display", "");
+                $(".choose_area").val(tipTxt);
+                //$(".add_tips.area").text(tipTxt).css("display", "");
+            }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+                $(".choose_area").val("全国");
+            }else {
+                $(".choose_area").val("");
             }
         },
         showPrice: function () {
@@ -387,12 +391,15 @@
         },
         showIndustry: function () {
             let data = this.industrySelect;
-            if (data.length > 0 && data[0] != "一个行业") {
+            /*if (data.length > 0 && data[0] != "一个行业") {
                 $(".choose_industry").val(data.join(" "));
-            }
+            }*/
             if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                var tipTxt = "已选择 ";
-                $(".add_tips.industry").text(tipTxt + this.industrySelect.length + " 个行业").css("display", "");
+                $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
+            }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+                $(".choose_industry").val("全部行业");
+            }else{
+                $(".choose_industry").val("");
             }
         },
         showTime: function () {
@@ -408,7 +415,7 @@
                 $(".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();
+                    $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
                 }
             }
             $(".info.choose_time").val(tmp);
@@ -528,7 +535,7 @@
             var firstButton = $('#number_box_month button:first');
             var lastButton = $('#number_box_month button:last');
             if (currentNum >= 10) {
-                $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”更换算哦~").show()
+                $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show()
             } else {
                 $('.profit_tips').hide()
             }

+ 370 - 190
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html

@@ -385,53 +385,53 @@
             $('.pay_mode .select_payment .choose_way.info').html(checkValue);
         });
          // 选择生效日期
-        $('.choose_effect_date > a').click(function () {
-            $('#effective_date').show(200);
-			var nowMonths = new Date().getMonth()+1;
-			var nowYears = new Date().getFullYear();
-			var as = nowMonths +1;
-			if(as > 12){
-				as = as-12;
-				nowYears = nowYears +1;
-			}
-			var bs = nowYears+"/"+as+"/1";
-			var effects = new Date(bs).getTime() /1000;
-			var a = nowYears+"."+as+".01";
-			$(".notnownow").text(a + " - " + endTime.replace(/-/g, "."))
-			if(ends < effects){
-				$(".effect_next").hide();
-//				$(".box").css("height", "2.7rem");
-			}
-        })
-        //
-		var effectiveName = new Date().getMonth()+2;
-		if(effectiveName > 12){
-	    	effectiveName = effectiveName - 12
-	   	}
-		var effectiveNames = effectiveName+"月1日生效"
-		$(".effective_name.notnow").text(effectiveNames);
-		$('#nextMonth').val(effectiveNames);
-		
-        // 对生效日期方式选择的input绑定点击事件
-        $('#effective_date input:radio[name="date"]').click(function () {
-            var checkValue = $('input:radio[name="date"]:checked').val();
-//          console.log(checkValue);
-            $('#effective_date').hide(200);
-            var effective = "";
-            var effectiveName = new Date().getMonth()+2;
-            if(effectiveName > 12){
-	    		effectiveName = effectiveName - 12
-	    	}
-            var effectiveNames = effectiveName+"月1日生效"
-            if(checkValue === "立即生效,需支付当月费用差价"){
-            	effective = "now";
-            }else if(checkValue === effectiveNames){
-            	effective = "notnow";
-            }
-            sessionStorage.effectiveDate = effective;
-            $('#effect_date_name').html(checkValue);
-            FinallyPrice();
-        });
+//      $('.choose_effect_date > a').click(function () {
+//          $('#effective_date').show(200);
+//			var nowMonths = new Date().getMonth()+1;
+//			var nowYears = new Date().getFullYear();
+//			var as = nowMonths +1;
+//			if(as > 12){
+//				as = as-12;
+//				nowYears = nowYears +1;
+//			}
+//			var bs = nowYears+"/"+as+"/1";
+//			var effects = new Date(bs).getTime() /1000;
+//			var a = nowYears+"."+as+".01";
+//			$(".notnownow").text(a + " - " + endTime.replace(/-/g, "."))
+//			if(ends < effects){
+//				$(".effect_next").hide();
+////				$(".box").css("height", "2.7rem");
+//			}
+//      })
+//      //
+//		var effectiveName = new Date().getMonth()+2;
+//		if(effectiveName > 12){
+//	    	effectiveName = effectiveName - 12
+//	   	}
+//		var effectiveNames = effectiveName+"月1日生效"
+//		$(".effective_name.notnow").text(effectiveNames);
+//		$('#nextMonth').val(effectiveNames);
+//		
+//      // 对生效日期方式选择的input绑定点击事件
+//      $('#effective_date input:radio[name="date"]').click(function () {
+//          var checkValue = $('input:radio[name="date"]:checked').val();
+////          console.log(checkValue);
+//          $('#effective_date').hide(200);
+//          var effective = "";
+//          var effectiveName = new Date().getMonth()+2;
+//          if(effectiveName > 12){
+//	    		effectiveName = effectiveName - 12
+//	    	}
+//          var effectiveNames = effectiveName+"月1日生效"
+//          if(checkValue === "立即生效,需支付当月费用差价"){
+//          	effective = "now";
+//          }else if(checkValue === effectiveNames){
+//          	effective = "notnow";
+//          }
+//          sessionStorage.effectiveDate = effective;
+//          $('#effect_date_name').html(checkValue);
+//          FinallyPrice();
+//      });
         
         
         // 选择周期
@@ -752,25 +752,25 @@
 			}
 	    }
 	    //生效时间
-	    if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
-	    	var effective = sessionStorage.effectiveDate;
-	    	var effectiveHtml = "";
-	    	if(effective === "now"){
-	    		effectiveHtml = "立即生效,需支付当月费用差价";
-	    	}else if(effective === "notnow"){
-	    		var effectiveName = new Date().getMonth()+2;
-	    		if(effectiveName > 12){
-	    			effectiveName = effectiveName - 12
-	    		}
-	    		effectiveHtml = effectiveName+"月1日生效";
-	    	}
-	    	$(".effective_name").each(function(){
-	    		if($(this).text() === effectiveHtml){
-	    			$(this).parent().next().find("input").prop("checked", true);
-	    		}
-	    	})
-	    	$('#effect_date_name').html(effectiveHtml);
-	    }
+//	    if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
+//	    	var effective = sessionStorage.effectiveDate;
+//	    	var effectiveHtml = "";
+//	    	if(effective === "now"){
+//	    		effectiveHtml = "立即生效,需支付当月费用差价";
+//	    	}else if(effective === "notnow"){
+//	    		var effectiveName = new Date().getMonth()+2;
+//	    		if(effectiveName > 12){
+//	    			effectiveName = effectiveName - 12
+//	    		}
+//	    		effectiveHtml = effectiveName+"月1日生效";
+//	    	}
+//	    	$(".effective_name").each(function(){
+//	    		if($(this).text() === effectiveHtml){
+//	    			$(this).parent().next().find("input").prop("checked", true);
+//	    		}
+//	    	})
+//	    	$('#effect_date_name').html(effectiveHtml);
+//	    }
         //支付方式
 	    if(sessionStorage.payType!==""&&sessionStorage.payType!==undefined){
 	    	var payType = sessionStorage.payType;
@@ -831,8 +831,8 @@
 	    var ends = "";
 	 	$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
             if (data) {
-                area = data.area;
-			    buyerclass = data.buyerclass;
+                area = data.allarea;
+			    buyerclass = data.allindustry;
 			    cycleunit = data.cycleunit;
 			    cyclecount = data.cyclecount;
 			    startTime = data.start;
@@ -840,47 +840,47 @@
 			    endTime = data.end;
 			    ends = data.endtime;
 			    //
-			    var areaArr = [];
-			    var areaHtml = "";
-			    var buyerclassArr = [];
-			    var buyerclassHtml = "";
-		//	    var dateName = "";
-		//	    var dateHtml = "";
-			    if (area !== "" && area !== undefined){
-			    	for(var province in area){
-			    		var citys = area[province]
-		//	    		console.log(citys);
-			    		if(citys.length===0){
-			    			areaArr.push(province);
-			    		}else{
-			    			for(var i in citys){
-			    				areaArr.push(citys[i]);
-			    			}
-			    		}
-			    	}
-			    	areaHtml = areaArr.toString().replace(/,/g, " ");
-		//	    	$(".item_area .label_for").text(areaHtml);
-					if(checkObj(area)){
-						areaHtml = "全国";
-					}
-			    	$('#area').attr("placeholder",areaHtml);
-			    }
-			    if(buyerclass !== "" && buyerclass !== undefined){
-			    	for(var i in buyerclass){
-			    		var industry = buyerclass[i];
-			    		buyerclassArr.push(industry);
-			    		buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
-			    	}
-		//	    	$(".item_industry .label_for").text(buyerclassHtml);
-					if(checkObj(buyerclass)){
-						buyerclassHtml = "全行业";
-					}
-					$('#buyerclass').attr("placeholder",buyerclassHtml);
-			    }
+//			    var areaArr = [];
+//			    var areaHtml = "";
+//			    var buyerclassArr = [];
+//			    var buyerclassHtml = "";
+//		//	    var dateName = "";
+//		//	    var dateHtml = "";
+//			    if (area !== "" && area !== undefined){
+//			    	for(var province in area){
+//			    		var citys = area[province]
+//		//	    		console.log(citys);
+//			    		if(citys.length===0){
+//			    			areaArr.push(province);
+//			    		}else{
+//			    			for(var i in citys){
+//			    				areaArr.push(citys[i]);
+//			    			}
+//			    		}
+//			    	}
+//			    	areaHtml = areaArr.toString().replace(/,/g, " ");
+//		//	    	$(".item_area .label_for").text(areaHtml);
+//					if(checkObj(area)){
+//						areaHtml = "全国";
+//					}
+//			    	$('#area').attr("placeholder",areaHtml);
+//			    }
+//			    if(buyerclass !== "" && buyerclass !== undefined){
+//			    	for(var i in buyerclass){
+//			    		var industry = buyerclass[i];
+//			    		buyerclassArr.push(industry);
+//			    		buyerclassHtml = buyerclassArr.toString().replace(/,/g, " ");
+//			    	}
+//		//	    	$(".item_industry .label_for").text(buyerclassHtml);
+//					if(checkObj(buyerclass)){
+//						buyerclassHtml = "全行业";
+//					}
+//					$('#buyerclass').attr("placeholder",buyerclassHtml);
+//			    }
 			    //
-			    var nowDate = data.now.replace(/-/g, ".");
-			    var a = nowDate+ " - " +endTime;
-			    $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
+//			    var nowDate = data.now.replace(/-/g, ".");
+//			    var a = nowDate+ " - " +endTime;
+//			    $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
 			    
 			}
         },false);
@@ -891,22 +891,25 @@
         var oldMonthPrice = 0;
         var areasArr = {};
 	    var industrysArr = [];
+	    var allArea = {};
+	    var allIndustry = [];
 	    var nowRenew = "";
         function FinallyPrice(){
         	$(".save_upgrade").attr('disabled','disabled');
 	    	var nowUpgrade = "";
 			//
-			var nowMonth = new Date(startTime).getMonth()+1;
-			var nowYear = new Date(startTime).getFullYear();
-			var nowDay = new Date(startTime).getDate();
+			var nowMonth = new Date().getMonth()+1;
+			var nowYear = new Date().getFullYear();
+			var nowDay = new Date().getDate();
 			//
 			var endMonth = new Date(endTime).getMonth()+1;
 			var endYear = new Date(endTime).getFullYear();
 			var endDay = new Date(endTime).getDate();
 			var oldPrice = "";
 			var price = "";
-			var effect = "";
+//			var effect = "";
 			var buyCheck = true;
+			var cPrice = 0;
 			if(sessionStorage.buyCheck!==undefined&&sessionStorage.buyCheck!==""){
 				let bcheck = sessionStorage.buyCheck;
 				if(bcheck === "true"){
@@ -917,26 +920,42 @@
 			}
 			if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
 				var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
+				for(let province in vipArea){
+		    		let citys = vipArea[province];
+		    		if(citys.length===0){
+						areasArr[province] = [];
+		    		}else{
+		    			areasArr[province] = citys;
+		    		}
+		    	}
+				for(let province in vipArea){
+		    		if(province === "全国"){
+						areasArr = {"全国":[]};
+					}
+		    	}
+				if(buyCheck){
+					$(".save_upgrade").removeAttr("disabled");
+				}
 				if(area !== ""&&area !== undefined){
 					for(let province in area){
 			    		let citys = area[province];
 			    		if(citys.length===0){
-							areasArr[province] = [];
+							allArea[province] = [];
 			    		}else{
-			    			areasArr[province] = citys;
+			    			allArea[province] = citys;
 			    		}
 			    	}
 					for(let province in vipArea){
 						let citys = vipArea[province];
-						if(areasArr[province] === undefined){
-							areasArr[province] = citys
+						if(allArea[province] === undefined){
+							allArea[province] = citys
 						}else{
 							let cityArr = [];
 							for(let i in citys){
 								cityArr.push(citys[i]);
 							}
-							for(let i in areasArr[province]){
-								cityArr.push(areasArr[province][i]);
+							for(let i in allArea[province]){
+								cityArr.push(allArea[province][i]);
 							}
 							//
 							for (var x = 0; x < cityArr.length; x++) {
@@ -948,42 +967,105 @@
 					            }
 					       	}
 							//
-							areasArr[province] = cityArr;
+							allArea[province] = cityArr;
 						}
 						if(province === "全国"){
-							areasArr = {"全国":[]};
+							allArea = {"全国":[]};
 						}
 					}
 				}
-				console.log($(".save_upgrade").attr("disabled"))
-				if(buyCheck){
-					$(".save_upgrade").removeAttr("disabled");
-				}
 			}else{
+				areasArr = null;
 				if(area !== ""&&area !== undefined){
 					for(let province in area){
 			    		let citys = area[province];
 			    		if(citys.length===0){
-							areasArr[province] = [];
+							allArea[province] = [];
 			    		}else{
-			    			areasArr[province] = citys;
+			    			allArea[province] = citys;
 			    		}
 			    	}
 				}
 			}
+//			if(sessionStorage.vipSubSelectAreaUpgrade!==""&&sessionStorage.vipSubSelectAreaUpgrade!==undefined){
+//				var vipArea = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);
+//				if(area !== ""&&area !== undefined){
+//					for(let province in area){
+//			    		let citys = area[province];
+//			    		if(citys.length===0){
+//							areasArr[province] = [];
+//			    		}else{
+//			    			areasArr[province] = citys;
+//			    		}
+//			    	}
+//					for(let province in vipArea){
+//						let citys = vipArea[province];
+//						if(areasArr[province] === undefined){
+//							areasArr[province] = citys
+//						}else{
+//							let cityArr = [];
+//							for(let i in citys){
+//								cityArr.push(citys[i]);
+//							}
+//							for(let i in areasArr[province]){
+//								cityArr.push(areasArr[province][i]);
+//							}
+//							//
+//							for (var x = 0; x < cityArr.length; x++) {
+//					            for (var j =x+1; j <cityArr.length; ) {
+//					                if (cityArr[x] === cityArr[j]){
+//					                    cityArr.splice(j, 1);
+//					                }
+//					                else j++;
+//					            }
+//					       	}
+//							//
+//							areasArr[province] = cityArr;
+//						}
+//						if(province === "全国"){
+//							areasArr = {"全国":[]};
+//						}
+//					}
+//				}
+//				console.log($(".save_upgrade").attr("disabled"))
+//				if(buyCheck){
+//					$(".save_upgrade").removeAttr("disabled");
+//				}
+//			}else{
+//				if(area !== ""&&area !== undefined){
+//					for(let province in area){
+//			    		let citys = area[province];
+//			    		if(citys.length===0){
+//							areasArr[province] = [];
+//			    		}else{
+//			    			areasArr[province] = citys;
+//			    		}
+//			    	}
+//				}
+//			}
+
 			console.log("areasArr",areasArr)
-			if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
-				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
+			if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
+				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
+				for(let i in vipIndustry){
+		    		let industry = vipIndustry[i];
+		    		industrysArr.push(industry);
+		        }
+				for(let i in vipIndustry){
+					if(industry === "全部行业"){
+						industrysArr = ["全部行业"];
+					}
+				}
 				if(buyerclass!==""&&buyerclass!==undefined){
 					for(let i in buyerclass){
 			    		let industry = buyerclass[i];
-			    		industrysArr.push(industry);
+			    		allIndustry.push(industry);
 			        }
 					for(let i in vipIndustry){
 						let industry = vipIndustry[i];
-						industrysArr.push(industry);
+						allIndustry.push(industry);
 						if(industry === "全部行业"){
-							industrysArr = ["全部行业"];
+							allIndustry = ["全部行业"];
 						}
 					}
 				}
@@ -991,34 +1073,71 @@
 					$(".save_upgrade").removeAttr("disabled");
 				}
 			}else{
+				industrysArr = null;
 				if(buyerclass!==""&&buyerclass!==undefined){
 					for(let i in buyerclass){
 			    		let industry = buyerclass[i];
-			    		industrysArr.push(industry);
+			    		allIndustry.push(industry);
 			    	}
 			    }
 			}
 			
-			for (var x = 0; x < industrysArr.length; x++) {
-	            for (var j =x+1; j <industrysArr.length; ) {
-	                if (industrysArr[x] === industrysArr[j]){
-	                    industrysArr.splice(j, 1);
+//			if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
+//				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
+//				if(buyerclass!==""&&buyerclass!==undefined){
+//					for(let i in buyerclass){
+//			    		let industry = buyerclass[i];
+//			    		industrysArr.push(industry);
+//			        }
+//					for(let i in vipIndustry){
+//						let industry = vipIndustry[i];
+//						industrysArr.push(industry);
+//						if(industry === "全部行业"){
+//							industrysArr = ["全部行业"];
+//						}
+//					}
+//				}
+//				if(buyCheck){
+//					$(".save_upgrade").removeAttr("disabled");
+//				}
+//			}else{
+//				if(buyerclass!==""&&buyerclass!==undefined){
+//					for(let i in buyerclass){
+//			    		let industry = buyerclass[i];
+//			    		industrysArr.push(industry);
+//			    	}
+//			    }
+//			}
+			if(industrysArr !== null){
+				for (var x = 0; x < industrysArr.length; x++) {
+		            for (var j =x+1; j <industrysArr.length; ) {
+		                if (industrysArr[x] === industrysArr[j]){
+		                    industrysArr.splice(j, 1);
+		                }
+		                else j++;
+		            }
+		       	}
+			}
+			for (var x = 0; x < allIndustry.length; x++) {
+	            for (var j =x+1; j <allIndustry.length; ) {
+	                if (allIndustry[x] === allIndustry[j]){
+	                    allIndustry.splice(j, 1);
 	                }
 	                else j++;
 	            }
 	       	}
 			
 			console.log("industrysArr",industrysArr);
-			if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
-				let eff = sessionStorage.effectiveDate;
-				if(eff === "now"){
-					effect = "now";
-				}else{
-					effect = "notnow";
-				}
-			}else{
-				effect = "now";
-			}
+//			if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
+//				let eff = sessionStorage.effectiveDate;
+//				if(eff === "now"){
+//					effect = "now";
+//				}else{
+//					effect = "notnow";
+//				}
+//			}else{
+//				effect = "now";
+//			}
 			//
 			if(endYear === nowYear){
 				if(endMonth === nowMonth){
@@ -1054,12 +1173,12 @@
 			nowRenew = nowUpgrade;
 			console.log("monthold",nowUpgrade)
 			//
-			if(effect === "notnow"){
-				nowUpgrade = nowUpgrade -1;
-			}
-			if(nowUpgrade == 0){
-				nowUpgrade = 1;
-			}
+//			if(effect === "notnow"){
+//				nowUpgrade = nowUpgrade -1;
+//			}
+//			if(nowUpgrade == 0){
+//				nowUpgrade = 1;
+//			}
 			
 			//
 			var nowUpgradeYear = 0;
@@ -1098,9 +1217,30 @@
 			
 			//
 			if(nowUpgradeYear >= 1){
-				let yearprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
-				let monthprice = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
-				price = yearprice + monthprice;
+				let addAreaPriceY = 0;
+				let addAreaPriceM = 0;
+				let oldAreaPriceY = 0;
+				let oldAreaPriceM = 0;
+				let addIndustryPriceY = 0;
+				let addIndustryPriceM = 0;
+				if(areasArr !== null&&industrysArr !== null){
+					addAreaPriceY = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgradeYear,1]);
+					addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
+				}
+				if(areasArr !== null){
+					oldAreaPriceY = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgradeYear,1]);
+					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgrade,2]);
+				}
+				if(industrysArr !== null){
+					addIndustryPriceY = getsubVipOrderPrice(area,industrysArr,[nowUpgradeYear,1]);
+					addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
+				}
+				let yearprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgradeYear,1]);
+				let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
+//				price = yearprice + monthprice;
+				price = addAreaPriceY + addAreaPriceM + oldAreaPriceY + oldAreaPriceM + addIndustryPriceY + addIndustryPriceM;
+//				let yearprice = addAreaPriceY + oldAreaPriceY + addIndustryPriceY;
+//				let monthprice = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
 				if(monthprice === 0){
 					completeMonth = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
 					completeYear = (yearprice / nowUpgradeYear).toFixed(1);
@@ -1112,16 +1252,30 @@
 				console.log("monthprice",monthprice);
 				console.log(">=1",price);
 			}else{
-				price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
-				completeMonth = (price / nowUpgrade).toFixed(1);
-				completeYear = ((price / nowUpgrade)*10).toFixed(1);
+				let addAreaPriceM = 0;
+				let oldAreaPriceM = 0;
+				let addIndustryPriceM = 0;
+				if(areasArr !== null&&industrysArr !== null){
+					addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
+				}
+				if(areasArr !== null){
+					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgrade,2]);
+				}
+				if(industrysArr !== null){
+					addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
+				}
+				let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
+//				price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
+				price = addAreaPriceM + oldAreaPriceM + addIndustryPriceM;
+				completeMonth = (monthprice / nowUpgrade).toFixed(1);
+				completeYear = ((monthprice / nowUpgrade)*10).toFixed(1);
 				console.log("<1",price)
 			}
 			
 			console.log("oldPrice", oldPrice);
 			if(sessionStorage.vipSubSelectAreaUpgrade===undefined&&sessionStorage.vipSubSelectIndustryUpgrade===undefined){
-				completeMonth = oldMonthPrice
-				completeYear = oldYearPrice
+				completeMonth = oldMonthPrice;
+				completeYear = oldYearPrice;
 			}
 			console.log("completeMonth",completeMonth)
 			console.log("completeYear",completeYear)
@@ -1136,10 +1290,10 @@
 					sessionStorage.proPrice = price;
 				}
 			}
-			var cPrice = 0;
-  			if(price>0){
-  				var cPrice = (price - oldPrice).toFixed(1);
-  			}
+			
+			if(price>0){
+				var cPrice = (price).toFixed(1);
+			}
 			console.log(cPrice);
 			if(sessionStorage.proPrice!==""&&sessionStorage.proPrice!==undefined){
 				let proPrice = sessionStorage.proPrice;
@@ -1172,32 +1326,54 @@
         //
         $(".save_upgrade").on("click", function(){
         	$(".save_upgrade").attr("disabled","disabled")
-        	let effective = $("#effect_date_name").text();
-        	var effect = "now";
-        	if(effective !== "立即生效,需支付当月费用差价"){
-				let nowMonth = new Date().getMonth()+1;
-				let nowYear = new Date().getFullYear();
-				let a = nowMonth +1
-        		if(a > 12){
-        			a = a-12;
-        			nowYear = nowYear +1;
-        		}
-        		let b = nowYear+"/"+a+"/1";
-        		effect = new Date(b).getTime() /1000;
-        	}
+//      	let effective = $("#effect_date_name").text();
+//      	var effect = "now";
+//      	if(effective !== "立即生效,需支付当月费用差价"){
+//				let nowMonth = new Date().getMonth()+1;
+//				let nowYear = new Date().getFullYear();
+//				let a = nowMonth +1
+//      		if(a > 12){
+//      			a = a-12;
+//      			nowYear = nowYear +1;
+//      		}
+//      		let b = nowYear+"/"+a+"/1";
+//      		effect = new Date(b).getTime() /1000;
+//      	}
         	//
         	let areas = areasArr;
-        	let industrys = industrysArr;
-        	if(areas["全国"]){
-                areas={};
-            }
-            if(industrys.length==1&&industrys[0]=="全部行业"){
-                industrys=[];
-            }
+        	let industrys = null;
+        	if(sessionStorage.vipSubSelectIndustryUpgrade !== undefined){
+        		industrys = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
+        	}
+        	let industryArr = "";
+        	let areaArr = "";
+        	if(areas !== null){
+        		if(areas["全国"]){
+	                areas={};
+	            }
+        		areaArr = JSON.stringify(areas);
+        	}else{
+        		areaArr = "no";
+        	}
+        	if(industrys !== null){
+        		if(industrys.length==1&&industrys[0]=="全部行业"){
+	                industrys=[];
+	            }
+        		industryArr = industrys.join(",");
+        	}else{
+        		industryArr = "no";
+        	}
             //
             let areaarr = area;
         	let industryarr = buyerclass;
-        	
+        	let allAreaArr = allArea;
+        	let allIndustryArr = allIndustry;
+        	if(allAreaArr["全国"]){
+                allAreaArr={};
+            }
+        	if(allIndustryArr.length==1&&allIndustryArr[0]=="全部行业"){
+                allIndustryArr=[];
+            }
             //
             let renew_time = $('.choose_item.lengthen .info').text();
             let times = "";
@@ -1212,15 +1388,17 @@
             }
             //
 	    	var param = {
-	    		"area": JSON.stringify(areas),
-	    		"industry": industrys.join(","),
+	    		"area": areaArr,
+	    		"industry": industryArr,
 	    		"areas": JSON.stringify(areaarr),
 	    		"industryarr": industryarr.join(","),
+	    		"allArea": JSON.stringify(allAreaArr),
+	    		"allIndustry": allIndustryArr.join(","),
 	    		"payWay": payType,
-	    		"effect": effect,
+//	    		"effect": effect,
 	    		"pay_source" : "Upgrade",
 	    		"time": times,
-	    		"nowUp": Number(nowRenew),
+//	    		"nowUp": Number(nowRenew),
 	    	}
 	    	console.log(param)
 	    	$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder", param, function (r) {
@@ -1238,6 +1416,7 @@
                         alert(e)
                     }
                     clearSessionStorage();
+                    $(".save_upgrade").removeAttr("disabled")
                 } else {
                     $(".save_upgrade").removeAttr("disabled")
                 }
@@ -1252,7 +1431,8 @@
 	    	sessionStorage.removeItem("proPrice");
 	    	sessionStorage.removeItem("vipSubSelectAreaUpgrade");
 	    	sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
-	    	sessionStorage.removeItem("effectiveDate");
+	    	sessionStorage.removeItem("vipSubSelectIndustryAdd");
+//	    	sessionStorage.removeItem("effectiveDate");
 	    	sessionStorage.removeItem("buyCheck");
 	    }
 	    //

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

@@ -213,7 +213,7 @@
 				</a>
 			</li>
       <li class="dataExport">
-				<a href="/jyapp/vipsubscribe/introducePage">
+				<a href="/jyapp/vipsubscribe/vipsubscribe_new">
 					<div>vip订阅</div>
 					<div>导出任意条件的招标数据,按条数付费</div>
 				</a>
@@ -780,7 +780,12 @@
 </script>
 </div>
 {{end}}
+<script src="/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript">
+	$(function() {
+	    // 解决ios系统click 事件300毫秒的延迟
+	    FastClick.attach(document.body);
+	});
  	sessionStorage.removeItem("readClause");
 	if(sessionStorage.onceTipUpdate != "1"){
 		localStorage.removeItem("onceTipUpdate");

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
src/jfw/modules/subscribepay/src/dataexport.json


+ 7 - 5
src/jfw/modules/subscribepay/src/entity/dataExportSearch.go

@@ -47,11 +47,13 @@ type SieveCondition struct {
 
 //VIP订单
 type VipFilter struct {
-	Area       map[string]interface{} `json:"area"`     //地区
-	Industry   []string               `json:"industry"` //
-	Cyclecount int                    `json:"cyclecount"`
-	Cycleunit  int                    `json:"cycleunit"`
-	ordertype  int                    `json:"ordertype"`
+	Area        map[string]interface{} `json:"area"`     //地区
+	Industry    []string               `json:"industry"` //
+	Cyclecount  int                    `json:"cyclecount"`
+	Cycleunit   int                    `json:"cycleunit"`
+	Ordertype   int                    `json:"ordertype"`
+	Addarea     map[string]interface{} `json:"addarea"`     //新增地区
+	Addindustry []string               `json:"addindustry"` //新增行业
 }
 
 const (

+ 114 - 48
src/jfw/modules/subscribepay/src/entity/dataexport.go

@@ -341,6 +341,7 @@ func SendMailToBJFinance(order *map[string]interface{}, pay_time, transaction_id
 			}
 			//vip开发票内容
 			subscription_area, industry, subscription_cycle, effective_date, payment_number := "", "", "", "", ""
+			display_a, display_b, display_c := "none", "none", "none" //a:正常购买 b:续费 c:升级
 			city_count := 0
 			filter := qutil.ObjToString((*order)["filter"])
 			vip_starttime := qutil.ObjToString((*order)["vip_starttime"])
@@ -350,59 +351,112 @@ func SendMailToBJFinance(order *map[string]interface{}, pay_time, transaction_id
 			vf := new(VipFilter)
 			err := json.Unmarshal([]byte(filter), &vf)
 			if err == nil && vf != nil {
-				vip_area := vf.Area    //区域
-				vip_ind := vf.Industry //行业
-				nbs := JyVipSubStruct.NewBuySet(&vip_area, vip_ind)
-				if nbs != nil {
-					if nbs.Citys != nil {
-						for _, v := range nbs.Citys {
-							city_count += v.(int)
+				if vip_type == 2 { //升级查新订单
+					addarea := vf.Addarea         //区域
+					addindustry := vf.Addindustry //行业
+					log.Println(addarea)
+					//升级区域显示
+					if (addarea)["no"] != "no" {
+						addarea_upgrade := JyVipSubStruct.NewBuySet(&addarea, addindustry)
+						if addarea_upgrade != nil {
+							if addarea_upgrade.Citys != nil {
+								for _, v := range addarea_upgrade.Citys {
+									city_count += v.(int)
+								}
+							}
+							//订阅区域
+							if addarea_upgrade.AreaCount == -1 {
+								subscription_area = "全国"
+							} else {
+								if city_count != 0 && addarea_upgrade.AreaCount == 0 {
+									subscription_area = fmt.Sprintf("%d个地市", city_count)
+								} else if city_count == 0 && addarea_upgrade.AreaCount != 0 {
+									subscription_area = fmt.Sprintf("%d个省级区域", addarea_upgrade.AreaCount)
+								} else if city_count != 0 && addarea_upgrade.AreaCount != 0 {
+									subscription_area = fmt.Sprintf("%d个省级区域、%d个地市", addarea_upgrade.AreaCount, city_count)
+								}
+							}
 						}
-					}
-					//订阅区域
-					if nbs.AreaCount == -1 {
-						subscription_area = "全国"
 					} else {
-						if city_count != 0 && nbs.AreaCount == 0 {
-							subscription_area = fmt.Sprintf("%d个地市", city_count)
-						} else if city_count == 0 && nbs.AreaCount != 0 {
-							subscription_area = fmt.Sprintf("%d个省级区域", nbs.AreaCount)
-						} else if city_count != 0 && nbs.AreaCount != 0 {
-							subscription_area = fmt.Sprintf("%d个省级区域、%d个地市", nbs.AreaCount, city_count)
+						subscription_area = "无"
+					}
+
+					//升级行业显示
+					industry_upgrade := 0
+					if len(addindustry) != 0 {
+						if addindustry[0] != "no" { //等于no 为 无新增区域
+							industry_upgrade = len(addindustry)
+						} else {
+							industry_upgrade = -2 //无新增
 						}
+					} else {
+						industry_upgrade = -1 //全行业
 					}
-					//行业
-					if nbs.BuyerclassCount != -1 {
-						industry = fmt.Sprintf("%d个行业", nbs.BuyerclassCount)
+					if industry_upgrade != -1 && industry_upgrade != -2 {
+						industry = fmt.Sprintf("%d个行业", industry_upgrade)
+					} else if industry_upgrade == -2 {
+						industry = "无"
 					} else {
 						industry = "全行业"
 					}
-					// 订阅周期 有效日期
-					if vip_endtime != "" && vip_starttime != "" {
-						year := 0
-						month := 0
-						//订阅周期
-						vip_starttime_stamp, _ := time.ParseInLocation(qutil.Date_Full_Layout, vip_starttime, time.Local)
-						vip_endtime_stamp, _ := time.ParseInLocation(qutil.Date_Full_Layout, vip_endtime, time.Local)
-						start_year := time.Unix(qutil.Int64All(vip_starttime_stamp.Unix()), 0).Year()
-						end_year := time.Unix(qutil.Int64All(vip_endtime_stamp.Unix()), 0).Year()
-						start_month := int(time.Unix(qutil.Int64All(vip_starttime_stamp.Unix()), 0).Month())
-						end_month := int(time.Unix(qutil.Int64All(vip_endtime_stamp.Unix()), 0).Month())
-						if end_year > start_year {
-							if end_month > start_month {
-								year = end_year - start_year
-								month = end_month - start_month
-							} else {
-								year = end_year - start_year - 1
-								month = 12 + end_month - start_month
-								if month == 12 {
-									year++
-									month = 0
-								}
+				} else { //非升级
+					vip_area := vf.Area    //区域
+					vip_ind := vf.Industry //行业
+					nbs := JyVipSubStruct.NewBuySet(&vip_area, vip_ind)
+					if nbs != nil {
+						if nbs.Citys != nil {
+							for _, v := range nbs.Citys {
+								city_count += v.(int)
 							}
-						} else if end_year == start_year {
+						}
+						//订阅区域
+						if nbs.AreaCount == -1 {
+							subscription_area = "全国"
+						} else {
+							if city_count != 0 && nbs.AreaCount == 0 {
+								subscription_area = fmt.Sprintf("%d个地市", city_count)
+							} else if city_count == 0 && nbs.AreaCount != 0 {
+								subscription_area = fmt.Sprintf("%d个省级区域", nbs.AreaCount)
+							} else if city_count != 0 && nbs.AreaCount != 0 {
+								subscription_area = fmt.Sprintf("%d个省级区域、%d个地市", nbs.AreaCount, city_count)
+							}
+						}
+						//行业
+						if nbs.BuyerclassCount != -1 {
+							industry = fmt.Sprintf("%d个行业", nbs.BuyerclassCount)
+						} else {
+							industry = "全行业"
+						}
+					}
+				}
+
+				// 订阅周期 有效日期
+				if vip_endtime != "" && vip_starttime != "" {
+					year := 0
+					month := 0
+					//订阅周期
+					vip_starttime_stamp, _ := time.ParseInLocation(qutil.Date_Full_Layout, vip_starttime, time.Local)
+					vip_endtime_stamp, _ := time.ParseInLocation(qutil.Date_Full_Layout, vip_endtime, time.Local)
+					start_year := time.Unix(qutil.Int64All(vip_starttime_stamp.Unix()), 0).Year()
+					end_year := time.Unix(qutil.Int64All(vip_endtime_stamp.Unix()), 0).Year()
+					start_month := int(time.Unix(qutil.Int64All(vip_starttime_stamp.Unix()), 0).Month())
+					end_month := int(time.Unix(qutil.Int64All(vip_endtime_stamp.Unix()), 0).Month())
+					if end_year > start_year {
+						if end_month > start_month {
+							year = end_year - start_year
 							month = end_month - start_month
+						} else {
+							year = end_year - start_year - 1
+							month = 12 + end_month - start_month
+							if month == 12 {
+								year++
+								month = 0
+							}
 						}
+					} else if end_year == start_year {
+						month = end_month - start_month
+					}
+					if vip_type != 2 {
 						if year == 0 && month > 0 {
 							subscription_cycle = fmt.Sprintf("%d个月", month)
 						} else if year > 0 && month > 0 {
@@ -410,22 +464,34 @@ func SendMailToBJFinance(order *map[string]interface{}, pay_time, transaction_id
 						} else if year > 0 && month == 0 {
 							subscription_cycle = fmt.Sprintf("%d年", year)
 						}
-						//有效日期
-						vip_starttime = strings.Replace(vip_starttime[0:10], "-", ".", -1)
-						vip_endtime = strings.Replace(vip_endtime[0:10], "-", ".", -1)
-						effective_date = fmt.Sprintf("%v-%v", vip_starttime, vip_endtime)
+					} else {
+						log.Println(vf.Cyclecount, "---", vf.Cycleunit)
+						if vf.Cycleunit == 1 {
+							subscription_cycle = fmt.Sprintf("%d年", vf.Cyclecount)
+						} else if vf.Cycleunit == 2 {
+							subscription_cycle = fmt.Sprintf("%d个月", vf.Cyclecount)
+						} else if vf.Cycleunit == -1 {
+							subscription_cycle = "不延期"
+						}
 					}
+					//有效日期
+					vip_starttime = strings.Replace(vip_starttime[0:10], "-", ".", -1)
+					vip_endtime = strings.Replace(vip_endtime[0:10], "-", ".", -1)
+					effective_date = fmt.Sprintf("%v-%v", vip_starttime, vip_endtime)
 				}
 			}
 			if vip_type == 1 {
 				product_type = "VIP订阅(续费)"
+				display_b = "block"
 			} else if vip_type == 2 {
 				product_type = "VIP订阅(升级)"
+				display_c = "block"
 			} else {
 				product_type = "VIP订阅"
+				display_a = "block"
 			}
 			mail_title = "电子发票申请-[剑鱼标讯]VIP订阅(" + order_code + ")"
-			mailcontent = fmt.Sprintf(ExConf.Mail_vip_invoice_finance_content, bill_title, company_flag, bill_company, taxnum_flag, bill_taxnum, user_email, order_code, create_time, payment_number, pay_time, pay_way, product_type, pay_money, subscription_area, industry, subscription_cycle, effective_date)
+			mailcontent = fmt.Sprintf(ExConf.Mail_vip_invoice_finance_content, bill_title, company_flag, bill_company, taxnum_flag, bill_taxnum, user_email, order_code, create_time, payment_number, pay_time, pay_way, product_type, pay_money, display_a, subscription_area, industry, subscription_cycle, display_b, subscription_area, industry, subscription_cycle, display_c, subscription_area, industry, subscription_cycle, effective_date)
 		}
 	}
 	//发送邮件

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

@@ -54,11 +54,13 @@ type subVipPrice struct {
 //订单简单信息
 type VipSimpleMsg struct {
 	//Id         string                  `json:"_id"`        //mgo id
-	Area       *map[string]interface{} `json:"area"`       //地区
-	Industry   []string                `json:"industry"`   //行业
-	Cyclecount int                     `json:"cyclecount"` //日期数量
-	Cycleunit  int                     `json:"cycleunit"`  //日期单位
-	OrderType  int                     `json:"ordertype"`  //类型 1:订单 2:续费 3:立即升级 4:下月升级 5:即将到期(升降级)6:升级订单未生效再次升级
+	Area        *map[string]interface{} `json:"area"`        //地区
+	Industry    []string                `json:"industry"`    //行业
+	Addarea     *map[string]interface{} `json:"addarea"`     //新增地区
+	Addindustry []string                `json:"addindustry"` //新增行业
+	Cyclecount  int                     `json:"cyclecount"`  //日期数量
+	Cycleunit   int                     `json:"cycleunit"`   //日期单位
+	OrderType   int                     `json:"ordertype"`   //类型 1:订单 2:续费 3:立即升级 4:下月升级 5:即将到期(升降级)6:升级订单未生效再次升级
 }
 
 //购买内容

+ 31 - 26
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -21,6 +21,24 @@ 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"`     //是否有未执行的订单
+}
+
+//
+func (a *AfterPay) CheckOrder() error {
+	defer qutil.Catch()
+	var flag = false
+	userId, _ := a.GetSession("userId").(string)
+	if userId != "" {
+		data, ok := util.MQFW.FindOne("vip_upgrade", `{"s_userid":"`+userId+`","i_isvalid":0}`)
+		if ok && (*data) != nil && len(*data) > 0 {
+			flag = true
+		}
+	}
+	a.ServeJson(map[string]interface{}{
+		"flag": flag,
+	})
+	return nil
 }
 
 //
@@ -288,37 +306,24 @@ func (a *AfterPay) GetUserInfo() error {
 			data := qutil.ObjToMap((*userData)["o_vipjy"])
 			i_vip_status := qutil.IntAll((*userData)["i_vip_status"])
 			//区域
-			_area := qutil.ObjToMap((*data)["o_area"].(interface{}))
-			var area_i = 0
-			var area_j = 0
-			for _, v := range *_area {
-				if len(v.([]interface{})) == 0 {
-					area_i += 1
-				} else {
-
-					area_j += len(v.([]interface{}))
-				}
+			_buyset := qutil.ObjToMap((*data)["o_buyset"].(interface{}))
+			var area_i = qutil.IntAll((*_buyset)["areacount"])
+			var citys = qutil.ObjToMap((*_buyset)["citys"].(interface{}))
+			var city_i = 0
+			for _, cv := range *citys {
+				city_i += qutil.IntAll(cv.(int))
 			}
-			if area_i != 0 && area_j != 0 {
-				(*data)["o_area"] = strconv.Itoa(area_i) + "个省级区域、" + strconv.Itoa(area_j) + "个地市"
-			} else if area_i == 0 && area_j != 0 {
-				(*data)["o_area"] = strconv.Itoa(area_j) + "个地市"
-			} else if area_i != 0 && area_j == 0 {
+			if area_i != -1 && city_i != 0 {
+				(*data)["o_area"] = strconv.Itoa(area_i) + "个省级区域、" + strconv.Itoa(city_i) + "个地市"
+			} else if area_i == -1 && city_i != 0 {
+				(*data)["o_area"] = strconv.Itoa(city_i) + "个地市"
+			} else if area_i != -1 && city_i == 0 {
 				(*data)["o_area"] = strconv.Itoa(area_i) + "个省级区域"
 			} else {
 				(*data)["o_area"] = "全国"
 			}
 			//采购行业
-			//_buyClass := (*data)["a_buyerclass"].([]interface{})
-			//			var buyClass = ""
-			//			for _, v := range _buyClass {
-			//				buyClass += v.(string) + "、"
-			//			}
-			//			if buyClass == "" {
-			//				(*data)["a_buyerclass"] = "全行业"
-			//			} else {
-			//				(*data)["a_buyerclass"] = strings.TrimRight(buyClass, "、")
-			//			}
+			(*data)["a_buyerclass"] = qutil.IntAll((*_buyset)["buyerclasscount"])
 			//有效日期
 			var _starttime = (*userData)["l_vip_starttime"]
 			(*userData)["l_vip_starttime"] = strings.Replace(qutil.FormatDateWithObj(&_starttime, qutil.Date_Short_Layout), "-", ".", -1)
@@ -353,7 +358,7 @@ func (a *AfterPay) GetUserInfo() error {
 			} else if qutil.Int64All(_endtime)-time.Now().Unix() < oneRemind && qutil.Int64All(_endtime)-time.Now().Unix() >= 0 {
 				(*data)["expRemind"] = "1" //即将到期
 			} else if qutil.Int64All(_endtime)-time.Now().Unix() < 0 {
-				(*data)["expRemind"] = "0" //已经到期
+				(*data)["expRemind"] = "-1" //已经到期
 			}
 			//信息类型
 			if (*data)["a_infotype"] != nil {

+ 78 - 11
src/jfw/modules/subscribepay/src/service/commonAction.go

@@ -3,20 +3,25 @@ package service
 import (
 	"config"
 	"entity"
+	"log"
 	"pay"
 	qutil "qfw/util"
+	"strings"
 	"time"
 	"util"
 
+	"gopkg.in/mgo.v2/bson"
+
 	"github.com/go-xweb/xweb"
 )
 
 //付费公用方法
 type CommonAction struct {
 	*xweb.Action
-	isPaySuccess xweb.Mapper `xweb:"/isPaySuccess"`          //数据导出是否支付成功
-	paySuccess   xweb.Mapper `xweb:"/dataReport/paySuccess"` //数据报告支付完成
-	deleteOrder  xweb.Mapper `xweb:"/deleteOrder"`           //删除订单
+	isPaySuccess  xweb.Mapper `xweb:"/isPaySuccess"`          //数据导出是否支付成功
+	paySuccess    xweb.Mapper `xweb:"/dataReport/paySuccess"` //数据报告支付完成
+	deleteOrder   xweb.Mapper `xweb:"/deleteOrder"`           //删除订单
+	vipPaySuccess xweb.Mapper `xweb:"/vipPaySuccess"`         //数据导出是否支付成功
 
 	applyInvoice xweb.Mapper `xweb:"/applyInvoice"` //申请发票
 }
@@ -32,20 +37,47 @@ func (d *CommonAction) ApplyInvoice() error {
 	queryMap := map[string]interface{}{
 		"order_code": order_code,
 	}
+	my_email, product := "", ""
+	product_type := util.Mysql.FindOne("dataexport_order", queryMap, "product_type", "")
+	if product_type != nil {
+		product = qutil.ObjToString((*product_type)["product_type"])
+	}
+	if product == "VIP订阅" {
+		//获取开发票时 用户所绑定的邮箱 user--s_myemail
+		email, _ := util.MQFW.FindOneByField("user", bson.M{"_id": bson.ObjectIdHex(qutil.ObjToString(d.GetSession("userId")))}, `{"s_myemail":1}`)
+		if len(*email) > 0 {
+			my_email = qutil.ObjToString((*email)["s_myemail"])
+		}
+	}
+	log.Println("my_email:", my_email)
+	log.Println("product:", product)
 	if applyBill_type == "个人" {
 		applyBill_status = 1
-		updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{"applyBill_status": applyBill_status})
-
+		if product == "VIP订阅" && my_email != "" {
+			updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{"applyBill_status": applyBill_status, "user_mail": my_email})
+		} else {
+			updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{"applyBill_status": applyBill_status})
+		}
 	} else if applyBill_type == "单位" {
 		applyBill_status = 1                                 //状态
 		applyBill_company = d.GetString("applyBill_company") //公司名
 		applyBill_taxnum = d.GetString("applyBill_taxnum")   //纳税人识别号
-		updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{
-			"applyBill_company": applyBill_company,
-			"applyBill_taxnum":  applyBill_taxnum,
-			"applyBill_status":  applyBill_status,
-			"applyBill_type":    1,
-		}) //修改操作
+		if product == "VIP订阅" && my_email != "" {
+			updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{
+				"applyBill_company": applyBill_company,
+				"applyBill_taxnum":  applyBill_taxnum,
+				"applyBill_status":  applyBill_status,
+				"applyBill_type":    1,
+				"user_mail":         my_email,
+			}) //修改操作
+		} else {
+			updateBl = util.Mysql.Update("dataexport_order", queryMap, map[string]interface{}{
+				"applyBill_company": applyBill_company,
+				"applyBill_taxnum":  applyBill_taxnum,
+				"applyBill_status":  applyBill_status,
+				"applyBill_type":    1,
+			}) //修改操作
+		}
 	}
 	//判断条件
 	if updateBl {
@@ -101,6 +133,8 @@ func (p *CommonAction) IsPaySuccess() {
 			"order_code": code,
 			"user_id":    userId,
 		}, "order_status,pay_time,user_mail,pay_way", "")
+		log.Println(qutil.IntAll((*data)["order_status"]))
+		log.Println(data)
 		if data != nil && qutil.IntAll((*data)["order_status"]) == 1 {
 			t, _ := time.ParseInLocation(qutil.Date_Full_Layout, qutil.ObjToString((*data)["pay_time"]), time.Local)
 			pay_way := "微信"
@@ -137,3 +171,36 @@ func (d *CommonAction) PaySuccess() {
 		"success": success,
 	})
 }
+
+//VIP订阅-是否支付完成
+func (d *CommonAction) VipPaySuccess() {
+	userId := qutil.ObjToString(d.GetSession("userId"))
+	code := d.GetString("code")
+	success := false
+	if code != "" || userId != "" {
+		data := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+			"order_code": code,
+			"user_id":    userId,
+		}, "order_status,pay_way,out_trade_no", "")
+		if data != nil && qutil.IntAll((*data)["order_status"]) == 1 {
+			payWay := qutil.ObjToString((*data)["pay_way"])
+			table := ""
+			if strings.HasPrefix(payWay, "wx") {
+				table = "weixin_pay"
+			} else if strings.HasPrefix(payWay, "ali") {
+				table = "ali_pay"
+			}
+			query := map[string]interface{}{
+				"out_trade_no": qutil.ObjToString((*data)["out_trade_no"]),
+			}
+			r := util.Mysql.FindOne(table, query, "transaction_id", "")
+			if r != nil {
+				success = true
+			}
+		}
+	}
+	log.Println("success:", success)
+	d.ServeJson(map[string]interface{}{
+		"success": success,
+	})
+}

+ 16 - 5
src/jfw/modules/subscribepay/src/service/dataExportPay_pc.go

@@ -19,9 +19,10 @@ import (
 
 type DataExportPayPC struct {
 	*xweb.Action
-	waitPayMsg            xweb.Mapper `xweb:"/dataExport/sacnPay/waitPayMsg"`     //pc端创建订单获取二维码 前后端分离
-	sacnPay_CreateOrder   xweb.Mapper `xweb:"/dataExport/sacnPay/createOrder"`    //pc端生成数据导出订单
-	getOrderPayMsg        xweb.Mapper `xweb:"/dataexport/getOrderPayMsg"`         //我的订单页面获取支付二维码
+	waitPayMsg          xweb.Mapper `xweb:"/dataExport/sacnPay/waitPayMsg"`  //pc端创建订单获取二维码 前后端分离
+	sacnPay_CreateOrder xweb.Mapper `xweb:"/dataExport/sacnPay/createOrder"` //pc端生成数据导出订单
+	getOrderPayMsg      xweb.Mapper `xweb:"/dataexport/getOrderPayMsg"`      //我的订单页面获取支付二维码
+	getPrice            xweb.Mapper `xweb:"/dataexport/getPrice"`            //我的订单页面获取支付二维码
 }
 
 var reg *regexp.Regexp //匹配特殊字符
@@ -31,6 +32,18 @@ func init() {
 	reg, _ = regexp.Compile("[^A-Za-z0-9\u4e00-\u9fa5]")
 }
 
+//获取价格
+func (p *DataExportPayPC) GetPrice() {
+	//获取数量
+	p.ServeJson(map[string]interface{}{
+		"unitPrice_normal": entity.ExConf.UnitPrice_normal,
+		"unitPrice_senior": entity.ExConf.UnitPrice_senior,
+		"discount":         entity.ExConf.Discount,
+		"orderMinPrice":    entity.ExConf.OrderMinPrice,
+		"msgMaxCount":      entity.ExConf.MsgMaxCount,
+	})
+}
+
 //pc端创建订单获取二维码 前后端分离
 func (p *DataExportPayPC) WaitPayMsg() {
 	defer qutil.Catch()
@@ -116,7 +129,6 @@ func (p *DataExportPayPC) WaitPayMsg() {
 	})
 }
 
-
 //pc端生成数据导出订单
 func (p *DataExportPayPC) SacnPay_CreateOrder() {
 	defer qutil.Catch()
@@ -456,4 +468,3 @@ func (p *DataExportPayPC) GetOrderPayMsg() {
 	})
 
 }
-

+ 91 - 39
src/jfw/modules/subscribepay/src/service/vipRenewUpgrade.go

@@ -43,29 +43,40 @@ func (this *RenewUpgrade) GetBuyMsg() {
 		end := time.Unix(endtime, 0).Format("2006-01-02")
 		now := time.Unix(time.Now().Unix(), 0).Format("2006-01-02")
 		vipStatus := (*data)["i_vip_status"]
+		buyset := vipjy["o_buyset"]
 		//		isvalidOk := true
 
-		//		str, oks := util.MQFW.FindOne("vip_upgrade", bson.M{"s_userid": userId, "i_isvalid": 0})
-		//		if oks && len(*str) > 0 && *str != nil {
-		//			area = (*str)["o_area"]
-		//			buyerclass = (*str)["a_buyerclass"]
-		//			isvalidOk = false
-		//		}
-
-		dataArr := map[string]interface{}{
-			"area":       area,
-			"buyerclass": buyerclass,
-			"cycleunit":  cycleunit,
-			"cyclecount": cyclecount,
-			"starttime":  starttime,
-			"endtime":    endtime,
-			"start":      start,
-			"end":        end,
-			"now":        now,
-			"vipStatus":  vipStatus,
-			//			"isvalidOk":  isvalidOk,
+		orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+			"user_id":      userId,
+			"order_status": 1,
+		}, "filter,order_code", "create_time desc")
+		vmsg := entity.VipSimpleMsg{}
+		if len(*orderdata) > 0 && *orderdata != nil {
+			filterStr := qutil.ObjToString((*orderdata)["filter"])
+			if err := json.Unmarshal([]byte(filterStr), &vmsg); err != nil {
+				log.Printf("%s vipSubscribeStruct PayCallBack Unmarshal 出错 [%s]\n", filterStr)
+				return
+			}
+			allArea := vmsg.Area
+			allIndustry := vmsg.Industry
+			dataArr := map[string]interface{}{
+				"area":        area,
+				"buyerclass":  buyerclass,
+				"cycleunit":   cycleunit,
+				"cyclecount":  cyclecount,
+				"starttime":   starttime,
+				"endtime":     endtime,
+				"start":       start,
+				"end":         end,
+				"now":         now,
+				"vipStatus":   vipStatus,
+				"buyset":      buyset,
+				"allarea":     allArea,
+				"allindustry": allIndustry,
+				"orderCode":   (*orderdata)["order_code"],
+			}
+			this.ServeJson(dataArr)
 		}
-		this.ServeJson(dataArr)
 	}
 }
 
@@ -99,8 +110,6 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 	pay_source := this.GetString("pay_source") //类型  续费-Renew or 升级-Upgrade
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	openId := qutil.ObjToString(this.GetSession("s_m_openid"))
-	log.Println("area", area)
-	log.Println("industry", industry)
 	//	isvalidOk, _ := this.GetBool("isvalidOk")
 	r := func() *entity.FuncResult {
 		now := time.Now()
@@ -130,7 +139,7 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 			}
 		}
 
-		res, ok := util.MQFW.FindById("user", userId, `{"l_vip_endtime":1,"l_vip_starttime":1}`)
+		res, ok := util.MQFW.FindById("user", userId, `{"l_vip_endtime":1,"l_vip_starttime":1,"o_vipjy":1}`)
 		if res == nil || len(*res) == 0 || !ok {
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
 		}
@@ -159,7 +168,6 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 		} else { //续费时间
 			orderType = 2 //续费操作
 			startTime = endTime
-			log.Println("startTime", startTime)
 		}
 		//		if date_unit == 1 { ///延长时间
 		//			endTime = endTime.AddDate(date_count, 0, 0)
@@ -169,7 +177,6 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 		if date_unit >= 1 {
 			endTime = util.GetDATE(date_unit, date_count, end)
 		}
-		log.Println("endend", endTime)
 		//		if pay_source == "Renew" && now.Unix() > end { //到期后的续费从当前时间往后延长
 		//			startTime = now
 		//			//			if date_unit == 1 { ///延长时间
@@ -179,13 +186,30 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 		//			//			}
 		//			endTime = util.GetDATE(date_unit, date_count, startTime.Unix())
 		//		}
-		filter := entity.VipSimpleMsg{
-			area,
-			industry,
-			date_count,
-			date_unit,
-			orderType,
+		filter := entity.VipSimpleMsg{}
+		if pay_source == "Renew" {
+			vipjy := (*res)["o_vipjy"].(map[string]interface{})
+			filter = entity.VipSimpleMsg{
+				qutil.ObjToMap(vipjy["o_area"]),
+				qutil.ObjArrToStringArr(vipjy["a_buyerclass"].([]interface{})),
+				nil,
+				nil,
+				date_count,
+				date_unit,
+				orderType,
+			}
+		} else if pay_source == "Upgrade" {
+			filter = entity.VipSimpleMsg{
+				allArea,
+				allIndustry,
+				area,
+				industry,
+				date_count,
+				date_unit,
+				orderType,
+			}
 		}
+
 		mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
 		if mog_id == "" {
 			return &entity.FuncResult{false, errors.New("创建订单出错"), nil}
@@ -198,29 +222,55 @@ func (this *RenewUpgrade) RenewUpgradeCreateOrder() {
 			upgradeYear, upgradeMonth := MaxUpgradeMonth(end) //获取最大升级月数
 			log.Println(upgradeYear)
 			log.Println(upgradeMonth)
+			vipjy := (*res)["o_vipjy"].(map[string]interface{})
+			addIndustry := qutil.ObjArrToStringArr(vipjy["a_buyerclass"].([]interface{}))
+			buyerclasscount := vipjy["o_buyset"].(map[string]interface{})["buyerclasscount"]
+			if len(addIndustry) != 0 {
+				log.Println("buyerclasscount", buyerclasscount)
+				log.Println("addIndustry", addIndustry)
+				reduce := qutil.IntAll(buyerclasscount) - len(addIndustry)
+				log.Println("reduce", reduce)
+				if reduce > 0 {
+					log.Println("industry", industry)
+					Leng := len(industry) - reduce
+					if len(industry) > 0 {
+						if industry[0] != "no" {
+							log.Println("industry", industry)
+							industry = industry[0:Leng]
+							log.Println("industry", industry)
+						}
+					}
+				}
+			}
+
 			addAreaY := 0
 			addAreaM := 0
 			oldAreaY := 0
 			oldAreaM := 0
 			addIndustryY := 0
 			addIndustryM := 0
-			if (*area)["no"] != "no" && industry[0] != "no" {
-				log.Println("1")
+			if (*area)["no"] != "no" && len(industry) > 0 {
+				if industry[0] != "no" {
+					addAreaY = entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeYear, 1)
+					addAreaM = entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeMonth, 2)
+				}
+			} else if (*area)["no"] != "no" && len(industry) == 0 {
 				addAreaY = entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeYear, 1)
 				addAreaM = entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeMonth, 2)
 			}
 			if (*area)["no"] != "no" {
-				log.Println("2")
 				oldAreaY = entity.JyVipSubStruct.GetSubVipPrice(area, industrys, upgradeYear, 1)
 				oldAreaM = entity.JyVipSubStruct.GetSubVipPrice(area, industrys, upgradeMonth, 2)
 			}
-			if industry[0] != "no" {
-				log.Println("3")
+			if len(industry) > 0 {
+				if industry[0] != "no" {
+					addIndustryY = entity.JyVipSubStruct.GetSubVipPrice(areas, industry, upgradeYear, 1)
+					addIndustryM = entity.JyVipSubStruct.GetSubVipPrice(areas, industry, upgradeMonth, 2)
+				}
+			} else {
 				addIndustryY = entity.JyVipSubStruct.GetSubVipPrice(areas, industry, upgradeYear, 1)
 				addIndustryM = entity.JyVipSubStruct.GetSubVipPrice(areas, industry, upgradeMonth, 2)
 			}
-			log.Println("addIndustryY", addIndustryY)
-			log.Println("addIndustryM", addIndustryM)
 			//			addY := entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeYear, 1)  //已购+新增,以年为单位的价格
 			//			addM := entity.JyVipSubStruct.GetSubVipPrice(area, industry, upgradeMonth, 2) //已购+新增,以月为单位的价格
 			//			addPrice := addM + addY                                                       //已购+新增总价格
@@ -332,7 +382,7 @@ func (this *RenewUpgrade) GetExprie() {
 	orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 		"id":      orderId,
 		"user_id": userId,
-	}, "filter", "")
+	}, "filter,order_code", "")
 	vmsg := entity.VipSimpleMsg{}
 	if orderdata != nil && len(*orderdata) > 0 {
 		filterStr := qutil.ObjToString((*orderdata)["filter"])
@@ -343,8 +393,10 @@ func (this *RenewUpgrade) GetExprie() {
 		dataArr := map[string]interface{}{
 			"area":       vmsg.Area,
 			"buyerclass": vmsg.Industry,
+			"orderCode":  (*orderdata)["order_code"],
 			"vipStatus":  vipStatus,
 		}
+		log.Println(dataArr)
 		this.ServeJson(dataArr)
 	}
 }

+ 3 - 0
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -63,6 +63,8 @@ func (this *SubVipPayOrder) CreateOrder() {
 		filter := entity.VipSimpleMsg{
 			area,
 			industry,
+			nil,
+			nil,
 			date_count,
 			date_unit,
 			orderType,
@@ -136,6 +138,7 @@ func (this *SubVipPayOrder) CreateOrder() {
 			timeStamp := qutil.Int64All((*userData)["l_vip_endtime"])
 			startTime := time.Unix(timeStamp, 0)
 			endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, timeStamp)
+			insertMap["vip_type"] = 1
 			insertMap["vip_starttime"] = qutil.FormatDate(&startTime, qutil.Date_Full_Layout)
 			insertMap["vip_endtime"] = qutil.FormatDate(&endTime, qutil.Date_Full_Layout)
 		}

+ 2 - 0
src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go

@@ -284,6 +284,8 @@ func (this *TrialOrder) TrialPay() {
 		filter := entity.VipSimpleMsg{
 			area,
 			industry,
+			nil,
+			nil,
 			date_count,
 			date_unit,
 			0,

+ 2 - 6
src/jfw/public/dataexport.go

@@ -13,12 +13,8 @@ var ExConf *DataexportConfig
 
 //价格配置文件
 type DataexportConfig struct {
-	UnitPrice_normal float64 `json:"unitPrice_normal"`
-	UnitPrice_senior float64 `json:"unitPrice_senior"`
-	Discount         float64 `json:"discount"`
-	OrderMinPrice    float64 `json:"orderMinPrice"`
-	MsgMaxCount      int     `json:"msgMaxCount"`
-	Font             Font    `json:"font"`
+	MsgMaxCount int  `json:"msgMaxCount"`
+	Font        Font `json:"font"`
 }
 
 type Font struct {

+ 10 - 5
src/jfw/public/historypush.go

@@ -46,19 +46,24 @@ func (h *historyPush) Datas_Mysql(userId string, pageNum int, selectTime, area s
 	}
 	if area != "" {
 		findStr += " and city in ("
-		for k, v := range strings.Split(area, ",") {
-			if k > 0 {
-				findStr += ","
+		var _area = ""
+		for _, v := range strings.Split(area, ",") {
+			if v == "全部" {
+				continue
 			}
-			findStr += "'" + v + "'"
+			if _area != "" {
+				_area += ","
+			}
+			_area += "'" + v + "'"
 		}
-		findStr += ")"
+		findStr += _area + ")"
 	}
 	countSQL = countSQL + findStr
 	count := Mysql.CountBySql(countSQL)
 	start := (pageNum - 1) * pageSize
 	findStr += " order by id desc limit " + fmt.Sprint(start) + "," + fmt.Sprint(pageSize)
 	findSQL = findSQL + findStr
+	//	log.Println("findsql:", findSQL)
 	list := Mysql.SelectBySql(findSQL)
 	if len(*list) > 0 {
 		pushCas := h.getJyPushs(*list)

+ 8 - 2
src/web/staticres/vipsubscribe/css/choose_area.css

@@ -494,16 +494,22 @@
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
   border: 0;
-  background: url(../image/xuanzhong.png) no-repeat center center;
+  background: url(/vipsubscribe/image/xuanzhong.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
   border: 0;
-  background: url(../image/active_disabled.png) no-repeat center center;
+  background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
+#choose_area .select-area-box .tab .province .checkbox.half:checked {
+  border: 0 !important;
+  background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+  background-size: cover !important;
+}
+
 #choose_area .select-area-box label::after {
   font-size: 14px;
   float: right;

+ 2 - 1
src/web/staticres/vipsubscribe/css/choose_area_new.css

@@ -425,7 +425,6 @@
 }
 
 #choose_area .optional_count, #choose_area .all_area {
-  background: #fff;
   height: .88rem;
   line-height: .88rem;
   padding: 0 .3rem;
@@ -524,6 +523,7 @@
   border: 0;
   background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
   background-size: 100% 100%;
+  opacity: 1;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half {
@@ -536,6 +536,7 @@
   border: 0 !important;
   background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
   background-size: cover !important;
+  opacity: 1!important;
 }
 
 #choose_area .select-area-box .tab .optional {

+ 140 - 0
src/web/staticres/vipsubscribe/css/vip_service_expire.css

@@ -318,3 +318,143 @@
   color: #2cb7ca;
   background-color: transparent;
 }
+
+.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%);
+  z-index: 99999;
+}
+
+.custom-toast .weui-icon_toast {
+  display: none;
+}
+
+.custom-toast .weui-toast__content {
+  margin: 0;
+}

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

@@ -196,4 +196,27 @@ function getSetMealPrice(c,iCount,u,price){
 				return price.year.oneCity_oneBuyerClass * iCount	//1年1市icount个行业
 			}
 	}
+}
+
+//查看用户是否有未执行的订单
+function checkOrder(){
+	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){
+				weui.toast('订单尚未到期', {
+	                duration: 3000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+			}
+		}
+	});
+	return flag
 }

+ 128 - 86
src/web/staticres/vipsubscribe/js/editArea.js

@@ -2,21 +2,21 @@
 var areaData = {
     "data": {
         "area": {
-            "北京": [],
-            "河南": [
-                "商丘市",
-                "安阳市",
-                "新乡市",
-                "郑州市"
-            ],
-            "澳门": [],
-            "甘肃": []
+            // "北京": [],
+            // "河南": [
+            //     "洛阳市",
+            //     "驻马店市",
+            //     "周口市",
+            //     // "郑州市"
+            // ],
+            // "澳门": [],
+            // "甘肃": []
         },
         "buyset": {
-            "areacount": 4,
+            "areacount": -1,
             "buyerclasscount": 11,
             "citys": {
-                "河南": 4
+                //   "河南": 4
             }
         },
         "industry": [
@@ -37,7 +37,6 @@ var areaData = {
     "success": true
 }
 
-
 //加载数据
 function getData() {
     $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
@@ -76,16 +75,14 @@ var obj
 
 // 改变选择结果方法
 function getResult() {
-    var data = '';
     obj = {};
-    $('.result_name').empty();
+    //$('.result_name').empty();
     $('.province').each(function () {
         let provinceText = $(this).text().trim();//省份名称
         let isChecked = $(this).children('.checkbox').is(':checked');
         let isHalf = $(this).children('.checkbox').hasClass('half');
         let arr = [];
         if (isChecked) {
-            data += provinceText + '、';
             obj[provinceText] = [];
         } else if (isHalf && !isChecked) {
             let $that = $(this);
@@ -97,13 +94,12 @@ function getResult() {
                 }
             })
             obj[$that.text().trim()] = arr
-            data += `${$that.text().trim()}(${arr.join('、')})、`
         }
     })
     $('count').html($('.checkbox:not(.other):checked').length);
-    $('.result_name').append(data.substring(0, data.length - 1));
-    //校验是否修改
-    if (theSameAs(obj)) {
+    //$('.result_name').append(getAreaClassArr_index(obj).join("、"));
+//校验是否修改
+    if (theSameAs(obj) || $.isEmptyObject(obj)) {
         $('#enter').attr("disabled", "disabled");
     } else {
         $('#enter').removeAttr("disabled");
@@ -114,7 +110,6 @@ function getResult() {
 function init() {
     let p = areaData.data.area;
     let count = areaData.data.buyset.citys;
-    var ht = '';
     // 1.渲染城市列表
     $(".select-area-box ul li:not('.index')").each(function () {
         var text = $(this).find(".province").text().trim()
@@ -128,88 +123,130 @@ function init() {
         box.html(html)
     })
     // 2.当areacount == -1时,全国为选中状态,为正数时为选中的省份数目,全国选项不显示
-    if (areaData.data.buyset.areacount == -1) {
-        // 选中全国
+    let pLength = Object.keys(areaData.data.area).length;
+    let cLength = Object.keys(areaData.data.buyset.citys).length
+    console.log(pLength, cLength)
+    if (areaData.data.buyset.areacount == -1 && pLength == 0 && cLength == 0) {
+        // 当购买的全国切选中的是全国时
         // $('.optional_count').html("可选择全部区域")
-        $('.all_area').show()
+        //$('.all_area').show()
         $('.optional_count').hide()
         $('.total').html('34')
         $('.count').html('34')
         $('.tab.whole').parent('li').show();
         $('.checkbox.other').prop('checked', true);
-        $('.checkbox:not(.other)').attr('disabled', true)
-        ht += `<span>全国</span>`
+        // $('.checkbox:not(.other)').attr('disabled',true)
+        //$('.result_name').append(`<span>全国</span>`);
+    } else if (areaData.data.buyset.areacount == -1 && pLength != 0) {
+        // 当购买的全国而没有选择全国,选择部分省市时
+        //$('.all_area').show();
+        $('.province').removeAttr('data-count');
+        $('.optional_count').hide();
+        $('.total').html('34');
+        initResult()
     } else {
-        $('.all_area').hide()
+        //$('.all_area').hide()
         $('.optional_count').show()
         $('.total').html(areaData.data.buyset.areacount)
         $('.tab.whole').parent('li').hide();
-        $('.checkbox.other').attr('disabled', true);
-        // 渲染已选择结果
-        for (const k in p) {
-            console.log(p[k], k)
-            if (p[k].length == 0) {
-                ht += k + '、';
-                $('.province').each(function () {
-                    let t = $(this).text().trim();
-                    if (k == t && p[k].length == 0) {
-                        // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
-                        // $(this).parent('.tab').unbind("click").parent('li').siblings().find('.tab').unbind("click");
+        // $('.checkbox.other').attr('disabled',true);
+        initResult()
+    }
+
+}
+
+function initResult() {
+    let isAll = areaData.data.buyset.areacount;
+    let p = areaData.data.area;
+    let count = areaData.data.buyset.citys;
+    // 渲染已选择结果
+    for (const k in p) {
+        console.log(p[k], k)
+        if (p[k].length == 0) {
+            $('.province').each(function () {
+                let t = $(this).text().trim();
+                if (k == t && p[k].length == 0) {
+                    // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
+                    if (isAll != -1) {
                         $(this).parent().siblings().children('.city').addClass('active').attr('disabled', true);
-                        $(this).children('.checkbox').prop('checked', true)
+                        $(this).parent('.tab').unbind('click').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
+                    } else {
+                        $(this).parent().siblings().children('.city').addClass('active').removeAttr('disabled')
+                    }
+                    $(this).children('.checkbox').prop('checked', true)
+                }
+            })
+        } else {
+            console.log(k, p[k].length)
+            $('.city').each(function () {
+                let t = $(this).text().trim();
+                p[k].forEach(v => {
+                    // console.log(v,t)
+                    if (v == t) {
+                        let that = $(this).parents('li').find('.tab:not(.municipality)');
+                        console.log("v==t")
+                        // 如果是可修改城市的省份,则可以进行下拉展示
+                        that.bind('click', function () {
+                            slideFun($(this));
+                        })
+                        $(this).addClass('active').removeAttr('disabled').parent().siblings('.tab').find('input').addClass('half');
+                        return;
                     }
                 })
-            } else {
-                console.log(k, p[k])
-                ht += `${k}( ${p[k].join('、')} )、`;
-                $('.city').each(function () {
-                    let t = $(this).text().trim();
-                    p[k].forEach(v => {
-                        // console.log(v,t)
-                        if (v == t) {
-                            let that = $(this).parents('li').find('.tab:not(.municipality)');
-                            console.log("v==t")
-                            // 如果是可修改城市的省份,则可以进行下拉展示
-                            that.bind('click', function () {
-                                slideFun($(this));
-                            });
-                            $(this).addClass('active').parent().siblings('.tab').find('input').addClass('half');
-                            return;
-                        }
-                    })
-                })
-                for (const c in count) {
-                    if (p[k].length >= count[c]) {
+            })
+            for (const c in count) {
+                if (p[k].length >= count[c]) {
+                    if (isAll != -1) {
                         $('.city:not(.active)').attr('disabled', true)
+                    } else {
+                        $('.city:not(.active)').removeAttr('disabled')
                     }
                 }
             }
         }
-        // 添加可选择城市文字 和自定义属性值
+    }
+    // 添加可选择城市文字 和自定义属性值
+    if (areaData.data.buyset.areacount != -1) {
         for (const c in count) {
             $('.province').each(function () {
                 let t = $(this).text().trim();
                 if (c == t) {
                     $(this).attr("data-count", count[c]);
                     $(this).after(`<em class="optional">可选择 ${count[c]} 个市</em>`)
-                    $(this).parent().bind('click', function () {
+                    let that = $(this).parent('.tab:not(.municipality)');
+                    that.bind('click', function () {
                         slideFun($(this));
                     })
                 }
             })
         }
-        $('.result_name').append(ht.substring(0, ht.length - 1));
-        $('.count').html($('.checkbox:not(.other):checked').length)
-        //$('.city:not(.active)').attr('disabled', true)
-        // 如果选中的省份数量等于购买的省份数量,则将其他未选中的省份禁用
-        if ($('.checkbox:not(.other):checked').length == $('.total').html()) {
-            $('.checkbox:not(:checked)').attr('disabled', true)
-        }
+    }
+    //$('.result_name').append(getAreaClassArr_index(areaData.data.area).join("、"));
+    $('.count').html($('.checkbox:not(.other):checked').length)
+    // 如果选中的省份数量等于购买的省份数量,则将其他未选中的省份禁用
+    if ($('.checkbox:not(.other):checked').length == $('.total').html()) {
+        $('.checkbox:not(:checked)').attr('disabled', true);
     }
     $('#enter').attr("disabled", "disabled");
 }
 
 $(function () {
+    // 省下拉事件
+    $('.tab:not(.municipality)').on('click', function () {
+        if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
+            $(this).children().children('i').css({
+                "display": "inline-block",
+                "transform": "rotate(0)"
+            })
+        } else {
+            $(this).children().children('i').css({
+                "display": "inline-block",
+                "transform": "rotate(-180deg)"
+            })
+        }
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).parent().siblings().children('.tab').removeClass('selected');
+    });
     getData();
     // 初始化
     init();
@@ -219,25 +256,21 @@ $(function () {
         let isChecked = $(this).is(':checked');
         if (isChecked) {
             $('.count').html('34')
-            $('.checkbox:not(.other)').prop('checked', false).attr('disabled', true).removeClass('half')
-            $('.city').removeClass('active').attr('disabled', true)
-            $('.tab').unbind("click").siblings().slideUp()
+            $('.checkbox:not(.other)').prop('checked', false).removeClass('half')
+            $('.city').removeClass('active');
+            $('.tab_content').slideUp()
             getResult()
         } else {
-            // $('.count').html($('.checkbox:not(.other):checked').length)
             $('.checkbox:not(.other)').removeAttr('disabled')
             $('.city').removeAttr('disabled')
-            $('.tab:not(.municipality)').on('click', function () {
-                slideFun($(this));
-            });
             getResult()
         }
     })
     // 2.点击非全国按钮onchange事件;
     $('.checkbox:not(.other)').on('change', function () {
+        $('.checkbox.other').prop('checked', false);
         let checkedLength = $('.checkbox:checked').length;
         let totalLength = $('.total').text();
-        // console.log(checkedLength,totalLength)
         $('.count').html(checkedLength)
         if (checkedLength < totalLength) {
             $('.checkbox:not(.other)').removeAttr('disabled')
@@ -247,10 +280,14 @@ $(function () {
             getResult()
         }
         if ($(this).is(':checked')) {
-            $(this).prop('checked', true).removeClass('half').parent().parent().siblings().find('.city').addClass('active').attr('disabled', true)
+            if (areaData.data.buyset.areacount != -1) {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active').attr('disabled', true);
+            } else {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active');
+            }
             getResult()
         } else {
-            $(this).prop('checked', false).removeClass('half').parent().parent().siblings().find('.city').removeClass('active').removeAttr('disabled')
+            $(this).prop('checked', false).removeClass('half').parent().parent().siblings().find('.city').removeClass('active').removeAttr('disabled');
             getResult()
         }
 
@@ -259,10 +296,11 @@ $(function () {
     $('.checkbox.half').on('change', function () {
         console.log($(this).is(':checked'))
         if ($(this).is(':checked')) {
-            $(this).prop('checked', true).removeClass('half');
-            $(this).removeClass('half').parent().parent().siblings().find('.city').addClass('active').attr('disabled', true);
-            $(this).parent().parent().siblings().children('.city').addClass('active');
-            //$(this).parent().siblings('.optional').hide();
+            if (areaData.data.buyset.areacount != -1) {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active').attr('disabled', true);
+            } else {
+                $(this).prop('checked', true).removeClass('half').parents('li').find('.city').addClass('active');
+            }
             getResult()
         } else {
             $(this).prop('checked', false);
@@ -274,10 +312,10 @@ $(function () {
     // 4.点击城市按钮触发的事件
     $('.tab_content').on('click', '.city', function () {
         let count = $(this).parent().siblings().find('.province').attr('data-count');
-        $(this).toggleClass('active')
+        $(this).toggleClass('active');
+        $('.checkbox.other').prop('checked', false);
         var isActive = $(this).parent().find('.city.active').length
         let cityLength = $(this).parent().find('.city').length
-
         if (isActive === cityLength) {//当选中的城市数量等于该省下所有城市总数时,即为全选
             var oInput = $(this).parents('li').find('input.checkbox')
             oInput.removeClass('half').prop('checked', true)
@@ -316,11 +354,15 @@ $(function () {
     // 取消按钮事件 返回上一页
     $('#cancel').click(function () {
         // window.history.go(-1)
-        $('.result_name').empty()
+        //$('.result_name').empty()
         $('.checkbox').prop('checked', false).removeAttr('disabled');
         $('.city').removeClass('active');
         $('.tab_content').slideUp();
-        $('.optional').remove()
+        $('.optional').remove();
+        $('.tab').find('i').css({
+            "display": "inline-block",
+            "transform": "rotate(0)"
+        })
         init();
     })
     // 确定修改事件

+ 73 - 0
src/web/staticres/vipsubscribe/js/mapArea.js

@@ -0,0 +1,73 @@
+/**
+ * @file china-map.json
+ * @author wangshan 简易版2019-11-21
+ */
+var chinaMapJSON = [{
+	"安徽": ["合肥市", "芜湖市", "蚌埠市", "淮南市", "马鞍山市", "淮北市", "铜陵市", "安庆市", "黄山市", "滁州市", "阜阳市", "宿州市", "巢湖市", "六安市", "亳州市", "池州市", "宣城市"]
+}, {
+	"澳门": ["澳门"]
+}, {
+	"北京": ["北京市"]
+}, {
+	"重庆": ["重庆市"]
+}, {
+	"福建": ["福州市", "厦门市", "宁德市", "莆田市", "泉州市", "漳州市", "龙岩市", "三明市", "南平市"]
+}, {
+	"广东": ["广州市", "汕尾市", "阳江市", "揭阳市", "茂名市", "惠州市", "江门市", "韶关市", "梅州市", "汕头市", "深圳市", "珠海市", "佛山市", "肇庆市", "湛江市", "中山市", "河源市", "清远市", "云浮市", "潮州市", "东莞市"]
+}, {
+	"广西": ["防城港市", "南宁市", "崇左市", "来宾市", "柳州市", "桂林市", "梧州市", "贺州市", "贵港市", "玉林市", "百色市", "钦州市", "河池市", "北海市"]
+}, {
+	"贵州": ["贵阳市", "遵义市", "安顺市", "黔南布依族苗族自治州", "黔东南苗族侗族自治州", "铜仁市", "毕节市", "六盘水市", "黔西南布依族苗族自治州"]
+}, {
+	"甘肃": ["兰州市", "金昌市", "白银市", "天水市", "嘉峪关市", "武威市", "张掖市", "平凉市", "酒泉市", "庆阳市", "定西市", "陇南市", "临夏回族自治州", "甘南藏族自治州"]
+}, {
+	"河北": ["邯郸市", "石家庄市", "秦皇岛市", "保定市", "张家口市", "承德市", "唐山市", "廊坊市", "沧州市", "衡水市", "邢台市"]
+}, {
+	"湖北": ["武汉市", "襄阳市", "鄂州市", "孝感市", "黄冈市", "黄石市", "咸宁市", "荆州市", "宜昌市", "恩施土家族苗族自治州", "神农架林区", "十堰市", "随州市", "荆门市", "仙桃市", "天门市", "潜江市"]
+}, {
+	"黑龙江": ["哈尔滨市", "齐齐哈尔市", "鸡西市", "牡丹江市", "七台河市", "佳木斯市", "鹤岗市", "双鸭山市", "绥化市", "黑河市", "大兴安岭地区", "伊春市", "大庆市"]
+}, {
+	"海南": ["海口市", "三亚市", "五指山市", "琼海市", "儋州市", "文昌市", "万宁市", "东方市", "澄迈县", "定安县", "屯昌县", "临高县", "白沙黎族自治县", "昌江黎族自治县", "乐东黎族自治县", "陵水黎族自治县", "保亭黎族苗族自治县", "琼中黎族苗族自治县", "三沙市"]
+}, {
+	"河南": ["商丘市", "郑州市", "安阳市", "新乡市", "许昌市", "平顶山市", "信阳市", "南阳市", "开封市", "洛阳市", "济源市", "焦作市", "鹤壁市", "濮阳市", "周口市", "漯河市", "驻马店市", "三门峡市"]
+}, {
+	"湖南": ["岳阳市", "长沙市", "湘潭市", "株洲市", "衡阳市", "郴州市", "常德市", "益阳市", "娄底市", "邵阳市", "湘西土家族苗族自治州", "张家界市", "怀化市", "永州市"]
+}, {
+	"吉林": ["长春市", "吉林市", "延边朝鲜族自治州", "四平市", "通化市", "白城市", "辽源市", "松原市", "白山市"]
+}, {
+	"江苏": ["南京市", "无锡市", "镇江市", "苏州市", "南通市", "扬州市", "盐城市", "徐州市", "淮安市", "连云港市", "常州市", "泰州市", "宿迁市"]
+}, {
+	"江西": ["鹰潭市", "新余市", "南昌市", "九江市", "上饶市", "抚州市", "宜春市", "吉安市", "赣州市", "景德镇市", "萍乡市"]
+}, {
+	"辽宁": ["沈阳市", "铁岭市", "大连市", "鞍山市", "抚顺市", "本溪市", "丹东市", "锦州市", "营口市", "阜新市", "辽阳市", "朝阳市", "盘锦市", "葫芦岛市"]
+}, {
+	"内蒙古": ["呼伦贝尔市", "呼和浩特市", "包头市", "乌海市", "乌兰察布市", "通辽市", "赤峰市", "鄂尔多斯市", "巴彦淖尔市", "锡林郭勒盟", "兴安盟", "阿拉善盟"]
+}, {
+	"宁夏": ["银川市", "石嘴山市", "吴忠市", "固原市", "中卫市"]
+}, {
+	"青海": ["海北藏族自治州", "西宁市", "海东市", "黄南藏族自治州", "海南藏族自治州", "果洛藏族自治州", "玉树藏族自治州", "海西蒙古族藏族自治州"]
+}, {
+	"山西": ["朔州市", "忻州市", "太原市", "大同市", "阳泉市", "晋中市", "长治市", "晋城市", "临汾市", "吕梁市", "运城市"]
+}, {
+	"陕西": ["西安市", "咸阳市", "延安市", "榆林市", "渭南市", "商洛市", "安康市", "汉中市", "宝鸡市", "铜川市"]
+}, {
+	"上海": ["上海市"]
+}, {
+	"山东": ["菏泽市", "济南市", "青岛市", "淄博市", "德州市", "烟台市", "潍坊市", "济宁市", "泰安市", "临沂市", "滨州市", "东营市", "威海市", "枣庄市", "日照市", "莱芜市", "聊城市"]
+}, {
+	"四川": ["成都市", "攀枝花市", "自贡市", "绵阳市", "南充市", "达州市", "遂宁市", "广安市", "巴中市", "泸州市", "宜宾市", "资阳市", "内江市", "乐山市", "眉山市", "凉山彝族自治州", "雅安市", "甘孜藏族自治州", "阿坝藏族羌族自治州", "德阳市", "广元市"]
+}, {
+	"天津": ["天津市"]
+}, {
+	"台湾": ["台湾省"]
+}, {
+	"西藏": ["拉萨市", "日喀则市", "山南市", "林芝市", "昌都市", "那曲地区", "阿里地区"]
+}, {
+	"新疆": ["塔城地区", "哈密地区", "和田地区", "阿勒泰地区", "克孜勒苏柯尔克孜自治州", "博尔塔拉蒙古自治州", "克拉玛依市", "乌鲁木齐市", "石河子市", "昌吉回族自治州", "五家渠市", "吐鲁番市", "巴音郭楞蒙古自治州", "阿克苏地区", "阿拉尔市", "喀什地区", "图木舒克市", "伊犁哈萨克自治州"]
+}, {
+	"香港": ["香港"]
+}, {
+	"云南": ["西双版纳傣族自治州", "德宏傣族景颇族自治州", "昭通市", "昆明市", "大理白族自治州", "红河哈尼族彝族自治州", "曲靖市", "保山市", "文山壮族苗族自治州", "玉溪市", "楚雄彝族自治州", "普洱市", "临沧市", "怒江傈僳族自治州", "迪庆藏族自治州", "丽江市"]
+}, {
+	"浙江": ["舟山市", "衢州市", "杭州市", "湖州市", "嘉兴市", "宁波市", "绍兴市", "温州市", "丽水市", "金华市", "台州市"]
+}]

+ 21 - 1
src/web/templates/pc/biddetail.html

@@ -196,6 +196,18 @@ a{
 .j-content.limitshare .com-prebuilt .jykeyword-border{
 	border-bottom:1px solid rgba(44,183,202,.2);
 }
+
+.com-buyerclass{
+	background-color: #CFAD89;
+    border-radius: 3px;
+    color: #fff;
+    padding: 1px 6px 2px 6px;
+    margin-right: 5px;
+    font-size: 14px;
+}
+.com-buyerclass > a{
+    color: #fff;
+}
 </style>
 </head>
 <body>
@@ -361,7 +373,7 @@ function isWechat() {
 			</div>-->
 		</div>
 		<center class="reward text-align">
-			<br><div>打赏</div>
+			<br><div>打赏</div>
 		</center>
 		{{if .T.obj.urltop}}<a class="trs" style="color:white"> </a>{{end}}
 		{{if .T.isForceShare}}
@@ -908,6 +920,7 @@ var thishtlists_ent = function(){
         })
     });
 }
+
 //
 var thishtlists = function(){
 	var _id = {{.T.obj._id}};
@@ -1092,6 +1105,7 @@ var type = {{.T.obj.subtype}};
 var area = {{.T.obj.area}};
 //var industry = {{.T.obj.industry}};
 var subscopeclass = {{.T.obj.s_subscopeclass}};
+var buyerclass={{.T.obj.buyerclass}}
 
 if (area !="" && area != "A"){
 	$(".com-statusbar").append('<span class="com-area"><a href="/list/area/'+{{.T.obj.areaadd}}+'.html">'+area+'</a></span>');
@@ -1120,6 +1134,12 @@ if(industry && industry!="undefined"){
 	$(".com-statusbar").append('<span class="com-industry"><a href="/list/industry/'+{{.T.obj.indadd}}+'.html">'+suclass.split("_")[0]+'</a></span>');
 }
 //
+if ({{.T.isVip}}){
+	if(buyerclass){
+		$(".com-statusbar").append('<span class="com-buyerclass"><a>'+buyerclass+'</a></span>');
+	}
+}
+//
 if(publishtime != ""){
 	var diff = timeDiff(new Date(Number(publishtime+"000")));
 	if(diff != null){

+ 18 - 0
src/web/templates/pc/biddetail_rec.html

@@ -189,6 +189,17 @@ a{
 	background: #fff;
     border-bottom: 1px solid #e0e0e0;
 }
+.com-buyerclass{
+	background-color: #CFAD89;
+    border-radius: 3px;
+    color: #fff;
+    padding: 1px 6px 2px 6px;
+    margin-right: 5px;
+    font-size: 14px;
+}
+.com-buyerclass > a{
+    color: #fff;
+}
 </style>
 </head>
 <body>
@@ -1678,6 +1689,7 @@ var area = {{.T.obj.area}};
 //var industry = {{.T.obj.industry}};
 var industry = getQueryString("industry");
 var subscopeclass = {{.T.obj.s_subscopeclass}};
+var buyerclass ={{.T.obj.buyerclass}};
 
 if (area !="" && area != "A"){
 	$(".com-statusbar").append('<span class="com-area"><a href="/list/area/'+{{.T.obj.areaadd}}+'.html">'+area+'</a></span>');
@@ -1706,6 +1718,12 @@ if(industry && industry!="undefined"){
 	$(".com-statusbar").append('<span class="com-industry"><a href="/list/industry/'+{{.T.obj.indadd}}+'.html">'+suclass.split("_")[0]+'</a></span>');
 }
 //
+if ({{.T.isVip}}){
+	if(buyerclass){
+		$(".com-statusbar").append('<span class="com-buyerclass"><a>'+buyerclass+'</a></span>');
+	}
+}
+//
 if(publishtime != ""){
 	var diff = timeDiff(new Date(Number(publishtime+"000")));
 	if(diff != null){

+ 487 - 446
src/web/templates/pc/createOrderPage.html

@@ -4,18 +4,20 @@
     <meta name="viewport"
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet"
+          href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/payment_order.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="https://at.alicdn.com/t/font_624651_wz9gl1vebtf.css">
-	
-	{{include "/common/pnc.html"}}
-	<link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-	<link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
-	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
-	<link href="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.css" rel="stylesheet">
+
+    {{include "/common/pnc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
+    <link href="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.css" rel="stylesheet">
     <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
-	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
     <title>支付订单</title>
 </head>
 <body>
@@ -31,10 +33,10 @@
         <div class="pro r a1">
             3.数据导出
         </div>
-		<div class="call">
-			<div>如有疑问,请拨</div>
-			<div class="callNum">400-108-6670</div>
-		</div>
+        <div class="call">
+            <div>如有疑问,请拨</div>
+            <div class="callNum">400-108-6670</div>
+        </div>
     </div>
     <div class="inner all" style="position: relative;">
         <div class="infotitle clearfix">
@@ -42,7 +44,8 @@
             <em style="display:none">最大限额20,000条</em>
             <a class="dataPreview"><span class="iconfont icon-yulan"></span>预览数据</a>
             <a class="fr goback" style="position: relative;text-decoration: none;">
-				<img class="goback" src="{{Msg "seo" "cdn"}}/dataExport/image/sieve.png" style="width: 16px;height: 16px;position: absolute;left: -19px;top: 2px;">返回筛选</a>
+                <img class="goback" src="{{Msg "seo" "cdn"}}/dataExport/image/sieve.png"
+                     style="width: 16px;height: 16px;position: absolute;left: -19px;top: 2px;">返回筛选</a>
         </div>
         <div class="guige">
             <div class="title">数据规格<i id="exp" class="iconfont icon-bangzhu"></i></div>
@@ -50,7 +53,7 @@
                 <div class="bz no-select">
                     <p>标准字段包</p>
                     <p>
-                        <del>{{.T.unitPrice_normal}}元/条</del>&nbsp;<span>{{.T.unitPrice_normal_final}}元/条</span></p>
+                        <del>**元/条</del>&nbsp;<span>**元/条</span></p>
                 </div>
                 <div class="gj no-select">
                     <p><i class="iconfont icon-huangguan"></i>高级字段包</p>
@@ -61,33 +64,25 @@
         </div>
         <div class="email" id="email">
             <div class="title">联系方式</div>
-			<div class="icon-input email">
-			    <input type="text" class="fl input-c email_input" placeholder="请输入邮箱地址,用于接收导出的数据">
-                <input type="text" class="fl test verity_input" style="display:none;" type="text" maxlength="6" placeholder="请输入邮箱验证码">
+            <div class="icon-input email">
+                <input type="text" class="fl input-c email_input" placeholder="请输入邮箱地址,用于接收导出的数据">
+                <input type="text" class="fl test verity_input" style="display:none;" type="text" maxlength="6"
+                       placeholder="请输入邮箱验证码">
                 <button class="fl sub sendEmail" style="display:none;">获取验证码</button>
                 <div class="fl status clearfix">
                     <i class="iconfont icon-zhengque succ email_check_ok" style="display:none"></i>
                     <p class="err email_err_msg" style="display:none"><i class="iconfont icon-cuowu"></i>您输入的验证码不正确</p>
                 </div>
-				<div style="clear:both;"></div>
-			</div>
-			<div class="icon-input phone">
-			    <input type="text" class="fl input-c phone_input" maxlength="11" placeholder="请输入手机号">
+                <div style="clear:both;"></div>
+            </div>
+            <div class="icon-input phone">
+                <input type="text" class="fl input-c phone_input" maxlength="11" placeholder="请输入手机号">
                 <div class="fl status clearfix">
                     <i class="iconfont icon-zhengque succ phone_check_ok" style="margin-left:15px; display:none"></i>
                     <p class="err phone_err_msg" style="display:none"><i class="iconfont icon-cuowu"></i>您输入的手机号不正确</p>
                 </div>
-				<div style="clear:both;"></div>
-			</div>
-<!--            <div class="input clearfix" style="display:block;">
-                <input class="fl em email_input" type="text" placeholder="请输入邮箱地址,用于接收导出的数据">
-                <input class="fl test verity_input" type="text" maxlength="6" placeholder="请输入邮箱验证码">
-                <button class="fl sub sendEmail">获取验证码</button>
-                <div class="fl status clearfix">
-                    <i class="fl iconfont icon-zhengque succ email_check_ok" style="display:none"></i>
-                    <p class="err fl email_err_msg" style="display:none"><i class="iconfont icon-cuowu"></i>您输入的验证码不正确</p>
-                </div>
-            </div>-->
+                <div style="clear:both;"></div>
+            </div>
         </div>
         <!--字段包说明-->
         <span class="remind" style="display:none;">
@@ -112,11 +107,11 @@
             </div>
         </div>
         <div class="money ">
-			<div>
-<!--				<p>如需发票,请拨打客服电话 400-108-6670</p>-->
-				<!--<p>如发票金额低于200元(不含),则快递费用到付。</p>-->
-			</div>
-			<div class="clearfix">
+            <div>
+                <!--				<p>如需发票,请拨打客服电话 400-108-6670</p>-->
+                <!--<p>如发票金额低于200元(不含),则快递费用到付。</p>-->
+            </div>
+            <div class="clearfix">
                 <p class="fr">应付总额:现价 <span class="pay_discount"></span></p>
             </div>
             <div class="clearfix">
@@ -127,9 +122,10 @@
         </div>
         <div class="info clearfix">
             <div class="fl left">
-				<p>购买须知:</p>
-				<p>最低起售{{.T.orderMinPrice}}元,标准字段包:原价{{.T.unitPrice_normal}}元/条,{{.T.discount10}}折价{{.T.unitPrice_normal_final}}元/条计费,</p>
-				<p>高级字段包:原价{{.T.unitPrice_senior}}元/条,{{.T.discount10}}折价{{.T.unitPrice_senior_final}}元/条计费</p>       
+                <p>购买须知:</p>
+                <p>最低起售<span></span>元,标准字段包:原价<span></span>元/条,<span></span>
+                    折价<span></span>元/条计费,</p>
+                <p>高级字段包:原价<span></span>元/条,<span></span>折价<span></span>元/条计费</p>
             </div>
             <div class="fr right">
                 <p class="clearfix t fr">
@@ -144,418 +140,463 @@
             </div>
         </div>
     </div>
-	<div class="dialog-box type-a"></div>
+    <div class="dialog-box type-a"></div>
 </section>
 
 <script>
-	var msgCount={{.T.msgCount}}
-	var msgMaxCount={{.T.msgMaxCount}}
-	var discount={{.T.discount}}
-	var unitPrice_normal={{.T.unitPrice_normal}}
-	var unitPrice_senior={{.T.unitPrice_senior}}
-	var orderMinPrice={{.T.orderMinPrice}}
-	var finishEmailVerity=false;
-	var readClause=false;
-	var dataType=1;
-  	var pay_way="wx_pc";
-	var finishPhoneVerity=false;
-	
-	var email_lastInput={{.T.email}}
-	var email_lastVerity={{.T.timeSpaceing}}
-	var previewDataTime={{.T.PreviewData}}
-	var phone_lastInput={{.T.phone}}
-	$(function () {
-		haslogin({{.T.logid}});
-		//样式
-		selcetIndexNav(4);
-		$(".public-nav").css("background","#fff")
-		$(".logo img").attr("src","/images/swordfish/sf_01_new.png");
-		//数据展示
-		var showCount=FormatNum(msgCount);
-		$(".msgCount").text(showCount);
-		if (sessionStorage.getItem("order_spec"+{{.T._id}})!=null){
-			dataType = sessionStorage.getItem("order_spec"+{{.T._id}});
-		}
-		if(dataType==1){
-			$(".switch-dataType .bz").addClass("active")
-			$(".switch-dataType .gj").removeClass("active")
-		}else{
-			$(".switch-dataType .bz").removeClass("active")
-			$(".switch-dataType .gj").addClass("active")
-		}
-		ChangePayMoney();
+    var msgCount ={{.T.msgCount}}
+    var previewDataTime ={{.T.PreviewData}}
+
+    var msgMaxCount, discount, unitPrice_normal, unitPrice_senior, orderMinPrice;
+
+    var finishEmailVerity = false;
+    var readClause = false;
+    var dataType = 1;
+    var pay_way = "wx_pc";
+    var finishPhoneVerity = false;
+
+    var email_lastInput ={{.T.email}}
+    var email_lastVerity ={{.T.timeSpaceing}}
+
+    var phone_lastInput ={{.T.phone}}
+        $(function () {
+            haslogin({{.T.logid}});
+            //加载价格
+            $.ajax({
+                url: "/jypay/dataexport/getPrice",
+                type: "POST",
+                async: false,
+                dataType: "json",
+                success: function (r) {
+                    if (r) {
+                        discount = r.discount;
+                        msgMaxCount = r.unitPrice_normal;
+                        orderMinPrice = r.orderMinPrice;
+                        unitPrice_normal = r.unitPrice_normal;
+                        unitPrice_senior = r.unitPrice_senior;
+                    }
+                }
+            });
+            //样式
+            selcetIndexNav(4);
+            $(".public-nav").css("background", "#fff")
+            $(".logo img").attr("src", "/images/swordfish/sf_01_new.png");
+
+            //数据展示
+            var showCount = FormatNum(msgCount);
+            $(".msgCount").text(showCount);
+            //数据规格
+            $(".guige .bz del").text(unitPrice_normal + "元/条");
+            $(".guige .bz span").text(unitPrice_normal * discount + "元/条");
+            $(".guige .gj del").text(unitPrice_senior + "元/条");
+            $(".guige .gj span").text(unitPrice_senior * discount + "元/条");
+            //购买须知
+            $(".fl.left p:eq(1) span:eq(0)").text(orderMinPrice);
+            $(".fl.left p:eq(1) span:eq(1)").text(unitPrice_normal);
+            $(".fl.left p:eq(1) span:eq(2)").text(discount*10);
+            $(".fl.left p:eq(1) span:eq(3)").text(discount*unitPrice_normal);
+
+            $(".fl.left p:eq(2) span:eq(0)").text(unitPrice_senior);
+            $(".fl.left p:eq(2) span:eq(1)").text(discount*10);
+            $(".fl.left p:eq(2) span:eq(2)").text(discount*unitPrice_senior);
+
+            if (sessionStorage.getItem("order_spec" +{{.T._id}}) != null) {
+                dataType = sessionStorage.getItem("order_spec" +{{.T._id}});
+            }
+            if (dataType == 1) {
+                $(".switch-dataType .bz").addClass("active")
+                $(".switch-dataType .gj").removeClass("active")
+            } else {
+                $(".switch-dataType .bz").removeClass("active")
+                $(".switch-dataType .gj").addClass("active")
+            }
+            ChangePayMoney();
+
+            if (sessionStorage.getItem("order_email" +{{.T._id}}) != null) {
+                $(".email_check_ok").show();
+                $(".email_input").val(sessionStorage.getItem("order_email" +{{.T._id}}));
+                finishEmailVerity = true;
+            } else if (email_lastInput != "") {
+                $(".email_check_ok").show();
+                $(".email_input").val(email_lastInput);
+                finishEmailVerity = true;
+            }
+            if (email_lastVerity > 0) {
+                sendemailTimer(email_lastVerity);
+            }
+            if (sessionStorage.getItem("order_phone" +{{.T._id}}) != null) {
+                $(".phone_check_ok").show();
+                $(".phone_input").val(sessionStorage.getItem("order_phone" +{{.T._id}}));
+                finishPhoneVerity = true;
+            } else if (phone_lastInput != "") {
+                $(".phone_check_ok").show();
+                $(".phone_input").val(phone_lastInput);
+                finishPhoneVerity = true;
+            }
+            //邮箱输入监控
+            $(".email_input").on("input propertychange", function () {
+                var email_input = $(this).val().replace(/\s*/g, "");
+                if (email_input.indexOf("@") > 0) {
+                    if (email_input != email_lastInput) {
+                        $(".sendEmail").show();
+                        if (email_lastVerity > 0) {
+                            $(".sendEmail").addClass("verity_send");
+                            $(".verity_input").show();
+                        }
+                        finishEmailVerity = false;
+                        $(".toPay").css("background-color", "#ddd")
+                        $(".toPay").attr("disabled", "disabled");
+                        $(".email_check_ok").hide();
+                    } else {
+                        finishEmailVerity = true;
+                        if (readClause && finishPhoneVerity) {
+                            $(".toPay").css("background-color", "#2CB7CA");
+                            $(".toPay").removeAttr("disabled")
+                        }
+                        $(".sendEmail").hide();
+                        $(".verity_input").hide();
+                        $(".email_err_msg").hide();
+                        $(".email_check_ok").show();
+                    }
+                } else {
+                    $(".sendEmail").hide();
+                    $(".verity_input").hide();
+                    $(".email_err_msg").hide();
+                    $(".email_check_ok").hide();
+                }
+            }).blur(function () {
+                console.log("xxx")
+                var email = $(".email_input").val().replace(/\s*/g, "");
+                if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
+                    showEmailErr("邮箱格式不正确");
+                    finishEmailVerity = false;
+                    $(".toPay").css("background-color", "#ddd")
+                    $(".toPay").attr("disabled", "disabled");
+                    return
+                }
+                $(".email_check_ok").show();
+                showEmailErr("");
+            });
+            //手机号输入监控
+            var Verification = {
+                //手机号验证
+                isPhone: function (value) {
+                    return /^[1][3-9][0-9]{9}$/.test(value);
+                }
+            };
+            $(".phone_input").on("input propertychange", function () {
+                var phone_input = $(this).val().replace(/\s*/g, "");
+                if (phone_input.length == 11) {
+                    if (Verification.isPhone(phone_input)) {
+                        $.post("/front/dataExport/checkPhoneVerify", {"phone": phone_input}, function (data) {
+                            if (data.success) {
+                                $(".phone_check_ok").show();
+                                $(".phone_err_msg").hide();
+                                finishPhoneVerity = true;
+                                if (readClause && finishEmailVerity) {
+                                    $(".toPay").css("background-color", "#2CB7CA");
+                                    $(".toPay").removeAttr("disabled")
+                                }
+                            } else {
+                                $(".phone_err_msg").show();
+                                $(".phone_check_ok").hide();
+                                finishPhoneVerity = false;
+                                $(".toPay").css("background-color", "#ddd")
+                                $(".toPay").attr("disabled", "disabled");
+                            }
+                        })
+                    } else {
+                        $(".phone_err_msg").show();
+                        $(".phone_check_ok").hide();
+                        finishPhoneVerity = false;
+                        $(".toPay").css("background-color", "#ddd")
+                        $(".toPay").attr("disabled", "disabled");
+                    }
+                } else {
+                    $(".phone_err_msg").hide();
+                    $(".phone_check_ok").hide();
+                    finishPhoneVerity = false;
+                    $(".toPay").css("background-color", "#ddd")
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            }).blur(function () {
+                var phone_input = $(this).val().replace(/\s*/g, "");
+                if (phone_input.length != 11) {
+                    $(".phone_err_msg").show();
+                    $(".phone_check_ok").hide();
+                    finishPhoneVerity = false;
+                    $(".toPay").css("background-color", "#ddd")
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            });
+            //邮箱验证
+            var canVerify = true;
+            $(".sendEmail").on("click", function () {
+                var email = $(".email_input").val().replace(/\s*/g, "");
+                if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
+                    showEmailErr("邮箱格式不正确");
+                    return
+                }
+                showEmailErr("");
+                if (!canVerify) {
+                    return
+                }
+                canVerify = false;
+                $.post("/front/dataExport/sendMailVerify", {"email": email}, function (data) {
+                    canVerify = true;
+                    if (data.success) {
+                        if (data.errCode == 4) {
+                            $(".type-a").text(data.errMsg);
+                            $(".type-a").show();
+                            setTimeout(function () {
+                                $(".type-a").hide();
+                            }, 2000)
+                            finishEmailVerity = true;
+                            $(".sendEmail").hide();
+                            $(".email_check_ok").show();
+                        } else {
+                            $(".toPay").attr("disabled", "disabled");
+                            finishEmailVerity = false;
+                            //发送成功
+                            sendemailTimer(60 * 5);
+                            $(".sendEmail").addClass("verity_send");
+                            $(".verity_input").show();
+                            $(".sendEmail").attr("disabled", "disabled");
+                            $(".email_input").attr("disabled", "disabled");
+                        }
+                    } else {
+                        showEmailErr(data.errMsg)
+                        if (data.errCode == 2) {
+                            sendemailTimer(data.time);
+                            $(".sendEmail").attr("disabled", "disabled");
+                            $(".email_input").attr("disabled", "disabled");
+                        }
+                    }
+                }, "json")
+            });
+            //校验验证码
+            $(".verity_input").bind("input propertychange", function () {
+                var verity = $(this).val()
+                var email = $(".email_input").val().replace(/\s*/g, "");
+                if (verity.length == 6) {
+                    $.post("/front/dataExport/checkMailVerify", {
+                        "emailVerity": verity,
+                        "email": email
+                    }, function (data) {
+                        if (data.success) {
+                            showEmailErr("");
+                            finishEmailVerity = true;
+                            if (readClause && finishPhoneVerity) {
+                                $(".toPay").css("background-color", "#2CB7CA");
+                                $(".toPay").removeAttr("disabled")
+                            }
+                            $(".verity_input").css({"margin-left": "15px"});
+                            $(".sendEmail").hide();
+                            $(".email_check_ok").css("display", "");
+                            $(".verity_input").attr("disabled", "disabled");
+                        } else {
+                            $(".verity_input").css({"margin-left": ""});
+                            showEmailErr("验证码错误");
+                        }
+                    })
+                } else {
+                    $(".email_err_msg").hide();
+                }
+            })
+
+            //是否显示最大条数
+            if (msgCount == msgMaxCount) {
+                $(".infotitle em").text("最大限额" + showCount + "条");
+                $(".infotitle em").css("display", "");
+            }
 
-		if (sessionStorage.getItem("order_email"+{{.T._id}})!=null){
-			$(".email_check_ok").show();
-			$(".email_input").val(sessionStorage.getItem("order_email"+{{.T._id}}));
-			finishEmailVerity=true;
-		}else if(email_lastInput!=""){
-      $(".email_check_ok").show();
-		  $(".email_input").val(email_lastInput);
-		  finishEmailVerity=true;	
-		}
-		if(email_lastVerity>0){
-			sendemailTimer(email_lastVerity);
-		}
-		if (sessionStorage.getItem("order_phone"+{{.T._id}})!=null){
-			$(".phone_check_ok").show();
-			$(".phone_input").val(sessionStorage.getItem("order_phone"+{{.T._id}}));
-			finishPhoneVerity=true;
-		}else if(phone_lastInput!=""){
-			$(".phone_check_ok").show();
-			$(".phone_input").val(phone_lastInput);
-			finishPhoneVerity=true;
-		}
-		//邮箱输入监控
-		$(".email_input").on("input propertychange",function() {
-			var email_input = $(this).val().replace(/\s*/g,"");
-			if(email_input.indexOf("@")>0){
-				if(email_input!=email_lastInput){
-					$(".sendEmail").show();
-					if(email_lastVerity>0){
-						$(".sendEmail").addClass("verity_send");
-						$(".verity_input").show();
-					}
-					finishEmailVerity=false;
-					$(".toPay").css("background-color","#ddd")
-					$(".toPay").attr("disabled","disabled");
-					$(".email_check_ok").hide();
-				}else{
-					finishEmailVerity=true;
-					if(readClause&&finishPhoneVerity){
-						$(".toPay").css("background-color","#2CB7CA");
-						$(".toPay").removeAttr("disabled")
-					}
-					$(".sendEmail").hide();
-					$(".verity_input").hide();
-					$(".email_err_msg").hide();
-					$(".email_check_ok").show();
-				}
-			}else{
-				$(".sendEmail").hide();
-				$(".verity_input").hide();
-				$(".email_err_msg").hide();
-				$(".email_check_ok").hide();
-			}
-		}).blur(function(){
-      console.log("xxx")
-			var email=$(".email_input").val().replace(/\s*/g,"");
-			if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)){
-				showEmailErr("邮箱格式不正确");
-        finishEmailVerity=false;
-        $(".toPay").css("background-color","#ddd")
-				$(".toPay").attr("disabled","disabled");
-				return
-			}
-			$(".email_check_ok").show();
-			showEmailErr("");
-		});
-		//手机号输入监控
-		var Verification = {
-	    	//手机号验证
-	    	isPhone: function(value) {
-		        return /^[1][3-9][0-9]{9}$/.test(value);
-		    }
-		};
-		$(".phone_input").on("input propertychange",function() {
-			var phone_input = $(this).val().replace(/\s*/g,"");
-			if (phone_input.length == 11) {
-				if(Verification.isPhone(phone_input)){
-					$.post("/front/dataExport/checkPhoneVerify",{"phone":phone_input},function(data){
-						if(data.success){
-							$(".phone_check_ok").show();
-							$(".phone_err_msg").hide();
-							finishPhoneVerity=true;
-							if(readClause&&finishEmailVerity){
-								$(".toPay").css("background-color","#2CB7CA");
-								$(".toPay").removeAttr("disabled")
-							}
-						}else{
-							$(".phone_err_msg").show();
-							$(".phone_check_ok").hide();
-							finishPhoneVerity=false;
-							$(".toPay").css("background-color","#ddd")
-							$(".toPay").attr("disabled","disabled");
-						}
-					})
-				}else{
-					$(".phone_err_msg").show();
-					$(".phone_check_ok").hide();
-					finishPhoneVerity=false;
-					$(".toPay").css("background-color","#ddd")
-					$(".toPay").attr("disabled","disabled");
-				}
-			}else{
-				$(".phone_err_msg").hide();
-				$(".phone_check_ok").hide();
-				finishPhoneVerity=false;
-				$(".toPay").css("background-color","#ddd")
-				$(".toPay").attr("disabled","disabled");
-			}
-		}).blur(function(){
-			var phone_input = $(this).val().replace(/\s*/g,"");
-			if (phone_input.length != 11) {
-				$(".phone_err_msg").show();
-				$(".phone_check_ok").hide();
-				finishPhoneVerity=false;
-				$(".toPay").css("background-color","#ddd")
-				$(".toPay").attr("disabled","disabled");
-			}
-		});
-		//邮箱验证
-		var canVerify=true;
-		$(".sendEmail").on("click",function(){
-			var email=$(".email_input").val().replace(/\s*/g,"");
-			if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)){
-				showEmailErr("邮箱格式不正确");
-				return
-			}
-			showEmailErr("");
-			if(!canVerify){
-				return
-			}
-			canVerify=false;
-			$.post("/front/dataExport/sendMailVerify",{"email":email},function(data){
-				canVerify=true;
-				if(data.success){
-					if(data.errCode==4){
-						$(".type-a").text(data.errMsg);
-						$(".type-a").show();
-						setTimeout(function(){
-							$(".type-a").hide();
-						},2000)
-						finishEmailVerity=true;
-						$(".sendEmail").hide();
-						$(".email_check_ok").show();
-					}else{
-						$(".toPay").attr("disabled","disabled");
-						finishEmailVerity=false;
-						//发送成功
-						sendemailTimer(60*5);
-						$(".sendEmail").addClass("verity_send");
-						$(".verity_input").show();
-						$(".sendEmail").attr("disabled","disabled");
-						$(".email_input").attr("disabled","disabled");
-					}
-				}else{
-					showEmailErr(data.errMsg)
-					if(data.errCode==2){
-						sendemailTimer(data.time);
-						$(".sendEmail").attr("disabled","disabled");
-						$(".email_input").attr("disabled","disabled");
-					}
-				}
-			},"json")
-		});
-		//校验验证码
-		$(".verity_input").bind("input propertychange",function(){
-			var verity=$(this).val()
-			var email=$(".email_input").val().replace(/\s*/g,"");
-			if(verity.length==6){
-				$.post("/front/dataExport/checkMailVerify",{"emailVerity":verity,"email":email},function(data){
-					if(data.success){
-						showEmailErr("");
-						finishEmailVerity=true;
-						if(readClause&&finishPhoneVerity){
-							$(".toPay").css("background-color","#2CB7CA");
-							$(".toPay").removeAttr("disabled")
-						}
-						$(".verity_input").css({"margin-left": "15px"});
-						$(".sendEmail").hide();
-						$(".email_check_ok").css("display","");
-						$(".verity_input").attr("disabled","disabled");
-					}else{
-						$(".verity_input").css({"margin-left": ""});
-						showEmailErr("验证码错误");
-					}
-				})
-			}else{
-				$(".email_err_msg").hide();
-			}
-		})
-		
-		//是否显示最大条数
-		if(msgCount==msgMaxCount){
-			$(".infotitle em").text("最大限额"+showCount+"条");
-			$(".infotitle em").css("display","");
-		} 
-		
-    //支付方式
-    if(sessionStorage.getItem("order_payway"+{{.T._id}})!=null){
-      pay_way=sessionStorage.getItem("order_payway"+{{.T._id}})  
+            //支付方式
+            if (sessionStorage.getItem("order_payway" +{{.T._id}}) != null) {
+                pay_way = sessionStorage.getItem("order_payway" +{{.T._id}})
+            }
+            if (pay_way == "wx_pc") {
+                $(".payway .wx").addClass("active");
+            } else if (pay_way == "ali_pc") {
+                $(".payway .alipay").addClass("active");
+            }
+            //支付方式切换
+            $(".payway>div").on("click", function () {
+                $(this).addClass("active").siblings().removeClass("active");
+                if ($(this).hasClass("wx")) {
+                    pay_way = "wx_pc"
+                } else if ($(this).hasClass("alipay")) {
+                    pay_way = "ali_pc"
+                }
+            })
+
+            //点击阅读条款
+            $('#checkBoxjy').on('click', function () {
+                $(this).toggleClass('hideBf');
+                if ($(this).attr("class").indexOf("hideBf") > -1) {
+                    readClause = true;
+                    if (finishEmailVerity && finishPhoneVerity) {
+                        $(".toPay").css("background-color", "#2CB7CA")
+                        $(".toPay").removeAttr("disabled")
+                    }
+                } else {
+                    readClause = false;
+                    $(".toPay").css("background-color", "#ddd")
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            })
+
+            //类型切换
+            $(".switch-dataType div").on("click", function () {
+                $($(this).addClass("active").siblings()).removeClass("active")
+                if ($(this).attr("class").indexOf("bz") > -1) {
+                    dataType = 1;
+                } else if ($(this).attr("class").indexOf("gj") > -1) {
+                    dataType = 2;
+                }
+                ChangePayMoney();
+            })
+            //确认支付
+            var canpay = true;
+            $(".toPay").on("click", function () {
+                if (!finishEmailVerity || !readClause || !canpay || !finishPhoneVerity) {
+                    return
+                }
+                canpay = false;
+                var param = {};
+                param.pay_way = pay_way;
+                param.data_spec = dataType == 2 ? "senior" : "standard";
+                param.id ={{.T._id}}
+
+                    $.post("/jypay/dataExport/sacnPay/createOrder", param, function (data) {
+                        if (data.status == "y") {
+                            sessionStorage.setItem("order_spec" +{{.T._id}}, dataType);
+                            sessionStorage.setItem("order_email" +{{.T._id}}, $(".email_input").val().replace(/\s*/g, ""));
+                            sessionStorage.setItem("order_phone" +{{.T._id}}, $(".phone_input").val().replace(/\s*/g, ""));
+                            sessionStorage.setItem("order_payway" +{{.T._id}}, pay_way);
+                            window.location.href = "/dataExport/sacnPay/waitPay?code=" + data.code + "&token=" + data.token;
+                        } else {
+                            canpay = true;
+                            $.confirm({
+                                title: '提示',
+                                content: '生成订单出错,请稍后尝试!',
+                                buttons: {
+                                    ok: {
+                                        text: '确认',
+                                        btnClass: 'btn-primary-0',
+                                    }
+                                }
+                            });
+                        }
+                    }, "json");
+
+            })
+            //数据浏览
+            $(".dataPreview").on("click", function () {
+                if (previewDataTime < 50) {
+                    previewDataTime++
+                    window.open("/front/dataExport/previewData/"+{{.T._id}}+"?dataType=" + dataType
+                )
+                } else {
+                    $.confirm({
+                        title: '提示',
+                        content: '预览数据次数超出今日上限!',
+                        buttons: {
+                            ok: {
+                                text: '确认',
+                                btnClass: 'btn-primary-0',
+                            }
+                        }
+                    });
+                }
+            })
+
+            $(".goback").on("click", function () {
+                window.history.back();
+            });
+
+        })
+
+    function FormatNum(n) {
+        if (n >= 1000) {
+            return Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3)
+        }
+        return n
+    }
+
+    function ChangePayMoney() {
+        var shouldPay = 0;
+        var beforePay = 0;
+        if (dataType == 1) {
+            beforePay = accMul(unitPrice_normal, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        } else if (dataType == 2) {
+            beforePay = accMul(unitPrice_senior, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        }
+        shouldPay = shouldPay > orderMinPrice ? shouldPay : orderMinPrice;
+        beforePay = beforePay > orderMinPrice ? beforePay : orderMinPrice;
+        $(".pay_discount").text("¥" + shouldPay);
+        $(".pay_before").text("¥" + beforePay)
+    }
+
+    function showEmailErr(str) {
+        if (!finishEmailVerity) {
+            $(".email_check_ok").css("display", "none");
+        }
+
+        if (str != "") {
+            if (str.indexOf("5分钟") > 0) {
+                $(".verity_input").show();
+            }
+            $(".email_err_msg").css("display", "").html("<i class=\"iconfont icon-cuowu\"></i>" + str);
+        } else {
+            $(".email_err_msg").css("display", "none")
+        }
     }
-    if(pay_way=="wx_pc"){
-      $(".payway .wx").addClass("active");
-    }else if(pay_way=="ali_pc"){
-      $(".payway .alipay").addClass("active");
+
+    function sendemailTimer(t) {
+        $(".sendEmail").css("background", "#ddd");
+        $(".sendEmail").text("再次尝试(" + t + "s)");
+        $(".sendEmail").attr("disabled", "disabled");
+        r = setInterval(function () {
+            t--;
+            $(".sendEmail").text("再次尝试(" + t + "s)")
+            if (t <= 0) {
+                clearInterval(r)
+                $(".sendEmail").removeClass("verity_send");
+                $(".sendEmail").text("获取验证码");
+                if (!finishEmailVerity) {
+                    $(".verity_input").hide();
+                    $(".sendEmail").removeAttr("disabled");
+                    $(".email_input").removeAttr("disabled");
+                    $(".sendEmail").css("background", "#2CB7CA");
+                    $(".sendEmail").css("cursor", "pointer");
+                }
+                showEmailErr("");
+            }
+        }, 1000)
+    }
+
+    function accMul(arg1, arg2) {
+        var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
+        try {
+            m += s1.split(".")[1].length
+        } catch (e) {
+        }
+        try {
+            m += s2.split(".")[1].length
+        } catch (e) {
+        }
+        return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) / Math.pow(10, 2);
     }
-    //支付方式切换
-    $(".payway>div").on("click",function(){
-      $(this).addClass("active").siblings().removeClass("active");
-      if($(this).hasClass("wx")){
-        pay_way="wx_pc"
-      }else if($(this).hasClass("alipay")){
-        pay_way="ali_pc"
-      }
-    })
-    
-		//点击阅读条款
-		$('#checkBoxjy').on('click', function () {
-			$(this).toggleClass('hideBf');
-			if($(this).attr("class").indexOf("hideBf")>-1){
-				readClause=true;
-				if(finishEmailVerity&&finishPhoneVerity){
-					$(".toPay").css("background-color","#2CB7CA")	
-					$(".toPay").removeAttr("disabled")
-				} 
-			}else{
-				readClause=false;
-				$(".toPay").css("background-color","#ddd")
-				$(".toPay").attr("disabled","disabled");
-			}
-		})
-		
-		//类型切换
-		$(".switch-dataType div").on("click",function(){
-			$($(this).addClass("active").siblings()).removeClass("active")
-			if($(this).attr("class").indexOf("bz")>-1){
-				dataType=1;
-			}else if($(this).attr("class").indexOf("gj")>-1){
-				dataType=2;
-			}
-			ChangePayMoney();
-		})
-		//确认支付
-		var canpay=true;
-		$(".toPay").on("click",function(){
-			if(!finishEmailVerity||!readClause||!canpay||!finishPhoneVerity){
-				return	
-			}
-			canpay=false;
-			var param={};
-      		param.pay_way=pay_way;
-			param.data_spec=dataType==2?"senior":"standard";
-			param.id={{.T._id}}
-			
-			$.post("/jypay/dataExport/sacnPay/createOrder",param,function(data){
-				if(data.status=="y"){
-					sessionStorage.setItem("order_spec"+{{.T._id}}, dataType);
-					sessionStorage.setItem("order_email"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
-					sessionStorage.setItem("order_phone"+{{.T._id}}, $(".phone_input").val().replace(/\s*/g,""));
-          sessionStorage.setItem("order_payway"+{{.T._id}},pay_way);
-					window.location.href="/dataExport/sacnPay/waitPay?code="+data.code+"&token="+data.token;
-				}else{
-					canpay=true;
-					$.confirm({
-			            title: '提示',
-			            content: '生成订单出错,请稍后尝试!',
-			            buttons: {
-			                ok: {
-			                    text: '确认',
-			                    btnClass: 'btn-primary-0',
-			                }
-			            }
-			        });
-				}
-			},"json");
-			
-		})
-		//数据浏览
-		$(".dataPreview").on("click",function(){
-			if(previewDataTime<50){
-				previewDataTime++
-				window.open("/front/dataExport/previewData/"+{{.T._id}}+"?dataType="+dataType);
-			}else{
-				 $.confirm({
-		            title: '提示',
-		            content: '预览数据次数超出今日上限!',
-		            buttons: {
-		                ok: {
-		                    text: '确认',
-		                    btnClass: 'btn-primary-0',
-		                }
-		            }
-		        });
-			}
-		})
-		
-		$(".goback").on("click",function(){
-			window.history.back();
-		});
-		
-	})
-	
-	function FormatNum(n){
-		if(n>=1000){
-			return Math.floor(n/1000)+","+("0000"+n%1000).slice(-3)
-		}
-		return n
-	}
-	
-	function ChangePayMoney(){
-		var shouldPay=0;var beforePay=0;
-		if(dataType==1){
-			beforePay=accMul(unitPrice_normal,msgCount)
-			shouldPay=accMul(beforePay,discount)
-		}else if(dataType==2){
-			beforePay=accMul(unitPrice_senior,msgCount)
-			shouldPay=accMul(beforePay,discount)
-		}
-		shouldPay=shouldPay>orderMinPrice?shouldPay:orderMinPrice;
-		beforePay=beforePay>orderMinPrice?beforePay:orderMinPrice;
-		$(".pay_discount").text("¥"+shouldPay);
-		$(".pay_before").text("¥"+beforePay)
-	}
-	function showEmailErr(str){
-		if(!finishEmailVerity){
-			$(".email_check_ok").css("display","none");
-		}
-		
-		if(str!=""){
-			if(str.indexOf("5分钟")>0){
-				$(".verity_input").show();
-			}
-			$(".email_err_msg").css("display","").html("<i class=\"iconfont icon-cuowu\"></i>"+str);
-		}else{
-			$(".email_err_msg").css("display","none")
-		}
-	}
-	function sendemailTimer(t){
-		$(".sendEmail").css("background","#ddd");
-		$(".sendEmail").text("再次尝试("+t+"s)");
-		$(".sendEmail").attr("disabled","disabled");
-		r=setInterval(function(){
-			t--;
-			$(".sendEmail").text("再次尝试("+t+"s)")
-			if(t<=0){
-				clearInterval(r)
-				$(".sendEmail").removeClass("verity_send");
-				$(".sendEmail").text("获取验证码");
-				if(!finishEmailVerity){
-					$(".verity_input").hide();
-					$(".sendEmail").removeAttr("disabled");
-					$(".email_input").removeAttr("disabled");
-					$(".sendEmail").css("background","#2CB7CA");
-					$(".sendEmail").css("cursor","pointer");
-				}
-				showEmailErr("");
-			}
-		},1000)
-	}
-	function accMul(arg1,arg2){  
-		 var m=0,s1=arg1.toString(),s2=arg2.toString();  
-		 try{m+=s1.split(".")[1].length}catch(e){}  
-		 try{m+=s2.split(".")[1].length}catch(e){} 
-		 return parseInt(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m).toString()*100)/Math.pow(10,2);
-	}  
-   
-	$("body").on("click",function(e){
-		if(e.target.id=="exp"){
-			$(".remind").fadeIn();
-		}else{
-			$(".remind").fadeOut();
-		}
-	});
+
+    $("body").on("click", function (e) {
+        if (e.target.id == "exp") {
+            $(".remind").fadeIn();
+        } else {
+            $(".remind").fadeOut();
+        }
+    });
 </script>
 {{include "/common/pcbottom.html"}}
 <!--百度统计end-->

+ 853 - 823
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -1,852 +1,882 @@
 <html>
-    <head>
-        <meta charset="utf-8">
-        <title>数据导出</title>
-		<meta name="format-detection" content="telephone=no" />
-		<meta name="viewport" content="width=device-width, initial-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="{{Msg "seo" "cdn"}}/js/rem.js"></script>
-        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_order.css?v={{Msg "seo" "version"}}35">
-        <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
-        <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/weui.min.js"></script>
-		{{include "/common/weixin.html"}}
-		<script>
-			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;
-				});
-			}
-		</script>
-    </head>
-    <body>
-    	<style>
-			#code{
-				margin-left: -0.2rem;
-			}
-			body{
-				height: auto;
-				overflow: auto;	
-			}
-    	</style>
-		<div class="loading_" style="display:none;">
-		    <p><span></span></p>
-		</div>
-        <div id="pay_order">
-            <main class="main">
-                <div class="progress">
-                    <div class="p-item">
-                        <p class="p-item-icon">
-                            <i class="icon iconfont">&#xe606;</i>
-                        </p>
-                        <span class="active">条件筛选</span>
-                        <div class="line" style="background: #2CB7CA"></div>
-                    </div>
+<head>
+    <meta charset="utf-8">
+    <title>数据导出</title>
+    <meta name="format-detection" content="telephone=no"/>
+    <meta name="viewport" content="width=device-width, initial-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="{{Msg "seo" "cdn"}}/js/rem.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_order.css?v={{Msg "seo" "version"}}35">
+    <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/weui.min.js"></script>
+    {{include "/common/weixin.html"}}
+    <script>
+        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;
+            });
+        }
+    </script>
+</head>
+<body>
+<style>
+    #code {
+        margin-left: -0.2rem;
+    }
+
+    body {
+        height: auto;
+        overflow: auto;
+    }
+</style>
+<div class="loading_" style="display:none;">
+    <p><span></span></p>
+</div>
+<div id="pay_order">
+    <main class="main">
+        <div class="progress">
+            <div class="p-item">
+                <p class="p-item-icon">
+                    <i class="icon iconfont">&#xe606;</i>
+                </p>
+                <span class="active">条件筛选</span>
+                <div class="line" style="background: #2CB7CA"></div>
+            </div>
+
+            <div class="p-item">
+                <p class="p-item-icon">
+                    <i class="icon iconfont">&#xe617;</i>
+                </p>
+                <span class="active">支付订单</span>
+                <div class="line"></div>
+            </div>
 
-                    <div class="p-item">
-                        <p class="p-item-icon">
-                            <i class="icon iconfont">&#xe617;</i>
+            <div class="p-item">
+                <p class="p-item-icon icon-gray">
+                    <i class="icon iconfont">&#xe616;</i>
+                </p>
+                <span>数据导出</span>
+            </div>
+        </div>
+        <div class="form">
+            <div class="form-item">
+                <div class="label-title">
+                    <span class="left">已为您筛选 <strong id="msgCount">{{.T.msgCount}}</strong> 条数据</span>
+                    <a href="javascript:history.go(-1)" class="right">返回筛选</a>
+                </div>
+                <!-- 选择字段包 -->
+                <div class="choose">
+                    <div class="choose-item active">
+                        <h2>标准字段包</h2>
+                        <p>
+                            <span class="initial">{{.T.unitPrice_normal}}元/条</span>
+                            <span class="current">{{.T.unitPrice_normal_final}}元/条</span>
                         </p>
-                        <span class="active">支付订单</span>
-                        <div class="line"></div>
+                        <!-- <i class="icon iconfont mark">&#xe611;</i> -->
+                        <img class="mark" src="/wx_dataExport/images/mark.png">
                     </div>
-
-                    <div class="p-item">
-                        <p class="p-item-icon icon-gray">
-                            <i class="icon iconfont">&#xe616;</i>
+                    <div class="choose-item">
+                        <h2>
+                            <i class="icon iconfont crown">&#xe604;</i>
+                            <span>高级字段包</span>
+                        </h2>
+                        <p>
+                            <span class="initial">{{.T.unitPrice_senior}}元/条</span>
+                            <span class="current">{{.T.unitPrice_senior_final}}元/条</span>
                         </p>
-                        <span>数据导出</span>
+                        <!-- <i class="icon iconfont mark">&#xe611;</i> -->
+                        <img class="mark" src="/wx_dataExport/images/mark.png">
                     </div>
                 </div>
-                <div class="form">
-                    <div class="form-item">
-                        <div class="label-title">
-                            <span class="left">已为您筛选 <strong id="msgCount">{{.T.msgCount}}</strong> 条数据</span>
-                            <a href="javascript:history.go(-1)" class="right">返回筛选</a>
-                        </div>
-                        <!-- 选择字段包 -->
-                        <div class="choose">
-                            <div class="choose-item active">
-                                <h2>标准字段包</h2>
-                                <p>
-                                    <span class="initial">{{.T.unitPrice_normal}}元/条</span>
-                                    <span class="current">{{.T.unitPrice_normal_final}}元/条</span>
-                                </p>
-                                <!-- <i class="icon iconfont mark">&#xe611;</i> -->
-                                <img class="mark" src="/wx_dataExport/images/mark.png">
-                            </div>
-                            <div class="choose-item">
-                                <h2>
-                                    <i class="icon iconfont crown">&#xe604;</i>
-                                    <span>高级字段包</span>
-                                </h2>
-                                <p>
-                                    <span class="initial">{{.T.unitPrice_senior}}元/条</span>
-                                    <span class="current">{{.T.unitPrice_senior_final}}元/条</span>
-                                </p>
-                                <!-- <i class="icon iconfont mark">&#xe611;</i> -->
-                                <img class="mark" src="/wx_dataExport/images/mark.png">
-                            </div>
-                        </div>
-                        <!-- 字段包提示 -->
-                        <div class="tips">
-                            <span>标准字段包、高级字段包</span>
-                            <i class="icon iconfont tips-icon" data-id="dialog">&#xe63b;</i>
-                        </div>
-                    </div>
-                    <div class="form-item phone-number">
-                        <div class="form-control">
-<!--                            <label for="">手机号:</label>-->
-                            <div class="input">
-                                <input type="text" class="phone_input" maxlength="11" placeholder="手机号" id="phone_input">
-								<div id="devinput" style="top: -0.05rem;">
-									<i class="icon iconfont phone_check_ok"></i>
-									<span class="phone_err_msg">手机号不正确</span>
-								</div>
-                            </div>
-                        </div>
-                    </div>
-                    <p class="msg">*数据导出将发送至邮箱</p>
-                    <div class="form-item" id="verify">
-                        <div class="form-control">
-<!--                            <label for="">邮箱:</label>-->
-                            <div class="input" id="email-input">
-                                <input type="text" class="email_input" placeholder="邮箱">
-								<div id="devinput">
-									<i class="icon iconfont email_check_ok"></i>
-									<span class="email_err_msg">邮箱不正确</span>
-								</div>
-                            </div>
-                        </div>
-                        <div class="form-control" style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;" id="vCode">
-<!--                            <label for="">验证码:</label>-->
-                            <div class="input" id="codeinput">
-                                <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6" placeholder="验证码">
-								<div id="devinput">
-									<i class="icon iconfont code_check_ok"></i>
-									<span class="code_err_msg">验证码错误</span>
-								</div>
-                                <button type="button" class="sendCode" disabled id="sendCode">发送验证码</button>
-                            </div>
+                <!-- 字段包提示 -->
+                <div class="tips">
+                    <span>标准字段包、高级字段包</span>
+                    <i class="icon iconfont tips-icon" data-id="dialog">&#xe63b;</i>
+                </div>
+            </div>
+            <div class="form-item phone-number">
+                <div class="form-control">
+                    <!--                            <label for="">手机号:</label>-->
+                    <div class="input">
+                        <input type="text" class="phone_input" maxlength="11" placeholder="手机号" id="phone_input">
+                        <div id="devinput" style="top: -0.05rem;">
+                            <i class="icon iconfont phone_check_ok"></i>
+                            <span class="phone_err_msg">手机号不正确</span>
                         </div>
                     </div>
-                    <div class="form-item" style="margin-top: .2rem;">
-                        <div class="way">
-                            <span>支付方式</span>
-                            <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i class="iconfont icon-arrow icon-right"></i></div>
+                </div>
+            </div>
+            <p class="msg">*数据导出将发送至邮箱</p>
+            <div class="form-item" id="verify">
+                <div class="form-control">
+                    <!--                            <label for="">邮箱:</label>-->
+                    <div class="input" id="email-input">
+                        <input type="text" class="email_input" placeholder="邮箱">
+                        <div id="devinput">
+                            <i class="icon iconfont email_check_ok"></i>
+                            <span class="email_err_msg">邮箱不正确</span>
                         </div>
                     </div>
-                    <p class="msg">购买须知:最低起售{{.T.orderMinPrice}}元;标准字段包:原价{{.T.unitPrice_normal}}元/条、{{.T.discount10}}折价{{.T.unitPrice_normal_final}}元/条计费;高级字段包:原价{{.T.unitPrice_senior}}元/条、{{.T.discount10}}折价{{.T.unitPrice_senior_final}}元/条计费;</p>
-
                 </div>
-            </main>
-                                <div class="fixed-bottom-box" id="bottombox">
-                        <div class="weui-cells weui-cells_checkbox radio-form">
-                            <label class="weui-cell weui-check__label" for="s11">
-                                <div class="weui-cell__hd">
-                                    <input type="checkbox" class="weui-check" name="checkbox1" id="s11" />
-                                    <i class="weui-icon-checked"></i>
-                                </div>
-                                <div class="weui-cell__bd read">
-                                    <p>我已阅读,理解并接受 <a onclick="toRead()" style="color:#2cb7ca">《剑鱼标讯线上购买与服务条款》</a></p>
-                                </div>
-                            </label>
-                        </div>
-                        <div class="price">
-                            <span class="pay_before"></span>
-                            <strong class="pay_discount"></strong>
-                        </div>
-                        <div class="form-btn">
-                            <button class="btn prew dataPreview">预览数据</button>
-                            <button class="btn enter toPay" disabled="disabled">确认支付</button>
+                <div class="form-control" style="display: none;border-top: 1px solid #e0e0e0;margin-top: 0.06rem;"
+                     id="vCode">
+                    <!--                            <label for="">验证码:</label>-->
+                    <div class="input" id="codeinput">
+                        <input type="text" value="" readonly=true class="verity_input" id="code" maxlength="6"
+                               placeholder="验证码">
+                        <div id="devinput">
+                            <i class="icon iconfont code_check_ok"></i>
+                            <span class="code_err_msg">验证码错误</span>
                         </div>
-                    </div>
-            <!-- 引用weui Dialog组件 -->
-            <div class="js_dialog" id="tipDialog" style="display: none;">
-                <div class="weui-mask"></div>
-                <div class="weui-dialog">
-                    <div class="weui-dialog__bd">
-                        <h1 class="dialog-title">字段包说明</h1>
-                        <ul class="info">
-                            <li>
-                                <label>·标准字段包</label>
-                                <p>公告标题、公告内容、剑鱼标讯地址、省份、城市、发布时间、项目名称、采购单位、中标单位、中标价、币种、公告类别</p>
-                            </li>
-                            <li>
-                                <label>·高级字段包</label>
-                                <p>公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
-                            </li>
-                        </ul>
-                    </div>
-                    <div class="weui-dialog__ft">
-                        <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">我知道了</a>
+                        <button type="button" class="sendCode" disabled id="sendCode">发送验证码</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="/wx_dataExport/images/weixin.png">微信支付</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="/wx_dataExport/images/zhifubao.png">支付宝支付</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 class="form-item" style="margin-top: .2rem;">
+                <div class="way">
+                    <span>支付方式</span>
+                    <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i
+                                class="iconfont icon-arrow icon-right"></i></div>
                 </div>
             </div>
-       --> 
-		</div>
-
-        <script>
-			//节后待处理:
-			//用户输入邮箱验证,点击获取验证码,在没有输入验证码的情况下,1.点击预览或者条款,返回后存session的邮件缓存和剩余时间,(返回后页面不会读取后台新的剩余数量,需处理一下。)处理后清除。2.返回上一页,重新点击数据导出到此页面,之前填写的邮件缓存等已不存在,但是剩余时间还在,当下的处理是时间直接显示,存在缺陷,需要出现发送验证按钮 ,如果此次属于邮箱和上次属于邮箱一致,则剩余时间继续减少,否则,重新发送验证。
-			//记录send_code_*改为发送验证码的时间-返回后重新计算剩余时间(同后台)。
-			var userId={{session "userId"}}
-			var msgCount={{.T.msgCount}}
-			var msgMaxCount={{.T.msgMaxCount}}
-			var discount={{.T.discount}}
-			var unitPrice_normal={{.T.unitPrice_normal}}
-			var unitPrice_senior={{.T.unitPrice_senior}}
-			var orderMinPrice={{.T.orderMinPrice}}
-			var finishEmailVerity=false;
-			var readClause=false;
-			var dataType=1;
-			var finishPhoneVerity=false;
-			//
-			var email_lastInput={{.T.email}}
-			var email_lastVerity={{.T.timeSpaceing}}
-			var previewDataTime={{.T.PreviewData}}
-			var phone_lastInput={{.T.phone}}
-			var dataspec={{.T.dataspec}}
-			//可以支付
-			var canpay=true;
-			//订单编号
-			var order_code = "";
-			//
-			var regInt = /[0-9]/;
-			var lstimes =0;
-			//处理苹果留白
-			(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
-			    // 这里加了个类型判断,因为a等元素也会触发blur事件
-			    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
-			}, true)
-			//
-			function accMul(arg1,arg2){  
-				 var m=0,s1=arg1.toString(),s2=arg2.toString();  
-				 try{m+=s1.split(".")[1].length}catch(e){}  
-				 try{m+=s2.split(".")[1].length}catch(e){} 
-				 return parseInt(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m).toString()*100)/Math.pow(10,2);
-			}  	
-			//
-			function FormatNum(n){
-				if(n>=1000){
-					return Math.floor(n/1000)+","+("0000"+n%1000).slice(-3)
-				}
-				return n
-			}
-			//
-			function ChangePayMoney(){
-				var shouldPay=0;var beforePay=0;
-				if(dataType==1){
-					beforePay=accMul(unitPrice_normal,msgCount)
-					shouldPay=accMul(beforePay,discount)
-				}else if(dataType==2){
-					beforePay=accMul(unitPrice_senior,msgCount)
-					shouldPay=accMul(beforePay,discount)
-				}
-				shouldPay=shouldPay>orderMinPrice?shouldPay:orderMinPrice;
-				beforePay=beforePay>orderMinPrice?beforePay:orderMinPrice;
-				$(".pay_discount").text("¥"+shouldPay);
-				$(".pay_before").text("¥"+beforePay)
-			}
-			//
-			function toRead(){
-				event.preventDefault();
-				if(regInt.test($(".sendCode").text())){
-					var email_input = $(".email_input").val().replace(/\s*/g, "");
-//					if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
-//						sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
-//					}
-				}
-				if($("#phone_input").val()){
-					sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
-				}
-				window.location.href="/front/staticPage/wx-serviceterms.html";
-			}
-			
-			
-			//
-            $(function() {		
-            	//记录用户上次选择的字段包  1标准2高级
-				if(dataspec){
-					if(dataspec=="1"){
-						$(".choose").children().eq(0).addClass("active");
-						$(".choose").children().eq(1).removeClass("active");
-						dataType=1;
-					}else if(dataspec=="2"){
-						$(".choose").children().eq(1).addClass("active");
-						$(".choose").children().eq(0).removeClass("active");
-						dataType=2;
-					}
-					ChangePayMoney();
-				}
-            	
-            	if(sessionStorage.index=="1"){
-            		$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
-            		dataType=2;
-            	}
-				ChangePayMoney();
-
-				
-				
-				var oHeight = $(document).height(); //浏览器当前的高度
-				if(!mySysIsIos()){
-					//软键盘弹起 
-					var isInFocus = false;
-					var timeObj = null;
-					$("input").click(function(){
-						isInFocus = true;
-						$("#bottombox").hide();
-						if(timeObj != null){
-							clearTimeout(timeObj);
-						}
-						timeObj = setTimeout(function(){
-							isInFocus = false;
-						},500);
-					}).blur(function(){
-						isInFocus = false;
-						$("#bottombox").show();
-					});
-					$(window).resize(function(){
-						if(!isInFocus && $("#bottombox").is(":hidden")){
-							$("#bottombox").show();
-						}
-				  	});
-				}
-
-			   
+            <p class="msg">购买须知:最低起售<span></span>元;标准字段包:原价<span></span>元/条、<span></span>
+                折价<span></span>元/条计费;高级字段包:原价<span></span>元/条、<span></span>
+                折价<span></span>元/条计费;</p>
+
+        </div>
+    </main>
+    <div class="fixed-bottom-box" id="bottombox">
+        <div class="weui-cells weui-cells_checkbox radio-form">
+            <label class="weui-cell weui-check__label" for="s11">
+                <div class="weui-cell__hd">
+                    <input type="checkbox" class="weui-check" name="checkbox1" id="s11"/>
+                    <i class="weui-icon-checked"></i>
+                </div>
+                <div class="weui-cell__bd read">
+                    <p>我已阅读,理解并接受 <a onclick="toRead()" style="color:#2cb7ca">《剑鱼标讯线上购买与服务条款》</a></p>
+                </div>
+            </label>
+        </div>
+        <div class="price">
+            <span class="pay_before"></span>
+            <strong class="pay_discount"></strong>
+        </div>
+        <div class="form-btn">
+            <button class="btn prew dataPreview">预览数据</button>
+            <button class="btn enter toPay" disabled="disabled">确认支付</button>
+        </div>
+    </div>
+    <!-- 引用weui Dialog组件 -->
+    <div class="js_dialog" id="tipDialog" style="display: none;">
+        <div class="weui-mask"></div>
+        <div class="weui-dialog">
+            <div class="weui-dialog__bd">
+                <h1 class="dialog-title">字段包说明</h1>
+                <ul class="info">
+                    <li>
+                        <label>·标准字段包</label>
+                        <p>公告标题、公告内容、剑鱼标讯地址、省份、城市、发布时间、项目名称、采购单位、中标单位、中标价、币种、公告类别</p>
+                    </li>
+                    <li>
+                        <label>·高级字段包</label>
+                        <p>
+                            公告标题、公告内容、公告地址、剑鱼标讯地址、省份、城市、发布时间、项目名称、项目编号、采购单位、采购单位联系人、采购单位联系电话、预算、开标日期、中标单位、中标价、招标机构、项目范围、币种、公告类别</p>
+                    </li>
+                </ul>
+            </div>
+            <div class="weui-dialog__ft">
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">我知道了</a>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    //节后待处理:
+    //用户输入邮箱验证,点击获取验证码,在没有输入验证码的情况下,1.点击预览或者条款,返回后存session的邮件缓存和剩余时间,(返回后页面不会读取后台新的剩余数量,需处理一下。)处理后清除。2.返回上一页,重新点击数据导出到此页面,之前填写的邮件缓存等已不存在,但是剩余时间还在,当下的处理是时间直接显示,存在缺陷,需要出现发送验证按钮 ,如果此次属于邮箱和上次属于邮箱一致,则剩余时间继续减少,否则,重新发送验证。
+    //记录send_code_*改为发送验证码的时间-返回后重新计算剩余时间(同后台)。
+    var userId ={{session "userId"}}
+    var msgCount ={{.T.msgCount}}
+
+    var msgMaxCount, discount, unitPrice_normal, unitPrice_senior, orderMinPrice;
+
+    var finishEmailVerity = false;
+    var readClause = false;
+    var dataType = 1;
+    var finishPhoneVerity = false;
+    //
+    var email_lastInput ={{.T.email}}
+    var email_lastVerity ={{.T.timeSpaceing}}
+    var previewDataTime ={{.T.PreviewData}}
+    var phone_lastInput ={{.T.phone}}
+    var dataspec ={{.T.dataspec}}
+
+
+
+    //可以支付
+    var canpay = true;
+    //订单编号
+    var order_code = "";
+    //
+    var regInt = /[0-9]/;
+    var lstimes = 0;
+    //处理苹果留白
+    (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
+        // 这里加了个类型判断,因为a等元素也会触发blur事件
+        ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
+    }, true)
+
+
+    $(function () {
+
+        //加载价格
+        $.ajax({
+            url: "/jypay/dataexport/getPrice",
+            type: "POST",
+            async: false,
+            dataType: "json",
+            success: function (r) {
+                if (r) {
+                    discount = r.discount;
+                    msgMaxCount = r.unitPrice_normal;
+                    orderMinPrice = r.orderMinPrice;
+                    unitPrice_normal = r.unitPrice_normal;
+                    unitPrice_senior = r.unitPrice_senior;
+                }
+            }
+        });
+
+        //数据规格
+        $(".initial:eq(0)").text(unitPrice_normal + "元/条");
+        $(".current:eq(0)").text(unitPrice_normal * discount + "元/条");
+        $(".initial:eq(1)").text(unitPrice_senior + "元/条");
+        $(".current:eq(1)").text(unitPrice_senior * discount + "元/条");
+        //购买须知
+        $(".msg span:eq(0)").text(orderMinPrice);
+        $(".msg span:eq(1)").text(unitPrice_normal);
+        $(".msg span:eq(2)").text(discount*10);
+        $(".msg span:eq(3)").text(discount*unitPrice_normal);
+
+        $(".msg span:eq(4)").text(unitPrice_senior);
+        $(".msg span:eq(5)").text(discount*10);
+        $(".msg span:eq(6)").text(discount*unitPrice_senior);
+
+
+        //记录用户上次选择的字段包  1标准2高级
+        if (dataspec) {
+            if (dataspec == "1") {
+                $(".choose").children().eq(0).addClass("active");
+                $(".choose").children().eq(1).removeClass("active");
+                dataType = 1;
+            } else if (dataspec == "2") {
+                $(".choose").children().eq(1).addClass("active");
+                $(".choose").children().eq(0).removeClass("active");
+                dataType = 2;
+            }
+            ChangePayMoney();
+        }
+
+        if (sessionStorage.index == "1") {
+            $(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
+            dataType = 2;
+        }
+        ChangePayMoney();
+
+
+        var oHeight = $(document).height(); //浏览器当前的高度
+        if (!mySysIsIos()) {
+            //软键盘弹起
+            var isInFocus = false;
+            var timeObj = null;
+            $("input").click(function () {
+                isInFocus = true;
+                $("#bottombox").hide();
+                if (timeObj != null) {
+                    clearTimeout(timeObj);
+                }
+                timeObj = setTimeout(function () {
+                    isInFocus = false;
+                }, 500);
+            }).blur(function () {
+                isInFocus = false;
+                $("#bottombox").show();
+            });
+            $(window).resize(function () {
+                if (!isInFocus && $("#bottombox").is(":hidden")) {
+                    $("#bottombox").show();
+                }
+            });
+        }
+
+
 //			   	alert(sessionStorage.getItem("send_email_"+userId)!=null)
 //			   	alert(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)
 //			   	alert(sessionStorage.getItem("send_email_"+userId)==null)
 //			   	alert(localStorage.getItem("new_email_"+userId)!=null)
-			   	//缓存  1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
+        //缓存  1.如果有sessionStorage邮箱 先显示此邮箱 再发送邮箱五分钟内 显示验证码输入框 2.如果没有 显示localStorage邮箱 3.如果都没得 显示email_lastInput数据库中邮箱
 //			   	if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+{{.T._id}})!=null)){
-		if((sessionStorage.getItem("send_email_"+userId)!=null)&&(sessionStorage.getItem("send_code_"+userId)!=null)){
-			   		//alert("1")
-			   		$(".email_check_ok").hide();
-					$(".email_input").parents('div.form-control').siblings().slideDown();
-			   		$(".email_input").val(sessionStorage.getItem("send_email_"+userId));
-		   			lstimes = parseInt(sessionStorage.getItem("send_code_"+userId));
-					$(".verity_input").removeAttr("readonly");
-					lstimes = lstimes -  Date.parse(new Date())/1000 + 60*5;
-					if (lstimes>0){
-						sendemailTimer(lstimes);
-					}
-					//.getItem("new_email_"+userId)!=null)
-			   	}else if((sessionStorage.getItem("send_email_"+userId)==null)&&(localStorage.getItem("new_email_"+userId)!=null)){
-			   		//alert("2")
-			   		$(".email_check_ok").show();
-					$(".email_input").val(localStorage.getItem("new_email_"+userId));
-					finishEmailVerity = true;
-			   	}else if (email_lastInput!=""){
-			   		//alert("~~")
-			   		$(".email_check_ok").show();
-					$(".email_input").val(email_lastInput);
-					finishEmailVerity = true;
-			   	}else{
-		   			$(".email_input").val("");
-			   	}
-			   	if(email_lastVerity>0){
-					sendemailTimer(email_lastVerity);
-					$(".verity_input").removeAttr("readonly");
-				}else if(lstimes>0){
-					sendemailTimer(lstimes);
-					$(".verity_input").removeAttr("readonly");
-				}
-			   	if (sessionStorage.getItem("order_phone"+{{.T._id}})!=null){
-					if((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone"+{{.T._id}})))){
-						$(".phone_check_ok").show();
-						$(".phone_input").val(sessionStorage.getItem("order_phone"+{{.T._id}}));
-						finishPhoneVerity=true;
-					}else{
-						$(".phone_err_msg").show();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity = false;
-						$(".toPay").attr("disabled", "disabled");
-					}
-				}else if(phone_lastInput!=""){
-					$(".phone_check_ok").show();
-					$(".phone_input").val(phone_lastInput);
-					finishPhoneVerity=true;
-				}
-				
-				if(readClause&&finishPhoneVerity&&finishEmailVerity){
-					$(".toPay").removeAttr("disabled")
-				}
-				
-				//判断支付按钮状态 
-				if((sessionStorage.readClause=="true")&&finishPhoneVerity&&finishEmailVerity){
-					//刷新
-					if($(".fixed-bottom-box .weui-check").is(":checked")){
-						$(".toPay").removeAttr("disabled")
-						readClause=true;
-					}
-				}
-
-				//数据展示
-				if (sessionStorage.getItem("order_spec"+{{.T._id}})!=null){
-					dataType = sessionStorage.getItem("order_spec"+{{.T._id}});
-				}
-				if(dataType==1){
-					$(".switch-dataType .bz").addClass("active")
-					$(".switch-dataType .gj").removeClass("active")
-				}else{
-					$(".switch-dataType .bz").removeClass("active")
-					$(".switch-dataType .gj").addClass("active")
-				}
-				//
-                $('.choose .choose-item').each(function() {
-                    var index = $(this).index();
-                    $(this).click(function() {
-						//类型切换
-                        $(this).addClass("active").siblings().removeClass("active");
-						if(index==0){
-							dataType=1;
-						}else if(index==1){
-							dataType=2;
-						}
-						sessionStorage.index=index;
-						ChangePayMoney();
+        if ((sessionStorage.getItem("send_email_" + userId) != null) && (sessionStorage.getItem("send_code_" + userId) != null)) {
+            //alert("1")
+            $(".email_check_ok").hide();
+            $(".email_input").parents('div.form-control').siblings().slideDown();
+            $(".email_input").val(sessionStorage.getItem("send_email_" + userId));
+            lstimes = parseInt(sessionStorage.getItem("send_code_" + userId));
+            $(".verity_input").removeAttr("readonly");
+            lstimes = lstimes - Date.parse(new Date()) / 1000 + 60 * 5;
+            if (lstimes > 0) {
+                sendemailTimer(lstimes);
+            }
+            //.getItem("new_email_"+userId)!=null)
+        } else if ((sessionStorage.getItem("send_email_" + userId) == null) && (localStorage.getItem("new_email_" + userId) != null)) {
+            //alert("2")
+            $(".email_check_ok").show();
+            $(".email_input").val(localStorage.getItem("new_email_" + userId));
+            finishEmailVerity = true;
+        } else if (email_lastInput != "") {
+            //alert("~~")
+            $(".email_check_ok").show();
+            $(".email_input").val(email_lastInput);
+            finishEmailVerity = true;
+        } else {
+            $(".email_input").val("");
+        }
+        if (email_lastVerity > 0) {
+            sendemailTimer(email_lastVerity);
+            $(".verity_input").removeAttr("readonly");
+        } else if (lstimes > 0) {
+            sendemailTimer(lstimes);
+            $(".verity_input").removeAttr("readonly");
+        }
+        if (sessionStorage.getItem("order_phone" +{{.T._id}}) != null) {
+            if ((/^[1][3-9][0-9]{9}$/.test(sessionStorage.getItem("order_phone" +{{.T._id}})))) {
+                $(".phone_check_ok").show();
+                $(".phone_input").val(sessionStorage.getItem("order_phone" +{{.T._id}}));
+                finishPhoneVerity = true;
+            } else {
+                $(".phone_err_msg").show();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+            }
+        } else if (phone_lastInput != "") {
+            $(".phone_check_ok").show();
+            $(".phone_input").val(phone_lastInput);
+            finishPhoneVerity = true;
+        }
+
+        if (readClause && finishPhoneVerity && finishEmailVerity) {
+            $(".toPay").removeAttr("disabled")
+        }
+
+        //判断支付按钮状态
+        if ((sessionStorage.readClause == "true") && finishPhoneVerity && finishEmailVerity) {
+            //刷新
+            if ($(".fixed-bottom-box .weui-check").is(":checked")) {
+                $(".toPay").removeAttr("disabled")
+                readClause = true;
+            }
+        }
+
+        //数据展示
+        if (sessionStorage.getItem("order_spec" +{{.T._id}}) != null) {
+            dataType = sessionStorage.getItem("order_spec" +{{.T._id}});
+        }
+        if (dataType == 1) {
+            $(".switch-dataType .bz").addClass("active")
+            $(".switch-dataType .gj").removeClass("active")
+        } else {
+            $(".switch-dataType .bz").removeClass("active")
+            $(".switch-dataType .gj").addClass("active")
+        }
+        //
+        $('.choose .choose-item').each(function () {
+            var index = $(this).index();
+            $(this).click(function () {
+                //类型切换
+                $(this).addClass("active").siblings().removeClass("active");
+                if (index == 0) {
+                    dataType = 1;
+                } else if (index == 1) {
+                    dataType = 2;
+                }
+                sessionStorage.index = index;
+                ChangePayMoney();
+            })
+        })
+        $('.tips-icon').on('click', function () {
+            $('#tipDialog').show(200);
+            $('.weui-dialog__btn_primary').click(function () {
+                $('#tipDialog').hide(200);
+            })
+        });
+        //手机号输入监控
+        var Verification = {
+            //手机号验证
+            isPhone: function (value) {
+                return /^[1][3-9][0-9]{9}$/.test(value);
+            }
+        };
+        $(".phone_input").on("input propertychange", function () {
+            var phone_input = $(this).val().replace(/\s*/g, "");
+            if (phone_input.length == 11) {
+                if (Verification.isPhone(phone_input)) {
+                    $.post("/front/dataExport/checkPhoneVerify", {"phone": phone_input}, function (data) {
+                        if (data.success) {
+                            $(".phone_check_ok").show();
+                            $(".phone_err_msg").hide();
+                            finishPhoneVerity = true;
+                            if (readClause && finishEmailVerity) {
+                                $(".toPay").removeAttr("disabled")
+                            }
+                        } else {
+                            $(".phone_err_msg").show();
+                            $(".phone_check_ok").hide();
+                            finishPhoneVerity = false;
+                            $(".toPay").attr("disabled", "disabled");
+                        }
                     })
+                } else {
+                    $(".phone_err_msg").show();
+                    $(".phone_check_ok").hide();
+                    finishPhoneVerity = false;
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            } else {
+                $(".phone_err_msg").hide();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+            }
+        }).blur(function () {
+            var phone_input = $(this).val().replace(/\s*/g, "");
+            if (phone_input.length != 11 && phone_input.length != 0) {
+                $(".phone_err_msg").show();
+                $(".phone_check_ok").hide();
+                finishPhoneVerity = false;
+                $(".toPay").attr("disabled", "disabled");
+            }
+        }).on("focus", function () {
+            this.scrollIntoView();
+        });
+        //邮箱输入监控
+        $(".email_input").on("input propertychange", function () {
+            var email_input = $(this).val().replace(/\s*/g, "");
+            if (email_input.indexOf("@") > 0) {
+                if (email_input != email_lastInput) {
+                    $(this).parents('div.form-control').siblings().slideDown();
+                    if (email_lastVerity > 0) {
+                        $("#sendCode").attr("disabled", true);
+                        //返回后验证码可输入
+                        if ((localStorage.getItem("new_email_" + userId) != null) && (localStorage.getItem("new_email_" + userId) == email_input)) {
+                            $(".verity_input").attr("readonly", false);
+                        } else {
+                            if (email_lastVerity > 0) {
+                                $(".verity_input").removeAttr("readonly");
+                            } else if (lstimes > 0) {
+                                $(".verity_input").removeAttr("readonly");
+                            } else {
+                                $(".verity_input").attr("readonly", true);
+                            }
+                        }
+                    } else {
+                        //新用户输入后 从新进来
+                        $(".verity_input").prop("readonly", false);
+                        $("#sendCode").prop("disabled", true);
+                    }
+                    finishEmailVerity = false;
+                    $(".toPay").attr("disabled", "disabled");
+                    if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)) {
+                        lstimes_ = parseInt(sessionStorage.getItem("send_code_" + userId));
+                        lstimes_ = lstimes_ - Date.parse(new Date()) / 1000 + 60 * 5;
+                        if (lstimes_ > 0) {
+                            $("#sendCode").prop("disabled", true);
+                        } else {
+                            $("#sendCode").prop("disabled", false);
+                        }
+                        $(".email_err_msg").hide();
+                        $(".email_check_ok").hide();
+                    } else {
+                        $("#sendCode").attr("disabled", true);
+                        $(".email_check_ok").hide();
+                        $(".email_err_msg").hide();
+                    }
+                } else {
+                    finishEmailVerity = true;
+                    if (readClause && finishPhoneVerity) {
+                        $(".toPay").removeAttr("disabled")
+                    }
+                    $("#sendCode").attr("disabled", "disabled");
+                    $(".verity_input").attr("readonly", true);
+                    $(".email_err_msg").hide();
+                    $(".email_check_ok").show();
+                    //验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
+                    localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    sessionStorage.removeItem("send_email_" + userId);
+                    $(this).parents('div.form-control').siblings().slideUp();
+                }
+            } else {
+                $(this).parents('div.form-control').siblings().slideUp();
+                $("#sendCode").attr("disabled", "disabled");
+                $(".verity_input").attr("readonly", true);
+                $(".email_err_msg").hide();
+                $(".email_check_ok").hide();
+            }
+        }).blur(function () {
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email) && ($(".email_input").val().length != 0)) {
+                $(".email_err_msg").show();
+                $(".email_check_ok").hide();
+                return
+            }
+            if ($(".email_input").val() == email) {
+                return;
+            }
+            $("#sendCode").removeAttr("disabled");
+            $(".email_check_ok").hide();
+            $(".email_err_msg").hide();
+        }).on("focus", function () {
+            this.scrollIntoView();
+        });
+        //点击发送验证码-邮箱验证
+        var canVerify = true;
+        $(".sendCode").on("click", function () {
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
+                $(".email_err_msg").show();
+                $(".email_check_ok").hide();
+                return
+            }
+            if (!canVerify) {
+                return
+            }
+            canVerify = false;
+            $.post("/front/dataExport/sendMailVerify", {"email": email}, function (data) {
+                canVerify = true;
+                if (data.success) {
+                    if (data.errCode == 4) {
+                        EasyAlert.show(data.errMsg, "", 3000);
+                        finishEmailVerity = true;
+                        $(".email_check_ok").show();
+                        $(".email_input").parents('div.form-control').siblings().slideUp();
+                        if (readClause && finishPhoneVerity) {
+                            $(".toPay").removeAttr("disabled")
+                        }
+                    } else {
+                        $(".toPay").attr("disabled", "disabled");
+                        finishEmailVerity = false;
+                        //发送成功
+                        sendemailTimer(60 * 5);
+                        sessionStorage.email_sign = "1";
+                        $(".verity_input").removeAttr("readonly");
+                        $(".sendCode").attr("disabled", "disabled");
+                        $(".email_input").attr("readonly", true);
+                        sessionStorage.setItem("send_code_" + userId, Date.parse(new Date()) / 1000);
+                        //发送验证码后 sessionStorage邮箱
+                        sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    }
+                } else {
+                    EasyAlert.show(data.errMsg, "", 3000)
+                    if (data.errCode == 2) {
+                        sendemailTimer(data.time);
+                        $(".sendCode").attr("disabled", "disabled");
+                        $(".email_input").attr("readonly", true);
+                        //发送验证码后 sessionStorage邮箱
+                        sessionStorage.setItem("send_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                    }
+                }
+            }, "json")
+        });
+        //校验验证码
+        $(".verity_input").bind("input propertychange", function () {
+            var verity = $(this).val()
+            var email = $(".email_input").val().replace(/\s*/g, "");
+            if (verity.length == 6) {
+                $.post("/front/dataExport/checkMailVerify", {"emailVerity": verity, "email": email}, function (data) {
+                    if (data.success) {
+                        finishEmailVerity = true;
+                        if (readClause && finishPhoneVerity) {
+                            $(".toPay").removeAttr("disabled")
+                        }
+                        $(".email_check_ok").show();
+                        $(".email_err_msg").hide();
+                        $(".verity_input").attr("readonly", true);
+                        $(".verity_input").val("");
+                        $(".email_input").parents('div.form-control').siblings().slideUp();
+                        sessionStorage.setItem("EmailVerity_" +{{.T._id}}, "T");
+                        //验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
+                        localStorage.setItem("new_email_" + userId, $(".email_input").val().replace(/\s*/g, ""));
+                        sessionStorage.removeItem("send_email_" + userId);
+                    } else {
+                        EasyAlert.show("验证码错误", "", 3000);
+                    }
                 })
-                $('.tips-icon').on('click', function() {
-                    $('#tipDialog').show(200);
-                    $('.weui-dialog__btn_primary').click(function() {
-                        $('#tipDialog').hide(200);
-                    })
-                });
-				//手机号输入监控
-				var Verification = {
-			    	//手机号验证
-			    	isPhone: function(value) {
-				        return /^[1][3-9][0-9]{9}$/.test(value);
-				    }
-				};
-				$(".phone_input").on("input propertychange",function() {
-					var phone_input = $(this).val().replace(/\s*/g,"");
-					if (phone_input.length == 11) {
-						if(Verification.isPhone(phone_input)){
-							$.post("/front/dataExport/checkPhoneVerify",{"phone":phone_input},function(data){
-								if(data.success){
-									$(".phone_check_ok").show();
-									$(".phone_err_msg").hide();
-									finishPhoneVerity=true;
-									if(readClause&&finishEmailVerity){
-										$(".toPay").removeAttr("disabled")
-									}
-								}else{
-									$(".phone_err_msg").show();
-									$(".phone_check_ok").hide();
-									finishPhoneVerity=false;
-									$(".toPay").attr("disabled","disabled");
-								}
-							})
-						}else{
-							$(".phone_err_msg").show();
-							$(".phone_check_ok").hide();
-							finishPhoneVerity=false;
-							$(".toPay").attr("disabled","disabled");
-						}
-					}else{
-						$(".phone_err_msg").hide();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity=false;
-						$(".toPay").attr("disabled","disabled");
-					}
-				}).blur(function(){
-					var phone_input = $(this).val().replace(/\s*/g,"");
-					if (phone_input.length != 11&&phone_input.length!=0) {
-						$(".phone_err_msg").show();
-						$(".phone_check_ok").hide();
-						finishPhoneVerity=false;
-						$(".toPay").attr("disabled","disabled");
-					}
-				}).on("focus",function(){
-			   		  this.scrollIntoView();
-				});
-				//邮箱输入监控
-				$(".email_input").on("input propertychange",function() {
-					var email_input = $(this).val().replace(/\s*/g,"");
-					if(email_input.indexOf("@")>0){
-						if (email_input != email_lastInput) {
-							$(this).parents('div.form-control').siblings().slideDown();
-							if(email_lastVerity>0){
-								$("#sendCode").attr("disabled", true);
-								//返回后验证码可输入
-								if((localStorage.getItem("new_email_"+userId)!=null)&&(localStorage.getItem("new_email_"+userId)==email_input)){
-									$(".verity_input").attr("readonly", false);
-								}else{
-								   	if(email_lastVerity>0){
-										$(".verity_input").removeAttr("readonly");
-									}else if(lstimes>0){
-										$(".verity_input").removeAttr("readonly");
-									}else{
-										$(".verity_input").attr("readonly", true);
-									}
-								}
-							}else{
-								//新用户输入后 从新进来
-								$(".verity_input").prop("readonly", false);
-								$("#sendCode").prop("disabled", true);
-							}
-							finishEmailVerity=false;
-							$(".toPay").attr("disabled","disabled");
-							if(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
-								lstimes_ = parseInt(sessionStorage.getItem("send_code_"+userId));
-								lstimes_ = lstimes_ -  Date.parse(new Date())/1000 + 60*5;
-								if (lstimes_>0) {
-									$("#sendCode").prop("disabled", true);
-								}else{
-									$("#sendCode").prop("disabled", false);
-								}
-								$(".email_err_msg").hide();
-								$(".email_check_ok").hide();
-							}else{
-								$("#sendCode").attr("disabled", true);
-								$(".email_check_ok").hide();
-								$(".email_err_msg").hide();
-							}
-						}else{
-							finishEmailVerity=true;
-							if(readClause&&finishPhoneVerity){
-								$(".toPay").removeAttr("disabled")
-							}
-							$("#sendCode").attr("disabled","disabled");
-							$(".verity_input").attr("readonly",true);
-							$(".email_err_msg").hide();
-							$(".email_check_ok").show();
-							//验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
-							localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
-							sessionStorage.removeItem("send_email_"+userId);
-							$(this).parents('div.form-control').siblings().slideUp();
-						}
-					}else{
-						$(this).parents('div.form-control').siblings().slideUp();
-						$("#sendCode").attr("disabled","disabled");
-						$(".verity_input").attr("readonly",true);
-						$(".email_err_msg").hide();
-						$(".email_check_ok").hide();
-					}
-				}).blur(function(){
-					var email=$(".email_input").val().replace(/\s*/g,"");
-					if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)&&($(".email_input").val().length!=0)){
-						$(".email_err_msg").show();
-						$(".email_check_ok").hide();
-						return
-					}
-					if($(".email_input").val()==email){
-						return;
-					}
-					$("#sendCode").removeAttr("disabled");
-					$(".email_check_ok").hide();
-					$(".email_err_msg").hide();
-				}).on("focus",function(){
-			   		  this.scrollIntoView();
-				});
-				//点击发送验证码-邮箱验证
-				var canVerify=true;
-				$(".sendCode").on("click",function(){
-					var email=$(".email_input").val().replace(/\s*/g,"");
-					if(!/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email)) {
-						$(".email_err_msg").show();
-						$(".email_check_ok").hide();
-						return
-					}
-					if(!canVerify){
-						return
-					}
-					canVerify=false;
-					$.post("/front/dataExport/sendMailVerify",{"email":email},function(data){
-						canVerify=true;
-						if(data.success){
-							if(data.errCode==4){
-								EasyAlert.show(data.errMsg,"",3000);
-								finishEmailVerity=true;
-								$(".email_check_ok").show();
-								$(".email_input").parents('div.form-control').siblings().slideUp();
-								if(readClause&&finishPhoneVerity){
-									$(".toPay").removeAttr("disabled")
-								}
-							}else{
-								$(".toPay").attr("disabled","disabled");
-								finishEmailVerity=false;
-								//发送成功
-								sendemailTimer(60*5);
-								sessionStorage.email_sign="1";
-								$(".verity_input").removeAttr("readonly");
-								$(".sendCode").attr("disabled","disabled");
-								$(".email_input").attr("readonly",true);
-								sessionStorage.setItem("send_code_"+userId, Date.parse(new Date())/1000);
-								//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							}
-						}else{
-							EasyAlert.show(data.errMsg,"",3000)
-							if(data.errCode==2){
-								sendemailTimer(data.time);
-								$(".sendCode").attr("disabled","disabled");
-								$(".email_input").attr("readonly",true);
-								//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_email_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							}
-						}
-					},"json")
-				});
-				//校验验证码
-				$(".verity_input").bind("input propertychange",function(){
-					var verity=$(this).val()
-					var email=$(".email_input").val().replace(/\s*/g,"");
-					if(verity.length==6){
-						$.post("/front/dataExport/checkMailVerify",{"emailVerity":verity,"email":email},function(data){
-							if(data.success){
-								finishEmailVerity=true;
-								if(readClause&&finishPhoneVerity){
-									$(".toPay").removeAttr("disabled")
-								}
-								$(".email_check_ok").show();
-								$(".email_err_msg").hide();
-								$(".verity_input").attr("readonly",true);
-								$(".verity_input").val("");
-								$(".email_input").parents('div.form-control').siblings().slideUp();
-								sessionStorage.setItem("EmailVerity_"+{{.T._id}},"T");
-								//验证通过后 存 localStorage邮箱  此邮箱为验证通过的邮箱   并清除sessionStorage发送验证码的邮箱
-								localStorage.setItem("new_email_"+userId,$(".email_input").val().replace(/\s*/g,""));
-								sessionStorage.removeItem("send_email_"+userId);
-							}else{
-								EasyAlert.show("验证码错误","",3000);
-							}
-						})
-					}else{
-						//进入其他页面 验证码显示 清除缓存
-						sessionStorage.removeItem("email_sign");
-						$(".email_err_msg").hide();
-					}
-					//防遮挡
-				}).on("focus",function(){
-					var target = this;
-			   		setTimeout(function(){
-			   		  	target.scrollIntoViewIfNeeded();
-			   		},500)
-				});
-				
-				//点击阅读条款
-				$(".fixed-bottom-box .weui-check").on("click", function () {
-					if($(this).is(":checked")){
-						if(finishEmailVerity&&finishPhoneVerity){
-							readClause=true;
-							sessionStorage.readClause="true";
-							$(".toPay").removeAttr("disabled")
-						}else{
-							readClause=true;
-							sessionStorage.readClause="true";
-							$(".toPay").attr("disabled","disabled");
-						}
-					}else{
-						readClause=false;
-						sessionStorage.readClause="false";
-						$(".toPay").attr("disabled","disabled");
-					}
-				})
-				
-				//数据浏览
-				$(".dataPreview").on("click",function(){
-					if(previewDataTime<50){
-						previewDataTime++
-						var dataType = $(".choose").find("div.active").index()+1;
-						//缓存
-						if(regInt.test($(".sendCode").text())){
-							var email_input = $(".email_input").val().replace(/\s*/g, "");
+            } else {
+                //进入其他页面 验证码显示 清除缓存
+                sessionStorage.removeItem("email_sign");
+                $(".email_err_msg").hide();
+            }
+            //防遮挡
+        }).on("focus", function () {
+            var target = this;
+            setTimeout(function () {
+                target.scrollIntoViewIfNeeded();
+            }, 500)
+        });
+
+        //点击阅读条款
+        $(".fixed-bottom-box .weui-check").on("click", function () {
+            if ($(this).is(":checked")) {
+                if (finishEmailVerity && finishPhoneVerity) {
+                    readClause = true;
+                    sessionStorage.readClause = "true";
+                    $(".toPay").removeAttr("disabled")
+                } else {
+                    readClause = true;
+                    sessionStorage.readClause = "true";
+                    $(".toPay").attr("disabled", "disabled");
+                }
+            } else {
+                readClause = false;
+                sessionStorage.readClause = "false";
+                $(".toPay").attr("disabled", "disabled");
+            }
+        })
+
+        //数据浏览
+        $(".dataPreview").on("click", function () {
+            if (previewDataTime < 50) {
+                previewDataTime++
+                var dataType = $(".choose").find("div.active").index() + 1;
+                //缓存
+                if (regInt.test($(".sendCode").text())) {
+                    var email_input = $(".email_input").val().replace(/\s*/g, "");
 //							if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
 //								sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
 //							}
-						}
-						if($("#phone_input").val()){
-							sessionStorage.setItem("order_phone"+{{.T._id}}, $("#phone_input").val().replace(/\s*/g,""));
-						}
-						if ($(".fixed-bottom-box .weui-check").is(":checked")) {
-							if (finishEmailVerity && finishPhoneVerity) {
-								readClause = true;
-								sessionStorage.readClause="true";
-							}else{
-								readClause = true;
-								sessionStorage.readClause="true";
-								$(".toPay").attr("disabled", "disabled");
-							}
-						} else {
-							readClause = false;
-							sessionStorage.readClause="false";
-							$(".toPay").attr("disabled", "disabled");
-						}
-						window.open("/front/wx_dataExport/toPreview/"+{{.T._id}}+"?dataType="+dataType);
-					}else{
-						EasyAlert.show("预览数据次数超出今日上限!","",3000);
-					}
-				})
-				
-				//确认支付
-				$(".toPay").on("click",function(){
-					if(!finishEmailVerity||!readClause||!canpay||!finishPhoneVerity){
-						return	
-					}
-					$(".loading_").show();
-					canpay=false;
-					
-					var param={};
-					param.pay_way="wx_js";
-					param.data_spec=dataType==2?"senior":"standard";
-					param.id={{.T._id}}
-					//先去创建预支付订单
-					$.post("/jypay/dataExport/weixin/createOrder",param,function(data){
-						if(data.status=="y"){
-							sessionStorage.setItem("order_spec"+{{.T._id}}, dataType);
-							sessionStorage.setItem("order_email"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
-							sessionStorage.setItem("order_phone"+{{.T._id}}, $(".phone_input").val().replace(/\s*/g,""));
-							//预支付订单创建成功后 调微信支付
-							if(data.res){
-								order_code=data.code;
-								onBridgeReady(data.res);
-							}
-						}else{
-							canpay=true;
-							EasyAlert.show("生成订单出错,请稍后尝试!","",3000);
-						}
-						$(".loading_").hide();
-					},"json");
-					
-				})
-            })
-			//调用微信支付接口
-			function onBridgeReady(res){
-			   	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"){
-							//清除我已阅读缓存
-							sessionStorage.removeItem("readClause");
-							sessionStorage.removeItem("index");
-							sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
-							sessionStorage.removeItem("keyWords");
-							$(".toPay").attr("disabled","disabled");
-							var email_pay = sessionStorage.getItem("order_email"+{{.T._id}})
-							setTimeout(function(){
-								window.location.replace("/front/wx_dataExport/paySuccessPage?email="+email_pay+"&orderCode="+order_code+"&payTime="+res["timestamp"]);
-							},500)
-						}else if(r.err_msg == "get_brand_wcpay_request:cancel"){
-							//取消支付 可以再次支付
-							canpay=true;
-						}else{
-							EasyAlert.show("系统异常,请稍微再试","",3000);
-					}
-					//清除我已阅读缓存 	
-					sessionStorage.removeItem("index");
-					sessionStorage.removeItem("EmailVerity_"+{{.T._id}});
-				});
-			}
-			//倒计时
-			function sendemailTimer(t){
-				$(".sendCode").text(""+t+"s");
-				$(".sendCode").attr("disabled","disabled");
-				r=setInterval(function(){
-					t--;
-					$(".sendCode").text(""+t+"s")
-					if(t<=0){
-						clearInterval(r);
-						$(".sendCode").text("发送验证码");
-						if(!finishEmailVerity){
-							$(".verity_input").attr("readonly",true);
-							$(".sendCode").removeAttr("disabled");
-							$(".email_input").removeAttr("readonly");
-							$(".sendCode").css("color","#2CB7CA");
-						}
-					}
-				},1000)
-			}
-			//提示框
-			var EasyAlert = {
-				timeout: null,
-				waitTime: 1000,
-				show: function(text,css,waitTime){
-					if(this.timeout != null){
-						clearTimeout(this.timeout);
-						this.hide();
-						this.timeout = null;
-					}
-					var thisClass = this;
-					this.timeout = setTimeout(function(){
-						thisClass.hide();
-						thisClass.timeout = null;
-					},waitTime?waitTime:this.waitTime);
-					$("body").append('<div class="easyalert" id="easyAlert">'+text+'</div>');
-					$("#easyAlert").css({"left":"50%","margin-top":-($("#easyAlert").outerHeight()/2),"margin-left":-($("#easyAlert").outerWidth()/2)}).show();
-				},
-				hide: function(){
-					$("#easyAlert").remove();
-				}
-			}
-			function mySysIsIos(){
-				return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
-			}
-        </script>
-	{{include "/common/baiducc.html"}}
-    </body>
+                }
+                if ($("#phone_input").val()) {
+                    sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
+                }
+                if ($(".fixed-bottom-box .weui-check").is(":checked")) {
+                    if (finishEmailVerity && finishPhoneVerity) {
+                        readClause = true;
+                        sessionStorage.readClause = "true";
+                    } else {
+                        readClause = true;
+                        sessionStorage.readClause = "true";
+                        $(".toPay").attr("disabled", "disabled");
+                    }
+                } else {
+                    readClause = false;
+                    sessionStorage.readClause = "false";
+                    $(".toPay").attr("disabled", "disabled");
+                }
+                window.open("/front/wx_dataExport/toPreview/"+{{.T._id}}+
+                "?dataType=" + dataType
+            )
+                ;
+            } else {
+                EasyAlert.show("预览数据次数超出今日上限!", "", 3000);
+            }
+        })
+
+        //确认支付
+        $(".toPay").on("click", function () {
+            if (!finishEmailVerity || !readClause || !canpay || !finishPhoneVerity) {
+                return
+            }
+            $(".loading_").show();
+            canpay = false;
+
+            var param = {};
+            param.pay_way = "wx_js";
+            param.data_spec = dataType == 2 ? "senior" : "standard";
+            param.id ={{.T._id}}
+                //先去创建预支付订单
+                $.post("/jypay/dataExport/weixin/createOrder", param, function (data) {
+                    if (data.status == "y") {
+                        sessionStorage.setItem("order_spec" +{{.T._id}}, dataType);
+                        sessionStorage.setItem("order_email" +{{.T._id}}, $(".email_input").val().replace(/\s*/g, ""));
+                        sessionStorage.setItem("order_phone" +{{.T._id}}, $(".phone_input").val().replace(/\s*/g, ""));
+                        //预支付订单创建成功后 调微信支付
+                        if (data.res) {
+                            order_code = data.code;
+                            onBridgeReady(data.res);
+                        }
+                    } else {
+                        canpay = true;
+                        EasyAlert.show("生成订单出错,请稍后尝试!", "", 3000);
+                    }
+                    $(".loading_").hide();
+                }, "json");
+
+        })
+    })
+
+    //调用微信支付接口
+    function onBridgeReady(res) {
+        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") {
+                    //清除我已阅读缓存
+                    sessionStorage.removeItem("readClause");
+                    sessionStorage.removeItem("index");
+                    sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
+                    sessionStorage.removeItem("keyWords");
+                    $(".toPay").attr("disabled", "disabled");
+                    var email_pay = sessionStorage.getItem("order_email" +{{.T._id}})
+                    setTimeout(function () {
+                        window.location.replace("/front/wx_dataExport/paySuccessPage?email=" + email_pay + "&orderCode=" + order_code + "&payTime=" + res["timestamp"]);
+                    }, 500)
+                } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
+                    //取消支付 可以再次支付
+                    canpay = true;
+                } else {
+                    EasyAlert.show("系统异常,请稍微再试", "", 3000);
+                }
+                //清除我已阅读缓存
+                sessionStorage.removeItem("index");
+                sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
+            });
+    }
+
+    //倒计时
+    function sendemailTimer(t) {
+        $(".sendCode").text("" + t + "s");
+        $(".sendCode").attr("disabled", "disabled");
+        r = setInterval(function () {
+            t--;
+            $(".sendCode").text("" + t + "s")
+            if (t <= 0) {
+                clearInterval(r);
+                $(".sendCode").text("发送验证码");
+                if (!finishEmailVerity) {
+                    $(".verity_input").attr("readonly", true);
+                    $(".sendCode").removeAttr("disabled");
+                    $(".email_input").removeAttr("readonly");
+                    $(".sendCode").css("color", "#2CB7CA");
+                }
+            }
+        }, 1000)
+    }
+
+    //提示框
+    var EasyAlert = {
+        timeout: null,
+        waitTime: 1000,
+        show: function (text, css, waitTime) {
+            if (this.timeout != null) {
+                clearTimeout(this.timeout);
+                this.hide();
+                this.timeout = null;
+            }
+            var thisClass = this;
+            this.timeout = setTimeout(function () {
+                thisClass.hide();
+                thisClass.timeout = null;
+            }, waitTime ? waitTime : this.waitTime);
+            $("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
+            $("#easyAlert").css({
+                "left": "50%",
+                "margin-top": -($("#easyAlert").outerHeight() / 2),
+                "margin-left": -($("#easyAlert").outerWidth() / 2)
+            }).show();
+        },
+        hide: function () {
+            $("#easyAlert").remove();
+        }
+    }
+
+    function mySysIsIos() {
+        return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+    }
+
+    //
+    function accMul(arg1, arg2) {
+        var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
+        try {
+            m += s1.split(".")[1].length
+        } catch (e) {
+        }
+        try {
+            m += s2.split(".")[1].length
+        } catch (e) {
+        }
+        return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) / Math.pow(10, 2);
+    }
+
+    //
+    function FormatNum(n) {
+        if (n >= 1000) {
+            return Math.floor(n / 1000) + "," + ("0000" + n % 1000).slice(-3)
+        }
+        return n
+    }
+
+    //
+    function ChangePayMoney() {
+        var shouldPay = 0;
+        var beforePay = 0;
+        if (dataType == 1) {
+            beforePay = accMul(unitPrice_normal, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        } else if (dataType == 2) {
+            beforePay = accMul(unitPrice_senior, msgCount)
+            shouldPay = accMul(beforePay, discount)
+        }
+        shouldPay = shouldPay > orderMinPrice ? shouldPay : orderMinPrice;
+        beforePay = beforePay > orderMinPrice ? beforePay : orderMinPrice;
+        $(".pay_discount").text("¥" + shouldPay);
+        $(".pay_before").text("¥" + beforePay)
+    }
+
+    //
+    function toRead() {
+        event.preventDefault();
+        if (regInt.test($(".sendCode").text())) {
+            var email_input = $(".email_input").val().replace(/\s*/g, "");
+//					if (/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(email_input)){
+//						sessionStorage.setItem("send_email_"+{{.T._id}}, $(".email_input").val().replace(/\s*/g,""));
+//					}
+        }
+        if ($("#phone_input").val()) {
+            sessionStorage.setItem("order_phone" +{{.T._id}}, $("#phone_input").val().replace(/\s*/g, ""));
+        }
+        window.location.href = "/front/staticPage/wx-serviceterms.html";
+    }
+</script>
+{{include "/common/baiducc.html"}}
+</body>
 </html>

+ 147 - 2
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -11,6 +11,9 @@
    	    <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
 		<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 		{{include "/common/weixin.html"}}
+		<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js"></script>
+		<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
 		<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base_myorder.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/order_list.css?v={{Msg "seo" "version"}}">
@@ -227,6 +230,146 @@
 			    border-radius: 0.05rem;
 			    font-size: .28rem;
 			}
+			
+			.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%);
+			  z-index: 99999;
+			}
+			
+			.custom-toast .weui-icon_toast {
+			  display: none;
+			}
+			
+			.custom-toast .weui-toast__content {
+			  margin: 0;
+			}
 		</style>
 		<script>
 			var signature = {{.T.signature}};
@@ -469,6 +612,10 @@
 				sessionStorage.orderTabActive=$("ul .active").index();
 				var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
 				if (pattern==1){
+					var checkOrder_bl=checkOrder()
+					if (checkOrder_bl){
+						return;
+					}
 					window.location.href="/weixin/pay/renewPayPage?orderCode="+orderCode;   
 				}else if (pattern==2){
 					window.location.href="/weixin/pay/vipsubscribe_new?orderCode="+orderCode;
@@ -652,7 +799,6 @@
 					var result = true;
 					$.post("/subscribepay/orderListDetails/myOrder",{"type":typ},function(data){
 							$(".loading_").hide();
-							console.log(data.res)
 							var list=data.res;
 							dataCache =data.res;
 							pageIndex=2;
@@ -982,7 +1128,6 @@
 	                    		orderHtml+="<a class=\"shanchu iconfont  icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip +",this)\"></a>";
 	                        	iconHtml=""
 	                        	//最后一次购买完 1:试用 2:正式 -1:试用到期 -2:正式到期
-	                        	console.log(obj.lastbuy_code)
 	                        	if((vip_status=="-2")&&(obj.lastbuy_code!=undefined)){
 	                        		iconHtml+='<div class="card-footer">'
 											+'<a  onclick="renewalOrBuyAgain(2,this)" class="btn cancle">再次购买</a>'

+ 1 - 1
src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html

@@ -446,7 +446,7 @@
 						</div>
 						<div class="card-content">
 							<div class="item-list">
-								<p class="ellipsis tax" id="p_publishTime">筛选日期:<span class="publishTime"></span></p>
+								<p class="ellipsis" id="p_publishTime">筛选日期:<span class="publishTime"></span></p>
 							</div>
 							<div class="item-list">
 								<label>区域:</label>

+ 93 - 63
src/web/templates/weixin/historypush.html

@@ -235,6 +235,7 @@
 			$(".tab_left .time").show();
 			//地区渲染
   			mapData();
+			//
 			if(!isVipSub){
 				$(".normal_set").show();
 				$(".tab_left .area").hide();
@@ -246,15 +247,9 @@
 				if(!firstPage.length>0 && !haskey){
 					if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
 						sessionStorage.removeItem("keysetindexToHistory");
-						if(sessionStorage.keysetindexToHistory=="1"){
-							wx.ready(function () {
-								wx.closeWindow();
-							});
-						}else{
-							setTimeout(function(){
-								wx.closeWindow();
-							},2000);
-						}
+						setTimeout(function(){
+							wx.closeWindow();
+						},2000);
 						return
 					}
 					history.pushState({},"","");
@@ -281,8 +276,11 @@
 						$(".renew_toast").show();
 					}
 				}else{
-					if(parseInt(isExpire)!=0){
+					if(parseInt(isExpire)<0){
 						$(".nv_renew_toast").show();
+					}else{
+						$(".isExpire").text(parseInt(isExpire));
+						$(".renew_toast").show();
 					}
 				}
 				$(".vip_set").show();
@@ -794,7 +792,7 @@
 		}
 		._header{
 			position: fixed;
-			top: 0;
+			top: 0rem;
 			width: 100%;
 			z-index: 999;
 		}
@@ -918,66 +916,77 @@
       </div>
   	</div>
   	<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-  	<script src="{{Msg "seo" "cdn"}}/dataExport/js/mapJSON.js?v={{Msg "seo" "version"}}"></script>
+  	<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/mapArea.js?v={{Msg "seo" "version"}}"></script>
   	<script type="text/javascript" charset="UTF-8">
   		function mapData(){
   			var _citySessionData = null
-  			var _provinceArr = {}
-  			var _cityMap = []
+  			var _provinceArr = {}//选择的省份对应的城市
+			var allCityNum = 0;//选择全部省份的个数
+			var cityNumArr = {};//单个省份下的城市个数
   			if (sessionStorage&&sessionStorage.getItem(userId+"_selectCityName")!=null){
   				_citySessionData  = JSON.parse(sessionStorage.getItem(userId+"_selectCityName"));
   				for(var k=0;k<_citySessionData.length;k++){
-  					_provinceArr[_citySessionData[k]["province"]] = _citySessionData[k]["selectCity"].length
-  					_cityMap = _cityMap.concat(_citySessionData[k]["selectCity"])
+					if (_citySessionData[k]["selectCity"]["0"]=="全部"){
+						cityNumArr[_citySessionData[k]["province"]] = _citySessionData[k]["selectCity"].length - 1;
+					}else{
+  						cityNumArr[_citySessionData[k]["province"]] = _citySessionData[k]["selectCity"].length;
+					}
+					allCityNum += cityNumArr[_citySessionData[k]["province"]]
+  					_provinceArr[_citySessionData[k]["province"]] = _citySessionData[k]["selectCity"]
   				}
-  				if(_cityMap.length>0){
-  					 $('#showArea .jymobile-tab-triangle').addClass('current').text(`地区 ${_cityMap.length}`);
+				//所选地级市的数量
+  				if(allCityNum>0){
+  					 $('#showArea .jymobile-tab-triangle').addClass('current').text(`地区 ${allCityNum}`);
   				}
 				//sessionStorage.removeItem("selectCityName");
   			}
-	  		var provinceArr = ["安徽","澳门","北京","重庆","福建","广东","广西","贵州","甘肃","河北","湖北","黑龙江","海南","河南","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山西","陕西","上海","山东","四川","天津","台湾","西藏","新疆","香港","云南","浙江"]
 	  		var provinceHtml = '<div class="province">';
 	  		var cityHtml = '<div class="city" >';
-	  		for (var j = 0;  j <  provinceArr.length;j++) {
+	  		for (var j = 0;  j <  chinaMapJSON.length;j++) {
 	  			var shwohide = 'none'
 	  			var _active = "";
-	  			for (var i = chinaMapJSON.length - 1; i >= 0; i--) {
-	  				_chinaMap = chinaMapJSON[i]
-	  				if(_chinaMap["name"].indexOf(provinceArr[j])>-1){
-	  					if (j==0){
-	  						shwohide = "";
-	  						_active = "active";
-	  					}
-	  					var provinceFlag = true;
-	  					if(_provinceArr[provinceArr[j]]!=undefined&&_provinceArr[provinceArr[j]]>0){
-								provinceHtml +='<p class="p_item '+_active+'"><span class="province-name">'+provinceArr[j]+'</span><span class="city-count" style="display: inline;">('+_provinceArr[provinceArr[j]]+')</span></p>'
-								//
-								cityHtml +='<div class="province_city" data-id="'+provinceArr[j]+'" style="display:'+shwohide+'">';
-								provinceFlag = false;
-	  					}
-	  					if(provinceFlag){
-	  						provinceHtml +='<p class="p_item '+_active+'"><span class="province-name">'+provinceArr[j]+'</span><span class="city-count"></span></p>'
-	  					
-	  						cityHtml +='<div class="province_city" data-id="'+provinceArr[j]+'" style="display:'+shwohide+'">'
-	  					}
-	  					var cityArr = _chinaMap["city"]
-	  					for(var m = 0;m < cityArr.length;m++){
-	  						var cityFlag = true;
-		  					if(_cityMap.length>0){
-			  					for(var k=0;k<_cityMap.length;k++){
-			  						if(_cityMap[k]==cityArr[m]["name"]){
-			  							cityHtml +='<p class="c_item"><input type="checkbox" class="checkbox"  checked><span class="city-name">'+cityArr[m]["name"]+'</span></p>';
-			  							cityFlag = false;
-			  							break;
-			  						}
-			  					}
-			  				}
-			  				if(cityFlag){
-	  							cityHtml +='<p class="c_item"><input type="checkbox" class="checkbox"><span class="city-name">'+cityArr[m]["name"]+'</span></p>'
-	  						}
-	  					}
-	  					cityHtml +='</div>'
-	  				}
+				var thisArea = chinaMapJSON[j]
+	  			for (var i in thisArea) {
+					//首先显示安徽省和其地级市 其他隐藏
+  					if (i=="安徽"){
+  						shwohide = "";
+  						_active = "active";
+  					}
+  					var provinceFlag = true;
+  					if(_provinceArr[i]!=undefined&&_provinceArr[i].length>0){
+							provinceHtml +='<p class="p_item '+_active+'"><span class="province-name">'+i+'</span><span class="city-count" style="display: inline;">('+cityNumArr[i]+')</span></p>'
+							//
+							cityHtml +='<div class="province_city" data-id="'+i+'" style="display:'+shwohide+'">';
+							provinceFlag = false;
+  					}
+  					if(provinceFlag){
+  						provinceHtml +='<p class="p_item '+_active+'"><span class="province-name">'+i+'</span><span class="city-count"></span></p>'
+  					
+  						cityHtml +='<div class="province_city" data-id="'+i+'" style="display:'+shwohide+'">'
+  					}
+  					var cityArr = thisArea[i]//每个省份下的地市
+					var _cityMap = _provinceArr[i]
+					if(_cityMap!=undefined&&_cityMap[0]=="全部"){
+						cityHtml +='<p class="c_item cityAll"><input type="checkbox" class="checkbox" checked><span class="city-name">全部</span></p>';
+					}else{
+						cityHtml +='<p class="c_item cityAll"><input type="checkbox" class="checkbox"><span class="city-name">全部</span></p>';
+					}
+  					for(var m = 0;m < cityArr.length;m++){
+  						var cityFlag = true;
+	  					if(_cityMap!=undefined&&_cityMap.length>0){
+		  					for(var k=0;k<_cityMap.length;k++){
+		  						if(_cityMap[k]==cityArr[m]){
+		  							cityHtml +='<p class="c_item"><input type="checkbox" class="checkbox"  checked><span class="city-name">'+cityArr[m]+'</span></p>';
+		  							cityFlag = false;
+		  							break;
+		  						}
+		  					}
+		  				}
+		  				if(cityFlag){
+  							cityHtml +='<p class="c_item"><input type="checkbox" class="checkbox"><span class="city-name">'+cityArr[m]+'</span></p>'
+  						}
+  					}
+  					cityHtml +='</div>'
 	  			}
 	  		}
 	  		provinceHtml += '</div>'
@@ -1120,13 +1129,32 @@
             	$(this).parent().children('input').trigger('click')
             })
             // 每次选择框变化,更新城市计数
-            $('.area_wrap .c_item input[type="checkbox"]').on('change',function () { 
+            $('.area_wrap .c_item input[type="checkbox"]').on('change',function () {
+				if($(this).parent("p").hasClass("cityAll")){
+					if ($(this).is(':checked')){
+						$(this).parent("p").nextAll("p").find('input[type="checkbox"]').prop('checked', true);
+					}else{
+						$(this).parent("p").nextAll("p").find('input[type="checkbox"]').prop('checked', false);
+					}
+				}else{
+					if ($(this).is(':checked')){
+						if($(this).parent().parent().find('input:checked').length == ($(this).parent().parent().find('p').length-1)){
+							$(this).parent().parent().find('.cityAll  input[type="checkbox"]').prop('checked', true);
+						}
+					}else{
+						$(this).parent().parent().find('.cityAll  input[type="checkbox"]').prop('checked', false);
+					}
+				}
             	var i = $(this).parent().parent().index()
                 // 找到该省份下所有被选中的input,统计有几个
                 var checkedCityNum = $(this).parent().parent().find('input:checked').length;
+				if(checkedCityNum>0&&$(this).parent().parent().find('.cityAll  input[type="checkbox"]').is(':checked')){
+					//判断全选是否
+					checkedCityNum = checkedCityNum -1;
+				}
                 var cityCountDOM = $('.province .p_item').eq(i).children('.city-count')
                 if (checkedCityNum) {
-                	cityCountDOM.show().text(`(${checkedCityNum})`)
+                	cityCountDOM.show().text(`(${checkedCityNum})`)
                 } else {
                 	cityCountDOM.show().text('')
                 	cityCountDOM.hide()
@@ -1136,14 +1164,16 @@
             $('.screen').click(function(){
             	$(".subscribe").toggleClass('overClass');
 				scrollHtml();
-				$('#showArea').find("span").toggleClass("current");
+				if(sessionStorage.getItem(userId+"_selectCityName")==""||sessionStorage.getItem(userId+"_selectCityName")==undefined){
+					$('#showArea').find("span").toggleClass("current");
+				}
             	$('.area_container').slideUp();
             	$('.screen').hide();
             })
             // 地区选择确认按钮
             $('.enter_btn').click(function (){
             	$(".subscribe").toggleClass('overClass');
-            	let cityCount = $('.area_wrap .city input:checked').length;
+            	let cityCount = $('.area_wrap .city input:checked').length-$('.area_wrap .city .cityAll input:checked').length;
             	$('.area_container').slideUp();
             	$('.screen').hide()
                 selectCity = "" //重新选择 初始化地区 参数
@@ -1185,9 +1215,9 @@
                     	province: provinceName,
                     	selectCity: cityArr
                     });
-                    sessionStorage.setItem(userId+"_selectCityName", JSON.stringify(selectCityName));
-                    ajaxFun(firstTime,selectCity);
                 })
+                sessionStorage.setItem(userId+"_selectCityName", JSON.stringify(selectCityName));
+                ajaxFun(firstTime,selectCity);
                 // 重写地区text
                 $('#showArea .jymobile-tab-triangle').addClass('current').text(`地区 ${cityCount}`);
                 

+ 24 - 9
src/web/templates/weixin/vipsubscribe/choose_area.html

@@ -443,7 +443,9 @@
         selectProvince: function (province, canClick) { //设置选中省份 province 省份
             $($('.tab .province')).each(function (index, dom) {
                 if (province == $.trim($(dom).text())) {
-                    if (province != "全国") $(".checkbox.other").attr("checked", false); //取消全国选中
+                    if (province != "全国") {
+                        $(".checkbox.other").attr("checked", false); //取消全国选中
+                    }
                     $(dom).children('.checkbox').attr({"checked": true, "disabled": !canClick});//选中此省份
                     $(dom).parents().siblings('.tab_content').find(".city").addClass("active").attr({"disabled": !canClick});
                 }
@@ -457,15 +459,16 @@
                         $(dom).addClass('active').attr('disabled', !canClick).parents().siblings('.tab')
                             .addClass('selected').children('.province').children('.checkbox').attr({
                             "checked": true
-                        })
+                        }).addClass('half');
                     }
                 })
             })
         },
-        getResult: function (changeCity) {   /* 选中结果 */
+        getResult: function (changeCity, isFirst) {   /* 选中结果 */
             //如果选中所有,则转为全国
             if ($(".city").length == $(".city.active").length) {
                 $(".checkbox.other").trigger("click");
+                $(".checkbox").removeClass("half");
                 return
             }
             var tmpSelect = {};
@@ -566,7 +569,7 @@
                 if (selectCityMax > 2) {
                     $('.tips_btn .tips_d_text').text("已选择" + selectCityMax + "个市,建议购买“全省”").slideDown();
                 } else {
-                    if (selectProvince > 9) {
+                    if (selectProvince > 9 && !isFirst) {
                         $('.tips_btn .tips_d_text').text("已选择" + selectProvince + "个省,建议购买“全国”").slideDown()
                     } else {
                         $(".tips_d_text").slideUp();
@@ -673,12 +676,19 @@
                     $(".province input").prop('checked', false);
                     $(".city").removeClass('active');
                     $(this).prop('checked', true);
+                    $(".checkbox").removeClass("half");
                 } else {
                     $(".checkbox.other").prop('checked', false);
-                    if ($(this).is(':checked') == false) {
-                        $(this).parent().parent().siblings('.tab_content').children('.city').removeClass('active');
-                        if ($(".province .checkbox:checked").length == 0) {//若没有省份被选中 则选中全国
-                            $(".checkbox.other").prop('checked', true);
+                    if (!$(this).is(':checked')) {
+                        if ($(this).hasClass("half")) {//判断当前是否是半选
+                            $(this).prop("checked", true).removeClass("half");
+                            $(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");
+                            }
                         }
                     } else {
                         $(this).parent().parent().siblings('.tab_content').children('.city').addClass('active');
@@ -696,6 +706,11 @@
                     var input = $(this).parents('li').find('input.checkbox')
                     window.input = input
                     input.prop('checked', true)
+                    if (isActive != $(this).parent().find('.city').length) {//是否全选
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').addClass('half');
+                    } else {
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').removeClass('half');
+                    }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
                         'checked', false)
@@ -758,7 +773,7 @@
         AreaChoose.showSelected(true);//回显已选择
         /* 判断已购买的城市 在不在 全部城市里面,在,将按钮置灰,不可点击 */
 
-        AreaChoose.getResult();
+        AreaChoose.getResult("", true);
         AreaChoose.inintClick();
     })
 </script>

+ 11 - 5
src/web/templates/weixin/vipsubscribe/choose_area_upgrade.html

@@ -399,9 +399,15 @@
     <script>
     	//已购买
     	var buystr = "";
+    	var areaData = {};
         $DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
         	if(data){
             	buystr = data.area;
+            	areaData["data"] = {
+            		"area" : data.area,
+            		"buyset" : data.buyset, 
+            	}
+            	console.log(areaData)
         	}
         }, false);
 //      console.log(buystr)
@@ -539,7 +545,7 @@
               let arr =[];
               // 判断省份下的城市是否等于选中的城市长度,相等就是全部选中
               if (length == activeLeng) {
-                  $('.tips_btn .tips_d_text.citys').slideUp()
+                  $('.tips_btn .tips_d_text.citys').hide();
                   // data.push($(this).parent('.tab_content').siblings('.tab:not(.whole)').children('.province').text().trim())
                   let province = $(this).parent('.tab_content').siblings('.tab:not(.whole)').children('.province').text().trim();
                   data.push({
@@ -591,10 +597,10 @@
                   // 判断每个省份下选中的城市长度,当大于等于4的时候 弹出"选择全省更划算的弹窗"
                   let childrenArr=[];
                   if (children.length >= 3 && !this.vipSubisTrial) {
-                      $('.tips_btn .tips_d_text.citys').text("已选择"+children.length+"个市,建议购买“全省”");
-                      $('.tips_btn .tips_d_text.citys').slideDown();
+                      $('.tips_btn .tips_d_text.citys').text("已选择"+children.length+"个市,建议购买“全省”");
+                      $('.tips_btn .tips_d_text.citys').show();
                   }else{
-                  		$('.tips_btn .tips_d_text.citys').slideUp();
+                  		$('.tips_btn .tips_d_text.citys').hide();
                   }
                   html += `${result[i].name}(`
                   for(var j = 0;j < children.length;j++){
@@ -629,7 +635,7 @@
 	            }
 	        }
           	if(provincesArr.length > 9){
-          		$('.tips_d_text.all').text("已选择"+provincesArr.length+"个省,建议购买“全国”");
+          		$('.tips_d_text.all').text("已选择"+provincesArr.length+"个省,建议购买“全国”");
           		$('.tips_d_text.all').show();
           		$('.tips_d_text.citys').hide();
           	}else{

+ 85 - 9
src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html

@@ -26,8 +26,9 @@
     	</script>
         <main class="choose_industry main">
             <div class="result">
-                <span class="label">已新增:</span>
-                <span class="result_name">全部行业</span>
+                <span class="label buyset">已购买:2/3个行业</span><br>
+                <span style="display: none;" class="label addUpgrade">升级新增:2个行业</span>
+                <!--<span class="result_name">全部行业</span>-->
             </div>
             <div class="form">
                 <div class="select-area-box">
@@ -243,7 +244,7 @@
             <div class="tips_btn">
                 <div class="tips_discount">
                     <!--<div class="tips_d_money" style="display: block">&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">重置</button>
@@ -285,14 +286,58 @@
                 buttons.each(function(){
                     if ($(this).hasClass('active')) {
                         if($(this).attr("disabled")!="disabled"){
-                          selectedArr.push($(this).text())
+                        	if($(this).text() === "全部行业"){
+                        		
+                        	}
+                          	selectedArr.push($(this).text())
                         }
                     }
                 })
-                
+                if(selectedArr.length > 0){
+                	let adds = selectedArr.length+buyIndustryLen
+                	if(buyset !== "全部行业"){
+                		if(adds <= buyset){
+	                		$(".addUpgrade").hide();
+		            		buyLen = adds;
+		            		$(".buyset").text("已购买:"+buyLen+"/"+buyset+"个行业");
+		            		$(".tips_btn .btns .save-btn").attr("disabled","disabled");
+							$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
+		            	}else{
+		            		let add = adds - buyset;
+		            		$(".addUpgrade").text("已新增:"+add+"个行业");
+		            		$(".addUpgrade").show();
+		            		$(".tips_btn .btns .save-btn").removeAttr("disabled");
+							$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+		            	}
+                	}else{
+                		if(selectedArr[0] === "全部行业"){
+                			$(".buyset").text("已购买:全部行业");
+                		}else{
+                			let adds = buyIndustry.length + selectedArr.length
+                			$(".buyset").text("已购买:"+buyset);
+                		}
+                	}
+                }else{
+                	if(buyset !== "全部行业"){
+                		$(".buyset").text("已购买:"+buyIndustryLen+"/"+buyset+"个行业")
+                	}else{
+                		$(".buyset").text("已购买:"+buyset)
+                	}
+                }
+                for(var i in selectedArr){
+                	if(selectedArr[i] === "全部行业"){
+                		if(buyset !== "全部行业"){
+                			$(".buyset").text("已购买:"+buyIndustry.length+"/"+buyset+"个行业");
+	                		$(".addUpgrade").text("已新增:全部行业");
+	                		$(".addUpgrade").show();
+	                		$(".tips_btn .btns .save-btn").removeAttr("disabled");
+							$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+                		}
+                	}
+                }
                 // 显示隐藏优惠tips
                 if (selectedArr.length >= 4 && !vipSubisTrial) {
-                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”。");
+                	$('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()
@@ -307,6 +352,7 @@
 //                  var allButton = $('#all button')
 //                  allButton.trigger('click')
 //                  $('.result .result_name').text(allButton.text())
+					$(".addUpgrade").hide();
 					$(".tips_btn .btns .save-btn").attr("disabled","disabled");
 					$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
                 }
@@ -356,7 +402,6 @@
             
             // 每个button的点击事件
             $('.select-area-box .list').on('click', 'button', function (e) {
-                $('.tips_btn .btns button').removeAttr('disabled')
 
                 $(this).toggleClass('active')
                 // 如果点击全部行业,则其他所有按钮都取消active
@@ -370,13 +415,13 @@
                 findSelectedIndustry()
                 flushPrice()
             })
-
             // 重置按钮事件
             $('.reset-btn').on('click', function () {
 //            $("#all .industry_item").trigger("click");
 				$('.select-area-box .list button').removeClass('active');
                 showSelect(buyIndustry,false);
                 findSelectedIndustry();
+                sessionStorage.removeItem("vipSubSelectIndustryAdd");
                 sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
                 $('.tips_btn .btns button').removeAttr('disabled');
             })
@@ -386,7 +431,18 @@
 
              // 确认按钮事件
             $('.save-btn').on('click', function () {
-                console.log(selectedIndustryArr)
+            	var selectedIndustrysArr = ["全部行业"];
+        		if(selectedIndustryArr[0] !== "全部行业"){
+        			let reduce = buyset - buyIndustry.length
+        			if(reduce > 0){
+        				selectedIndustrysArr = selectedIndustryArr.slice(0, -reduce);
+        			}else{
+        				selectedIndustrysArr = selectedIndustryArr;
+        			}
+        		}
+        		sessionStorage.buyIndustry = $(".buyset").html();
+        		sessionStorage.addIndustry = $(".addUpgrade").html();
+        		sessionStorage.setItem("vipSubSelectIndustryAdd",JSON.stringify(selectedIndustrysArr));
                 sessionStorage.setItem("vipSubSelectIndustryUpgrade",JSON.stringify(selectedIndustryArr));
                 history.go(-1);
             })
@@ -396,6 +452,9 @@
             var timeSelect = [1,2]//计算价格临时变量 timeSelect[0]时长  timeSelect[1] 1:年 2:月
             var vipSubisTrial = false;
             var buyIndustry = "";//已购买
+            var buyIndustryLen = 0;
+            var buyset = "";
+            var buyLen = 0;
             $(function(){
               try{
                 if(sessionStorage.getItem("vipSubSelectIndustryUpgrade")){
@@ -413,6 +472,22 @@
                 $DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
                 	if(data){
 		            	buyIndustry = data.buyerclass;
+		            	buyLen = buyIndustry.length
+		            	buyIndustryLen = buyIndustry.length;
+		            	buyset = Number(data.buyset.buyerclasscount);
+		            	if(sessionStorage.buyIndustry !== undefined){
+							$(".buyset").text(sessionStorage.buyIndustry);
+						}else{
+							if(buyset === -1){
+			            		buyset = "全部行业";
+			            		$(".buyset").text("已购买:/"+buyset);
+			            	}else{
+			            		$(".buyset").text("已购买:"+buyLen+"/"+buyset+"个行业");
+			            	}
+						}
+						if(sessionStorage.addIndustry !== undefined){
+							$(".addUpgrade").text(sessionStorage.addIndustry);
+						}
                 	}
                 },false);
                 if(checkObj(buyIndustry)){
@@ -442,6 +517,7 @@
 			    }
 			    return false;
 			}
+		
         </script>
     </body>
 </html>

+ 3 - 5
src/web/templates/weixin/vipsubscribe/edit_city_new.html

@@ -27,13 +27,11 @@
 
 <body>
 <div id="choose_area">
-    <p class="all_area" style="display: none;"> 可选择全部区域</p>
+    <!--<p class="all_area" style="display: none;"> 可选择全部区域</p>-->
     <p class="optional_count"> 可选择省数量:<em class="count"></em> / <span class="total"></span></p>
-    <div class="result">
-        <!-- 首次购买 显示"已选择" -----  升级订阅显示"已新增" -->
-
+    <!--<div class="result">
         <p>已选择:<span class="result_name"></span></p>
-    </div>
+    </div>-->
     <div class="form">
         <div class="select-area-box" style="padding-bottom: 0;">
             <ul class="area-list">

+ 1 - 1
src/web/templates/weixin/vipsubscribe/edit_subscribe.html

@@ -94,7 +94,7 @@
 
             //行业展示                 
             if (this.reqData.buyset.buyerclasscount === -1) {
-                $(".edit_item.industry .item_bottom").text("已购买全");
+                $(".edit_item.industry .item_bottom").text("已购买全部行业");
             } else {
                 $(".edit_item.industry .item_bottom").text("已购买" + this.reqData.buyset.buyerclasscount + "个行业");
             }

+ 392 - 389
src/web/templates/weixin/vipsubscribe/edit_subscribe_industry.html

@@ -1,405 +1,408 @@
 <!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="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
-        <link rel="stylesheet" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
-        <link rel="stylesheet" href="/vipsubscribe/css/choose_industry.css?v={{Msg "seo" "version"}}">
-    </head>
-    <body>
-        <main class="choose_industry main">
-            <p class="optional_count"> 可选择行业数量: <em class="count"></em> / <span class="total"></span></p>
-            <div class="result"  style="display: block;">
-                <span class="label">已选择:</span>
-                <span class="result_name">全部行业</span>
-            </div>
-            <div class="form">
-                <div class="select-area-box">
-                    <ul class="list">
-                        <li class="list_item" id="all" style="display:none">
-                            <div class="item_label"></div>
-                            <div class="item_industry_list">
-                                <button class="industry_item">全部行业</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>
-                            </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:;">F</a>
-                <a href="javascript:;">G</a>
-                <a href="javascript:;">H</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:;">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:;">W</a>
-                <a href="javascript:;">X</a>
-                <a href="javascript:;">Y</a>
-                <a href="javascript:;">Z</a>
-            </div>
-            <!-- <div class="bottom_button">
-                <button class="reset-btn left_btn" disabled>重置</button>
-                <button class="save-btn right_btn" disabled>确认</button>
-            </div> -->
-            <div class="tips_btn">
-                <div class="btns">
-                    <button class="reset-btn" id="cancel">取消</button>
-                    <button disabled class="save-btn" id="enter">确认修改</button>
-                </div>
-            </div>
-        </main>
-        <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-        <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-        <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
-        <script>
+<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="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/vipsubscribe/css/choose_industry.css?v={{Msg "seo" "version"}}">
+</head>
+<body>
+<main class="choose_industry main">
+    <p class="optional_count" style="background: rgba(245,244,249,1);"> 可选择行业数量: <em class="count"></em> / <span class="total"></span></p>
+    <!--<div class="result" style="display: block;">
+        <span class="label">已选择:</span>
+        <span class="result_name">全部行业</span>
+    </div>-->
+    <div class="form">
+        <div class="select-area-box">
+            <ul class="list">
+                <li class="list_item" id="all" style="display:none">
+                    <div class="item_label"></div>
+                    <div class="item_industry_list">
+                        <button class="industry_item">全部行业</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>
+                    </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:;">F</a>
+        <a href="javascript:;">G</a>
+        <a href="javascript:;">H</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:;">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:;">W</a>
+        <a href="javascript:;">X</a>
+        <a href="javascript:;">Y</a>
+        <a href="javascript:;">Z</a>
+    </div>
+    <!-- <div class="bottom_button">
+        <button class="reset-btn left_btn" disabled>重置</button>
+        <button class="save-btn right_btn" disabled>确认</button>
+    </div> -->
+    <div class="tips_btn">
+        <div class="btns">
+            <button class="reset-btn" id="cancel">取消</button>
+            <button disabled class="save-btn" id="enter">确认修改</button>
+        </div>
+    </div>
+</main>
+<script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+<script>
+    //加载数据
+    var EditIndustry = {
+        reqData: {},
+        selectlast: [],
+        init: function () {
+            this.getData();
+            this.showData();//初始化页面展示
+            this.initClick();//初始化点击事件
+        },
+        getData: function () {
             //加载数据
-            var EditIndustry={
-              reqData:{},
-              selectlast:[],
-              init:function(){
-                this.getData();
-                this.showData();//初始化页面展示
-                this.initClick();//初始化点击事件
-              },
-              getData:function(){
-                //加载数据
-                  $DoPost("/subscribepay/editSub/getSubBuyMsg",{},function(r){
-                    if(r.success){
-                      EditIndustry.reqData=r.data;
-                    }
-                  },false)
-                  if(this.reqData.industry.length==0&&this.reqData.buyset.buyerclasscount==-1){
-                    this.reqData.industry=["全部行业"]
-                  }
-              },
-              showData:function(){
-                this.selectlast=this.reqData.industry;
-                
-                $('.result .result_name').html(this.reqData.industry.join('、'));
-                
-                $('.industry_item').each(function () {  
-                  let text = $(this).text();
-                  EditIndustry.reqData.industry.forEach(v =>{
-                      if(v.trim() == text.trim()){
-                        $(this).addClass('active')
-                      }
-                    })
-                });
-                
-                if(this.reqData.buyset.buyerclasscount!=-1){ //非全部行业 展示数量
-                  $('.total').html(this.reqData.buyset.buyerclasscount);
-                  $('.count').html(this.reqData.industry.length);
-                  $('.optional_count').css({"width":"100%","position":"fixed","top":0,"z-index":9999});
-                  $('.result').css({"top":$('.optional_count').height()});
-                  $('.select-area-box').css({"padding-top":$('.optional_count').height()});
-                  if(this.reqData.industry.length>=this.reqData.buyset[2]){
-                    $('.industry_item:not(.active)').attr('disabled',true);
-                  }
-                }else{
-                  $("#all").css("display","");
-                  $(".optional_count").css("display","none");
+            $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
+                if (r.success) {
+                    EditIndustry.reqData = r.data;
                 }
-                EditIndustry.findSelectedIndustry(true);
-              },
-              initClick:function(){
-                // 点击导航跳转
-                $("body").on('click','.slide a',function(){
-                    var s = $(this).html()
-                    if(s == '#'){
-                        return;
+            }, false)
+            if (this.reqData.industry.length == 0 && this.reqData.buyset.buyerclasscount == -1) {
+                this.reqData.industry = ["全部行业"]
+            }
+        },
+        showData: function () {
+            this.selectlast = this.reqData.industry;
+
+            //$('.result .result_name').html(this.reqData.industry.join('、'));
+
+            $('.industry_item').each(function () {
+                let text = $(this).text();
+                EditIndustry.reqData.industry.forEach(v => {
+                    if (v.trim() == text.trim()) {
+                        $(this).addClass('active')
                     }
-                    document.querySelector('#' + s).scrollIntoView({block:'center'});
                 })
-                // 每个button的点击事件
-                $('.select-area-box .list').on('click', 'button', function (e) {
-                    if($(this).text()=="全部行业"){
-                      if($(this).hasClass('active')){
+            });
+
+            if (this.reqData.buyset.buyerclasscount != -1) { //非全部行业 展示数量
+                $('.total').html(this.reqData.buyset.buyerclasscount);
+                $('.count').html(this.reqData.industry.length);
+                $('.optional_count').css({"width": "100%", "position": "fixed", "top": 0, "z-index": 9999});
+                $('.result').css({"top": $('.optional_count').height()});
+                $('.select-area-box').css({"padding-top": $('.optional_count').height()});
+                if (this.reqData.industry.length >= this.reqData.buyset[2]) {
+                    $('.industry_item:not(.active)').attr('disabled', true);
+                }
+            } else {
+                $("#all").css("display", "");
+                $(".optional_count").css("display", "none");
+            }
+            EditIndustry.findSelectedIndustry(true);
+        },
+        initClick: function () {
+            // 点击导航跳转
+            $("body").on('click', '.slide a', function () {
+                var s = $(this).html()
+                if (s == '#') {
+                    return;
+                }
+                document.querySelector('#' + s).scrollIntoView({block: 'center'});
+            })
+            // 每个button的点击事件
+            $('.select-area-box .list').on('click', 'button', function (e) {
+                if ($(this).text() == "全部行业") {
+                    if ($(this).hasClass('active')) {
                         return
-                      }
-                      if(EditIndustry.reqData.buyset.buyerclasscount!=-1){ //购买不是全部行业 不能点击
+                    }
+                    if (EditIndustry.reqData.buyset.buyerclasscount != -1) { //购买不是全部行业 不能点击
                         EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
                         return
-                      }
-                      $('.select-area-box .list button').removeClass('active');
-                      $('#all button').addClass('active');
-                      $('#enter').removeAttr('disabled');
-                    }else{
-                      $(this).toggleClass('active')
-                      if($(".industry_item.active").length==0){//如果没有行业被选中 则选中全部行业
-                        if(EditIndustry.reqData.buyset.buyerclasscount==-1){
-                          $('#all button').addClass('active');
-                        }else{
-                          $('#enter').attr('disabled','disabled');//选择空不能提交
+                    }
+                    $('.select-area-box .list button').removeClass('active');
+                    $('#all button').addClass('active');
+                    $('#enter').removeAttr('disabled');
+                } else {
+                    $(this).toggleClass('active')
+                    if ($(".industry_item.active").length == 0) {//如果没有行业被选中 则选中全部行业
+                        if (EditIndustry.reqData.buyset.buyerclasscount == -1) {
+                            $('#all button').addClass('active');
+                        } else {
+                            $('#enter').attr('disabled', 'disabled');//选择空不能提交
                         }
-                      }else{
+                    } else {
                         $('#all button').removeClass('active');
                         $('#enter').removeAttr('disabled');
-                      }
-                    }
-                    
-                    EditIndustry.findSelectedIndustry(false);
-                })
-                // 取消按钮事件 返回上一页
-                $('#cancel').click(function(){
-                    window.history.go(-1);
-                })
-                // 确定修改事件
-                $('#enter').click(function(){
-                  $("#enter").attr("disabled","disabled");  
-                  //更新对象
-                  if(EditIndustry.reqData.buyset.buyerclasscount==-1&&EditIndustry.reqData.industry[0]=="全部行业"){
-                    EditIndustry.reqData.industry=[];
-                  }
-                  console.log("final select ",EditIndustry.reqData)
-                  $DoPost("/subscribepay/editSub/submit",{"type":"industry","value":JSON.stringify(EditIndustry.reqData.industry)},function(r){
-                    if(r.success){
-                      window.location.replace('/front/vipsubscribe/submitEditSubFinish');
                     }
-                  },false)
-                  $("#enter").removeAttr("disabled");  
-                })
-              },
-              showTip:function(msg){
-                weui.toast(msg,{
-                  duration: 2000,
-                  className: 'custom-toast',
-                });
-              },
-              findSelectedIndustry:function(isInit) {
-                  var buttons = $('.select-area-box .list button')
-                  // 找到已选择的数组(有active类的数组)
-                  var selectedArr = []
-                  buttons.each(function(){
-                      if ($(this).hasClass('active')) {
-                        selectedArr.push($(this).text())
-                      }
-                  })
-                  if(selectedArr.length==$('.select-area-box .list button').length-1){//选中了全部行业
-                    $('#all button').trigger('click');
-                    return
-                  }
-                  var selectCount= selectedArr.length
-                  $('.count').html(selectCount);
-                  // 显示隐藏优惠tips
-                  if (selectedArr.length >= EditIndustry.reqData.buyset.buyerclasscount&& EditIndustry.reqData.buyset.buyerclasscount!=-1) {
-                    if(!isInit){
-                      EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                }
+
+                EditIndustry.findSelectedIndustry(false);
+            })
+            // 取消按钮事件 返回上一页
+            $('#cancel').click(function () {
+                window.history.go(-1);
+            })
+            // 确定修改事件
+            $('#enter').click(function () {
+                $("#enter").attr("disabled", "disabled");
+                //更新对象
+                if (EditIndustry.reqData.buyset.buyerclasscount == -1 && EditIndustry.reqData.industry[0] == "全部行业") {
+                    EditIndustry.reqData.industry = [];
+                }
+                console.log("final select ", EditIndustry.reqData)
+                $DoPost("/subscribepay/editSub/submit", {
+                    "type": "industry",
+                    "value": JSON.stringify(EditIndustry.reqData.industry)
+                }, function (r) {
+                    if (r.success) {
+                        window.location.replace('/front/vipsubscribe/submitEditSubFinish');
                     }
-                    $('.industry_item:not(.active)').attr('disabled','disabled');
-                  } else {
-                      $('.industry_item:not(.active)').removeAttr('disabled')
-                  }
-                  this.reqData.industry = selectedArr;
-                  var selectedStr = selectedArr.join('、')
-                  $('.result .result_name').text(selectedStr)
-                  if(this.noChange(this.reqData.industry,EditIndustry.selectlast)||this.reqData.industry.length==0){
-                    $('#enter').attr('disabled', 'disabled');
-                  }else{
-                    $('#enter').removeAttr('disabled');
-                  }
-                  $(".select-area-box .list").css("margin-top",$(".result").height()+20);
-              },
-              noChange:function(arr1,arr2){
-                return JSON.stringify(arr1.sort()) === JSON.stringify(arr2.sort());
-              }
-            }
-            $(function(){
-              EditIndustry.init();
+                }, false)
+                $("#enter").removeAttr("disabled");
             })
-            
-        </script>
-    </body>
+        },
+        showTip: function (msg) {
+            weui.toast(msg, {
+                duration: 2000,
+                className: 'custom-toast',
+            });
+        },
+        findSelectedIndustry: function (isInit) {
+            var buttons = $('.select-area-box .list button')
+            // 找到已选择的数组(有active类的数组)
+            var selectedArr = []
+            buttons.each(function () {
+                if ($(this).hasClass('active')) {
+                    selectedArr.push($(this).text())
+                }
+            })
+            if (selectedArr.length == $('.select-area-box .list button').length - 1) {//选中了全部行业
+                $('#all button').trigger('click');
+                return
+            }
+            var selectCount = selectedArr.length
+            $('.count').html(selectCount);
+            // 显示隐藏优惠tips
+            if (selectedArr.length >= EditIndustry.reqData.buyset.buyerclasscount && EditIndustry.reqData.buyset.buyerclasscount != -1) {
+                if (!isInit) {
+                    EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                }
+                $('.industry_item:not(.active)').attr('disabled', 'disabled');
+            } else {
+                $('.industry_item:not(.active)').removeAttr('disabled')
+            }
+            this.reqData.industry = selectedArr;
+            var selectedStr = selectedArr.join('、')
+            //$('.result .result_name').text(selectedStr)
+            if (this.noChange(this.reqData.industry, EditIndustry.selectlast) || this.reqData.industry.length == 0) {
+                $('#enter').attr('disabled', 'disabled');
+            } else {
+                $('#enter').removeAttr('disabled');
+            }
+        },
+        noChange: function (arr1, arr2) {
+            return JSON.stringify(arr1.sort()) === JSON.stringify(arr2.sort());
+        }
+    }
+    $(function () {
+        EditIndustry.init();
+    })
+
+</script>
+</body>
 </html>

+ 3 - 1
src/web/templates/weixin/vipsubscribe/edit_subscribe_success.html

@@ -20,8 +20,10 @@
         </div>
         <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
         <script>
-
+			
             $(function(){
+            	sessionStorage.removeItem("vipSubSelectArea");
+            	sessionStorage.removeItem("vipSubSelectIndustry");
 //              timer($('.time'),()=>{
 //                  window.history.go(-1); 
 //              })

+ 20 - 6
src/web/templates/weixin/vipsubscribe/renew_notice.html

@@ -8,7 +8,7 @@
 		<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
 		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
 		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_service_expire.css?v={{Msg "seo" "version"}}1">
+		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_service_expire.css?v={{Msg "seo" "version"}}3">
 		{{include "/common/weixin.html"}}
 		<!--<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>-->
 		<script src="/vipsubscribe/js/share.js?v={{Msg "seo" "version"}}"></script>
@@ -59,20 +59,21 @@
                 </div>
             </div>
 			<div class="renew_box">
-                <button style="display: none;" class="renew_service" onclick="window.location.href='/weixin/pay/renewPayPage'">续费</button>
-                <button style="display: none;" class="aginBuy" onclick="window.location.href='/weixin/pay/vipsubscribe_willExpire'">再次购买</button>
+                <button style="display: none;" class="renew_service">续费</button>
+                <button style="display: none;" class="aginBuy">再次购买</button>
                 <button style="display: none;" class="free_service" onclick="window.location.href='/swordfish/historypush'">使用免费订阅</button>
             </div>
 		</div>
 		<script src="/vipsubscribe/js/jquery-2.1.4.js"></script>
     	<!--<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
     	<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    	<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+    	<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}7"></script>
 		<script type="text/javascript">
 			//
 			var orderId = {{.T.orderId}};
 			var starts = {{.T.startTime}};
 			var ends = {{.T.endTime}};
+			var orderCode = "";
 //			console.log("orderId",orderId)
 //			console.log("starts",starts)
 //			console.log("ends",ends)
@@ -84,6 +85,8 @@
 						var buyerclass = r.buyerclass
 						var exprie = {{.T.exprie}};
 						var vipStatus = Number(r.vipStatus);
+						orderCode = r.orderCode;
+						//
 						var areaHtml = "";
 					    var provinceArr = [];
 					    var cityArr = [];
@@ -147,7 +150,7 @@
 					  	  	$(".free_service").show();
 					    }
 					}
-				});
+				},false);
 			}else{
 				$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
 					if(data){
@@ -157,6 +160,7 @@
 					    var endTime = data.end;
 					    var exprie = {{.T.exprie}};
 					    var vipStatus = Number(data.vipStatus);
+					    orderCode = data.orderCode;
 					    //
 					    var areaHtml = "";
 					    var provinceArr = [];
@@ -222,9 +226,19 @@
 					    	$(".free_service").show();
 					    }
 					}
-				});	
+				},false);	
 			}
 			
+			$(".renew_service").on("click",function(){
+				let flags = checkOrder();
+				if(flags){
+					return
+				};
+				window.location.href = "/weixin/pay/renewPayPage";
+			});
+			$(".aginBuy").on("click",function(){
+				window.location.href = "/weixin/pay/vipsubscribe_new?orderCode="+orderCode;
+			});
 	        //
 		    function checkObj(obj) {
 			    //检验数组

+ 14 - 8
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -127,7 +127,7 @@
                     <span class="cancel">取消</span>
                 </div>
                 <div class="box_bd">
-                    <div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”更划算哦~</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">
@@ -391,7 +391,7 @@
 		        return
             }
             if (currentNum >= 10) {
-            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
+            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”");
                 $('.profit_tips').show();
                 if(currentNum==12){ //12个月自动跳转1年
                     $("#number_box_year .year_number:eq(0)").trigger("click");
@@ -457,7 +457,7 @@
             let isChecked = $(this).is(':checked')
             let val = $('.month_number').text();
             if (val >= 10) {
-            	$('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”更划算哦~");
+            	$('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”");
                 $('.profit_tips').show();
                 val = 10;
             }
@@ -574,7 +574,9 @@
         
         //
         var area = "";
+        var areas = "";
 	    var buyerclass = "";
+	    var industrys = "";
 	    var cycleunit = "";
 	    var cyclecount = "";
 	    var startTime = "";
@@ -588,13 +590,15 @@
             if (data) {
                 area = data.area;
 			    buyerclass = data.buyerclass;
+			    areas = data.allarea;
+			    industrys = data.allindustry;
 			    cyclecount = data.cyclecount;
 			    startTime = data.start;
 			    starts = data.starttime;
 			    endTime = data.end;
 			    ends = data.endtime;
-			    monthPrice = getsubVipOrderPrice(area, buyerclass, [1, 2]);
-			    yearPrice = getsubVipOrderPrice(area, buyerclass, [1, 1]);
+			    monthPrice = getsubVipOrderPrice(areas, industrys, [1, 2]);
+			    yearPrice = getsubVipOrderPrice(areas, industrys, [1, 1]);
 			    //
 			    var areaHtml = "";
 			    var provinceArr = [];
@@ -761,6 +765,9 @@
                 $('#number_box_year span').removeClass('active');
                 $(".month_number").text(cyclecount);
                 dateName = cyclecount + "个月";
+                if(cyclecount > 1){
+                	$('#number_box_month button:first').removeAttr("disabled");
+                }
 //              $('.choose_item.select_cycle .info').attr('placeholder', dateName);
                 $('.choose_item.select_cycle .info').val(dateName);
 	 		}
@@ -787,12 +794,11 @@
 	    $(".save_renew").on("click", function(){
 	        $(".save_renew").attr("disabled","disabled");
 	    	var param = {
-	    		"area": JSON.stringify(area),
-	    		"industry": buyerclass.toString(),
+	    		"area": JSON.stringify(areas),
+	    		"industry": industrys.toString(),
 	    		"time": $('.choose_item.select_cycle .info').val(),
 	    		"payWay":"wx_js",
 	    		"pay_source": "Renew",
-	    		"endtime": ends,
 	    	}
 	    	console.log(param)
 	    	$DoPost("/subscribepay/renewUpgrade/renewUpgradeCreateOrder",param,function(r){

+ 17 - 5
src/web/templates/weixin/vipsubscribe/vip_index.html

@@ -142,8 +142,8 @@
             </div>
             <!-- 升级 续费 -->
             <div class="tabbar">
-                <a href="/weixin/pay/toUpgradePage" class="update_btn">升级</a>
-                <a href="/weixin/pay/renewPayPage" class="renew_btn">续费</a>
+                <a onclick="upgrade()" class="update_btn">升级</a>
+                <a onclick="rebuy()" class="renew_btn">续费</a>
             </div>
         </div>
         <!-- 项目匹配提醒 -->
@@ -279,7 +279,7 @@
 	                        }else{
 	                            $(".to_expired").hide();
 	                        }
-							$(".tabbar").html('<a href="/weixin/pay/toUpgradePage" class="update_btn">升级</a><a href="/weixin/pay/renewPayPage" class="renew_btn">续费</a>')
+							$(".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>");
 	                   }
@@ -294,8 +294,8 @@
 	                        $("._area").text(area);
 							//行业
 							var buyerclass =  _vipData["a_buyerclass"];
-							if (buyerclass.length>0){
-	                        	$("._buyerClass").text(buyerclass.length+"个行业");
+							if (buyerclass >0){
+	                        	$("._buyerClass").text(buyerclass+"个行业");
 							}else{
 	                        	$("._buyerClass").text("全部行业");
 							}
@@ -344,6 +344,18 @@
 	            })
 			}
 		}
+		//
+		function upgrade(){
+			if(!checkOrder()){
+				window.location.href="/weixin/pay/toUpgradePage"
+			}
+		}
+		//
+		function rebuy(){
+			if(!checkOrder()){
+				window.location.href="/weixin/pay/renewPayPage"
+			}
+		}
     </script>
 	{{include "/common/baiducc.html"}}
 </body>

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

@@ -230,6 +230,7 @@ try{
         //订单条件        
         if(r.data.order.filter){
             var filterObj=JSON.parse(r.data.order.filter);
+        	if (r.data.order.vip_type!=2){
             //省份数 城市数
             if(!$.isEmptyObject(filterObj.area)){
               var cityNum=0;
@@ -252,14 +253,61 @@ try{
             }else{
               $(".areaNum").text("全国");
             }
-         
+            //行业数
+	        if(filterObj.industry.length!=0){
+	            $(".industryNum").text(filterObj.industry.length+"个行业");
+	        }else{
+	            $(".industryNum").text("全行业");
+	        }
+         }else{
+         	//升级订单 单独处理
+         	if(!$.isEmptyObject(filterObj.addarea)){
+              var cityNum_u=0;
+              var provinceNum_u=0;
+         	for(var i in filterObj.addarea) {
+                let citys_u=filterObj.addarea[i];
+                if (citys_u=="no"){
+                	$(".areaNum").text("无");
+                }
+                if (citys_u.length>0){
+                	cityNum_u+=citys_u.length;
+                }else{
+                	provinceNum_u++;
+                }
+                var areaText_u="";//1个省级区域、4个地市
+                if(provinceNum_u>0) areaText_u= areaText_u + provinceNum_u+"个省级区域";
+                if(cityNum_u>0){
+                  if(provinceNum_u>0) areaText_u= areaText_u+"、"
+                  areaText_u = areaText_u+ cityNum_u+"个地市";
+                }
+              $(".areaNum").text(areaText_u);
+              }
+         	}else {
+         		$(".areaNum").text("全国");
+         	}
+         	//行业
+         	if(filterObj.addindustry[0]=="no"){
+         		$(".industryNum").text("无");
+         	}else{
+         		if(filterObj.addindustry.length==0){
+         			$(".industryNum").text("全行业");
+         		}else{
+         			$(".industryNum").text(filterObj.addindustry.length+"个行业");
+         		}
+         	}
+
+//			if(filterObj.addindustry.length==0){
+//       		$(".industryNum").text("全行业");
+//          }else{
+//          	if(filterObj.addindustry[0]=="no"){
+//          		$(".industryNum").text("无");
+//          	}else{
+//          		$(".industryNum").text(filterObj.addindustry.length+"个行业");
+//          	}
+//          }
+         }
+          
           
-          //行业数
-          if(filterObj.industry.length!=0){
-            $(".industryNum").text(filterObj.industry.length+"个行业");
-          }else{
-            $(".industryNum").text("全行业");
-          }
           
         }
         

+ 15 - 8
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -426,9 +426,9 @@
                     }
                 }
 
-                if (!$.isEmptyObject(data) && !this.areaSelect["一个省"]) {
+                /*if (!$.isEmptyObject(data) && !this.areaSelect["一个省"]) {
                     $(".choose_area").val(provinceArr.join(" ") + " " + cityArr.join(" "));
-                }
+                }*/
 
                 if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["全国"] && !this.areaSelect["一个省"]) { //选择有行业信息 且不是全国
                     var tipTxt = "已选择 ";
@@ -437,7 +437,12 @@
                         if (provinceArr.length > 0) tipTxt += "、";
                         tipTxt += cityArr.length + " 个地市";
                     }
-                    $(".add_tips.area").text(tipTxt).css("display", "");
+                    $(".choose_area").val(tipTxt);
+                    //$(".add_tips.area").text(tipTxt).css("display", "");
+                }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+                    $(".choose_area").val("全国");
+                }else {
+                    $(".choose_area").val("");
                 }
             },
             showPrice: function () {
@@ -457,13 +462,15 @@
             },
             showIndustry: function () {
                 let data = this.industrySelect;
-                if (data.length > 0 && data[0] != "一个行业") {
+                /*if (data.length > 0 && data[0] != "一个行业") {
                     $(".choose_industry").val(data.join(" "));
-                }
-
+                }*/
                 if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                    var tipTxt = "已选择 ";
-                    $(".add_tips.industry").text(tipTxt + this.industrySelect.length + " 个行业").css("display", "");
+                    $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
+                }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+                    $(".choose_industry").val("全部行业");
+                }else{
+                    $(".choose_industry").val("");
                 }
             },
             showTime: function () {

+ 7 - 1
src/web/templates/weixin/vipsubscribe/vip_seniorset.html

@@ -140,6 +140,7 @@
 					parentLi.children(".turn-on").hide();
 				}else{
 					if(s_email == ""){
+						$("input#email").focus();
 						emailSetModalShow();
 						return;
 					}else{
@@ -150,10 +151,14 @@
 				saveData();
 			});
 			$(".emailset>img").click(function(){
+				$("input#email").focus();
 				emailSetModalShow();
 			});
 			$("#sure").click(function(){
-				var thisValue = $("#email").val();
+				var thisValue = $.trim($("#email").val());
+				if(thisValue==""){
+					return
+				}
 				var szReg=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-|\-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; 
 				if(!szReg.test(thisValue)){
 					$(".error").removeClass("hide");
@@ -201,6 +206,7 @@
 				"matchtype":1,
 				"email": $("#email").val(),
 			};
+			s_email = $("#email").val();
 			if($("#matchType li:eq(2)").hasClass("checked")){
 				param["matchtype"] = 2;
 			}

+ 61 - 45
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -42,7 +42,7 @@
 <body class="no-touch">
     <div class="vip_update">
         <div class="choose_condition">
-            <p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期!</p>
+            <p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期。升级完成后,将立即生效。</p>
             <ul class="chooseList">
                 <li class="choose_item">
                     <a href="/front/vipsubscribe/toChooseAreaUpgrade">
@@ -352,12 +352,11 @@
 				    if(r.err_msg == "get_brand_wcpay_request:ok"){
 				    	//
                     	clearSessionStorage();
-						/*
-						setTimeout(function(){
+						
+						/*setTimeout(function(){
 							window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
-						},500)
-						*/
-						checkPaySuccess(data.order);
+						},500)*/
+						checkPaySuccess(ordercode);
 					}
 					
 //					}else if(r.err_msg == "get_brand_wcpay_request:cancel"){               
@@ -375,27 +374,27 @@
 //	                	});
 //	  				}
   				});
-				 var interval
-				        //支付完成跳转
-				        function checkPaySuccess(orderCode){
-				        	if(interval){
-				            	clearInterval(interval);
-			        		}
-				        	interval=setInterval(function() {
-				            	$.post("/jypay/isPaySuccess", {
-											code: orderCode
-										}, function(r) {
-											if (r.success) {
-												window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
-												clearInterval(interval);
-											}
-										})
-				         	},3000)
-				        }
   			}   
 		}catch(e){
 		  console.log(e)
 		}
+				var interval
+		        //支付完成跳转
+		        function checkPaySuccess(orderCode){
+		        	if(interval){
+		            	clearInterval(interval);
+	        		}
+		        	interval=setInterval(function() {
+		            	$.post("/jypay/vipPaySuccess", {
+									code: orderCode
+								}, function(r) {
+									if (r.success) {
+										window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+orderCode);
+										clearInterval(interval);
+									}
+								})
+		         	},3000)
+		        }
     </script>
     <script>
         $(function () {    
@@ -438,6 +437,11 @@
 	        	sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
 	        }
         }
+        if(sessionStorage.vipSubSelectIndustryAdd!==undefined&&sessionStorage.vipSubSelectIndustryAdd!==""){
+        	if(checkObj(JSON.parse(sessionStorage.vipSubSelectIndustryAdd))){
+	        	sessionStorage.removeItem("vipSubSelectIndustryAdd");
+	        }
+        }
         //
 		var monthPrice = "";
         var yearPrice = "";
@@ -608,7 +612,7 @@
             }
             $(".computed_price").show();
             if (currentNum >= 10) {
-            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更划算哦~");
+            	$('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”");
                 $('.profit_tips').show();
                 if(currentNum==12){ //12个月自动跳转1年
                     $("#number_box_year .year_number:eq(0)").trigger("click");
@@ -675,7 +679,7 @@
             let isChecked = $(this).is(':checked')
             let val = $('.month_number').text();
             if (val >= 10) {
-                $('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”更划算哦~");
+                $('.profit_tips').text("已选择"+val+"个月,建议“按年订阅”");
                 $('.profit_tips').show();
             }
             
@@ -915,6 +919,8 @@
 	 	//
 	 	var area = "";
 	    var buyerclass = "";
+	    var buyArea = "";
+	    var buyIndustry = "";
 	    var cycleunit = "";
 	    var cyclecount = "";
 	 	var startTime = "";
@@ -926,6 +932,8 @@
             if (data) {
                 area = data.area;
 			    buyerclass = data.buyerclass;
+			    buyArea = data.allarea;
+			    buyIndustry = data.allindustry;
 			    cycleunit = data.cycleunit;
 			    cyclecount = data.cyclecount;
 			    startTime = data.start;
@@ -1081,9 +1089,9 @@
 				}
 			}else{
 				areasArr = null;
-				if(area !== ""&&area !== undefined){
-					for(let province in area){
-			    		let citys = area[province];
+				if(buyArea !== ""&&buyArea !== undefined){
+					for(let province in buyArea){
+			    		let citys = buyArea[province];
 			    		if(citys.length===0){
 							allArea[province] = [];
 			    		}else{
@@ -1150,8 +1158,8 @@
 //			}
 
 			console.log("areasArr",areasArr)
-			if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
-				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
+			if(sessionStorage.vipSubSelectIndustryAdd!==""&&sessionStorage.vipSubSelectIndustryAdd!==undefined){
+				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryAdd);
 				for(let i in vipIndustry){
 		    		let industry = vipIndustry[i];
 		    		industrysArr.push(industry);
@@ -1161,6 +1169,10 @@
 						industrysArr = ["全部行业"];
 					}
 				}
+			}
+			
+			if(sessionStorage.vipSubSelectIndustryUpgrade!==""&&sessionStorage.vipSubSelectIndustryUpgrade!==undefined){
+				var vipIndustry = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
 				if(buyerclass!==""&&buyerclass!==undefined){
 					for(let i in buyerclass){
 			    		let industry = buyerclass[i];
@@ -1179,9 +1191,9 @@
 				}
 			}else{
 				industrysArr = null;
-				if(buyerclass!==""&&buyerclass!==undefined){
-					for(let i in buyerclass){
-			    		let industry = buyerclass[i];
+				if(buyIndustry!==""&&buyIndustry!==undefined){
+					for(let i in buyIndustry){
+			    		let industry = buyIndustry[i];
 			    		allIndustry.push(industry);
 			    	}
 			    }
@@ -1302,8 +1314,8 @@
 			console.log("month",nowUpgrade)
 			//
 			if (nowUpgradeYear >= 1) {
-				let monthprice = getsubVipOrderPrice(area, buyerclass, [nowUpgrade, 2])
-				let yearprice = getsubVipOrderPrice(area, buyerclass, [nowUpgradeYear, 1])
+				let monthprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
+				let yearprice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgradeYear, 1])
 				oldPrice = yearprice + monthprice
 				if (monthprice == 0) {
 					oldMonthPrice = ((yearprice / nowUpgradeYear) / 10).toFixed(1);
@@ -1313,7 +1325,7 @@
 					oldYearPrice = ((monthprice / nowUpgrade) * 10).toFixed(1);
 				}
 			} else {
-				oldPrice = getsubVipOrderPrice(area, buyerclass, [nowUpgrade, 2])
+				oldPrice = getsubVipOrderPrice(buyArea, buyIndustry, [nowUpgrade, 2])
 				oldMonthPrice = (oldPrice / nowUpgrade)
 				oldYearPrice = ((oldPrice / nowUpgrade) * 10).toFixed(1);
 			}
@@ -1333,12 +1345,12 @@
 					addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
 				}
 				if(areasArr !== null){
-					oldAreaPriceY = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgradeYear,1]);
-					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgrade,2]);
+					oldAreaPriceY = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgradeYear,1]);
+					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgrade,2]);
 				}
 				if(industrysArr !== null){
-					addIndustryPriceY = getsubVipOrderPrice(area,industrysArr,[nowUpgradeYear,1]);
-					addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
+					addIndustryPriceY = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgradeYear,1]);
+					addIndustryPriceM = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgrade,2]);
 				}
 				let yearprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgradeYear,1]);
 				let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
@@ -1364,10 +1376,10 @@
 					addAreaPriceM = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
 				}
 				if(areasArr !== null){
-					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyerclass,[nowUpgrade,2]);
+					oldAreaPriceM = getsubVipOrderPrice(areasArr,buyIndustry,[nowUpgrade,2]);
 				}
 				if(industrysArr !== null){
-					addIndustryPriceM = getsubVipOrderPrice(area,industrysArr,[nowUpgrade,2]);
+					addIndustryPriceM = getsubVipOrderPrice(buyArea,industrysArr,[nowUpgrade,2]);
 				}
 				let monthprice = getsubVipOrderPrice(allArea,allIndustry,[nowUpgrade,2]);
 //				price = getsubVipOrderPrice(areasArr,industrysArr,[nowUpgrade,2]);
@@ -1446,7 +1458,10 @@
 //      	}
         	//
         	let areas = areasArr;
-        	let industrys = industrysArr;
+        	let industrys = null;
+        	if(sessionStorage.vipSubSelectIndustryUpgrade !== undefined){
+        		industrys = JSON.parse(sessionStorage.vipSubSelectIndustryUpgrade);
+        	}
         	let industryArr = "";
         	let areaArr = "";
         	if(areas !== null){
@@ -1466,8 +1481,8 @@
         		industryArr = "no";
         	}
             //
-            let areaarr = area;
-        	let industryarr = buyerclass;
+            let areaarr = buyArea;
+        	let industryarr = buyIndustry;
         	let allAreaArr = allArea;
         	let allIndustryArr = allIndustry;
         	if(allAreaArr["全国"]){
@@ -1514,6 +1529,7 @@
 	    	sessionStorage.removeItem("proPrice");
 	    	sessionStorage.removeItem("vipSubSelectAreaUpgrade");
 	    	sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
+	    	sessionStorage.removeItem("vipSubSelectIndustryAdd");
 //	    	sessionStorage.removeItem("effectiveDate");
 	    	sessionStorage.removeItem("buyCheck");
 	    }

+ 1 - 0
src/web/templates/weixin/wxkeyset/index.html

@@ -703,6 +703,7 @@ function saveSeniorset(r){
 }
 //
 function tointroducepage(){
+	sessionStorage.removeItem("keysetindexToHistory");
 	window.location.replace("/front/vipsubscribe/introducePage");
 }
 

Деякі файли не було показано, через те що забагато файлів було змінено