Pārlūkot izejas kodu

Merge branch 'dev2.8.5' into release

lianbingjie 5 gadi atpakaļ
vecāks
revīzija
42bd6c8bef
100 mainītis faili ar 7456 papildinājumiem un 1161 dzēšanām
  1. 2 2
      README.md
  2. 4 0
      src/jfw/modules/app/src/app/front/front.go
  3. 1 2
      src/jfw/modules/app/src/app/front/laboratory.go
  4. 17 2
      src/jfw/modules/app/src/app/front/login.go
  5. 2 2
      src/jfw/modules/app/src/app/front/search.go
  6. 2 1
      src/jfw/modules/app/src/app/front/shorturl.go
  7. 75 35
      src/jfw/modules/app/src/app/front/swordfish.go
  8. 114 63
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  9. 2 1
      src/jfw/modules/app/src/app/front/ws_dataExport.go
  10. 16 12
      src/jfw/modules/app/src/config.json
  11. 42 42
      src/jfw/modules/app/src/web/staticres/jyapp/course/js/drawabill.js
  12. 289 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/wx/home.css
  13. 165 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/wx/personal.css
  14. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/css/wxkeyset.css
  15. 8 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/wxlist.css
  16. 6 5
      src/jfw/modules/app/src/web/staticres/jyapp/css/wxsearch.css
  17. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/home_search.png
  18. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_arrow_right.png
  19. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_data_export.png
  20. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_head.png
  21. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_1.png
  22. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_2.png
  23. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_3.png
  24. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_4.png
  25. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_5.png
  26. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_6.png
  27. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_1.png
  28. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_2.png
  29. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_3.png
  30. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_4.png
  31. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_vip.png
  32. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_1.png
  33. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_2.png
  34. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_3.png
  35. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_question.png
  36. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_search.png
  37. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_1.png
  38. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_2.png
  39. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_3.png
  40. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_4.png
  41. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/laba.png
  42. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/nothing.png
  43. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_vip.png
  44. 32 8
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  45. 228 19
      src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js
  46. 0 0
      src/jfw/modules/app/src/web/staticres/jyapp/swiper/maps/swiper.jquery.min.js.map
  47. 0 0
      src/jfw/modules/app/src/web/staticres/jyapp/swiper/maps/swiper.min.js.map
  48. 14 0
      src/jfw/modules/app/src/web/staticres/jyapp/swiper/swiper.min.css
  49. 14 0
      src/jfw/modules/app/src/web/staticres/jyapp/swiper/swiper.min.js
  50. 1 13
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/addition_exclusive_word.css
  51. 102 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/base2.css
  52. 584 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_area.css
  53. 556 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_industry.css
  54. 618 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_time.css
  55. 13 8
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css
  56. 27 5
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_industry.css
  57. 147 13
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/keyWord.css
  58. 4 2
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/messageType.css
  59. 104 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/payway_select.css
  60. 53 49
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/subscribe_list.css
  61. 108 109
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/trial_info.css
  62. 9 15
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index.css
  63. 61 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css
  64. 1 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_introduce.css
  65. 246 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css
  66. 22 9
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css
  67. 339 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css
  68. 4 3
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_update.css
  69. 76 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vipreport_dialog.css
  70. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/bgi-curve.png
  71. 3 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/vipreport/close.svg
  72. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/vipreport/dialog-image.png
  73. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/vipreport/report.png
  74. 416 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/UpgradePrice.js
  75. 464 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js
  76. 165 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_industry.js
  77. 368 216
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/common.js
  78. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js
  79. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/exclusiveWord.js
  80. 121 53
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js
  81. 73 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/mapArea.js
  82. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/personal_info.js
  83. 114 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/share.js
  84. 188 26
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js
  85. 786 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js
  86. 1 1
      src/jfw/modules/app/src/web/templates/common/js.html
  87. 55 55
      src/jfw/modules/app/src/web/templates/course/applyInvoice.html
  88. 1 1
      src/jfw/modules/app/src/web/templates/course/course_detail.html
  89. 6 0
      src/jfw/modules/app/src/web/templates/course/optionPay.html
  90. 6 0
      src/jfw/modules/app/src/web/templates/course/publicToPublic.html
  91. 29 21
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_applyInvoice.html
  92. 2 2
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_invoiceSuccess.html
  93. 1 0
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_subType.html
  94. 387 269
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html
  95. 16 6
      src/jfw/modules/app/src/web/templates/me/index.html
  96. 92 67
      src/jfw/modules/app/src/web/templates/me/setemail/bind_email.html
  97. 27 8
      src/jfw/modules/app/src/web/templates/me/setemail/bind_success.html
  98. 14 9
      src/jfw/modules/app/src/web/templates/me/setemail/unbind_email.html
  99. 2 2
      src/jfw/modules/app/src/web/templates/staticpage/wx-serviceterms.html
  100. 7 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/additionWord.html

+ 2 - 2
README.md

@@ -3,6 +3,6 @@
 weixin sdk https://github.com/wizjin/weixin
 web用xweb框架
 
-v2.8.8
-招投标课程
+v2.8.5
+vip订阅
 

+ 4 - 0
src/jfw/modules/app/src/app/front/front.go

@@ -507,6 +507,10 @@ func (s *Front) ShowRedSpotOnMenu() {
 				"s_userid": userid,
 			})
 		}
+		subscribe += mongodb.Count("pushspace_statistic", map[string]interface{}{
+			"userid": userid,
+			"unread": 1,
+		})
 	}
 	s.ServeJson(map[string]interface{}{
 		"subscribe":      subscribe,

+ 1 - 2
src/jfw/modules/app/src/app/front/laboratory.go

@@ -18,7 +18,6 @@ func init() {
 
 //剑鱼标讯实验室首页
 func (l *Lab) Index() error {
-	//	return l.Render("/weixin/jylab/lab-close.html")
-	//return l.Render("/weixin/jylab/lab-index.html")
 	return l.Render("/weixin/treasure_box.html")
+	//return l.Render("/weixin/jylab/lab-index.html")
 }

+ 17 - 2
src/jfw/modules/app/src/app/front/login.go

@@ -65,7 +65,6 @@ type Login struct {
 	channelSign          xweb.Mapper `xweb:"/jyapp/free/channelSign"`               //渠道统计
 	changeiosUpdate      xweb.Mapper `xweb:"/jyapp/free/changeiosUpdate/(.*)/(.*)"` //ios更新显示
 	savePushIdMsg        xweb.Mapper `xweb:"/jyapp/free/savePushIdMsg"`             //推送id记录
-
 }
 
 var (
@@ -248,6 +247,22 @@ func (l *Login) Sess(ostr string) error {
 		}
 		if hasSession {
 			actionurl := qutil.ObjToString(urlMap[str[3]])
+			userid := qutil.ObjToString(l.GetSession("userId"))
+			if str[3] == "msgremind" && userid != "" {
+				go func() {
+					mongodb.Update("jyapp_notice", map[string]interface{}{
+						"s_userid": userid,
+						"s_type":   "vipNotice",
+						"i_unread": 1,
+						"s_url":    l.Request.URL,
+					}, map[string]interface{}{
+						"$set": map[string]interface{}{
+							"i_unread":    0,
+							"l_timestamp": time.Now().Unix(),
+						},
+					}, false, true)
+				}()
+			}
 			if actionurl != "" {
 				if len(strs) > 1 {
 					if strings.Contains(actionurl, "followent/newInfo") {
@@ -1181,7 +1196,7 @@ func UpdateRid_C(sess *httpsession.Session, rid, oid, phoneType, version string)
 		},
 	}, false, true)
 	if qutil.ObjToString(sess.Get("s_jpushid")) != "" && qutil.ObjToString(sess.Get("s_appversion")) != "" {
-		return ""
+		//return ""
 	}
 	sess.Set("s_jpushid", rid)
 	sess.Set("s_opushid", oid)

+ 2 - 2
src/jfw/modules/app/src/app/front/search.go

@@ -78,8 +78,8 @@ func (s *Search) GetHK() error {
 				arrs = append(arrs, word)
 			}
 		}
-		if len(arrs) > 5 {
-			arrs = arrs[1:6]
+		if len(arrs) > 10 {
+			arrs = arrs[1:11]
 		}
 		redis.Del("other", "s_"+userid)
 		redis.Put("other", "s_"+userid, strings.Join(arrs, ","), -1)

+ 2 - 1
src/jfw/modules/app/src/app/front/shorturl.go

@@ -42,7 +42,8 @@ func (s *Short) Article(stype, id string) error {
 	//判断用户是否是vip用户
 	isVip := false
 	vip_status, _ := mongodb.FindOne("user", bson.M{"_id": bson.ObjectIdHex(userId), "i_vip_status": bson.M{"$in": []int{1, 2}}}) //获取vip标志
-	if len(*vip_status) == 1 {
+
+	if len(*vip_status) > 1 {
 		isVip = true
 	}
 	s.T["isVip"] = isVip

+ 75 - 35
src/jfw/modules/app/src/app/front/swordfish.go

@@ -2,6 +2,7 @@ package front
 
 import (
 	"app/filter"
+	"encoding/json"
 	"fmt"
 	"jfw/config"
 	"jfw/public"
@@ -268,6 +269,7 @@ func (f *Front) MyFeedbacks() error {
 	}
 	mongodb.Update("jyapp_notice", map[string]interface{}{
 		"s_userid": util.ObjToString(f.GetSession("userId")),
+		"s_type":   "feedback",
 	}, map[string]interface{}{
 		"$set": map[string]interface{}{
 			"i_unread":    0,
@@ -643,39 +645,54 @@ func (f *Front) HasPushHistory() {
 	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 {
-		//
-		var threeRemind = int64(3 * 24 * 60 * 60)
-		var twoRemind = int64(2 * 24 * 60 * 60)
-		var oneRemind = int64(1 * 24 * 60 * 60)
-		var o_vipjy map[string]interface{}
-		o_vipjy, _ = (*user)["o_vipjy"].(map[string]interface{})
-		if o_vipjy["a_items"] != nil {
-			a_itmes := util.ObjArrToMapArr(o_vipjy["a_items"].([]interface{}))
-			hasKeyFlag = len(a_itmes) > 0
-		}
-		isVipFlag = true
-		isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 2000
-		isOnTail = util.IntAll((*user)["i_vip_status"])
-		_endtime := (*user)["l_vip_endtime"]
-		//是否到期
-		if util.Int64All(_endtime)-time.Now().Unix() < threeRemind && util.Int64All(_endtime)-time.Now().Unix() >= twoRemind {
-			isExpire = 3 //即将到期
-		} else if util.Int64All(_endtime)-time.Now().Unix() < twoRemind && util.Int64All(_endtime)-time.Now().Unix() >= oneRemind {
-			isExpire = 2 //即将到期
-		} else if util.Int64All(_endtime)-time.Now().Unix() < oneRemind && util.Int64All(_endtime)-time.Now().Unix() >= 0 {
-			isExpire = 1 //即将到期
-		}
-	} else {
-		var o_jy map[string]interface{}
-		if user != nil {
-			o_jy, _ = (*user)["o_jy"].(map[string]interface{})
-		}
+	var o_jy map[string]interface{}
+	var keys []string
+	if user != nil {
+		o_jy, _ = (*user)["o_jy"].(map[string]interface{})
 		if o_jy != nil || len(o_jy) == 0 {
 			a_key, _ := o_jy["a_key"].([]interface{})
-			hasKeyFlag = len(a_key) > 0
+			if a_key != nil {
+				for _, v := range a_key {
+					kv := util.ObjToMap(v)
+					keys = append(keys, util.ObjArrToStringArr((*kv)["key"].([]interface{}))...)
+				}
+			}
+		}
+		if util.IntAll((*user)["i_vip_status"]) == 1 || util.IntAll((*user)["i_vip_status"]) == 2 {
+			//
+			var threeRemind = int64(3 * 24 * 60 * 60)
+			var twoRemind = int64(2 * 24 * 60 * 60)
+			var oneRemind = int64(1 * 24 * 60 * 60)
+			var o_vipjy map[string]interface{}
+			o_vipjy, _ = (*user)["o_vipjy"].(map[string]interface{})
+			if o_vipjy["a_items"] != nil {
+				a_itmes := util.ObjArrToMapArr(o_vipjy["a_items"].([]interface{}))
+				hasKeyFlag = len(a_itmes) > 0
+			}
+			isVipFlag = true
+			isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 2000
+			isOnTail = util.IntAll((*user)["i_vip_status"])
+			_endtime := (*user)["l_vip_endtime"]
+			//是否到期
+			if util.Int64All(_endtime)-time.Now().Unix() < threeRemind && util.Int64All(_endtime)-time.Now().Unix() >= twoRemind {
+				isExpire = 3 //即将到期
+			} else if util.Int64All(_endtime)-time.Now().Unix() < twoRemind && util.Int64All(_endtime)-time.Now().Unix() >= oneRemind {
+				isExpire = 2 //即将到期
+			} else if util.Int64All(_endtime)-time.Now().Unix() < oneRemind && util.Int64All(_endtime)-time.Now().Unix() >= 0 {
+				isExpire = 1 //即将到期
+			}
+		} else {
+			if (*user)["i_vip_status"] == nil {
+				isExpire = 0
+			} else {
+				isOnTail = util.IntAll((*user)["i_vip_status"])
+			}
+			if o_jy != nil || len(o_jy) == 0 {
+				a_key, _ := o_jy["a_key"].([]interface{})
+				hasKeyFlag = len(a_key) > 0
+			}
+			isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 50
 		}
-		isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 50
 	}
 	pageNum, _ := f.GetInteger("pageNum")
 	if pageNum == 0 {
@@ -686,10 +703,14 @@ func (f *Front) HasPushHistory() {
 	if len(list) > 0 {
 		go updateUserApppushunread(userId)
 		//formatTime
-	} else if hasKeyFlag && len(list) == 0 && formatTime == "" && !isVipFlag {
+	} else if hasKeyFlag && len(list) == 0 && formatTime == "" && area == "" && !isVipFlag {
 		flag, data := jy.SubscribePush.MakeHistoryDatas(public.MQFW, public.PushMysql, userId, public.PushView)
 		if flag && data != nil {
-			list = data
+			jsonBytes, err := json.Marshal(data)
+			err = json.Unmarshal(jsonBytes, &list)
+			if err != nil {
+				log.Println("err:", err)
+			}
 		}
 	}
 	//
@@ -702,16 +723,35 @@ func (f *Front) HasPushHistory() {
 		"isPassCount": isPassCount,
 		"isExpire":    isExpire,
 		"isOnTail":    isOnTail,
-		"userId":      userId,
+		"userId":      util.EncodeArticleId(userId),
+		"keys":        keys,
 	})
 }
 
 //历史推送
 func (f *Front) Historypush() error {
-	selectTime := f.GetString("selectTime")
-	f.T["selectTime"] = selectTime
+	userId := util.ObjToString(f.GetSession("userId"))
+	if userId != "" {
+		selectTime := f.GetString("selectTime")
+		f.T["selectTime"] = selectTime
+		isExprie := 1
+		// 打开推送
+		data, ok := mongodb.FindById("user", userId, nil)
+		if ok && data != nil && len(*data) > 0 {
+			//VIP服务到期
+			vipSubtips := (*data)["i_vip_subtips"]
+			if vipSubtips == 0 {
+				if mongodb.UpdateById("user", userId, bson.M{"$set": bson.M{"i_vip_subtips": 1}}) {
+					isExprie = 0
+				}
+			}
+		}
+		f.T["vipSubtips"] = isExprie
+		f.T["isVip"] = util.IntAll((*data)["i_vip_status"]) > 0
+	}
 	return f.Render("/weixin/historypush.html", &f.T)
 }
+
 func (f *Front) HistorypushPaging() error {
 	pageNum, _ := f.GetInteger("pageNum")
 	selectTime := f.GetString("selectTime")

+ 114 - 63
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -1,9 +1,10 @@
 package front
 
 import (
+	"encoding/hex"
 	"jfw/public"
-	"jfw/wx"
 	"qfw/util"
+	"strings"
 	"time"
 
 	"github.com/go-xweb/xweb"
@@ -19,29 +20,28 @@ type Subscribepay struct {
 	toPaySuccessPage  xweb.Mapper `xweb:"/jyapp/vipsubscribe/toPaySuccessPage"`  //订阅支付完成页面
 	toOrderDetailPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toOrderDetailPage"` //订阅收费支付订单详情页面
 	toSetKeyWordPage  xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetKeyWordPage"`  //订阅收费设置关键词
-	toSetPage         xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPage"`         //订阅收费设置
+
+	//toSetPageOld         xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPage"`         //订阅收费设置
 	toSetInfoTypePage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetInfoTypePage"` //订阅收费设置信息类型
-	toSetPushSetPage  xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPushSetPage"`  //订阅收费推送设置
 	toSetOtherKwsPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSet(.*)Page"`     //订阅收费附加词和排除词设置
 	toVIPViewPage     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toVIPViewPage"`     //订阅收费预览
 
-	//修改
-	toEditSubPage       xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubPage"`       //订阅收费修改页面
-	toEditSubAreaPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubAreaPage"`   //订阅收费修改地区
-	toEditSubInduPage   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toEditSubInduPage"`   //订阅收费修改行业
-	submitEditSubFinish xweb.Mapper `xweb:"/jyapp/vipsubscribe/submitEditSubFinish"` //订阅收费修改成功
-
-	//升级
-	toUpgradePage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toUpgradePage"`           //订阅收费升级服务页面
-	addArea       xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChooseAreaUpgrade"`     //订阅收费升级新增区域页面
-	addIndustry   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChooseIndustryUpgrade"` //订阅收费升级新增行业页面
-
+	//修改升级
+	toSetPage        xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSubVipSetPage"`  //订阅收费设置
+	toChangeArea     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeArea"`     //修改区域
+	toChangeIndustry xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeIndustry"` //修改行业
+	toChangeTime     xweb.Mapper `xweb:"/jyapp/vipsubscribe/toChangeTime"`     //修改时间
+	toSelectPayWay   xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSelectPayWay"`   //支付方式选择
+	toSetPushSetPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/toSetPushSetPage"` //订阅收费推送设置
 	//续费
-	renewPage    xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPage/(.*)"` //订阅到期(will:即将到期,exprie:已到期)
-	renewPayPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPayPage"`   //订阅到期续费
+	renewPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPage/(.*)"` //订阅到期(will:即将到期,exprie:已到期)
+	//renewPayPage xweb.Mapper `xweb:"/jyapp/vipsubscribe/renewPayPage"`   //订阅到期续费
 
 	//发票
 	openInvoice xweb.Mapper `xweb:"/jyapp/vipsubscribe/openInvoice/(\\w+)"` //开发票
+
+	//订阅付费消息提醒中转
+	msgremind xweb.Mapper `xweb:"/jyapp/vipsubscribe/msgremind"`
 }
 
 func init() {
@@ -70,18 +70,41 @@ func (s *Subscribepay) ToSetInfoTypePage() {
 
 //订阅设置
 func (s *Subscribepay) ToSetPage() {
-	s.Render("/vipsubscribe/vip_index.html")
+	s.Render("/vipsubscribe/vip_index_new.html")
+}
+
+//修改升级 选择地区
+func (s *Subscribepay) ToChangeArea() {
+	s.Render("/vipsubscribe/change_area.html")
+}
+
+//修改升级 选择行业
+func (s *Subscribepay) ToChangeIndustry() {
+	s.Render("/vipsubscribe/change_industry.html")
+}
+
+//修改升级 选择时间
+func (s *Subscribepay) ToChangeTime() {
+	s.Render("/vipsubscribe/change_time.html")
+}
+
+//支付方式选择
+func (s *Subscribepay) ToSelectPayWay() {
+	s.Render("/vipsubscribe/payway_select.html")
 }
 
 //vip订阅介绍页
 func (s *Subscribepay) Introduce() error {
 	userId := util.ObjToString(s.GetSession("userId"))
 	if userId == "" {
-		return s.Redirect("/swordfish/about")
+		return s.Redirect("/jyapp/login")
 	}
 	m, _ := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
 	if len(*m) == 0 {
-		return s.Redirect("/swordfish/about")
+		return s.Redirect("/jyapp/login")
+	}
+	if util.IntAll((*m)["i_vip_status"]) > 0 {
+		return s.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
 	s.T["notShowTrial"] = util.IntAll((*obj)["i_trial"]) == -1 || (*m)["i_vip_status"] != nil
@@ -92,11 +115,11 @@ func (s *Subscribepay) Introduce() error {
 func (s *Subscribepay) TrialInfo() error {
 	userId := util.ObjToString(s.GetSession("userId"))
 	if userId == "" {
-		return s.Redirect("/swordfish/about")
+		return s.Redirect("/jyapp/login")
 	}
 	m, ok := public.MQFW.FindById("user", userId, `{"o_vipjy":1}`)
 	if !ok || len(*m) == 0 {
-		return s.Redirect("/swordfish/about")
+		return s.Redirect("/jyapp/login")
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
 	s.T["trialSign"] = util.IntAll((*obj)["i_trial"]) == 1
@@ -109,14 +132,11 @@ func (s *Subscribepay) ToPurchasePage(flag string) {
 		s.T["isTrial"] = true
 		s.T["orderType"] = -1
 	} else { //付费
-		if flag == "willExpire" {
-			s.T["orderType"] = 5
-			s.T["orderType"] = 5
-			s.Render("/vipsubscribe/vip_purchase_willExpire.html")
+		if flag == "renew" {
+			s.Render("/vipsubscribe/vip_renew.html")
 			return
-		} else {
-			s.T["orderType"] = 1
 		}
+		s.T["orderType"] = 1
 		if s.GetString("orderCode") != "" {
 			s.T["again"] = 1 //再次购买
 		}
@@ -149,42 +169,6 @@ func (s *Subscribepay) ToSetKeyWordPage() {
 	s.Render("/vipsubscribe/keyWord.html")
 }
 
-//修改订阅页面
-func (s *Subscribepay) ToEditSubPage() {
-	s.Render("/vipsubscribe/edit_subscribe.html")
-}
-
-//合并后修改地区
-func (s *Subscribepay) ToEditSubAreaPage() {
-	s.Render("/vipsubscribe/edit_city_new.html")
-}
-
-//修改订阅行业
-func (s *Subscribepay) ToEditSubInduPage() {
-	s.Render("/vipsubscribe/edit_subscribe_industry.html")
-}
-
-//提交订阅修改
-func (s *Subscribepay) SubmitEditSubFinish() {
-	s.Render("/vipsubscribe/edit_subscribe_success.html")
-}
-
-//升级订阅服务
-func (s *Subscribepay) ToUpgradePage() {
-	s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url()) //微信支付准备参数
-	s.Render("/vipsubscribe/vip_upgrade.html")
-}
-
-//升级订阅新增区域
-func (s *Subscribepay) AddArea() {
-	s.Render("/vipsubscribe/choose_area_upgrade.html")
-}
-
-//升级订阅新增行业
-func (s *Subscribepay) AddIndustry() {
-	s.Render("/vipsubscribe/choose_industry_upgrade.html")
-}
-
 //服务续费(will:即将到期,exprie:已到期)
 func (s *Subscribepay) RenewPage(sign string) {
 	startTime := util.Int64All(s.GetString("startTime"))
@@ -209,3 +193,70 @@ func (s *Subscribepay) OpenInvoice(order_code string) {
 	s.T["order_code"] = order_code
 	s.Render("/dataExport/dataExport_applyInvoice.html", &s.T)
 }
+
+func (f *Subscribepay) Msgremind() error {
+	param := map[string]string{}
+	if array := strings.Split(f.Url(), "?"); len(array) == 2 {
+		decode, _ := hex.DecodeString(array[1])
+		for _, v := range strings.Split(string(decode), "&") {
+			if vv := strings.Split(v, "="); len(vv) == 2 {
+				param[vv[0]] = vv[1]
+			}
+		}
+	}
+	userId, _ := f.GetSession("userId").(string)
+	if userId == "" {
+		return f.Render("_error.html")
+	}
+	user, ok := public.MQFW.FindById("user", userId, `{"i_vip_status":1,"l_vip_endtime":1}`)
+	i_vip_status := util.IntAll((*user)["i_vip_status"])
+	if !ok || user == nil || len(*user) == 0 {
+		return f.Render("_error.html")
+	}
+	myLastOrderCode := func(user_id string) string {
+		order := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
+			"user_id":      user_id,
+			"order_status": 1,
+			"product_type": "VIP订阅",
+		}, "id,order_code", "pay_time desc")
+		if order != nil && len(*order) > 0 {
+			return util.ObjToString((*order)["order_code"])
+		} else {
+			return ""
+		}
+	}
+	t := param["type"]
+	if t == "unpaid" { //未支付 已支付
+		return f.Redirect("/jyapp/vipsubscribe/toOrderDetailPage?orderCode=" + param["ordercode"])
+	} else if t == "paid" {
+		if i_vip_status > 0 {
+			return f.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
+		} else {
+			return f.Redirect("/jyapp/vipsubscribe/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
+		}
+	} else if t == "ontrial_soonexprie" || t == "ontrial_expried" || t == "soonexprie" || t == "expried" { //试用即将到期 试用已到期 即将到期 已到期
+		if t == "ontrial_soonexprie" || t == "ontrial_expried" {
+			if i_vip_status == 2 {
+				return f.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
+			} else {
+				return f.Redirect("/jyapp/vipsubscribe/vipsubscribe_new")
+			}
+		} else if t == "soonexprie" || t == "expried" {
+			now_unix := time.Now().Unix()
+			l_vip_endtime := util.Int64All((*user)["l_vip_endtime"])
+			if now_unix < l_vip_endtime-259200 {
+				//已续费
+				return f.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
+			} else {
+				if now_unix > l_vip_endtime {
+					//未续费已到期,跳转到再次购买页面
+					return f.Redirect("/jyapp/vipsubscribe/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
+				} else {
+					//未续费未到期,跳转到续费页面
+					return f.Redirect("/jyapp/vipsubscribe/vipsubscribe_renew")
+				}
+			}
+		}
+	}
+	return f.Render("_error.html")
+}

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

@@ -266,7 +266,8 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 		w.T["timeSpaceing"] = timeSpaceing
 	} else {
 		mail_phone := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
-			"user_id": userId,
+			"user_id":      userId,
+			"product_type": "历史数据",
 		}, "user_mail,user_phone", "create_time desc")
 		if mail_phone != nil {
 			email = (*mail_phone)["user_mail"]

+ 16 - 12
src/jfw/modules/app/src/config.json

@@ -1,26 +1,26 @@
 {
-    "mongodbServers": "192.168.3.128:27080",
+    "mongodbServers": "127.0.0.1:27080",
     "mongodbPoolSize": "5",
     "mongodbName": "qfw",
-    "influxaddr": "http://192.168.3.207:8086",
+    "influxaddr": "http://127.0.0.1:8086",
     "influxdb": "jy_logs",
-    "elasticsearch": "http://192.168.3.128:9800",
+    "elasticsearch": "http://127.0.0.1:9800",
     "elasticPoolSize": 30,
     "cookiedomain": ".jianyu360.cn",
-    "redisaddrs": "other=192.168.3.128:1712,push=192.168.3.128:1712,pushcache_1=192.168.3.128:1712,pushcache_2_a=192.168.3.128:1712,pushcache_2_b=192.168.3.128:1712,sso=192.168.3.128:1712,session=192.168.3.128:1712",
+    "redisaddrs": "other=127.0.0.1:1712,push=127.0.0.1:1712,pushcache_1=127.0.0.1:1712,pushcache_2_a=127.0.0.1:1712,pushcache_2_b=127.0.0.1:1712,sso=127.0.0.1:1712,session=127.0.0.1:1712",
     "webport": "89",
     "weixinrpc": "127.0.0.1:8083",
     "cassandra": {
         "log": {
             "host": [
-                "192.168.3.207"
+                "127.0.0.1"
             ],
             "size": 5,
             "port": 9043
         },
         "push": {
             "host": [
-                "192.168.3.207"
+                "127.0.0.1"
             ],
             "size": 5
         }
@@ -28,17 +28,19 @@
     "cacheflag": false,
     "mysql": {
         "dbName": "jianyu",
-        "address": "192.168.3.11:3366",
+        "address": "127.0.0.1:3366",
         "userName": "root",
-        "passWord": "Topnet123"
+        "passWord": "Topnet123",
+		"maxOpenConns":5,
+		"maxIdleConns":2
     },
 	"pushMysql": {
         "dbName": "jianyu",
-        "address": "192.168.3.11:3366",
+        "address": "127.0.0.1:3366",
         "userName": "root",
         "passWord": "Topnet123",
-		"maxOpenConns":2000,
-		"maxIdleConns":1000
+		"maxOpenConns":5,
+		"maxIdleConns":2
     },
     "agreement": "http",
     "webdomain": "http://web-jydev-ws.jianyu360.cn",
@@ -49,7 +51,9 @@
         "followset": "/jyapp/follow/set/%s/%s",
         "myfeedbacks": "/jyapp/swordfish/myFeedbacks",
         "historypush": "/jyapp/swordfish/historypush?f=push",
-        "followEntDetail": "/jyapp/followent/detail/%s"
+        "followEntDetail": "/jyapp/followent/detail/%s",
+        "msgremind": "/jyapp/vipsubscribe/msgremind?%s",
+		"vipreport":"/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s"
     },
     "followProject": 10,
     "followentlimit": "10",

+ 42 - 42
src/jfw/modules/app/src/web/staticres/jyapp/course/js/drawabill.js

@@ -1,5 +1,5 @@
 $(function () {
-    scrollView('textfield')
+    // scrollView('textfield')
 
     // 首先判断是普发还是专发
     if ($('.content_text').text() == "增值税普通发票") {
@@ -523,50 +523,50 @@ $(function () {
     }
 
     // 解决移动端软键盘弹起遮挡输入框及ios下软键盘关闭后底部留白问题
-    function scrollView(obj) {
-        var u = navigator.userAgent, app = navigator.appVersion;
-        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
+    // function scrollView(obj) {
+    //     var u = navigator.userAgent, app = navigator.appVersion;
+    //     var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
 
-        var view_height = $(document.body).height()
-        function change() {
-            $(document.body).height(view_height)
-        }
-        // 给所有input绑定一个focus事件,用来判断键盘弹起。执行完成就解绑该事件
-        function focusOnce() {
-            $('.' + obj).on('focus', function(e) {
-                e.target.scrollIntoView({"block": "center"})
-                $('.' + obj).off('focus')
-            })
-        }
+    //     var view_height = $(document.body).height()
+    //     function change() {
+    //         $(document.body).height(view_height)
+    //     }
+    //     // 给所有input绑定一个focus事件,用来判断键盘弹起。执行完成就解绑该事件
+    //     function focusOnce() {
+    //         $('.' + obj).on('focus', function(e) {
+    //             e.target.scrollIntoView({"block": "center"})
+    //             $('.' + obj).off('focus')
+    //         })
+    //     }
 
-        if (isAndroid) {
-            // 在安卓中键盘弹起会触发window.onresize事件
-            // ios中则不会触发window.resize事件
-            change();
-            window.addEventListener('resize', change);
-        } else {
-            // 进入页面绑定,触发一次就解绑
-            focusOnce()
-        }
+    //     if (isAndroid) {
+    //         // 在安卓中键盘弹起会触发window.onresize事件
+    //         // ios中则不会触发window.resize事件
+    //         change();
+    //         window.addEventListener('resize', change);
+    //     } else {
+    //         // 进入页面绑定,触发一次就解绑
+    //         focusOnce()
+    //     }
         
-        $('.' + obj).on('blur', function (e) {
-            setTimeout(function() {
-                var dom = document.activeElement;
-                if (dom.className.includes(obj)) {
-                    if (isAndroid) {
-                        dom.scrollIntoView({"block": "center"})
-                    } else {
-                        // dom.scrollIntoView({"block": "bottom"})
-                    }
-                } else {
-                    window.scroll(0, 0)
-                    // 当页面上没有获得焦点的input时候就说明键盘收起来了。
-                    // 给input绑定focus事件用来监听其弹起
-                    focusOnce()
-                }
-            }, 50)
-        })
-    }
+    //     $('.' + obj).on('blur', function (e) {
+    //         setTimeout(function() {
+    //             var dom = document.activeElement;
+    //             if (dom.className.includes(obj)) {
+    //                 if (isAndroid) {
+    //                     dom.scrollIntoView({"block": "center"})
+    //                 } else {
+    //                     // dom.scrollIntoView({"block": "bottom"})
+    //                 }
+    //             } else {
+    //                 window.scroll(0, 0)
+    //                 // 当页面上没有获得焦点的input时候就说明键盘收起来了。
+    //                 // 给input绑定focus事件用来监听其弹起
+    //                 focusOnce()
+    //             }
+    //         }, 50)
+    //     })
+    // }
 
     // 数组去重
     function distinct(a, b) {

+ 289 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/wx/home.css

@@ -0,0 +1,289 @@
+.jy_header{
+    display: none;
+}
+.sticky{
+    position: -webkit-sticky;
+    position: sticky;
+    top: 0;
+    left: 0;
+    width: 100%;
+    z-index: 9999;
+}
+.fixed-top{
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    z-index: 9999;
+}
+
+.jy_header_box {
+  padding: 0.55rem .3rem .2rem;
+  background-color: #fff;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #f5f5f5;
+}
+
+.jy_header_box h3 {
+  font-size: .38rem;
+  color: #000000;
+  font-weight: normal;
+  line-height: .66rem;
+}
+
+.jy_header_box img {
+  width: .48rem;
+  height: .48rem;
+}
+
+.home {
+  min-height: 100%;
+  background: #F4F4F9;
+}
+
+.home .top {
+  width: 100%;
+  height: 5.36rem;
+  padding-top: 1.29rem;
+  background: linear-gradient(#31cbe0, white);
+}
+
+.home .top .home_search {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: .96rem;
+  margin: 0 .2rem;
+  padding: 0 .2rem 0 .24rem;
+  background: #fff;
+  border-radius: 0.06rem;
+}
+
+.home .top .home_search .home_search_left {
+  display: flex;
+  align-items: center;
+width: 100%;
+}
+
+.home .top .home_search .home_search_left span {
+  font-size: .32rem;
+  color: #888888;
+  margin-left: .16rem;
+}
+
+.home .top .home_search .home_search_right {
+  position: relative;
+  padding-left: .2rem;
+}
+
+.home .top .home_search .home_search_right:before {
+  position: absolute;
+  content: '';
+  top: 0;
+  left: 0;
+  width: 1px;
+  height: 100%;
+  background: #E0E0E0;
+  transform-origin: 0 0;
+  transform: scaleX(0.5);
+}
+
+.home .top .home_search .icon_search, .home .top .home_search .icon_question {
+  width: .58rem;
+/*  height: .48rem;*/
+}
+
+.home .top .home_banner {
+  margin-top: .36rem;
+  padding: 0 .3rem;
+}
+
+.home .top .home_banner .lunbo {
+  width: 100%;
+  height: 2.75rem;
+}
+
+.home .top .home_banner .lunbo .swiper-slide a {
+  display: block;
+  width: 100%;
+}
+
+.home .top .home_banner .lunbo .swiper-slide a img {
+  display: block;
+  margin: 0 auto;
+}
+
+.home .top .home_banner .lunbo .custorm_dot {
+  bottom: 0;
+}
+
+.home .top .home_banner .lunbo .custorm_dot .swiper-pagination-bullet {
+  width: 0.08rem;
+  height: 0.08rem;
+  background: #fff;
+  opacity: 0.6;
+}
+
+.home .top .home_banner .lunbo .custorm_dot .swiper-pagination-bullet-active {
+  background: #fff;
+  opacity: 1;
+}
+
+.home .home_tab {
+  padding: .5rem 0 .56rem;
+  border-bottom: 1px solid #F2F2F2;
+  background: #fff;
+}
+
+.home .home_tab .tab_container {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.home .home_tab .tab_container .tab_item {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  text-align: center;
+}
+
+.home .home_tab .tab_container .tab_item img {
+  width: .96rem;
+  height: .96rem;
+}
+
+.home .home_tab .tab_container .tab_item span {
+  margin-top: .16rem;
+  font-size: .26rem;
+  color: #1D1D1D;
+}
+
+.home .home_data {
+  background: #fff;
+}
+
+.home .home_data .data_nav {
+  padding: .32rem .3rem 0.08rem;
+  font-size: .4rem;
+  color: #1D1D1D;
+font-weight: bold;
+}
+
+.home .home_data .data_list {
+  padding: 0 .3rem;
+}
+
+.home .home_data .data_list .list_item {
+  padding: .3rem 0 .36rem;
+  border-bottom: 1px solid #F2F2F2;
+}
+
+.home .home_data .data_list .list_title {
+  display: flex;
+  font-size: .32rem;
+/*  text-align: justify;*/
+}
+.home .home_data .data_list .list_title p{
+	word-break: break-all;
+	overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
+}
+.home .home_data .data_list .list_info {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: .36rem;
+}
+
+.home .home_data .data_list .tags {
+  display: flex;
+  align-items: center;
+  padding-left: .4rem;
+}
+
+.home .home_data .data_list .tags > div {
+  padding: 0 0.08rem;
+  height: .36rem;
+  line-height: .36rem;
+  text-align: center;
+  margin-right: .1rem;
+  border-radius: 0.04rem;
+  background: #F4F4F9;
+  color: #686868;
+  font-size: .24rem;
+}
+
+.home .home_data .data_list .timer {
+  color: #888888;
+  font-size: .24rem;
+}
+
+.home .no_data {
+  padding: .16rem 0;
+  text-align: center;
+}
+
+.home .no_data img {
+  width: 1.96rem;
+  height: 1.96rem;
+}
+
+.home .no_data p {
+  padding: .43rem 0 .24rem;
+  color: #686868;
+  font-size: .26rem;
+}
+
+.home .no_data a {
+  display: inline-block;
+  padding: 0 .32rem;
+  height: .64rem;
+  line-height: .64rem;
+  background: #2CB7CA;
+  color: #fff !important;
+  font-size: .28rem;
+  border-radius: 0.06rem;
+}
+
+.home .tips .tips_text {
+  padding: .48rem 0 .24rem;
+  color: #686868;
+  font-size: .26rem;
+  text-align: center;
+}
+
+.home .tips .tips_all {
+  padding: .26rem 0;
+  text-align: center;
+}
+
+.home .tips .tips_all a {
+  color: #2CB7CA !important;
+}
+
+.home .tips .tips_btn {
+  padding-bottom: .48rem;
+  text-align: center;
+}
+
+.home .tips .tips_btn a {
+  display: inline-block;
+  padding: 0 .32rem;
+  height: .64rem;
+  line-height: .64rem;
+  background: #2CB7CA;
+  color: #fff !important;
+  font-size: .28rem;
+  border-radius: 0.06rem;
+}
+.home .keyword {
+    color: #2cb7ca;
+}

+ 165 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/wx/personal.css

@@ -0,0 +1,165 @@
+.personal {
+/*  padding-top: .88rem;*/
+}
+
+.personal .navbar {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: .88rem;
+  padding: 0 .32rem;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background: #fff;
+  z-index: 999;
+}
+
+.personal .navbar .navbar_left {
+  font-size: .4rem;
+  font-weight: bold;
+  color: #1D1D1D;
+}
+
+.personal .navbar .navbar_right {
+  display: flex;
+  align-items: center;
+}
+
+.personal .navbar .navbar_right img {
+  width: .48rem;
+  height: .48rem;
+  margin-left: .4rem;
+}
+
+.personal .user {
+  display: flex;
+  align-items: center;
+  padding: .4rem .42rem .56rem;
+  background: #fff;
+}
+
+.personal .user .user_img {
+  width: 1.2rem;
+  height: 1.2rem;
+  margin-right: .32rem;
+  border-radius: 50%;
+  border: 1px solid #2FC4D9;
+  overflow: hidden;
+  opacity: 0.8;
+}
+
+.personal .user .user_img img {
+  width: 100%;
+  height: 100%;
+}
+
+.personal .user .user_info {
+  display: flex;
+  flex-direction: column;
+}
+
+.personal .user .user_info .user_name {
+  font-size: .32rem;
+  color: #1D1D1D;
+}
+
+.personal .user .user_info .set_email, .personal .user .user_info .user_email {
+  width: auto;
+  height: .48rem;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 0 .2rem;
+  margin-top: .22rem;
+  background: #F5F4F9;
+  color: #686868;
+  font-size: .26rem;
+  border-radius: .24rem;
+  box-sizing: border-box;
+}
+
+.personal .user .user_info .set_email .icon-arrow, .personal .user .user_info .user_email .icon-arrow {
+  margin-left: .2rem;
+  color: #686868;
+  font-size: .14rem;
+}
+
+.personal .order {
+  padding: 0 .32rem;
+  background: #fff;
+}
+
+.personal .order .order_tab {
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.personal .order .order_tab .tab_list {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: .32rem 0;
+}
+
+.personal .order .order_tab .tab_list img {
+  width: .72rem;
+  height: .72rem;
+}
+
+.personal .order .order_tab .tab_list span {
+  margin-top: 0.08rem;
+  font-size: .26rem;
+  color: #686868;
+}
+
+.personal .order .order_tab:before {
+  position: absolute;
+  content: '';
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  background-color: #E0E0E0;
+  transform-origin: 0 0;
+  transform: scaleY(0.5);
+}
+
+.personal .mgTop20 {
+  margin-top: .2rem;
+}
+
+.personal .menu {
+  margin-top: .2rem;
+}
+
+.personal .menu .menu_list {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  height: 1.1rem;
+  padding: 0 .2rem 0 .32rem;
+  background: #fff;
+}
+
+.personal .menu .menu_list .menu_list_left {
+  display: flex;
+  align-items: center;
+  font-size: .32rem;
+  color: #1D1D1D;
+}
+
+.personal .menu .menu_list .menu_list_left img {
+  width: .48rem;
+  height: .48rem;
+  margin-right: .32rem;
+}
+
+.personal .menu .menu_list .arrow_right {
+  width: .48rem;
+  height: .48rem;
+}

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

@@ -65,7 +65,7 @@ html.hidden,body.hidden,.keysetpage .keyWordContent.adjustment{
 	position: absolute;
     left: 0px;
     right: 0px;
-    top: 0px;
+    top: 47px;
 	z-index: 1;
 	margin-top: 20px;
 }

+ 8 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/wxlist.css

@@ -17,6 +17,14 @@
 	padding-left:25px;
 	float:left;
 	line-height:24px;
+    color: #1D1D1D;
+    font-size: .32rem;
+    text-align: justify;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 .resnumb{
 	position: relative;

+ 6 - 5
src/jfw/modules/app/src/web/staticres/jyapp/css/wxsearch.css

@@ -13,9 +13,9 @@
 /*文字链接*/
 /*文字高亮*/
 /*白色字体*/
-body {
+/* body {
   background-color: #f5f4f9;
-}
+} */
 a{
 	color: #000 !important;
     text-decoration: none !important;
@@ -111,7 +111,7 @@ form{
 
 #searchIndex .content {
   /*列表*/
-  padding: 0 .15rem;
+/*  padding: 0 .15rem;*/
 }
 
 #searchIndex .content li {
@@ -394,12 +394,13 @@ form{
 }
 /**引导页**/
 .swiper-pagination{
-	top: 80px !important;
+/*	top: 80px !important;*/
 	transition: 0ms !important;
 	-webkit-transition: 0ms !important;
 }
 .swiper-pagination-bullet{
-	margin-bottom: 15px !important;
+/*	margin-bottom: 15px !important;*/
+	margin-bottom: 4px !important;
 }
 .swiper-slide{
 	text-align: center;

BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/home_search.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_arrow_right.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_data_export.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_head.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_1.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_2.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_3.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_4.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_5.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_list_6.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_1.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_2.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_3.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_order_4.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/persional/my_vip.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_1.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_2.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/banner_3.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_question.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_search.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_1.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_2.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_3.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_4.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/laba.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/search/nothing.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/images/syzindex/treasure_vip.png


+ 32 - 8
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -30,14 +30,13 @@ $(function(){
 		}
 		$target.trigger("tap",e);
     });
-	$(".app-layout-header .app-back").unbind("tap").on("tap",function(){
+	$(".app-layout-header .app-back").unbind("click").on("click",function(){
 		if(typeof(clickBack)=="function"){
 			clickBack();
 		}else{
 			try{
 				afterClickBack();
-			}catch(e){
-            }
+			}catch(e){}
 			//可以自定义返回url,不过是跳转的方式
 			if(typeof(backUrl) != "undefined" && backUrl != null){
 				if(typeof(backUrl) == "string"){
@@ -46,7 +45,7 @@ $(function(){
 					window.history.go(backUrl);
 				}
 			}else{
-                window.history.back();
+				window.history.back();
 			}
 		}
 	});
@@ -169,17 +168,21 @@ function timeDiff(date){
 	}
 	return td;
 }
-function newredirect(zbadd,link,sid,sds){
+function newredirect(zbadd,link,sid,sds,index){
 	if(link != null && typeof(link) != "undefined"){
 		link = link.replace(/\n/g,"");
 		if(!/^http/.test(link)){
 			link="http://"+link
 		}
 	}
+	var pt = ""
+	if (index==1){
+		pt="projectMatch=项目匹配"
+	}
 	if(sds){
-		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?keywords="+encodeURIComponent(sds);
+		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?keywords="+encodeURIComponent(sds)+pt;
 	}else{
-		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?";
+		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?"+pt;
 	}
 }
 function pcredirect(link,sid){
@@ -641,4 +644,25 @@ function isIphoneX(){
 }
 function myDomain(){
 	return window.location.protocol+"//"+window.location.host;
-}
+}
+
+/******* 获取url参数(正则)********/
+function getParam(name) {
+    var search = document.location.search;
+    // alert(search);
+    var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+    var matcher = pattern.exec(search);
+    var items = null;
+    if (null != matcher) {
+        try {
+            items = decodeURIComponent(decodeURIComponent(matcher[1]));
+        } catch (e) {
+            try {
+                items = decodeURIComponent(matcher[1]);
+            } catch (e) {
+                items = matcher[1];
+            }
+        }
+    }
+    return items;
+};

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

@@ -201,28 +201,53 @@ var SuperSearch = {
 				return;
 			}
 			var rFlag = false;
-			$.ajax({
-				type: "post",
-				url: "/jyapp/member/swordfish/ajaxReq",
-				data: {keys:SuperSearch.s_words,reqType: "subscribe"},
-				dataType: "json",
-				async: false,
-				success: function(r){
-					if(r.flag=="y"){
+			if(SuperSearch.isVip){
+				$.ajax({
+					type: "post",
+					url: "/subscribepay/afterPay/directSubKWS",
+					data: {keys:SuperSearch.s_words},
+					dataType: "json",
+					async: false,
+					success: function(r){
+						if(r.flag=="y"){
+							rFlag = true;
+						}else if(r.flag=="o"){
+							EasyAlert.show("您已经订阅过此关键字");
+						}else if(r.flag=="m"){
+							EasyAlert.show("您已经超过订阅<br>关键字上限");
+						}
+					},error: function(){
 						rFlag = true;
-					}else if(r.flag=="o"){
-						EasyAlert.show("您已经超过订阅<br>关键字上限");
 					}
-				},error: function(){
-					rFlag = true;
+				});
+				if(rFlag){
+					SuperSearch.setSessionStorage();
+					window.location.href = "/jyapp/vipsubscribe/toSetKeyWordPage";
+				}
+			}else{
+				$.ajax({
+					type: "post",
+					url: "/jyapp/member/swordfish/ajaxReq",
+					data: {keys:SuperSearch.s_words,reqType: "subscribe"},
+					dataType: "json",
+					async: false,
+					success: function(r){
+						if(r.flag=="y"){
+							rFlag = true;
+						}else if(r.flag=="o"){
+							EasyAlert.show("您已经超过订阅<br>关键字上限");
+						}
+					},error: function(){
+						rFlag = true;
+					}
+				});
+				if(rFlag){
+					//JyObj.redirectKeyset();
+					SuperSearch.setSessionStorage();
+					setTimeout(function(){
+						window.location.href = "/jyapp/wxkeyset/keyset/index";
+					},100);
 				}
-			});
-			if(rFlag){
-				//JyObj.redirectKeyset();
-				SuperSearch.setSessionStorage();
-				setTimeout(function(){
-					window.location.href = "/jyapp/wxkeyset/keyset/index";
-				},100);
 			}
 		});
 		//订阅结束==========================================================================
@@ -859,6 +884,7 @@ var SuperSearch = {
 	formSubmit: function (nw){    //提交表单,获取数据
 		$(".loading_").show();
 		if(!SuperSearch.beforeSubmit()){
+			$(".loading_").hide();
 			return;
 		}
 		$("#wrapper .shade_table").css("display","none"); //隐藏table 查看更多
@@ -2035,5 +2061,188 @@ var SuperSearch = {
 		}else{
 			$('#supersearchPage .searchinput').removeClass("nocaret");
 		}
+	},
+	getHomeList:function(locationCity,nReq){
+		SuperSearch.locationCity = locationCity;
+		SuperSearch.initHomePage();
+		$.ajax({
+			type: "post",
+			url: "/subscribepay/index/getIndexMessage",
+			data: {city:SuperSearch.locationCity,nReq:nReq},
+			dataType: "json",
+			async: false,
+			success: function(r){
+				if(nReq==2){
+					$(".loading_").hide();
+				}
+				if(r.success){
+					SuperSearch.homePageShow(r.data);
+				}
+			},error: function(){
+				console.log("请求报错...")
+			}
+		});
+	},
+	locationHomeData:function(){
+		//APP调用客户端方法获取用户所在城市: 省-市
+		$(".loading_").show();
+		var address = "";
+		var ai = 0;
+	 	var locatInterval = setInterval(function(){
+			if((address!=""&&address!=undefined&&address.indexOf("null")<0)||ai>4){
+				$(".loading_").hide();
+				clearInterval(locatInterval);
+				if(address!=""&&address!=undefined&&address.indexOf("null")<0){
+					SuperSearch.getHomeList(address.split("-")[1],2);
+				}else{
+					SuperSearch.getHomeList("",2);
+				}
+			}
+			ai=ai+1;
+			try{
+				address = JyObj.getLocation();
+			}catch(e){}
+        },1000)
+	},
+	homePageShow:function(r){
+		SuperSearch.hasHistory = r["hasHistory"]
+		SuperSearch.hasSubscribe = r["hasSubscribe"]
+		SuperSearch.isVip = r["isVip"]
+		SuperSearch.listLength =  r["listLength"]
+		SuperSearch.myHistory = r["history"]
+		var list = r["list"]
+		var homeListHtml = '';
+		if(list!=null&&list.length>0){
+			for(var i=0;i<list.length;i++){
+				var _list = list[i];
+				var title = _list["title"];
+				if(SuperSearch.hasSubscribe){
+					if(_list["matchkeys"]!=null&&typeof(_list["matchkeys"])!="undefined"){
+						for(var n=0;n<_list["matchkeys"].length;n++){
+							var matchkeys = _list["matchkeys"][n].split("+");
+							for(var nn=0;nn<matchkeys.length;nn++){
+								title = keyWordHighlight(title,matchkeys[nn],'<font class="keyword">$1</font>');
+							}
+						}
+					}
+				}else if(SuperSearch.myHistory!=null&&SuperSearch.myHistory.length>0){
+					title = keyWordHighlight(title,SuperSearch.myHistory,'<font class="keyword">$1</font>');
+				}
+				homeListHtml +='<div class="list_item" onclick="SuperSearch.HomeToDetails(\''+_list["_id"]+'\')">'
+									+'<div class="list_title">'
+									+'<span class="serial_number">'+(i+1)+'. &nbsp;</span>'
+									+'<p>'+title+'</p>'
+									+'</div>'
+									+'<div class="list_info">'
+									+'<div class="tags">'
+				var area = _list["area"];
+				if(area==undefined||area==""){
+					area='全国'
+				}
+				homeListHtml +='<div class="area">'+area+'</div>'
+				var industry = _list["industry"];
+				var subtype = _list["subtype"];
+				if(SuperSearch.hasSubscribe||SuperSearch.isVip){
+					industry = _list["s_subscopeclass"];
+					subtype = _list["type"];
+				}
+				if(industry==undefined){
+					industry=""
+				}
+				if(subtype==undefined){
+					subtype = ""
+				}
+				if (industry!=""){
+					homeListHtml +='<div class="industry">'+industry+'</div>'
+				}
+				if(subtype!=""){
+					homeListHtml +='<div class="course">'+subtype+'</div>'
+				}
+				//时间
+				var publishtime = _list["publishtime"];
+				if(publishtime&&Number(publishtime)>=1000000){
+					publishtime = timeDiff(new Date(Number(publishtime+"000")));
+				}else{
+					publishtime = ""
+				}
+				homeListHtml +='<div class="price hide"></div>'
+									+'</div>'
+									+'<div class="timer">'+publishtime+'</div>'
+									+'</div>'
+									+'</div>'
+			}
+		}else{
+			if(!SuperSearch.isVip&&!SuperSearch.hasSubscribe){
+                SuperSearch.locationHomeData();
+				return
+			}
+		}
+		SuperSearch.showHomeList(homeListHtml);
+	},
+	HomeToDetails:function(id){
+		if(id!=""){
+			window.location.href="/jyapp/article/content/"+id+".html"
+		}
+	},
+	showHomeList:function(hh){
+		SuperSearch.initHomeTip();
+		if(hh!=""){
+			$(".home_data .data_list").html(hh);
+		}
+	},
+	initHomePage:function(){
+		$(".home_toset").click(function(){
+			if(SuperSearch.isVip){
+				window.location.href="/jyapp/vipsubscribe/toSubVipSetPage"
+			}else{
+				sessionStorage.removeItem("keysetindexToHistory");
+				//window.location.href="/jyapp/swordfish/historypush"
+				try{
+					JyObj.chooseTab(1);
+				}catch(e){}
+			}
+		})
+		$(".tips_all .GetAll").click(function(){
+			sessionStorage.removeItem("keysetindexToHistory");
+			//window.location.href="/jyapp/swordfish/historypush"
+			try{
+				JyObj.chooseTab(1);
+			}catch(e){}
+		})
+		$(".home_todetails").click(function(){
+			window.location.href="/jyapp/vipsubscribe/introducePage"
+		})
+	},
+	initHomeTip:function(){
+		if(SuperSearch.listLength>0){
+			if(!SuperSearch.isVip){
+				if(SuperSearch.hasSubscribe){
+					if(SuperSearch.listLength>=50){
+						$(".home_4").show();
+						$(".home_todetails").show();
+					}else if(SuperSearch.listLength>0){
+						$(".home_2").show();
+						$(".home_toset").show();
+					}
+				}else{
+					$(".home_1").show();
+					$(".home_toset a").text("去订阅");
+					$(".home_toset").show();
+				}
+			}else{
+				if(SuperSearch.listLength>=50){
+					$(".tips .tips_all").show();
+				}else if(SuperSearch.listLength>0){
+					if(!SuperSearch.hasSubscribe){
+						$(".home_3").show();
+					}else{
+						$(".home_2").show();
+					}
+					$(".home_toset").show();
+				}
+			}
+		}else{
+			$(".no_data").show();
+		}
 	}
 };

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/jfw/modules/app/src/web/staticres/jyapp/swiper/maps/swiper.jquery.min.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/jfw/modules/app/src/web/staticres/jyapp/swiper/maps/swiper.min.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 14 - 0
src/jfw/modules/app/src/web/staticres/jyapp/swiper/swiper.min.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 14 - 0
src/jfw/modules/app/src/web/staticres/jyapp/swiper/swiper.min.js


+ 1 - 13
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/addition_exclusive_word.css

@@ -3,7 +3,7 @@
   display: flex;
   flex-direction: column;
   justify-content: space-between;
-  width: 100;
+/*  width: 100;*/
   height: 100%;
   overflow: hidden;
 }
@@ -73,7 +73,6 @@
 .addition-word .showKeyWord ul li {
   margin-bottom: 0.16rem;
   overflow: hidden;
-width: 100%;
 }
 
 .exclusive-word .showKeyWord ul li .one,
@@ -350,14 +349,3 @@ width: 100%;
 .addkeyWord{
 	margin-bottom:.2rem;
 }
-[type='text'] {
-	border: 0px solid #ccc; 
-/*    border-radius: 4px; 
-    padding-left: 10px; 
-    padding-right: 0px;*/
-}
-.btn{
-	background: rgba(245,244,249,1);
-	padding:0px;
-	border:0px;
-}

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

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

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 584 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/change_area.css


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

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

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

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

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 13 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css


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

@@ -1,7 +1,6 @@
 @charset "UTF-8";
 .main {
   width: 100%;
-  overflow: scroll;
 }
 
 .main::-webkit-scrollbar {
@@ -383,7 +382,6 @@
 }
 
 .choose_industry {
-  position: relative;
   display: flex;
   flex-direction: column;
   justify-content: space-between;
@@ -406,9 +404,7 @@
 .choose_industry .result {
   padding: .2rem .3rem;
   background:rgba(245,244,249,1);
-  z-index:999;
-  /* position: fixed; */
-  width:100%;
+  width:100%;	 
 }
 
 .choose_industry .form {
@@ -424,6 +420,7 @@
   flex-direction: column;
   width: 0.3rem;
   transform: translateY(-50%);
+  z-index:9999;
 }
 
 .choose_industry .slide a {
@@ -485,3 +482,28 @@
   color: #fff;
   background-color: #bfbfc3;
 }
+.choose_industry .list .tips_detail {
+  width: 6.4rem;
+  padding: .2rem;
+  margin-top: -0.1rem;
+  margin-bottom: .25rem;
+  display: none;
+  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
+  text-align: justify;
+  font-size: .26rem;
+  color: #1d1d1d;
+  line-height: .4rem;
+  border-radius: 2px;
+}
+
+.choose_industry .list .wenhao {
+  display: inline-block;
+  padding: 0 0.1rem;
+  height: .7rem;
+  line-height: .7rem;
+}
+
+.choose_industry .list .show_tips {
+  color: #2cb7ca;
+  font-size: .34rem;
+}

+ 147 - 13
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/keyWord.css

@@ -3,7 +3,7 @@
   flex-direction: column;
   justify-content: space-between;
   width: 100%;
-/*  height: 100vh;*/
+  height: 100%;
   overflow: hidden;
 }
 
@@ -46,7 +46,7 @@
 }
 
 .keyWord .add-keyword-container .classify-tips {
-  padding: .1rem .3rem .3rem;
+  padding: .1rem .3rem .2rem;
   font-size: .26rem;
   color: #888;
   line-height: .38rem;
@@ -304,8 +304,6 @@
   background-color: #fff;
   font-size: .28rem;
   color: #888;
-    position: fixed;
-    bottom: 0px;
 }
 
 .keyWord .problem {
@@ -474,14 +472,150 @@
 .enter.addkeyWord{
 	margin-bottom: .2rem;
 }
-[type='text'] {
-	border: 0px solid #ccc; 
-/*    border-radius: 4px; 
-    padding-left: 10px; 
-    padding-right: 0px;*/
+
+.ios-user-select {
+    -webkit-user-select: text;
+}
+.opacity6{
+    opacity: 0.6;
+}
+.keysexplain{
+    position: fixed;
+height: .8rem;
+background: rgba(245,244,249,1);
+width: 100%;
+    font-size: .3rem;
+    padding-top: .18rem;
+    padding-left: .3rem;
+    color: #888;
+}
+.classifyKeysShow{
+    font-size: .25rem;
+    color: #686868;
+    margin-top: 0.1rem;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 1;
+    -webkit-box-orient: vertical;
 }
-.btn{
-	background: rgba(245,244,249,1);
-	padding:0px;
-	border:0px;
+.addClassify{
+    height: 1rem;
+    text-align: center;
+    background: #2CB7CA;
+    width: 100%;
+    line-height: 1rem;
+    color:#FFFFFF;
+    font-size: .32rem;
+position:fixed;
+bottom:0px;
+}
+.classify-show-pop .weui-dialog .weui-dialog__hd {
+ padding: 0;
+ text-align: center;
+ font-size: .34rem;
+}
+.classify-show-pop .weui-dialog .weui-dialog__hd {
+    padding-left: .3rem;
+    height: .88rem;
+    line-height: .88rem;
+    background-color: #F4F4F9;
+}
+.classify-show-pop .weui-dialog .weui-dialog__bd {
+    padding: .38rem .1rem;
+    text-align: center;
+    font-size: .32rem;
+    color: #1d1d1d;
+    line-height: .6rem;
+}
+.classify-show-pop .weui-dialog .weui-dialog__bd .classify-keyword {
+    padding: 0 .17rem;
+    height: 0.8rem;
+    width: 100%;
+    font-size: .32rem;
+    border: 1px solid #CECECE;
+}
+
+.classify-show-pop .weui-dialog .weui-dialog__ft {
+    margin-top: .1rem;
+    margin-bottom: .3rem;
+    justify-content: space-around;
+}
+.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn {
+    display: inline-block;
+    width: 1.72rem;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    font-size: .32rem;
+}
+.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn_confirm {
+      background-color: #2CB7CA;
+}
+.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn_cancel {
+      background-color: #BFBFC3;
+}
+.classify-show-pop .weui-dialog .weui-dialog__ft:after {
+      border: none;
+}
+.all-classify-column{
+      position: relative;
+      padding-bottom: 1rem;
+}
+.classify-fast{
+    width: 1.7rem;
+    text-align: center;
+    color: #2CB7CA;
+    font-size: 0.26rem;
+    padding: 0rem 0rem 0.1rem;
+    float: right;
+}
+
+.classify-fast-pop .weui-dialog .weui-dialog__hd {
+ padding: 0;
+ text-align: center;
+ font-size: .34rem;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__hd {
+    padding-left: .3rem;
+    height: .88rem;
+    line-height: .88rem;
+    background-color: #F4F4F9;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__bd {
+        padding: .38rem .4rem;
+    text-align: left;
+    font-size: .32rem;
+    color: #1d1d1d;
+    line-height: .45rem;
+    letter-spacing: 0.01rem
+}
+.classify-fast-pop .weui-dialog .weui-dialog__bd p {
+        color: #888;
+    font-size: .26rem;
+    margin-top: .2rem;
+    letter-spacing: 0.01rem;
+}
+
+.classify-fast-pop .weui-dialog .weui-dialog__ft {
+    margin-top: .1rem;
+    margin-bottom: .3rem;
+    justify-content: space-around;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn {
+    display: inline-block;
+    width: 1.72rem;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    font-size: .32rem;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn_confirm {
+      background-color: #2CB7CA;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn_cancel {
+      background-color: #BFBFC3;
+}
+.classify-fast-pop .weui-dialog .weui-dialog__ft:after {
+      border: none;
 }

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

@@ -10,6 +10,7 @@ body .industry {
   width: 100%;
   height: 100%;
   overflow: hidden;
+background: #fff;
 }
 
 body .industry .content {
@@ -43,6 +44,7 @@ body .industry .list ul li {
   margin: 0 0.3rem;
   padding: 0.3rem 0;
   border-bottom: 1px solid #E0E0E0;
+    width: 100%;
 }
 
 body .industry .list ul li dt {
@@ -120,12 +122,12 @@ body .industry .resetOne button:first-child {
 }
 /*----*/
 .result {
-    position: fixed;
+/*    position: fixed;*/
     padding: .2rem .3rem;
     font-size: .26rem;
     text-align: justify;
     width: 100%;
     background: rgba(245,244,249,1);
     z-index: 999;
-	    top: 0px;
+/*	    top: 1.2rem;*/
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 104 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/payway_select.css


+ 53 - 49
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/subscribe_list.css

@@ -6,7 +6,7 @@
   align-items: center;
 }
 
-.flex_alginC_justB, .vip_banner .box, .filter_tab, .filter_tab .area_container .area_wrap .handle_menu, .set_keyword > div, .renew_toast > div,.nv_renew_toast > div, .open_remind .remind_box {
+.flex_alginC_justB, .vip_banner .box, .filter_tab, .filter_tab .area_container .area_wrap .handle_menu, .set_keyword > div, .renew_toast > div,.nv_renew_toast > div,._renew_toast > div, .open_remind .remind_box {
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -108,7 +108,7 @@
 .free7days_pic,
 .noble_vip_pic {
   display: inline-block;
-  margin-right: .2rem;
+  margin-right: 5px;
   padding-left: .4rem;
   height: .4rem;
   line-height: normal;
@@ -116,20 +116,20 @@
   background-size: contain;
 }
 
-.free7days_pic:after {
+/*.free7days_pic:after {
   content: '试用7天';
   position: relative;
   top: -0.03rem;
   left: .05rem;
   display: inline-block;
-  padding: 0 .04rem;
+  padding: 0 2px;
   line-height: normal;
   font-size: 0.18rem;
   color: #fff;
   text-align: center;
   background-color: #CFAD89;
   border-radius: .06rem;
-}
+}*/
 
 .vip_banner .box {
   width: 100%;
@@ -149,6 +149,7 @@
 .vip_banner .box .left h4 {
   font-size: .32rem;
   color: #FFDAB1;
+font-weight: bold;
 }
 
 .vip_banner .box .right {
@@ -160,10 +161,9 @@
   position: relative;
   height: .88rem;
   line-height: .88rem;
-  padding: 0 .3rem;
+  padding: 0 10px;
   background: #fff;
       border-bottom: 1px solid #E6E6E6;
-z-index:999;
 }
 
 /*.filter_tab:after {
@@ -183,7 +183,7 @@ z-index:999;
 }
 
 .filter_tab .tab_left .time {
-  margin-right: .25rem;
+  margin-right: 10px;
 }
 
 .filter_tab .tab_left .time_box,
@@ -215,7 +215,7 @@ z-index:999;
 
 .filter_tab .tab_right .vip_set_box {
   position: relative;
-  padding-left: .3rem;
+  padding-left: 5px;
   font-size: .28rem;
   color: #CFAD89;
 text-decoration: none;
@@ -238,7 +238,7 @@ text-decoration: none;
   width: 100%;
   top: 0.88rem;
   margin-left: -0.3rem;
-  z-index: 12;
+  z-index: 9999;
   background: #fff;
 }
 
@@ -274,6 +274,8 @@ text-decoration: none;
   height: .88rem;
   line-height: .88rem;
   padding: 0 .3rem;
+display: flex;
+    align-items: center;
 }
 
 .filter_tab .area_container .area_wrap .area_data .p_item .city-count {
@@ -308,6 +310,7 @@ text-decoration: none;
   margin-right: .2rem;
   -webkit-appearance: none;
   background: #fff;
+    margin-top: -0.05rem !important;
 }
 
 .filter_tab .area_container .area_wrap .area_data .checkbox:checked {
@@ -431,13 +434,27 @@ text-decoration: none;
 }
 
 .msg_alert {
-  position: fixed;
+/*  position: fixed;
   left: 0;
   bottom: 0;
   width: 100%;
-  height: auto;
+  height: auto;*/
+    display: flex;
+    position: relative;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
+}
+.msg_alert>div{
+	display: inline-block;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+/*    height: .94rem;*/
+/*    line-height: .94rem;*/
+/*    color: #fff;*/
+/*    font-size: .34rem;*/
 }
-
 .push {
   width: 100%;
   height: .72rem;
@@ -467,6 +484,7 @@ text-decoration: none;
   background: transparent;
   border: 1px solid white;
   border-radius: .32rem;
+    text-decoration: none;
 }
 
 .set_keyword > div {
@@ -523,41 +541,27 @@ text-decoration: none;
 .nv_renew_toast > div {
   background-color: #FE737A;
 }
+/*‘’*/
+._renew_toast > div {
+  padding: .15rem .3rem;
+  color: #fff;
+  font-size: .26rem;
+}
+
+._renew_toast > div i {
+  font-size: .32rem;
+}
 
-/*2.8.5 new*/
-.city-name{
-    text-overflow: ellipsis;
-    overflow: hidden;
-    display: -webkit-box;
-    -webkit-line-clamp: 1;
-    -webkit-box-orient: vertical;
-}
-.overClass{
-/*	overflow: hidden;
-	height:100vh;*/
-}
-.buyerclass {
-    border: 1px solid #CFAD89;
-    background: #CFAD89;
-    border-radius: 3px;
-    margin: 0px 5px;
-    padding: 1px 3px;
-    color: #fff;
-    font-size: 14px;
-}
-._header{
-	position: fixed;
-	top: 0;
-	width: 100%;
-	z-index: 999;
-	    margin-top: 65px;
-}
-.listcontent{
-	margin-top: 1rem;
-}
-.province_city p:last-child{
-	margin-bottom:1rem;
-}
-.province p:last-child{
-	margin-bottom:1rem;
+._renew_toast > div a {
+  width: 1.24rem;
+  height: .64rem;
+  line-height: .64rem;
+  color: #fff;
+  text-align: center;
+  background: transparent;
+  border: 1px solid white;
+  border-radius: .32rem;
+}
+._renew_toast > div {
+  background-color: #FE737A;
 }

+ 108 - 109
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/trial_info.css

@@ -1,190 +1,189 @@
 
 .trial_info {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: space-between;
-    width: 100%;
-    height: 100%;
-    overflow-x: hidden;
-    background: #34355A;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+  height: 100%;
+  overflow-x: hidden;
 }
 
 .trial_info .form {
-    flex: 1;
-    width: 100%;
-    overflow-y: scroll;
+  flex: 1;
+  width: 100%;
+  overflow-y: scroll;
 }
 
 .trial_info .trial_body {
-    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);
+  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;
 }

+ 9 - 15
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index.css

@@ -409,13 +409,12 @@
   flex-direction: column;
   flex-wrap: nowrap;
   width: 100%;
-/*  height: 100vh;*/
+  height: 100%;
   padding-top: constant(safe-area-inset-top);
   padding-top: env(safe-area-inset-top);
   padding-bottom: constant(safe-area-inset-bottom);
   padding-bottom: env(safe-area-inset-bottom);
   box-sizing: border-box;
-margin-bottom:.5rem;
 }
 
 .vip_index .header {
@@ -619,14 +618,14 @@ margin-bottom:.5rem;
 }
 
 .vip_index .content .subscribe_info .s_info_top .s_i_item .expand-box .icon-arrow {
-    position: absolute;
-    width: 1.14rem;
-    bottom: -0.08rem;
-    right: .05rem;
-    text-align: right;
-    font-size: .26rem;
-    background: linear-gradient(90deg, rgba(255, 218, 177, 0) 0%, #ffdab1 100%);
-    transition: height 0.5s ease;
+  position: absolute;
+  width: 1.14rem;
+  bottom: -0.08rem;
+  right: .05rem;
+  text-align: right;
+  font-size: .26rem;
+  background: linear-gradient(90deg, rgba(255, 218, 177, 0) 0%, #ffdab1 100%);
+  transition: height 0.5s ease;
 }
 
 .vip_index .content .subscribe_info .s_info_top .s_i_item .expand-box .icon-arrow::before {
@@ -799,8 +798,3 @@ i.icon-wenhao{
   border: 1px solid white;
   border-radius: .32rem;
 }
-.footer{
-	position: fixed;
-    bottom: 0;
-    width: 100%;
-}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 61 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_index_new.css


+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_introduce.css

@@ -29,6 +29,7 @@
 
 .vip_introduce {
   width: 100%;
+  height: 100%;
   overflow: hidden;
   display: flex;
   flex-direction: column;

+ 246 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css

@@ -487,3 +487,249 @@
   background: #2cb7ca;
   color: #fff;
 }
+
+/* 弹窗 */
+.billing-list-container .weui-half-screen-dialog {
+  display: flex;
+  flex-direction: column;
+  background-color: #fff;
+  padding: 0;
+  border-radius: 0;
+}
+
+.billing-list-container .weui-half-screen-dialog .weui-half-screen-dialog__bd {
+  height: 100%;
+}
+
+.billing-list-container .weui-half-screen-dialog .weui-half-screen-dialog__hd {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 0.4rem;
+  height: 0.88rem;
+  background-color: #f4f4f9;
+}
+
+.billing-list-container .weui-half-screen-dialog .weui-half-screen-dialog__hd .dialog_hd__title {
+  color: #1d1d1d;
+  font-size: 0.32rem;
+}
+
+.billing-list-container .weui-half-screen-dialog .weui-half-screen-dialog__hd .dialog_hd__close {
+  color: #707070;
+  font-size: 0.36rem;
+}
+
+.billing-list-container .weui-half-screen-dialog .weui-half-screen-dialog__ft {
+  padding: 0;
+}
+
+.billing-list-container .vip_prise_table {
+  padding: 0.5rem 0.3rem 0.4rem;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  font-size: 0.26rem;
+  text-align: center;
+}
+
+.billing-list-container .vip_prise_table .table_title {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 0.3rem;
+  width: 100%;
+}
+
+.billing-list-container .vip_prise_table .table_title .line {
+  width: 0.16rem;
+  height: 1px;
+  transform: scaleY(0.5);
+  background-color: #888;
+}
+
+.billing-list-container .vip_prise_table .table_title .title {
+  margin: 0 0.12rem;
+}
+
+.billing-list-container .vip_prise_table table {
+  margin-bottom: 0.48rem;
+  width: 100%;
+  border-collapse: collapse;
+}
+
+.billing-list-container .vip_prise_table table td {
+  height: 0.72rem;
+  width: 50%;
+  border: 1px solid #ccc;
+}
+
+.billing-list-container .vip_prise_table .tips {
+  text-align: left;
+}
+
+.billing-list-container .vip_prise_table .tips dt {
+  margin-bottom: 0.08rem;
+}
+
+.valuation_list {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  flex: 1;
+}
+
+.valuation_list .va-list-container {
+  flex: 1;
+  overflow-y: scroll;
+}
+
+.valuation_list .va-total-container {
+  height: 0.94rem;
+  background-color: #fff;
+}
+
+.va-list-container .text-title {
+  color: #1d1d1d;
+  font-size: 0.32rem;
+}
+
+.va-list-container .list-item {
+  margin-bottom: 0.2rem;
+  font-size: 0.26rem;
+  color: #686868;
+  background-color: #fff;
+}
+
+.va-list-container .list-item .item-top {
+  padding: 0 0.3rem;
+}
+
+.va-list-container .list-item .item-header {
+  display: flex;
+  align-items: center;
+  height: 0.79rem;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.va-list-container .list-item .item-header .header-content {
+  flex: 1;
+}
+
+.va-list-container .list-item .item-body {
+  position: relative;
+  padding: 0.14rem 0;
+}
+
+.va-list-container .list-item .item-body.vp-oneline {
+  padding: 0.38rem 0;
+}
+
+.va-list-container .list-item .item-body.vp-oneline .b-item .body-area-sub,
+.va-list-container .list-item .item-body.vp-oneline .b-item .body-industry-sub {
+  margin-top: 0.1rem;
+}
+
+.va-list-container .list-item .item-body .b-item {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  padding: 0.1rem 0;
+}
+
+.va-list-container .list-item .item-body .body-area-sub,
+.va-list-container .list-item .item-body .body-industry-sub {
+  margin-top: 0.08rem;
+}
+
+.va-list-container .list-item .item-body .vp-type {
+  position: absolute;
+  top: 50%;
+  right: 0;
+  width: 1.4rem;
+  height: 1.4rem;
+  background-color: transparent;
+  transform: translateY(-50%);
+  opacity: 0.5;
+  z-index: 1;
+}
+
+.va-list-container .list-item .item-body .vp-type .vp-type-text {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 100%;
+  color: #e6bd90;
+  font-size: 0.38rem;
+  border: 1px solid #e6bd90;
+  border-radius: 50%;
+  transform: rotate(-30deg);
+}
+
+.va-list-container .list-item .item-footer {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 0.3rem;
+  height: 0.84rem;
+  border-top: 1px solid #e0e0e0;
+}
+
+.va-total-container {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 0.3rem;
+  font-size: 0.26rem;
+  color: #686868;
+}
+
+.va-total-container .total-price {
+  font-weight: 700;
+  font-size: 0.32rem;
+  color: #fe737a;
+}
+
+.valuation_list {
+  max-height: 9.23rem;
+  background-color: #f5f4f9;
+}
+
+.va-total-container {
+  height: .94rem;
+  border-top: 1px solid #e0e0e0;
+}
+
+.jy-toast .weui-toast {
+  font-size: 0.3rem;
+  padding: 0.26rem 0.5rem;
+  width: auto;
+  height: auto;
+  max-width: 6rem;
+  min-height: 0;
+  top: 50%;
+  left: 50%;
+  margin-left: 0;
+  margin-top: -0.47rem;
+  transform: translateX(-50%) translateY(-50%);
+}
+
+.jy-toast .weui-icon_toast {
+  display: none;
+}
+
+.jy-toast .weui-toast__content {
+  margin: 0;
+}
+
+/* 计费清单 */
+.valuationList {
+    display: inline-block;
+    padding: 0 .12rem;
+    border: 1px solid #2cb7ca;
+	border-radius: 0.06rem;
+	font-size: .28rem;
+	color:#2cb7ca;
+	margin-left: .15rem;
+}

+ 22 - 9
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_purchase.css

@@ -308,8 +308,8 @@
   border-radius: 16px;
   box-sizing: border-box;
   background-color: #dfdfdf;
-  -webkit-transition: background-color .1s,border .1s;
-  transition: background-color .1s,border .1s;
+  -webkit-transition: background-color .1s, border .1s;
+  transition: background-color .1s, border .1s;
   -webkit-appearance: none;
 }
 
@@ -405,7 +405,8 @@
 }
 
 .radio-form .weui-check + .weui-icon-checked:before {
-  font-size: .42rem;
+  font-size: 16px;
+  margin-top: -3px;
 }
 
 .radio-form .weui-check:checked + .weui-icon-checked:before {
@@ -482,6 +483,10 @@
   color: #000;
 }
 
+.choose_item input:disabled, .choose_item input[disabled] {
+  opacity: 1;
+}
+
 .vip_purchase .choose_condition .chooseList .choose_item a i.iconfont,
 .vip_purchase .choose_condition .pay_mode .choose_item a i.iconfont {
   float: right;
@@ -510,7 +515,7 @@
 .vip_purchase .choose_condition .chooseList .free-7day .info,
 .vip_purchase .choose_condition .pay_mode .free-7day .info {
   margin-right: .2rem;
-  color: #000;
+  color: #686868;
 }
 
 .vip_purchase .choose_condition .chooseList {
@@ -560,14 +565,16 @@
 }
 
 .vip_purchase .fixed-bottom-box {
-  width: 100%;	
+  width: 100%;
   background-color: #fff;
   position: fixed;
   bottom: 0;
 }
+
 .weui-check__label:active {
-    background-color: #fff !important;
+  background-color: #fff !important;
 }
+
 .vip_purchase .fixed-bottom-box .price {
   display: flex;
   align-items: center;
@@ -782,10 +789,16 @@
   background-color: #2cb7ca;
 }
 
-.choose_item .show_time{
-  display:block;
+.choose_item .show_time {
+  display: block;
   width: 5rem;
   text-align: right;
   padding-right: .2rem;
   color: #000;
-}
+}
+
+.choose_item .add_tips.area_warn,
+.choose_item .add_tips.industry_warn {
+  color: #fe737a !important;
+  display: block;
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 339 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_renew.css


+ 4 - 3
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_update.css

@@ -425,9 +425,9 @@
   padding: 0;
 }
 
-.radio-form .weui-cell__hd {
+/* .radio-form .weui-cell__hd {
   transform: scale(0.8);
-}
+} */
 
 .radio-form .read {
   font-size: .26rem;
@@ -438,7 +438,8 @@
 }
 
 .radio-form .weui-check + .weui-icon-checked:before {
-  font-size: 21px;
+  font-size: 16px;
+  margin-top: -3px;
 }
 
 .radio-form .weui-check:checked + .weui-icon-checked:before {

+ 76 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vipreport_dialog.css

@@ -0,0 +1,76 @@
+@charset "UTF-8";
+/* 解决编译过程中闪烁的问题 */
+[v-cloak] {
+  display: none !important;
+}
+
+.vip_report_tip {
+  width: 100%;
+  height: 100%;
+  display: none;
+  position: fixed;
+  left: 0px;
+  right: 0px;
+  bottom: 0px;
+  top: 0px;
+  z-index:99999;
+}
+
+.vip_report_tip .weui-dialog {
+  width: 5.92rem;
+  height: 7.4rem;
+  border-radius: 0.16rem;
+  overflow: visible !important;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd {
+  position: relative;
+  display: flex;
+  width: 100%;
+  height: 100%;
+  flex-direction: column;
+  align-items: center;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd .jy_title {
+  min-width: 1.28rem;
+  height: 0.48rem;
+  font-size: 0.32rem;
+  color: #5F5E64;
+  margin-top: -0.24rem;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd .weekly {
+  min-width: 3.2rem;
+  height: 0.6rem;
+  font-size: 0.4rem;
+  font-weight: bold;
+  line-height: inherit;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd .term {
+  width: 100%;
+  height: 0.4rem;
+  margin-top: 0.16rem;
+  font-size: 0.26rem;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd .vip_report_todetail {
+  width: 4.96rem;
+  height: 0.88rem;
+  background-color: #2ABED1;
+  border-radius: 0.8rem;
+  color: #FFFFFF;
+  font-size: 0.36rem;
+  margin-top: 0.8rem;
+  line-height: 0.88rem;
+}
+
+.vip_report_tip .weui-dialog .my-dialog__hd .vip_report_tip_close {
+  position: absolute;
+  right: 1%;
+  top: -10.33%;
+  width: 0.56rem;
+  height: 0.56rem;
+  color: #FFFFFF;
+}

BIN
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/bgi-curve.png


+ 3 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/vipreport/close.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM13.4143 12L16.2427 14.8284L14.8285 16.2426L12 13.4142L9.17161 16.2426L7.75739 14.8284L10.5858 12L7.75742 9.17158L9.17163 7.75736L12 10.5858L14.8285 7.75736L16.2427 9.17157L13.4143 12Z" fill="white"/>
+</svg>

BIN
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/image/vipreport/dialog-image.png


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


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

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

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

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

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

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

+ 368 - 216
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/common.js

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

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

@@ -251,7 +251,7 @@ function initResult() {
 
         }
     }
-    $('ul.area-list .province[data-count]').parent().on('click',  function(){
+	$('ul.area-list .province[data-count]').parent().on('click',  function(){
         slideFun($(this));
     })
     //$('.result_name').append(getAreaClassArr_index(areaData.data.area).join("、"));

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

@@ -79,7 +79,7 @@ $(function(){
         //保存新附加词
         _notkws = keyWord;
 		if(notkws_arr[keyWord]!=undefined){
-            weui.toast('您设置的附加词已存在,请调整后再添加。', {
+            weui.toast('您设置的排除词已存在,请调整后再添加。', {
                 duration: 2000,
                 className: 'custom-toast',
                 callback: function () { console.log('close') }

+ 121 - 53
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

@@ -40,6 +40,7 @@ var reloadFunc = function(){
     })
 
     // 添加 确认按钮的点击事件
+	var pushHistoryFlag = true;
     $('.content .addkeyWord .btn button:nth-child(2)').on('click', function () {
 		setTimeout(function(){
 	        var keyWord = $.trim($('.addkeyWord input.enterOne').val());
@@ -74,6 +75,10 @@ var reloadFunc = function(){
 	        classify_name = $.trim($('.classify-r .classify-detail').text());
 	        //保存关键词
 	        kws_count = parseInt(kws_count) + 1;
+			if(kws_count==1&&pushHistoryFlag){
+				pushHistoryFlag = false;//首次进入页面后,添加第一个关键词时调用,删除首次添加关键词再添加则不会再push历史
+				pushHistory();
+			}
 	        if(kws_count>300){
 	            weui.toast('您设置的关键词已超出最高上限,请调整后再添加。', {
 	                duration: 2000,
@@ -87,7 +92,10 @@ var reloadFunc = function(){
 	            }
 	            //
 	            doSessionData("",_index);
-	            $(".add-keyword-container .addNewKeyword i").show();
+				setTimeout(function(){
+                	$(".add-keyword-container .addNewKeyword i").show();
+				},300)
+	            //$(".add-keyword-container .addNewKeyword i").show();
 	            //点击保存关键词,查看缓存中存的附加词 和排除词。
 	            $(".kws_count").text(kws_count);
 	            var html = `<li><div class="one"><div>
@@ -113,16 +121,16 @@ var reloadFunc = function(){
 	                        <div class="modify">
 	                        <textarea  name=""  rows="1"  placeholder="" maxlength="20">${keyWord}</textarea>`
 	            if (addition_kws.length>0){
-	                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">编辑 附加词<i>(`+addition_kws.length+`)</i></button>`
+	                html +=`<button class="addAdjunctWord" onclick="toappendkey(this)">编辑 附加词<i>(`+addition_kws.length+`)</i></button>`
 	            }else{
-	                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">添加 附加词</button>`
+	                html +=`<button class="addAdjunctWord" onclick="toappendkey(this)">添加 附加词</button>`
 	            }
 	            if (not_kws.length>0){
-	                html +=`<button class="addExclusion" onClick="tonotkey(this)">编辑 排除词<i>(`+not_kws.length+`)</i></button>`
+	                html +=`<button class="addExclusion" onclick="tonotkey(this)">编辑 排除词<i>(`+not_kws.length+`)</i></button>`
 	            }else{
-	                html +=`<button class="addExclusion" onClick="tonotkey(this)">添加 排除词</button>`
+	                html +=`<button class="addExclusion" onclick="tonotkey(this)">添加 排除词</button>`
 	            }
-	                html +=`<button class="deleteKey">删除</button><button class="ascertainKey" dataIndex=`+_index+` onclick="saveK(this)">确定</button></div></li>`
+	                html +=`<button class="deleteKey" onclick="deleteKey(this)">删除</button><button class="ascertainKey" dataIndex=`+_index+` onclick="saveK(this)">确定</button></div></li>`
 	            $('.showKeyWord > ul').prepend(html);
 	            // 添加完成隐藏输入框
 	            $(".enter.addkeyWord").hide();
@@ -184,50 +192,6 @@ var reloadFunc = function(){
         $(".add-keyword-container .addNewKeyword i").hide()
     })
 
-    // 编辑删除
-    $('.showKeyWord').on('click', '.deleteKey', function (e) {
-		var _index = Number($(this).next(".ascertainKey").attr("dataindex"));
-        var jQueryDOM = $(this).parents('li')
-        weui.confirm('确定要删除关键词?', {
-            buttons: [{
-                label: '取消',
-                type: 'default',
-                onClick: function () { console.log('不删了') }
-            }, {
-                label: '确定',
-                type: 'primary',
-                onClick: function () {
-                    if(saveData('DK')){
-                        kws_count -= 1;
-                        $(".kws_count").text(kws_count);
-                        jQueryDOM.remove();
-						if($(".showKeyWord ul").find('li').length==0){
-			                $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
-			                $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 附加词');
-			                $(".enter.addkeyWord").find("input").val("");
-						}else{
-							$(".add-keyword-container .addNewKeyword i").show();
-						}
-                        hasWords();
-                        doSessionData('DK',_index);
-			            //把kws_name,kws_index,addition_kws,not_kws初始化
-			            kws_index = 0;
-			            kws_name = "";
-			            addition_kws = [];
-			            not_kws = [];
-                    }else{
-			            weui.toast('无法删除', {
-			                duration: 2000,
-			                className: 'custom-toast',
-			                callback: function () { console.log('close') }
-			            });
-                    }
-                }
-            }]
-        });
-        console.log('删除关键词:', $(this).parent().find('textarea').val())
-
-    })
     // 编辑确定
     // $('.showKeyWord').on('click', '.ascertainKey', function (e) {
     //     var $this = $(this)
@@ -268,6 +232,104 @@ var reloadFunc = function(){
     $('.classify-r').on('click', function(){
 		modalOne();
     })
+    // 显示快速导入弹框
+    $('.classify-fast').on('click', function(){
+		modalTwo();
+    })
+    // 关键词分类 - 去设置按钮点击事件
+    $('.classify-fast-pop .dialog__btn_confirm').on('click', function() {
+		$.ajax({
+            type: "POST",
+            url: "/subscribepay/afterPay/fastImport",
+            data: {c_index:classify_index,k_index:$(".showKeyWord li").length,c_name:$(".classify-detail").text()},
+            dataType: "json",
+            async: false,
+            traditional: true,
+            success: function(r){
+				$('.classify-fast-pop').hide();
+                if(r.flagInt==1){
+					sessionStorage.fastimport = r.flagInt;
+					$(".classify-fast").hide();
+					var kwcount = r.kwMap.length;
+					var newCount = parseInt($(".addNewKeyword .kws_count").text())+parseInt(kwcount);
+					$(".kws_count").text(newCount);
+					weui.toast('成功导入'+kwcount+'个关键词', {
+		                duration: 2000,
+		                className: 'custom-toast',
+		                callback: function () { console.log('close') }
+		            });
+					//if($(".classify .classify-detail").text()=="未分类"){
+					var _keyArr = r.kwMap;
+					var p = $(".showKeyWord li").length;
+					if($(".showKeyWord li").length==0){
+                    	var classifyArr = {"s_item":"未分类","a_key":[]}
+                        a_items.push(classifyArr);
+					}else{
+						a_items[classify_index]["s_item"]="未分类";
+					}
+	                for (var i = 0; i< _keyArr.length; i++) {
+						a_items[classify_index]["a_key"].push(_keyArr[i]);
+						kws_arr[_keyArr[i]["key"].join(" ")] = p+"-"+classify_index
+           				var kwsHtml = '';
+	                    var nk_showClass = 'hide';//是否显示排除词个数
+	                    var nk_remark = '添加';
+	                    var notkeylth = 0;
+	                    kwsHtml +='<li>'
+	                    kwsHtml +='<div class="one" style="">'
+	                    kwsHtml +='<div>'
+	                                +'<span><strong> 关键词:</strong>'
+	                                +'<p class="key">'+_keyArr[i]["key"].join(" ")+'</p></span>'
+	                    if (_keyArr[i]["notkey"]!=undefined&&_keyArr[i]["notkey"].length>0){
+	                        nk_showClass = "";
+	                        nk_remark = '编辑';
+	                        notkeylth = _keyArr[i]["notkey"].length;
+	                        kwsHtml +='<span>'
+	                                    +'<strong> 排除词:</strong>'
+	                                    +'<p class="notkey">'+_keyArr[i]["notkey"].join(" ")+'</p>'
+	                                    +'</span>'
+	                    }
+	                    kwsHtml +='</div>'
+	                                +'<button class="editKeyWord" dataIndex="'+p+'"><i class="iconfont icon-xiugai"></i> 修改</button>'
+	                                +'</div>'
+	                     
+	                    if(modifyFlag&&i==kws_index){
+	                        kwsHtml +='<div class="modify" style="display:block;">'
+	                        if(not_kws.length>0){
+	                            notkeylth = not_kws.length;
+	                        }
+	                    }else{
+	                        kwsHtml +='<div class="modify" style="display: none;">'
+	                    }
+	                    kwsHtml +='<textarea name="" rows="1" placeholder="" maxlength="20">'+_keyArr[i]["key"].join(" ")+'</textarea>'
+	                                +'<button class="addAdjunctWord" onclick="toappendkey(this)">添加 附加词 <i class="appendkey hide">(0)</i></button>'
+	                                +'<button class="addExclusion" onclick="tonotkey(this)">'+nk_remark+' 排除词 <i class="notkey '+nk_showClass+'">('+notkeylth+')</i></button>'
+	                                +'<button class="deleteKey" onclick="deleteKey(this)">删除</button>'
+	                                +'<button class="ascertainKey" dataIndex="'+p+'" onclick="saveK(this)">确定</button>'
+	                                +'</div>'
+	                                +'</li>'
+						$(kwsHtml).prependTo(".showKeyWord ul");
+						p = parseInt(p) + 1;
+	                }
+					//}
+				}else{
+					weui.toast('导入失败', {
+		                duration: 2000,
+		                className: 'custom-toast',
+		                callback: function () { console.log('close') }
+		            });
+				}
+				try{
+					JyObj.checkLab()//刷新搜索首页和订阅首页
+					sessionStorage.reloadHomePage = true;
+					sessionStorage.reloadSubPage = true;
+				}catch(e){}
+            }
+        });
+    })
+    // 关键词分类 - 取消按钮点击事件
+    $('.classify-fast-pop .dialog__btn_cancel').on('click', function() {
+        $('.classify-fast-pop').hide();
+    })
     //
 
     $('.classify-edit-pop .classify-keyword').bind('input propertychange', function() {
@@ -310,12 +372,18 @@ var reloadFunc = function(){
             saveData('SC')
 			kws_name = "";
             a_items[classify_index]["s_item"] = classify_name;
+			setTimeout(function(){
+				doSessionData();
+			},300)
         }
     })
 
     // 关键词分类 - 取消按钮点击事件
-    $('.classify-edit-pop .dialog__btn_cancel').on('click', function() {
-        $('.classify-edit-pop').hide()
-        $('input.classify-keyword').val('')
+    $('.classify-edit-pop .dialog__btn_cancel').unbind('tap').on('tap', function() {
+		setTimeout(function(){
+        	$('.classify-edit-pop').hide()
+       	 	$('input.classify-keyword').val('')
+		},300)
+		return true;
     })
 }

+ 73 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/mapArea.js

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

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

@@ -30,7 +30,7 @@
 var flags = [false, false, false, false, false];
 function checkAll() {
     for (f in flags) {
-        if (f==2) continue
+        //if (f==2) continue
         if (!flags[f]) {
             isDisabled(false);
             return;

+ 114 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/share.js

@@ -0,0 +1,114 @@
+function initShare(signature){
+	var myloc = window.location.host;
+	var ors = "";
+	if("https:"==document.location.protocol){
+		ors = "s"
+	}
+	myloc="http"+ors+"://"+myloc;
+	if(typeof(signature) != "undefined" && signature != null && 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: ['onMenuShareTimeline', 'onMenuShareAppMessage','onMenuShareQQ','onMenuShareQZone','closeWindow'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+		});
+		var randShareTitle = getShareText();
+
+		var link = myloc+"/swordfish/about";
+
+		var otherLink = link;
+		var desc = "全国招标信息免费看,不遮挡";
+		var otherDesc = desc;
+		var url = "/wxswordfish/images/small_log_new.jpg";
+		var encryptid = "";
+		var subhref = window.location.href;
+		
+		wx.ready(function () {
+			var triggerFlag = false;
+	        wx.onMenuShareTimeline({
+			    title: randShareTitle, // 分享标题
+			    link: otherLink, // 分享链接
+			    imgUrl: myloc+'/wxswordfish/images/small_log_new.jpg', // 分享图标
+				trigger: function (res) {
+					try{
+						triggerFlag = true;
+						afterShareTimeline("trigger");
+					}catch(e){}
+                },
+			    success: function () {
+					if(!triggerFlag){
+						try{
+							afterShareTimeline("success");
+						}catch(e){}
+					}
+			       //alert('分享成功');
+			    },
+			    cancel: function () {
+					if(!triggerFlag){
+						try{
+							afterShareTimeline("cancel");
+						}catch(e){}
+					}
+			       //alert('分享失败,或用户取消了');
+			    }
+			});
+			wx.onMenuShareAppMessage({
+			    title: randShareTitle, // 分享标题
+			    desc: desc, // 分享描述
+			    link: link, // 分享链接
+			    imgUrl: myloc+url, // 分享图标
+			    type: 'link', // 分享类型,music、video或link,不填默认为link'
+			    dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
+			    success: function () {
+			        //alert('分享成功');
+			    },
+			    cancel: function () {
+					//alert('分享失败,或用户取消了');
+			    }
+			});
+			wx.onMenuShareQQ({
+				title: randShareTitle, // 分享标题
+				desc: otherDesc, // 分享描述
+				link: otherLink, // 分享链接
+				imgUrl: myloc+url, // 分享图标
+				success: function () {
+					// 用户确认分享后执行的回调函数
+				},
+				cancel: function () {
+					// 用户取消分享后执行的回调函数
+				}
+			});
+			wx.onMenuShareQZone({
+			    title: randShareTitle, // 分享标题
+				desc: otherDesc, // 分享描述
+				link: otherLink, // 分享链接
+				imgUrl: myloc+url, // 分享图标
+				success: function () {
+					// 用户确认分享后执行的回调函数
+				},
+				cancel: function () {
+					// 用户取消分享后执行的回调函数
+				}
+			});
+	    });
+		wx.error(function(res){
+		    // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
+			//alert("error auth");
+		});
+	}
+}
+//随机获取分享文案
+var ShareText = [
+	"我和投标伙伴都在用剑鱼标讯找项目,推荐你也试试",
+	"我用剑鱼标讯免费查到超多招标信息,推荐你也试试",
+	"我收到了剑鱼标讯免费推送的招标信息,推荐你也试试",
+	"发现了一个投标神器,推荐你也试试"
+]
+function getShareText(){
+	var Range = ShareText.length-1;
+	var Rand = Math.random();  
+	var num = Math.round(Rand * Range);
+	return ShareText[num];
+}

+ 188 - 26
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js

@@ -73,7 +73,7 @@ $(function () {
     }
 
     // 新增求值 ---- 统计数量,不做视图操作
-    function getResult(callback) {
+    function getResult0(callback) {
         if (areaData.data.buyset.areacount === -1) {
             $('.result_text.add_new .added-info').hide()
             return
@@ -86,7 +86,7 @@ $(function () {
         
         // 已购买省份改变的数量
         let dBuySetProvinceCount = 0
-        // 已购买省份改变的数量
+        // 新增省份改变的数量
         let dAddedProvinceCount = 0
         
         // 已购买城市改变的数量
@@ -192,21 +192,165 @@ $(function () {
             isLockedTipButtons(false)
         }
     }
+	
+	
+	
+	// 新增求值 ---- 统计数量,不做视图操作
+	function getResult(callback) {
+	    if (areaData.data.buyset.areacount === -1) {
+	        $('.result_text.add_new .added-info').hide()
+	        return
+	    }
+	    // 升级新增清空
+	    $('.result_text.add_new .added-info').text('')
+	
+	    let isWholeSelected = $('.tab.whole input').is(':checked')
+	    let isWholeDisabled = $('.tab.whole input').prop('disabled')
+	    
+	    // 已购买省份改变的数量
+	    let dBuySetProvinceCount = 0
+	    // 新增省份改变的数量
+	    let dAddedProvinceCount = 0
+	    
+	    // 已购买城市改变的数量
+	    let dBuySetCityCount = 0
+	    // 新增城市的数量
+	    let dAddedCityCount = 0
+	    $('.area-list li:not(.index)').each(function(i, dom){
+	        if ($(dom).children('.tab').hasClass('whole')) return true
+	        // 统计非全国的数量
+	        // 没有'data-buy-city-count'属性的 $(dom).attr('data-buy-city-count') 为undefined
+	        if ($(dom).attr('data-buy-city-count')) {
+	            /********  此处判断的是已购买的城市下的  ********************/
+	            // 获取购买城市的数量
+	            let buyCount = $(dom).attr('data-buy-city-count') - 0   // 隐式转换成Number
+	            // 获取城市不可点击的数量
+	            let alreadySelectedCount = $(dom).find('button[disabled]').length
+	            // 选择城市的数量(包括不可点击的)
+	            let hasActiveCount = $(dom).find('button.active').length
+				let allCitylength = $(dom).find('button').length
+	
+	            if (hasActiveCount > buyCount) {
+					if (alreadySelectedCount - hasActiveCount === 0) {
+						dBuySetCityCount += buyCount
+						dBuySetProvinceCount ++
+					} else if (allCitylength === hasActiveCount) {
+						// 如果选中全省,则多修改
+						dBuySetCityCount += buyCount
+						dAddedProvinceCount ++
+					} else {
+						dBuySetCityCount += buyCount
+						dAddedCityCount += (hasActiveCount - buyCount)
+					}
+	            } else {
+	                // 操作已购买的数量
+	                dBuySetCityCount += hasActiveCount
+	            }
+	        } else {
+	            // 是不是直辖市或自治区,在有data-buy-count没必要判断
+	            let hasCities = $(dom).find('.tab').hasClass('municipality')
+	            // 是否购买过该省份(还需要判断该省份下面的城市是否全部disabled --- 同时满足才算购买过全省)
+	            let provinceInput = $(dom).find('input')
+	            // 循环着的当前的省份是否可选 和 是否被选中
+	            let isBoughtProvince = provinceInput.prop('disabled')
+	            let isChecked = provinceInput.is(':checked')
+	
+	            // 可得到已经购买的省份的数量(循环完成后可得到,循环过程中的值可能不全)
+	
+	            // 判断是否为购买过的城市
+	            if (isBoughtProvince) {
+	                // 将已购买(选中但不能单击的)城市选中
+	                if (isChecked) {
+	                    dBuySetProvinceCount ++
+	                }
+	            } else {
+	                // 判断是否是直辖市或自治区(省份下面没有城市的和有城市的分开计算)
+	                if (hasCities) {
+	                    // 直辖市、自治区 -----直接进行省份的操作
+	                    // 并且没有购买过该省的,并且选中的
+	                    if (isChecked) {
+	                        dAddedProvinceCount ++
+	                    }
+	                } else {
+	                    // 带有市的省份城市(该省份下以前没有购买过任何城市)
+	                    // 两种情况:1. 全选    2. 不全选
+	                    let allCityLength = $(dom).find('button').length
+	                    let otherTotalAddCount = $(dom).find('button.active').length
+	
+	                    if (allCityLength === otherTotalAddCount && isChecked) {
+	                        // 选中了省份下的所有城市
+	                        dAddedProvinceCount ++
+	                    } else {
+	                        // 对城市做新增操作
+	                        dAddedCityCount += otherTotalAddCount
+	                    }
+	                }
+	            }
+	        }
+	    })
+	
+	    // 循环完成判断已经选择的省份数量 是否 大于购买过的数量
+	    if (dBuySetProvinceCount + dAddedProvinceCount > alreadyBuy.province.totalCount) {
+	        // 如果已选择的数量和新增的数量大于已购买过的数量,说明我有购买新的城市
+	        dAddedProvinceCount -= (alreadyBuy.province.totalCount - dBuySetProvinceCount)
+	        dBuySetProvinceCount = alreadyBuy.province.totalCount
+	    } else {
+	        dBuySetProvinceCount += dAddedProvinceCount
+	        dAddedProvinceCount = 0
+	    }
+	
+	    // 已购买城市下选项改变,状态更新
+	    alreadyBuy.city.selectedCount = dBuySetCityCount
+	    newlyAdded.city = dAddedCityCount
+	
+	    alreadyBuy.province.selectedCount = dBuySetProvinceCount
+	    newlyAdded.province = dAddedProvinceCount
+	
+	    callback && callback()
+	
+	    setDataInResult()
+	
+	    // 全国被选中了
+	    if (isWholeSelected && !isWholeDisabled) {
+	        $('.result_text.add_new .added-info').text('全国')
+	        $('.result_text.add_new').show()
+	        isLockedTipButtons(false)
+	    }
+	}
+	
+	
 
     function setDataInResult() {
         let buySetInfo = {
-            p: `省级区域${alreadyBuy.province.selectedCount}/${alreadyBuy.province.totalCount}、`,
+            p: `省级区域${alreadyBuy.province.selectedCount}/${alreadyBuy.province.totalCount}`,
             c: `地市${alreadyBuy.city.selectedCount}/${alreadyBuy.city.totalCount}`
         }
         let addedInfo = {
-            p: `省级区域 ${newlyAdded.province}、`,
+            p: `省级区域 ${newlyAdded.province}`,
             c: `地市 ${newlyAdded.city}`
         }
 
         // 修改数量并进行重新赋值
-        $('.result_text.already .buy-set-info').text(buySetInfo.p + buySetInfo.c)
+		if (alreadyBuy.city.totalCount === 0) {
+			// 只买了省级区域
+			$('.result_text.already .buy-set-info').text(buySetInfo.p)
+		} else if (alreadyBuy.province.totalCount === 0){
+			// 只买了市
+			$('.result_text.already .buy-set-info').text(buySetInfo.c)
+		} else {
+			$('.result_text.already .buy-set-info').text(`${buySetInfo.p}、${buySetInfo.c}`)
+		}
+        
         // 升级新增赋值
-        $('.result_text.add_new .added-info').text(addedInfo.p + addedInfo.c)
+		if (newlyAdded.city === 0) {
+			// 只买了省级区域
+			$('.result_text.add_new .added-info').text(`${addedInfo.p}`)
+		} else if (newlyAdded.province === 0){
+			// 只买了市
+			$('.result_text.add_new .added-info').text(`${addedInfo.c}`)
+		} else {
+			$('.result_text.add_new .added-info').text(`${addedInfo.p}、${addedInfo.c}`)
+		}
 
         if (newlyAdded.province !== 0 || newlyAdded.city !== 0) {
             $('.result_text.add_new').show()
@@ -228,6 +372,7 @@ $(function () {
                 // '吉林': 1
             }
         }
+		let allDisabledButHasCityCount = {}
         // 购买过的省份数量
         let buySetProvinceCount = $('.area-list').attr('data-buy-province-count') - 0  // 隐式转换成Number
         
@@ -245,6 +390,7 @@ $(function () {
                 let pName = $(dom).find('.province').text().replace(/\s+ | [\r\n]/g, '')
                 // 获取当前dom下有几个按钮有active样式(点亮和灰色按钮的总数)
                 let activeButtonLength = $(dom).find('button.active').length
+				let allCitylength = $(dom).find('button').length
 
                 // 判断该省是否有购买过的城市
                 if ($(dom).attr('data-buy-city-count')) {
@@ -258,6 +404,12 @@ $(function () {
 						// 说明有购买的城市
 						if (activeButtonLength - alreadySelectedCount === 0) {
 							added.province ++
+							allDisabledButHasCityCount[pName] = buyCityCount
+						} else if (activeButtonLength === allCitylength) {
+							// if(alreadySelectedCount < activeButtonLength){
+							// 	allDisabledButHasCityCount[pName] = buyCityCount
+							// }
+							added.province ++
 						} else {
 							added.city[pName] = aCityCount
 						}
@@ -291,7 +443,7 @@ $(function () {
         } else {
             added.province = 0
         }
-        return added
+        return { added, allDisabledButHasCityCount }
     }
 
     // 点亮的城市数量详情(需要省和城市名称)
@@ -322,23 +474,12 @@ $(function () {
                 } else {
                     let allCitylength = $(dom).find('button').length
 
-                    if (state === 'disabled') {
+                    if (state === 'notDisabled') {
                         // 判断是否全省被选中
-                        if ($(dom).find('button.active').length === allCitylength) {
-                            // 判断省下有没有不可点击的按钮
-                            if ($(dom).attr('data-buy-city-count')) {
-                                $(dom).find('button.active').each(function(c, dom) {
-                                    let cName = $(dom).text().replace(/\s+ | [\r\n]/g, '')
-                                    selectedObj.children.push(cName)
-                                })
-                                if (selectedObj.children.length) {
-                                    arr.push(selectedObj)
-                                }
-                            } else {
-                                arr.push(selectedObj)
-                            }
+                        if ($(dom).find('button.active:not([disabled])').length === allCitylength) {
+                            arr.push(selectedObj)
                         } else {
-                            $(dom).find('button.active').each(function(c, dom) {
+                            $(dom).find('button.active:not([disabled])').each(function(c, dom) {
                                 let cName = $(dom).text().replace(/\s+ | [\r\n]/g, '')
                                 selectedObj.children.push(cName)
                             })
@@ -348,10 +489,10 @@ $(function () {
                         }
                     } else {
                         // 判断是否全省被选中
-                        if ($(dom).find('button.active:not([disabled])').length === allCitylength) {
+                        if ($(dom).find('button.active').length === allCitylength) {
                             arr.push(selectedObj)
                         } else {
-                            $(dom).find('button.active:not([disabled])').each(function(c, dom) {
+                            $(dom).find('button.active').each(function(c, dom) {
                                 let cName = $(dom).text().replace(/\s+ | [\r\n]/g, '')
                                 selectedObj.children.push(cName)
                             })
@@ -443,7 +584,7 @@ $(function () {
         }
         getResult()
     }
-
+	
     function isLockedTipButtons(f) {
         $('.tips_btn button').prop('disabled', f)
     }
@@ -760,7 +901,8 @@ $(function () {
     $('.save-btn').on('click', function(){
         // 获取added城市详情
         var activeCityDetail = getActiveCityDetail()
-        let areaCount = getResultWithMCount()
+        let areaCount = getResultWithMCount().added
+		let lastSet = getResultWithMCount().allDisabledButHasCityCount
 //      console.log("111",areaCount)
 //      console.log(JSON.stringify(activeCityDetail))
 //      console.log(activeCityDetail)
@@ -770,8 +912,28 @@ $(function () {
         sessionStorage.vipSubSelectCity = newlyAdded.city;
         sessionStorage.vipSubSelectAreaUpgrade = JSON.stringify(activeCityDetail);
         sessionStorage.vipSubSelectAreaAdd = JSON.stringify(areaCount);
+		sessionStorage.vipallDisabledButHasCityCount = JSON.stringify(lastSet);
+		//
+		if(areaCount.country === 0){
+			if(areaCount.province === 0 && checkObj(areaCount.city)){
+				sessionStorage.removeItem("vipSubSelectAreaUpgrade");
+			}
+		}
+				
         history.go(-1);
     })
+	
+	function checkObj(obj) {
+	    //检验数组
+	    if (Array.prototype.isPrototypeOf(obj) && obj.length === 0) {
+	        return true;
+	    }
+	    //检验对象
+	    if (Object.prototype.isPrototypeOf(obj) && Object.keys(obj).length === 0) {
+	        return true;
+	    }
+	    return false;
+	}
 	//
 	if(sessionStorage.vipSubSelectAreaUpgrade!==undefined&&sessionStorage.vipSubSelectAreaUpgrade!==""){
 		let areaObj = JSON.parse(sessionStorage.vipSubSelectAreaUpgrade);

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

@@ -0,0 +1,786 @@
+$(function () {
+    //项目匹配开关
+    var checkedflag = true;
+
+    function setprojectmatch(index) {
+        if (checkedflag) {
+            checkedflag = false;
+            $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
+                if (r.flag) {
+                    checkedflag = true;
+                    reqData.projectmatch = index;
+                    sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
+                }
+            })
+        }
+    }
+
+    function flushSubtotal(list) {
+        var returnHtml = "";
+        for (var i = 0; i < list.length; i++) {
+            var showTime = new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
+            var typeName = "";
+            if (list[i].type === 1) {
+                typeName = "续费"
+            } else if (list[i].type === 0) {
+                typeName = "升级"
+            }
+            var showArea = "";
+            if (list[i].buyset.areacount === -1) {
+                showArea = "全国"
+            } else {
+                if (list[i].buyset.areacount > 0) {
+                    showArea = list[i].buyset.areacount + "个省";
+                }
+                if (list[i].buyset.citys.length > 0) {
+                    var cityCount = 0;
+                    for (var j = 0; j < list[i].buyset.citys.length; j++) {
+                        cityCount += list[i].buyset.citys[j];
+                    }
+                    if (list[i].buyset.areacount > 0) showArea += "、";
+                    showArea += cityCount + "个市";
+                    if (list[i].buyset.citys.length > 1) {
+                        showArea += "(分布在" + list[i].buyset.citys.length + "个省内)"
+                    }
+                }
+            }
+            var industryShow = "";
+            if (list[i].buyset.buyerclasscount === -1) {
+                industryShow = "全行业"
+            } else {
+                industryShow = list[i].buyset.buyerclasscount + "个行业";
+            }
+            returnHtml += "<li class=\"list-item\">"
+                + "<div class=\"item-top\">"
+                + "<div class=\"item-header\">"
+                + "<span class=\"header-label\">有效日期:</span>"
+                + "<span class=\"header-content ellipsis\">" + showTime + "</span>"
+                + "</div>"
+                + "<div class=\"item-body\">"
+                + "<div class=\"b-item body-area\">"
+                + "<div class=\"body-area-title text-title\">区域</div>"
+                + "<div class=\"body-area-sub\">" + showArea + "</div>"
+                + "</div>"
+                + "<div class=\"b-item body-industry\">"
+                + "<div class=\"body-industry-title text-title\">采购单位行业</div>"
+                + "<div class=\"body-industry-sub\">" + industryShow + "</div>"
+                + "</div>";
+            if (typeName != "") {
+                returnHtml += "<div class=\"vp-type\">"
+                    + "<div class=\"vp-type-text\">" + typeName + "</div>"
+                    + "</div>"
+            }
+
+            returnHtml += "</div>"
+                + "</div>"
+                + "<div class=\"item-footer\">"
+                + "<span class=\"footer-label\">小计:</span>"
+                + "<span class=\"footer-content text-title\">¥" + formatMoney(list[i].price) + "</span>"
+                + "</div>"
+                + "</li>"
+        }
+        $(".list-content").html(returnHtml);
+    }
+
+    function getDataWitXHR() {
+        $DoPost('/subscribepay/vipsubscribe/getSubBuyMsg', {}, function (res) {
+            if (!res.success) return;
+            res.data.oldArea = res.data.area;
+            res.data.oldIndustry = res.data.industry;
+
+            var globalStateStr = JSON.stringify(res.data);
+            sessionStorage.setItem('sub_vip_state', globalStateStr);
+            sessionStorage.setItem('vip_index_read', true);
+            globalState = JSON.parse(globalStateStr);
+            sessionStorage.removeItem("vip_change_time");
+            init(res.data)
+        })
+    }
+
+
+    // 设置已选择的区域和行业
+    function setSelectedAreaAndInd(selected) {
+        // buySet = {
+        //     areacount: 2,
+        //     buyerclasscount: 2,
+        //     newcitys: []
+        // }
+        // 设置已选择区域
+        var citySum = arrSum(selected.citys);
+        var text = {
+            p: selected.areacount === 0 ? '' : selected.areacount + '个省',
+            c: citySum === 0 ? '' : citySum + '个市',
+            s: selected.citys.length === 1 ? '' : '(分布在' + selected.citys.length + '个省内)'
+        };
+
+        if (selected.areacount === -1) {
+            $('.vip-body .area .selected-area').text('全国')
+        } else {
+            var dunhao = '';
+            if (citySum !== 0 && selected.areacount !== 0) {
+                dunhao = '、'
+            }
+            if (citySum === 0 || citySum === 1) {
+                text.s = ''
+            }
+            $('.vip-body .area .selected-area').text(text.p + dunhao + text.c + text.s);
+        }
+
+        // 设置已选择行业
+        if (selected.buyerclasscount === -1) {
+            $('.vip-body .industry .selected-industry').text('全行业')
+        } else {
+            $('.vip-body .industry .selected-industry').text(selected.buyerclasscount + '个行业')
+        }
+    }
+
+
+    // 设置已购买的区域和行业
+    function setBuyAreaAndInd(buySet) {
+        // 设置已购买区域
+        var buySetCitySum = arrSum(buySet.newcitys)
+        var text = {
+            p: buySet.areacount === 0 ? '' : buySet.areacount + '个省',
+            c: buySetCitySum === 0 ? '' : buySetCitySum + '个市',
+            s: buySet.newcitys.length === 1 ? '' : '(分布在' + buySet.newcitys.length + '个省内)'
+        }
+
+        if (buySet.areacount === -1) {
+            $('.vip-body .area .buy-set-area').text('全国')
+        } else {
+            var dunhao = '';
+            // 如果省或者市都不为0,则添加顿号
+            if (buySetCitySum !== 0 && buySet.areacount !== 0) {
+                dunhao = '、'
+            }
+            // 如果市等于0或者1,text.s不需要显示
+            if (buySetCitySum === 0 || buySetCitySum === 1) {
+                text.s = ''
+            }
+            $('.vip-body .area .buy-set-area').text(text.p + dunhao + text.c + text.s);
+        }
+
+        // 设置已选择行业
+        if (buySet.buyerclasscount === -1) {
+            $('.vip-body .industry .buy-set-industry').text('全行业')
+        } else {
+            $('.vip-body .industry .buy-set-industry').text(buySet.buyerclasscount + '个行业')
+        }
+    }
+
+    function showTimeOut(endTime, isTrail) {
+        var timeSub = endTime * 1000 - new Date().getTime();
+        if (timeSub > 0 && timeSub < 60 * 60 * 24 * 1000 * 3) {
+            var hours = Math.floor(timeSub / (60 * 60 * 1000));
+            var day = Math.floor(hours / 24);
+            if (day > 0) {
+                if (!isTrail) {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务还有" + (day + 1) + "天到期,请及时续费!");
+                } else {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务还有" + (day + 1) + "天到期,请及时购买!");
+                }
+            } else {
+                if (!isTrail) {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务今天到期,请及时续费!");
+                } else {
+                    $(".vip-header .expire-remind .remind-text").text("VIP订阅服务今天到期,请及时购买!");
+                }
+            }
+            $(".vip-header .expire-remind").show();
+        }
+    }
+
+
+    function arrSum(arr) {
+        var sum = 0
+        arr.forEach(function (item, i) {
+            sum += item
+        })
+        return sum
+    }
+
+    // picker的显示隐藏
+    function pickerShow(selector, f) {
+        if (f) {
+            // 添加进场动画,并显示
+            $(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
+            $(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
+            $(selector).show(300);
+        } else {
+            // 添加离场动画,并隐藏
+            $(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
+            $(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
+            $(selector).hide(300);
+        }
+    }
+
+    // 项目匹配问号点击事件
+    $('.project-match .icon-bangzhu').on('click', function () {
+        var str = '开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。'
+        weui.alert(str, {
+            title: '项目匹配',
+            className: 'jy-alert',
+            buttons: [{
+                label: '我知道了'
+            }]
+        });
+    })
+
+    // 计算标准点击事件
+    $('.billing-list-btn').on('click', function () {
+        pickerShow('.billing-list-container', true)
+    })
+    // 计算标准隐藏
+    $('.billing-list-container .dialog_hd__close').on('click', function () {
+        pickerShow('.billing-list-container', false)
+    })
+    $('.weui-mask').on('click', function () {
+        pickerShow('.billing-list-container', false)
+    })
+
+    $('.close-expire-remind').on("click", function () {
+        $(".expire-remind").hide();
+    });
+    // 阅读并接受协议前的模拟checkbox点击事件
+    if (sessionStorage.getItem("vip_index_read") === "true") {
+        $('.checkbox').addClass("checked");
+        $('.vip-footer.upgrade .confirm').prop('disabled', false);
+    }
+    $('.checkbox').on('click', function () {
+        $(this).toggleClass('checked');
+        var state = $(this).hasClass('checked');
+        $('.vip-footer.upgrade .confirm').prop('disabled', !state);
+        sessionStorage.setItem("vip_index_read", state ? true : false);
+    });
+
+    // switch点击切换
+    $('.switch').on('click', function (e) {
+        var $this = $(this);
+        var hasChecked = $this.hasClass('checked');
+
+        if (!hasChecked) {
+            $this.addClass('checked');
+            setprojectmatch(1);
+        } else {
+            $this.removeClass('checked');
+            setprojectmatch(0);
+            weui.toast('项目匹配已关闭', {
+                duration: 1500,
+                className: 'jy-toast',
+                callback: function () {
+                    console.log('close')
+                }
+            });
+        }
+    })
+
+    //返回提示使用
+    function pushHistory() {
+        if (!window.history.state) {
+            window.history.pushState({
+                title: "title",
+                url: "#"
+            }, "title", "#");
+        }
+    }
+
+
+    function initBack(module) {
+        pushHistory();
+        //weui.toast(module);
+        $('.vip-footer .button-l.reset').off("click").on("click", function () {
+            //cancelTip(module);
+            window.history.back();
+        });
+        setTimeout(function () {
+            window.addEventListener("popstate", function (e) {
+                //如果订单计费清单显示,则关闭清单;
+                if ($(".billing-list-container").css("display") !== "none" && module === 2) {
+                    pickerShow('.billing-list-container', false);
+                    pushHistory();
+                } else {//提示是否保存
+                    if (!noshow) {
+                        cancelTip(module);
+                    }
+                    //pushHistory();
+                }
+            }, false);
+        }, 500);
+    }
+
+    var $dialog;
+
+    //保存取消提示 module 1 修改 2升级 3续费 4购买
+    function cancelTip(module) {
+        var content = "";
+        var labName = "";
+        if (module === 1) {
+            content = "所选订阅设置已做修改,返回后修改的设置将不做保存。";
+            labName = "保存修改";
+        } else if (module === 2) {
+            content = "所选订阅设置已超出购买范围,升级后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即升级"
+        } else if (module === 3) {
+            content = "所选订阅设置已超出购买范围,续费后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即续费"
+        } else {
+            content = "所选订阅设置已超出试用范围,购买后方才生效,返回后修改的设置将不做保存。";
+            labName = "立即购买"
+        }
+
+        $dialog = weui.dialog({
+            title: '提示信息',
+            content: content,
+            className: 'jy-dialog',
+            buttons: [
+                {
+                    label: labName,
+                    type: 'primary',
+                    onClick: function () {
+                        doSubmit();
+                    }
+                },
+                {
+                    label: '取消',
+                    type: 'default',
+                    onClick: function () {
+                        clearSessionStorage();
+                        //window.history.go(-1);
+                        window.location.reload();
+                    }
+                }
+            ]
+        });
+    }
+
+    //展示订阅周期时间
+    function flushShowTime(isTrial, changeValue, startValue, endValue) {
+        if (isTrial) {
+            sessionStorage.removeItem("vip_trial_buy");
+        }
+        var dEnd;
+        if (isTrial && changeValue) {
+            // 初始化订阅周期
+            endValue = new Date().getTime() / 1000;
+            startValue = new Date().getTime() / 1000;
+        }
+        if (changeValue) {
+            var afterEndTime;
+            if (isTrial) {
+                $(".body-item.cycle .tip").text("购买订阅周期" + changeValue).show();
+            } else {
+                $(".body-item.cycle .tip").text("延长订阅周期" + changeValue).show();
+            }
+            if (changeValue.indexOf("月") > -1) {
+                var monthNum = parseInt(changeValue.replace("个月", ""));
+                afterEndTime = getVipEndDate(2, monthNum, endValue);
+                changeTime = [monthNum, 2]
+            } else {
+                var yearNum = parseInt(changeValue.replace("年", ""));
+                afterEndTime = getVipEndDate(1, yearNum, endValue);
+                changeTime = [yearNum, 1]
+            }
+            dEnd = new Date(afterEndTime * 1000).pattern('yyyy年MM月dd日');
+        } else {
+            dEnd = new Date(endValue * 1000).pattern('yyyy年MM月dd日')
+        }
+        var dStart = new Date(startValue * 1000).pattern('yyyy年MM月dd日');
+        var sDuration = dStart + ' - ' + dEnd;
+        $('.body-item.cycle .buy-cycle').text(sDuration);
+    }
+
+    function initCycleSelector() {
+        $('.vip-body .body-item.cycle').on('click', function () {
+            pickerShow('#time_cycle', true)
+        })
+        // 打开dialog
+        $('#time_cycle .weui-mask').on('click', function () {
+            pickerShow('#time_cycle', false)
+        })
+        // 关闭dialog
+        $('#time_cycle .box_hd .cancel').on('click', function () {
+            pickerShow('#time_cycle', false)
+        })
+
+        // 选择完成(确定)按钮的点击事件
+        $('#enter_period').on('click', function () {
+            var checkedValue = $('#time_cycle input:radio[name="time"]:checked').val();
+            var result = null
+            if (checkedValue == 'month') {
+                result = $('#number_box_month .month_number').text() + '个月'
+            } else if (checkedValue == 'year') {
+                result = $('#number_box_year span.active').attr('data-id') + '年'
+            }
+            $('.vip-body .extend-cycle').show().text('延长订阅周期' + result)
+            pickerShow('#time_cycle', false)
+        })
+
+
+        // 1. 对订阅时间选择的input绑定点击事件
+        $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+            // 解除确认按钮的锁定
+            $('#time_cycle .form-btn button').removeAttr('disabled')
+            if ($(e.target).hasClass('monthly')) {
+                // 按月订阅
+                $('#number_box_month').addClass('active');
+                $('#number_box_year span').removeClass('active');
+            } else {
+                // 按年订阅
+                $('#number_box_month').removeClass('active');
+                // $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active');
+            }
+        })
+
+        /* --------控制月份number_box的事件  点击加减号触发的事件------- */
+        $('#number_box_month').on('click', 'button', function (e) {
+            // 点击加减号让input radio选中
+            $("#monthly").prop('checked', true);
+            $('#yearly').prop('checked', false);
+            $('.number_box span').removeClass('active')
+
+            $('#number_box_month').addClass('active');
+
+            var $number = $('#number_box_month span.month_number');
+            var $monthlyInput = $('#monthly');
+            // 未整理的data数组,里面的值都是字符串
+            var preData = e.delegateTarget.dataset
+            var currentNum = parseInt($number.text());
+            var data = {};
+            // 把字符串转换成数字
+            for (var i in preData) {
+                data[i] = preData[i] - 0
+            }
+
+            if (!$monthlyInput.prop('checked')) {
+                return
+            }
+            // 判断是点击的是+ 还是-
+            if ($(e.target).hasClass('add')) {
+                // 点的+
+                // currentNum = currentNum >= 12 ? 12 : currentNum + 1;
+                currentNum = currentNum >= data.numboxMax ? data.numboxMax : currentNum + data
+                    .numboxStep;
+            } else {
+                // 点的-
+                // currentNum = currentNum <= 1 ? 1 : currentNum - 1;
+                currentNum = currentNum <= data.numboxMin ? data.numboxMin : currentNum - data
+                    .numboxStep;
+            }
+            $number.text(currentNum)
+            var price = (5.8 * currentNum).toFixed(1);
+            $('.computed_price').html('¥' + price)
+            var firstButton = $('#number_box_month button:first')
+            var lastButton = $('#number_box_month button:last')
+            if (currentNum >= 10) {
+                $('.profit_tips').show()
+            } else {
+                $('.profit_tips').hide()
+            }
+            // 如果为操作后的结果为1,则锁定减号按钮
+            if (currentNum === data.numboxMin) {
+                firstButton.attr('disabled', true)
+            } else {
+                firstButton.removeAttr('disabled')
+            }
+            // 如果为操作后的结果为12,则锁定加号按钮
+            if (currentNum === data.numboxMax) {
+                lastButton.attr('disabled', true)
+            } else {
+                lastButton.removeAttr('disabled')
+            }
+        })
+
+        /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
+        $('#number_box_year').on('click', 'span', function (e) {
+            $('#number_box_month').removeClass('active');
+            console.log(e.target.dataset.id)
+            var id = e.target.dataset.id;
+            $('.profit_tips').hide()
+            $(this).addClass('active').siblings().removeClass('active')
+            $('#yearly').prop('checked', true);
+            $("#monthly").prop('checked', false);
+            // 渲染结果 保留一位小数
+            var result = (Number(id) * 58).toFixed(1);
+            $('.computed_price').html('¥' + result)
+        })
+
+        /* -------- 选择按月订阅  radio触发的事件------- */
+        $('#monthly').on('change', function (e) {
+            var isChecked = $(this).is(':checked')
+            var val = $('.month_number').text();
+            if (val >= 10) {
+                $('.profit_tips').show()
+            }
+            if (!isChecked) {
+                $('#number_box_month button').attr('disabled', true)
+            } else {
+                $('#number_box_month button').removeAttr('disabled')
+            }
+
+            if (val === 1) {
+                $('#number_box_month button:eq(0)').prop('disabled', true)
+            }
+            if (val === 12) {
+                $('#number_box_month button:eq(1)').prop('disabled', true)
+            }
+
+            var result = (Number(val) * 5.8).toFixed(1);
+            $('.computed_price').html('¥' + result)
+
+        })
+
+        /* -------- 选择按年订阅  radio触发的事件------- */
+        $('#yearly').on('change', function (e) {
+            $('.profit_tips').hide()
+            // console.log($(this).is(':checked'))
+            var isChecked = $(this).is(':checked')
+            // 按年订阅默认选择1年
+            var val = 1;
+            $('.computed_price').html('¥' + Number(val) * 58)
+            if (isChecked) {
+                $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
+            }
+        });
+
+    }
+
+    //提交请求
+    $('.vip-footer .button-r.confirm').on('click', function () {
+        $(this).attr("disabled", "disabled");
+        doSubmit();
+        $(this).removeAttr("disabled");
+    });
+    // 以下数据交互 -------------------
+    // 定义全部变量state
+    var globalState = {};
+    var changeTime = [];
+    var submitPrice = 0;
+    var selectTime = "";
+
+    function init(state) {
+        // init 已选择的区域和行业
+        var selectedAreaAndInd = getBuySet(state.area, state.industry);
+        setSelectedAreaAndInd(selectedAreaAndInd);
+        // 初始化,已购买的城市和行业
+        setBuyAreaAndInd(state.buyset);
+        //是否提示即将到期
+        showTimeOut(state.endTime, state.isTrial);
+
+        selectTime = sessionStorage.getItem("vip_change_time");
+        var endflag = state.endTime;
+        var stratFlag = state.startTime;
+        //刷新展示周期
+        flushShowTime(state.isTrial, selectTime, stratFlag, endflag);
+
+        // 初始化关键词
+        if (state.items.length === 0) {
+            $('.body-item.keywords .keywords-text').text('未分类')
+        } else {
+            var arr = []
+            state.items.forEach(function (item, index) {
+                arr.push(item['s_item'])
+            })
+            $('.body-item.keywords .keywords-text').text(arr.join('、'))
+        }
+
+        // 初始化信息类型
+        if (state.infotype.length === 0) {
+            $('.body-item.info-type .info-type-text').text('全部类型')
+        } else {
+            $('.body-item.info-type .info-type-text').text(state.infotype.join('、'))
+        }
+
+        // 推送设置初始化
+        var pushSettingMap = {
+            1: '实时推送',
+            2: '每日推送',
+            3: '每周推送',
+            4: '每月推送',
+        }
+        $('.body-item.push-setting .push-setting-text').text(pushSettingMap[state.ratemode])
+
+        // 初始化项目匹配
+        if (state.projectmatch) {
+            $('.switch').addClass('checked')
+        } else {
+            $('.switch').removeClass('checked')
+        }
+
+        //试用不展示续费
+        if (!state.isTrial) {
+            $(".vip-header .renew").show();
+        } else {
+            $(".vip-header .trail").show();
+        }
+
+    }
+
+
+    // 给订阅周期栏目绑定点击事件(订阅周期选择框显示与隐藏等各种操作)
+    //initCycleSelector()
+
+    var subVipState = sessionStorage.getItem('sub_vip_state');
+    var readcache = sessionStorage.getItem('index_read_cache');
+    var reqData = JSON.parse(subVipState);
+    if (readcache) {
+        sessionStorage.removeItem('index_read_cache');
+        init(reqData);
+        //判断是否修改
+        var IndustryNoChange = JSON.stringify(reqData.oldIndustry.sort()) === JSON.stringify(reqData.industry.sort());
+        var tmp1 = getAreaClassArr(reqData.oldArea);
+        var tmp2 = getAreaClassArr(reqData.area);
+        var areaNoChange = (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
+        if (IndustryNoChange && areaNoChange && changeTime.length === 0) {
+            return
+        }
+
+        //判断是否需要升级
+        var status = getUpgradeFinalStatus(getBuySet(reqData.area, reqData.industry), {
+            "areacount": reqData.buyset.areacount,
+            "buyerclasscount": reqData.buyset.buyerclasscount,
+            "citys": reqData.buyset.newcitys
+        }, changeTime, reqData.endTime, reqData.renewList, reqData.isTrial);
+
+        if (status[0] === -2) {
+            weui.toast('订单冲突', {
+                duration: 3000,
+                className: 'jy-toast',
+            });
+            return
+        }
+        if (status[0] === -1) {
+            //直接修改
+            $(".vip-footer.modify").show();
+            initBack(1);
+            return
+        }
+
+        //区域需要升级
+        if (status[1]) {
+            if (reqData.isTrial) {
+                $(".body-item.area .tip").text("需购买");
+            }
+            $(".body-item.area .tip-need-upgrade").show();
+        }
+        //行业需要升级
+        if (status[2]) {
+            if (reqData.isTrial) {
+                $(".body-item.industry .tip").text("需购买");
+            }
+            $(".body-item.industry .tip-need-upgrade").show()
+        }
+
+        if (status[0] > 0) {
+            //需要付钱
+            $(".vip-footer.upgrade").show();
+            //价格展示
+            $(".vip-footer.upgrade .billing-price").text("¥" + formatMoney(status[0]));
+            submitPrice = status[0] * 10000 / 100
+        }
+
+        if (reqData.isTrial) {//试用购买
+            if (changeTime.length === 0) {
+                //刷新展示时间
+                changeTime = [1, 2];//
+                flushShowTime(true, "1个月");
+                sessionStorage.setItem("vip_trial_buy", true);
+                selectTime = "1个月"
+            }
+            initBack(4);
+            $(".vip-footer.upgrade .confirm").text("立即购买");
+        } else if ((!status[1] && !status[2])) {//续费
+            initBack(2);
+        } else {//升级
+            //升级展示计价清单
+            if (!reqData.isTrial) {
+                $(".preview-label").text("需补差价:");
+                $(".billing-list-btn").text("计费清单");
+                $(".va-total-container .total-price").text("¥" + formatMoney(status[0]));
+                flushSubtotal(status[3]);
+                console.log("subtotail", status[3])
+            }
+            initBack(2);//升级
+        }
+
+    } else {
+        getDataWitXHR()
+    }
+
+
+    //保存 or 升级
+    var submited = false;
+    var noshow = false;
+
+    function doSubmit() {
+        if (submited) {
+            return
+        }
+        submited = true;
+        setTimeout(function () {
+            submited = false;
+        }, 1000);
+
+        //校验是否点击阅读条款
+        if (submitPrice > 0) {
+            if (!$('.checkbox').hasClass("checked")) {
+                weui.toast('请勾选服务条款', {
+                    duration: 1500,
+                    className: 'jy-toast',
+                });
+                $dialog.hide(function () {
+                });
+                return
+            }
+        }
+
+        $DoPost('/subscribepay/vipsubscribe/saveChange', {
+            "area": reqData.area["全国"] ? '{}' : JSON.stringify(reqData.area),
+            "industry": reqData.industry.join(","),
+            "payWay": "wx_app",
+            "time": selectTime,
+            "price": submitPrice
+        }, function (r) {
+            if (r.success) {
+                if (r.data.needPay) {
+                    //创建支付订单
+                    window.location.replace("/jyapp/vipsubscribe/toSelectPayWay?orderCode=" + r.data.code + "&price=" + submitPrice);
+                } else {
+                    //订阅修改
+                    if (r.data.doSuccess) {
+                        clearSessionStorage();
+                        window.history.go(-1);
+                        window.location.reload();
+                        noshow = true;
+                        //window.location.reload();
+                    } else {
+                        weui.toast('修改保存失败', {
+                            duration: 1500,
+                            className: 'jy-toast',
+                        });
+                    }
+                }
+            }
+        }, false);
+    }
+
+});
+
+function clearSessionStorage() {
+    sessionStorage.removeItem("sub_vip_state");
+    sessionStorage.removeItem("vip_index_read");
+    sessionStorage.removeItem("vip_change_time");
+    sessionStorage.removeItem("vip_trial_buy");
+
+    //续费页面缓存
+    sessionStorage.removeItem("vipSubSelectArea");
+    sessionStorage.removeItem("vipSubSelectIndustry");
+    sessionStorage.removeItem("vipSubSelectTime");
+    sessionStorage.removeItem("endTime");
+    sessionStorage.removeItem("payWay");
+
+}
+
+function toRead() {
+    sessionStorage.setItem('index_read_cache', '0');
+    window.location.href = "/jyapp/front/staticPage/wx-serviceterms.html";
+}

+ 1 - 1
src/jfw/modules/app/src/web/templates/common/js.html

@@ -1,2 +1,2 @@
 <script src="/jyapp/js/rem.js?v={{Msg "seo" "version"}}" type="text/javascript" charset="utf-8"></script>
-<script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}4"></script>
+<script src="/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>

+ 55 - 55
src/jfw/modules/app/src/web/templates/course/applyInvoice.html

@@ -188,7 +188,7 @@
 	<script src="/jyapp/course/js/jquery.min.js?v={{Msg "seo" "venrsion"}}"></script>
     <script src="/jyapp/course/js/weui.min.js?v={{Msg "seo" "venrsion"}}"></script>
     <script src="/jyapp/course/js/mapJSON.js?v={{Msg "seo" "venrsion"}}"></script>
-    <script src="/jyapp/course/js/drawabill.js?v={{Msg "seo" "venrsion"}}6"></script>
+    <script src="/jyapp/course/js/drawabill.js?v={{Msg "seo" "venrsion"}}67"></script>
 	<script src="/jyapp/js/common.js?v={{Msg "seo" "venrsion"}}3"></script>
 	<script type="text/javascript">
 		$(function(){
@@ -201,65 +201,65 @@
             window.addEventListener('pagehide', function () {
                 isPageHide = true;
             });
-            // 解决移动端软键盘弹起遮挡输入框及ios下软键盘关闭后底部留白问题
-            // scrollView('.textfield','.container')
-            // function scrollView(className,container) {
-            //     var u = navigator.userAgent, app = navigator.appVersion;
-            //     var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
+            //解决移动端软键盘弹起遮挡输入框及ios下软键盘关闭后底部留白问题
+            scrollView('.textfield','.container')
+            function scrollView(className,container) {
+                var u = navigator.userAgent, app = navigator.appVersion;
+                var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
             
-            //     var view_height = $(container).height()
-            //     function change() {
-            //         $(container).height(view_height)
-            //     }
-            //     // 给所有input绑定一个focus事件,用来判断键盘弹起。执行完成就解绑该事件
-            //     function focusOnce() {
-            //         $(className).on('focus', function(e) {
-            //             e.target.scrollIntoView({"block": "center"})
-            //             $(className).off('focus')
-            //         })
-            //     }
+                var view_height = $(container).height()
+                function change() {
+                    $(container).height(view_height)
+                }
+                // 给所有input绑定一个focus事件,用来判断键盘弹起。执行完成就解绑该事件
+                function focusOnce() {
+                    $(className).on('focus', function(e) {
+                        e.target.scrollIntoView({"block": "center"})
+                        $(className).off('focus')
+                    })
+                }
             
-            //     if (isAndroid) {
-            //         // 在安卓中键盘弹起会触发window.onresize事件
-            //         // ios中则不会触发window.resize事件
-            //         change();
-            //         window.addEventListener('resize', change);
-            //     } else {
-            //         // 进入页面绑定,触发一次就解绑
-            //         focusOnce()
-            //     }
+                if (isAndroid) {
+                    // 在安卓中键盘弹起会触发window.onresize事件
+                    // ios中则不会触发window.resize事件
+                    change();
+                    window.addEventListener('resize', change);
+                } else {
+                    // 进入页面绑定,触发一次就解绑
+                    focusOnce()
+                }
                 
                 
-            //     $(className).on('blur', function (e) {
-            //         setTimeout(function() {
-            //             var dom = document.activeElement;
-            //             if (dom.className.includes(className.replace(/\./g, ''))) {
-            //                 if (isAndroid) {
-            //                     dom.scrollIntoView({"block": "center"})
-            //                 } else {
-            //                     // dom.scrollIntoView({"block": "bottom"})
-            //                 }
-            //             } else {
-            //                 window.scroll(0, 0)
-            //                 // 当页面上没有获得焦点的input时候就说明键盘收起来了。
-            //                 // 给input绑定focus事件用来监听其弹起
-            //                 focusOnce()
-            //             }
-            //         }, 50)
-            //     })
-            // }
-            var winHeight = $(window).height();  //获取当前页面高度
-            $(window).resize(function () {
-                var thisHeight = $(this).height();
-                if (winHeight - thisHeight > 140) {   //原窗口减去改变后的窗口>140就隐藏底部fixed内容。
-                    //键盘弹出
-                    $('.bottom-container').hide();
-                } else {
-                    //键盘收起
-                    $('.bottom-container').show();
+                $(className).on('blur', function (e) {
+                    setTimeout(function() {
+                        var dom = document.activeElement;
+                        if (dom.className.includes(className.replace(/\./g, ''))) {
+                            if (isAndroid) {
+                                dom.scrollIntoView({"block": "center"})
+                            } else {
+                                // dom.scrollIntoView({"block": "bottom"})
+                            }
+                        } else {
+                            window.scroll(0, 0)
+                            // 当页面上没有获得焦点的input时候就说明键盘收起来了。
+                            // 给input绑定focus事件用来监听其弹起
+                            focusOnce()
+                        }
+                    }, 50)
+                })
+            }
+            // var winHeight = $(window).height();  //获取当前页面高度
+            // $(window).resize(function () {
+            //     var thisHeight = $(this).height();
+            //     if (winHeight - thisHeight > 140) {   //原窗口减去改变后的窗口>140就隐藏底部fixed内容。
+            //         //键盘弹出
+            //         $('.bottom-container').hide();
+            //     } else {
+            //         //键盘收起
+            //         $('.bottom-container').show();
                 
-                }
-            })
+            //     }
+            // })
             //
 			var orderCode = getParam("code");
 			

+ 1 - 1
src/jfw/modules/app/src/web/templates/course/course_detail.html

@@ -222,7 +222,7 @@
             if (cannotTriggerScroll) return;
             cannotTriggerScroll = true;
             var current = null;
-            scrollTop = $(this).scrollTop();
+            scrollTop = $(this).scrollTop() + 65;
             h2Ids.some(function (item, i) {
                 if (scrollTop < h2Ids[0].oTop) {
                     current = h2Ids[0];

+ 6 - 0
src/jfw/modules/app/src/web/templates/course/optionPay.html

@@ -45,6 +45,12 @@
     .course-toast .weui-toast__content {
       margin: 0;
     }
+	/*修复荣耀8预览凭证不显示问题*/
+	.weui-gallery__img {
+		display: inline-block;
+		width: 100%;
+		height: 100%;
+	}
 </style>
 <body>
 	<div class="app-layout-header">

+ 6 - 0
src/jfw/modules/app/src/web/templates/course/publicToPublic.html

@@ -47,6 +47,12 @@
         .bottom_btn{
             border-top: 1px solid rgba(0, 0, 0, 0.05);
         }
+		/*修复荣耀8预览凭证不显示问题*/
+		.weui-gallery__img {
+			display: inline-block;
+			width: 100%;
+			height: 100%;
+		}
 	</style>
 	<body>
 		<div class="app-layout-header">

+ 29 - 21
src/jfw/modules/app/src/web/templates/dataExport/dataExport_applyInvoice.html

@@ -263,6 +263,7 @@
                 }
                 
                 //软键盘弹起 
+				/*
 				var oHeight = $(document).height(); //浏览器当前的高度
 				var mainHeight=$("form").height();
 				
@@ -273,6 +274,7 @@
 					    $("#bottombox").css("position","fixed");
 					}
 			   	});
+				*/
             })
             $(document).on("click", ".fp", function() {
                 $.actions({
@@ -295,6 +297,13 @@
                                 $(".type").html("单位")
                                 $("#sieve").css("background-color","#90D5E1");
                                 $("#unit-info").show()
+								if(taxNumer_reg.test(taxNumer.value)&&companyName_reg.test(companyName.value)){
+						  	  		document.getElementById("sieve").style.backgroundColor="#2cb7ca" ;
+							   		document.getElementById("sieve").style.color="#fff" ;
+							    }else{
+							   		document.getElementById("sieve").style.backgroundColor="#90D5E1" ;
+							   		document.getElementById("sieve").style.color="#C8EAF0" ;
+							   }
                             }
                         }
                     ]
@@ -308,7 +317,6 @@
 				
 				var companyName = $("#companyName").val();
 				var taxNumer = $("#taxNumer").val();
-			
 				
 				if ($(".type").html() =="个人") {
 					submitBl =true;
@@ -317,27 +325,27 @@
 						submitBl =true;
 					}
 				}
-				if (submitBl){
+				if(submitBl){
 					$.post('/jypay/applyInvoice',formParam+"&demo-radio="+$(".type").html(),function(data){ 
-                        if(data.flag){
-                            //window.location.href="/jyapp/front/myorder/paySuccess/" + {{.T.order_code}}
-                            sessionStorage.applysuccess="1";
-                            sessionStorage.companyName=companyName;
-                            sessionStorage.taxNumer=taxNumer;
-                            if($(".type").html()=="单位"){
-                                sessionStorage.type="danwei";
-                            }else if($(".type").html()=="个人"){
-                                sessionStorage.type="geren";
-                            }
-                            sessionStorage.setItem("order_code_aai"+{{.T.order_code}},{{.T.order_code}});
-                            window.location.replace("/jyapp/front/myorder/paySuccess/" + {{.T.order_code}})
-                        }else{
-                            $("#tjsb").removeClass("disno");
-                            setTimeout(function () {
-                                $("#tjsb").addClass("disno");
-                            }, 2000);
-                        }
-                    })
+						if(data.flag){
+							//window.location.href="/jyapp/front/myorder/paySuccess/" + {{.T.order_code}}
+							sessionStorage.applysuccess="1";
+							sessionStorage.companyName=companyName;
+							sessionStorage.taxNumer=taxNumer;
+							if($(".type").html()=="单位"){
+								sessionStorage.type="danwei";
+							}else if($(".type").html()=="个人"){
+								sessionStorage.type="geren";
+							}
+							sessionStorage.setItem("order_code_aai"+{{.T.order_code}},{{.T.order_code}});
+							window.location.replace("/jyapp/front/myorder/paySuccess/" + {{.T.order_code}})
+						}else{
+							$("#tjsb").removeClass("disno");
+							setTimeout(function () {
+								$("#tjsb").addClass("disno");
+							}, 2000);
+						}
+					})
 				}
 			}
             

+ 2 - 2
src/jfw/modules/app/src/web/templates/dataExport/dataExport_invoiceSuccess.html

@@ -26,11 +26,11 @@
         </div>
     	</div>
 		<script>
-        	var i=5;
+        	var i=3;
 			$(function(){
 			 	setTimeout(function(){
 				 	window.location.href="javascript:history.go(-1)";
-				},5000);//5秒后返回首页
+				},3000);//3秒后返回首页
 				after();
 			});
 			//自动刷新页面上的时间

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

@@ -269,6 +269,7 @@
                 var all = $(".all span").attr("class");
                 if (all === "active"){
                     html = "全部";
+					htmls = "全部";
                 }
                 localStorage.subType = html;
                 localStorage.subTypes = htmls;

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

@@ -574,7 +574,7 @@
 					if (checkOrder_bl){
 						return;
 					}*/
-					window.location.href="/jyapp/vipsubscribe/renewPayPage?orderCode="+orderCode;   
+					window.location.href="/jyapp/vipsubscribe/vipsubscribe_renew?orderCode="+orderCode;   
 				}else if (pattern==2){
 					window.location.href="/jyapp/vipsubscribe/vipsubscribe_new?orderCode="+orderCode;
 				}
@@ -582,6 +582,9 @@
 			
 			//删除订单
 			function deleteOrder(id,obj,cancel) {
+					if (getParam("active")){
+					 	typ=getParam("active");
+					}
 			        $.confirm({
 			            title: '提示信息',
 			            content: '确定删除订单?',
@@ -590,13 +593,14 @@
 			                    text: '确定',
 			                    btnClass: 'btn-primary-0',
 			                    action: function() {
+									$(".loading_").show();
 			                        $.ajax({
 			                            type: "post",
 			                            url: "/subscribepay/orderListDetails/deleteOrder",
 			                            data: {"id":id,"pageNum":pageIndex,"type":typ},
 			                            dataType: 'json',
 			                            success: function(data){
-											console.log(data)
+											$(".loading_").hide();
 			                                if(data && data["success"]){
 			                                    var self = $(obj).parent().parent();
 			                                    var parent = self.parent();
@@ -622,6 +626,7 @@
 			                                                text: '确定',
 			                                                btnClass: 'btn-primary-2',
 			                                                action: function() {
+																$(".loading_").show();
 			                                                	if(parent.children("div").length<10){
 			                                                		$(".dropload-refresh").text("没有更多了");
 			                                                	}
@@ -634,122 +639,11 @@
 			                                                        $(".card_lists").append(nodataHtml);
 			                                                       	$(".dropload-down").hide();
 			                                                    }else{//删除一条数据 往后铺一条数据
-																/*
-			                                                    	var listhtml=""
-			                                                    	var oneD=data.res;
-																	for(var index in oneD){
-																    var obj=oneD[index];
-															    	count++;
-																	var id = obj.id;
-																	//订单编号
-											                        var orderCode = obj.order_code;
-											                        //创建时间
-											                        var createTime=obj.create_time;
-											                        createTime=createTime.replace(/-/g,".")
-											                        //选择时间
-											                        var publishTime = obj.filter_publishtime;
-											                        if(!publishTime){
-											                            publishTime = "全部";
-											                        }else{
-											                        	 if(publishTime.length==11){
-											                        	 	if(publishTime.slice(0,1)!="_"){
-											                        	 		var publishtime_=publishTime.slice(0,10);
-											                        	 		publishTime=timestampToTime(publishtime_);
-											                        	 		publishTime=publishTime+"-";
-											                        	 	}else{
-											                        	 		var publishtime_=publishTime.slice(1,11);
-											                        	 		publishTime=timestampToTime(publishtime_);
-											                        	 		publishTime=publishTime+"前全部";
-											                        	 	}
-											                        	 }else{
-											                        	 	 //publishTime= publishTime.replace(/\./g,"/")
-											                        	 }
-											                        }
-											                        //1标准字段包 2高级字段包
-											                        var spec = obj.data_spec;
-											                        if(spec=="标准字段包"){
-											                        	spec_=1;
-											                        }else if(spec =="高级字段包"){
-											                        	spec_=2;
-											                        }
-											                        //订单状态 0待支付 1已完成 -1删除
-											                        var orderStatus = obj.order_status;
-											                        if(orderStatus==0){
-											                        	orderStatus="待付款"
-											                        	orderHtml=""
-											                        	orderHtml+='<span class="status notpay">'+orderStatus+'</span>'
-											                        	orderHtml+="<a class=\"shanchu iconfont  icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
-											                        	iconHtml=""
-											                        	iconHtml+='<div class="card-footer">'
-																					+'<a  class="btn cancle" onclick="cancelOrder('+id+',this,)">取消订单</a>'
-																					+'<a  class="btn pay_" onclick="choosePayWay(\''+orderMoney+'\','+spec_+',&quot;'+obj.filter_id+'&quot;,this)" >去支付</a>'
-																				+'</div>'
-											                        }else if(orderStatus==1){
-											                        	orderStatus="已完成";
-											                        	orderHtml=""
-											                        	orderHtml+='<span class="status">'+orderStatus+'</span>'
-											                        	iconHtml=""
-											                        	iconHtml+='<div class="card-footer">'
-																					+'<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>'
-																				+'</div>'
-											                        }
-											                        //订单总数
-											                        var data_count=obj.data_count;
-											                        //订单金额
-											                        var orderMoney = obj.order_money;
-									       	                        //金额格式化 小数点前 1,000
-											                        orderMoney=orderMoney+"";
-										           	             	orderMoney_1=toThousands(orderMoney.split(".")[0]);
-																	orderMoney_2=orderMoney.split(".")[1];
-										           	             	if(orderMoney_2){
-										           	             		orderMoney=orderMoney_1+"."+orderMoney_2;
-										           	             	}else{
-										           	             		orderMoney=orderMoney_1;
-										           	             	}                 
-											                        //
-											                        var token = obj.token;
-											                        //关键词
-																	if(obj.filter_keys && obj.filter_keys.split(",").length>0){
-																		var keysHtml="";
-												                        var keysArr = obj.filter_keys.split(",");
-												                        var keysLen = keysArr.length;for(var j=0;j<keysLen;j++){
-												                            keysHtml += "<span>" + keysArr[j] + "&nbsp</span>";
-												                        }
-												                 	}else{
-												                 		keysHtml=""
-												                 	}
-																	
-																	listhtml+='<div class="card">'
-																					+'<div class="card-header">'
-																						+'<span class="time">'+createTime+'</span>'
-																						+orderHtml
-																					+'</div>'
-																					+'<div class="card-content">'
-																						+'<a  eid='+orderCode+' class="media">'
-																							+'<div class="media-img">'
-																								+'<img src="/jyapp/images/myorder/historical_data.png">'
-																							+'</div>'
-																							+'<div class="media-info">'
-																								+'<p class="item-ifo ellipsis">关键词:'+ keysHtml+'</p>'
-																								+'<p class="item-ifo ellipsis">数据量:'+ data_count +'条</p>'
-																								+'<p class="item-ifo ellipsis">数据规格:'+spec+'</p>'
-																								+'<p class="item-ifo ellipsis">筛选日期:'+publishTime+'</p>'
-																							+'</div>'
-																						+'</a>'
-																						+'<div class="price">'
-																							+'<strong class="current">¥'+orderMoney+'</strong>'
-																						+'</div>'
-																					+'</div>'
-																					+iconHtml
-																				+'</div>'
-																	
-																		}
-																		*/
 																		structureHtml(data.res);
 																		//删除完成后补的订单仍可点击
 																		//appendList($(listhtml))
 			                                                    	}
-			                                                   
+			                                                    $(".loading_").hide();
 			                                                }
 			                                            }
 			                                        }
@@ -776,6 +670,9 @@
 //-------------------------------------------------
 			//取消订单
 			function cancelOrder(id,obj) {
+					if (getParam("active")){
+					 	typ=getParam("active");
+					}
 			        $.confirm({
 			            title: '提示信息',
 			            content: '确定取消订单?',
@@ -784,12 +681,14 @@
 			                    text: '确定',
 			                    btnClass: 'btn-primary-0',
 			                    action: function() {
+									$(".loading_").show();
 			                        $.ajax({
 			                            type: "post",
 			                            url: "/subscribepay/orderListDetails/deleteOrder",
 			                            data: {"id":id,"pageNum":pageIndex,"type":typ,"cancel":"cancel"},
 			                            dataType: 'json',
 			                            success: function(data){
+											$(".loading_").hide();
 			                                if(data && data["success"]){
 			                                    $.alert({
 			                                        title:"提示信息",
@@ -799,6 +698,7 @@
 			                                                text: '确定',
 			                                                btnClass: 'btn-primary-2',
 			                                                action: function() {
+																$(".loading_").show();
 			                                                	if (typ==1){
 			                                                		var self = $(obj).parent().parent();
 			                                    					self.remove();
@@ -823,13 +723,22 @@
 																	$(".card_lists").empty();
 			                                   						queryOrder($("ul .active").index(),10);
 			                                   					}
-			                                   					 
+																if($(".card_lists").children("div").length==0){
+																	nodataHtml=""
+																	nodataHtml+='<div style="text-align:center;">';
+																	//nodataHtml+='<div style="display:flex;justify-content:center;align-items: center;">';
+																	nodataHtml+='<img src="/jyapp/images/myorder/fish.png" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
+																	nodataHtml+='<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
+																	$(".card_lists").append(nodataHtml);
+																	$(".dropload-down").hide();
+																}
+																$(".loading_").hide();
 			                                                }
 			                                            }
 			                                        }
 			                                    });
 			                                }else{
-			                                    alertS("删除失败,请联系管理员!");
+			                                    alertS("取消失败,请联系管理员!");
 			                                }
 			                            },
 			                            error: function(xhr, type){
@@ -889,19 +798,26 @@
 				/* 选择支付方式*/
 				$('input:radio[name="way"]').click(function() {
 					var checkValue = $('input:radio[name="way"]:checked').val();
+					var order_code_vip=$(".order_code_vip").text();
 		        	if(checkValue=="微信支付"){
 		        		localStorage.setItem($(".param_id").text(),"wx");
+						if(order_code_vip){
+		        			localStorage.setItem(order_code_vip,"wx");
+						}
 		        		$("#wx").prop("checked",true);
 						$("#zfb").prop("checked",false);
 		            	pay_way="wx_app";
 		        	}else{
 		        		localStorage.setItem($(".param_id").text(),"ali");
+		        		if(order_code_vip){
+		        			localStorage.setItem(order_code_vip,"ali");
+						}
 		        		$("#wx").prop("checked",false);
 						$("#zfb").prop("checked",true);
 		        		pay_way="ali_app";
 		        	}
 				});
-				var canpay=true;
+			//	var canpay=true;
 				//确认支付
 				$(".surePay").on("click", function() {
 					$(".loading_").show();
@@ -909,21 +825,24 @@
 					var order_code_vip=$(".order_code_vip").html();
 					//vip支付;
 					if (order_code_vip!=""){
-						var orderCode =$(".media").attr("eid");
-						if(!canpay)return  
-		            	canpay=false;
+						var orderCode =order_code_vip;
+					//	if(!canpay)return  
+		  		    //  canpay=false;
 			            $.post("/subscribepay/vipsubscribe/orderToPay",{"orderCode":orderCode,"pay_way":pay_way},function(r){
 			            	if(r.success){
 			            		  if(pay_way=="wx_app"){
-					                  JyObj.wxPay(r.data.res);
+					                	JyObj.wxPay(r.data.res);
+										$(".loading_").hide();
 					                }else{
-					                  JyObj.aliPay(r.data.res);
+					                	JyObj.aliPay(r.data.res);
+										$(".loading_").hide();
 					                }
 					                $('.pay_way').hide(200)
-					                checkPaySuccess_vip(data.order);
-			            	}else{
+					                checkPaySuccess_vip(orderCode);
+			            	}/*else{
 			            		canpay=true;
-			            	} 
+			            	}*/
+							$(".loading_").hide();
 	            		})
 					}else{ //移动端数据导出支付;
 						//canpay = false;
@@ -984,6 +903,7 @@
 				
 				var interval_vip
 				//支付完成跳转 VIP订单
+				/*
 				function checkPaySuccess_vip(order_vipcode){
 					if(interval_vip){
 						clearInterval(interval_vip)
@@ -1001,6 +921,33 @@
 					},3000)
 					$(".loading_").hide();
 				}	
+				*/
+				//支付完成跳转 VIP订单
+				function checkPaySuccess_vip(order_vipcode){
+					if(interval_vip){
+						clearInterval(interval_vip)
+					}
+					$(".loading_").show();
+					interval_vip=setInterval(function(){
+						$.post("/jypay/isPaySuccess",{code:order_vipcode},function(r){
+							if(r.success){
+								$(".loading_").show();
+								setTimeout(function(){
+									$(".loading_").hide();
+									setSessionStorage();
+									try{
+										JyObj.checkLab()//刷新搜索首页和订阅首页
+										sessionStorage.reloadHomePage = true;
+										sessionStorage.reloadSubPage = true;
+									}catch(e){}	
+									window.location.href="/jyapp/vipsubscribe/toPaySuccessPage?orderCode="+order_vipcode;
+									clearInterval(interval_vip);
+								})
+							}
+						})
+					},3000)
+					$(".loading_").hide();
+				}
 				
 				function getParam(pname) {
 				    var params = location.search.substr(1);
@@ -1150,6 +1097,7 @@
 			//选择
 			function choosePayWay(orderMoney,param_dataType,param_id,e){
 				$(".pay_way").show();
+				$(".order_code_vip").text("");
 				$(".money_pay").text("¥"+orderMoney);
 				$(".param_dataType").text(param_dataType);
 				$(".param_id").text(param_id);
@@ -1170,14 +1118,30 @@
 				this_e=e;
 			}
 			//vip付款 弹窗
-			function choosePayWay_vip(orderMoney,orderCode,e){
+			function choosePayWay_vip(orderMoney,orderCode,e,way){
 				$(".pay_way").show();
 				$(".money_pay").text("¥"+orderMoney);
 				$(".order_code_vip").text(orderCode);
-				
-				$("#wx").prop("checked",true);
-				$("#zfb").prop("checked",false);
-				pay_way="wx_app";
+				if(localStorage.getItem(orderCode)=="wx"){
+					$("#wx").prop("checked",true);
+					$("#zfb").prop("checked",false);
+					pay_way="wx_app";
+				}else if(localStorage.getItem(orderCode)=="ali"){
+					pay_way="ali_app";
+					$("#zfb").prop("checked",true);
+					$("#wx").prop("checked",false);
+				}else{
+					//没有缓存取 生成订单时的购买方式
+					if(way.indexOf("wx")!=-1){
+						$("#wx").prop("checked",true);
+						$("#zfb").prop("checked",false);
+						pay_way="wx_app";
+					}else{
+						$("#wx").prop("checked",false);
+						$("#zfb").prop("checked",true);
+						pay_way="ali_app";
+					}
+				}
 				this_e=e;
 			}
 		
@@ -1350,152 +1314,268 @@
 											+'</div>'
 							
 							}else if(obj.product_type=="VIP订阅"){
+								if(typ==1){	//待付款订单列表页 
+									if(obj.order_status==-2){
+										continue;
+									}
+								}
 								count++;
 								var id_vip = obj.id;
 								//订单编号
-		                        var orderCode_vip = obj.order_code;
-		                        //创建时间
-		                        var createTime_vip=obj.create_time;
-		                        createTime_vip =createTime_vip.replace(/-/g,".")
-		                        //筛选条件
-		                        var filter_vip = JSON.parse(obj.filter);
-		                        //地区
-								var region_vipArr = filter_vip.area;
-		                        var region_vip=""
-		                        var province_length=0;
-		                        var city_length=0;
-								var vip_type=obj.vip_type;
-								if (vip_type!=2){
-									if(JSON.stringify(region_vipArr) != JSON.stringify({})){
-										for(i in region_vipArr){
-											if(region_vipArr[i].length==0){
-												province_length++;
+								var orderCode_vip = obj.order_code;
+								//创建时间
+								var createTime_vip=obj.create_time;
+								createTime_vip =createTime_vip.replace(/-/g,".")
+								//筛选条件
+								var filter_vip = JSON.parse(obj.filter);
+								//判断该订单是否是升级订单
+								var vip_type = obj.vip_type;
+								//升级续费逻辑修改后的判断条件
+								var newbuyset= filter_vip.newBuyset;
+								var region_vip=""
+								var industry_vip=""
+							   if ((vip_type != 2)&&(vip_type!=1)){
+									 //地区
+									var region_vipArr = filter_vip.area;
+									var province_length=0;
+									var city_length=0;
+									if (!$.isEmptyObject(newbuyset)){
+										var val=getnewbuyset(newbuyset);
+										region_vip=val[0];
+										industry_vip=val[1];
+									}else{
+										if(JSON.stringify(region_vipArr) != JSON.stringify({})){
+											for(i in region_vipArr){
+												if(region_vipArr[i].length==0){
+													province_length++;
+												}else{
+													city_length+=region_vipArr[i].length;
+												}
+											}
+										}else{
+											region_vip="全国";
+										}
+										if((province_length!=0)&&(city_length!=0)){
+										  region_vip=province_length+"个省级区域、"+city_length+"个地市";
+										}else if((province_length==0)&&(city_length!=0)){
+										  region_vip=city_length+"个地市";
+										}else if((province_length!=0)&&(city_length==0)){
+										  region_vip=province_length+"个省级区域";
+										}
+										//行业
+										var industry_vip = filter_vip.industry.length;	//数组
+										if(industry_vip==0){
+											industry_vip="全行业";
+										}else{
+											industry_vip=industry_vip+"个行业";
+										}
+									}
+									var cyclecount_vip = filter_vip.cyclecount;	//时长
+									var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
+									//订阅周期
+									var effectiveduration_vip=""
+									if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
+										var start_time_vip = obj.vip_starttime;
+										var end_time_vip = obj.vip_endtime;
+										var start_time_arr = start_time_vip.split(" ")[0].split("-")
+										var end_time_arr = end_time_vip.split(" ")[0].split("-")
+										var start_year=start_time_arr[0];
+										var start_month=start_time_arr[1];
+										var end_year=end_time_arr[0];
+										var end_month=end_time_arr[1];
+										
+										var year = 0;
+										var month = 0;
+										if(end_year > start_year){
+											if(end_month > start_month){
+												year = end_year - start_year;
+												month = end_month - start_month;
 											}else{
-												city_length+=region_vipArr[i].length;
+												year = end_year - start_year-1;
+												month = 12+Number(end_month)-start_month;
+												if (month==12){
+													year=Number(year)+1;
+													month=0;
+												}
+											}
+										}else if(end_year == start_year){
+											month = end_month - start_month;
+										}
+										
+										if(year != 0 && month !=0){
+											effectiveduration_vip=year+"年"+month+"个月";
+										}else if(year !== 0&& month ===0){
+											effectiveduration_vip=year+"年";
+										}else if(year === 0&& month !==0){
+											effectiveduration_vip=month+"个月";
+										}
+										if(cycleunit_vip==3){
+											effectiveduration_vip=cyclecount_vip+"天";	 
+										}
+										if (!$.isEmptyObject(newbuyset)){
+											if(cycleunit_vip==1){
+												effectiveduration_vip=cyclecount_vip+"年";
+											}else if(cycleunit_vip==2){
+												effectiveduration_vip=cyclecount_vip+"个月"
+											}else if(cycleunit_vip==3){
+												effectiveduration_vip=cyclecount_vip+"天";	                    
 											}
 										}
 									}else{
-										region_vip="全国";
+										if(cycleunit_vip==1){
+											effectiveduration_vip=cyclecount_vip+"年";
+										}else if(cycleunit_vip==2){
+											effectiveduration_vip=cyclecount_vip+"个月"
+										}else if(cycleunit_vip==3){
+											effectiveduration_vip=cyclecount_vip+"天";	                    
+										}
+									}
+							   }else if(vip_type==2){
+									//新增全部行业:-1  新增部分行业:123   		无新增:0
+									//新增全国{"province":0,"city":0}  无新增:{}
+									//升级订单 单独处理
+									//区域
+									var filterObj =filter_vip;
+									if(!$.isEmptyObject(newbuyset)){
+										var val=getnewbuyset(newbuyset);
+										region_vip=val[0];
+										industry_vip=val[1];
+									}else{
+										if(!$.isEmptyObject(filterObj.addareacount)){
+											if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
+												region_vip="全国";
+											}
+											if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
+												region_vip=filterObj.addareacount.province+"个省级区域";
+											}
+											if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
+												region_vip=filterObj.addareacount.city+"个地市";
+											}
+											if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
+												region_vip=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
+											}
+										}else{
+											region_vip="无";
+										}
+										//行业
+										var industry_vip="";
+										industry_vip=filterObj.addbuyerclasscount+"个行业";
+										if(filterObj.addbuyerclasscount==0){
+											industry_vip="无";
+										}
+										if(filterObj.addbuyerclasscount==-1){
+											industry_vip="全行业";
+										}
 									}
-									if((province_length!=0)&&(city_length!=0)){
-			                      		region_vip=province_length+"个省级区域、"+city_length+"个地市";
-									}else if((province_length==0)&&(city_length!=0)){
-			                      	  	region_vip=city_length+"个地市";
-									}else if((province_length!=0)&&(city_length==0)){
-			                      	  	region_vip=province_length+"个省级区域";
+									//延长周期
+									var effectiveduration_vip="";
+									if(filterObj.cycleunit==1){
+									   effectiveduration_vip=filterObj.cyclecount+"年";
+									}else if(filterObj.cycleunit==2){
+									   effectiveduration_vip=filterObj.cyclecount+"个月";
+									}else if(filterObj.cycleunit==3){
+									   effectiveduration_vip=filterObj.cyclecount+"天";
+									}else if (filterObj.cycleunit==-1){
+										effectiveduration_vip="不延期";
 									}
-			                        //行业
-			                        var industry_vip = filter_vip.industry.length;	//数组
-			                        if(industry_vip==0){
-			                        	industry_vip="全行业";
-			                        }else{
-			                        	industry_vip=industry_vip+"个行业";
-			                        }
-			                        var cyclecount_vip = filter_vip.cyclecount;	//时长
-			                        var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
-			                        //订阅周期
-			                        var effectiveduration_vip=""
-			                        if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
-							       		var start_time_vip = obj.vip_starttime;
-							       		var end_time_vip = obj.vip_endtime;
-							       		var start_time_arr = start_time_vip.split(" ")[0].split("-")
-							       		var end_time_arr = end_time_vip.split(" ")[0].split("-")
-							       		var start_year=start_time_arr[0];
-							       		var start_month=start_time_arr[1];
-							       		var end_year=end_time_arr[0];
-							       		var end_month=end_time_arr[1];
-							       		
-							       		var year = 0;
+									//续费升级逻辑修改后判断是否不延期
+									if(filterObj.cycleunit==0&&filterObj.cyclecount==0){
+										effectiveduration_vip="不延期";
+									}
+							   }else if (vip_type==1){
+									filter_vip = JSON.parse(obj.filter);
+									var renewal_market=0; //续费市级地区
+									var buyset=filter_vip.buyset;
+									if(!$.isEmptyObject(newbuyset)){
+										var val = getnewbuyset(newbuyset);
+										region_vip=val[0];
+										industry_vip=val[1];
+									}else{
+										if (!$.isEmptyObject(buyset)){
+											if (buyset.areacount==-1){
+												region_vip = "全国";
+											}else{
+												if(!$.isEmptyObject(buyset.citys)){
+													for (var key in buyset.citys) {
+														renewal_market+=(buyset.citys[key]);
+													}
+												}
+												//
+												var areaText="";
+												if ((buyset.areacount!=0)&&(renewal_market!=0)){
+													region_vip=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
+												}else if((buyset.areacount==0)&&(renewal_market!=0)){
+													region_vip=renewal_market+"个地市";
+												}else if((buyset.areacount!=0)&&(renewal_market==0)){
+													region_vip=buyset.areacount+"个省级地区";
+												}
+											}
+											if(buyset.buyerclasscount==-1){
+												industry_vip="全行业";
+											}else{
+												industry_vip=buyset.buyerclasscount+"个行业";
+											}
+										}else{
+											industry_vip=""
+											region_vip=""
+										}
+									}
+									//订阅周期
+									var effectiveduration_vip=""
+									if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
+										var start_time_vip = obj.vip_starttime;
+										var end_time_vip = obj.vip_endtime;
+										var start_time_arr = start_time_vip.split(" ")[0].split("-")
+										var end_time_arr = end_time_vip.split(" ")[0].split("-")
+										var start_year=start_time_arr[0];
+										var start_month=start_time_arr[1];
+										var end_year=end_time_arr[0];
+										var end_month=end_time_arr[1];
+										
+										var year = 0;
 										var month = 0;
 										if(end_year > start_year){
-								    		if(end_month > start_month){
-							    				year = end_year - start_year;
-							    				month = end_month - start_month;
-								    		}else{
-							    				year = end_year - start_year-1;
-							    				month = 12+Number(end_month)-start_month;
-							    				if (month==12){
-							    					year=Number(year)+1;
-							    					month=0;
-							    				}
-								    		}
-								    	}else if(end_year == start_year){
-							    			month = end_month - start_month;
-								    	}
-								    	
-								    	if(year != 0 && month !=0){
-								    		effectiveduration_vip=year+"年"+month+"个月";
-								    	}else if(year !== 0&& month ===0){
-								    		effectiveduration_vip=year+"年";
-								    	}else if(year === 0&& month !==0){
-								    		effectiveduration_vip=month+"个月";
-								    	}
-								    	if(cycleunit_vip==3){
-								    		effectiveduration_vip=cyclecount_vip+"天";	 
-								    	}
-							      	}else{
-								       	if(cycleunit_vip==1){
-				                        	effectiveduration_vip=cyclecount_vip+"年";
-				                        }else if(cycleunit_vip==2){
-				                        	effectiveduration_vip=cyclecount_vip+"个月"
-				                        }else if(cycleunit_vip==3){
-				                        	effectiveduration_vip=cyclecount_vip+"天";	                    
-				                        }
-								    }
-								}else{
-									//区域
-		                       		var filterObj =filter_vip;
-		                       		var region_vip ="";
-		                       		//升级订单 单独处理
-						         	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"){
-							                	 region_vip="无"
-							                }else{
-							                	if (citys_u.length>0){
-								                	cityNum_u+=citys_u.length;
-								                }else{
-								                	provinceNum_u++;
-								                }
-							                }
-						                }
-						                if(provinceNum_u>0) region_vip= region_vip + provinceNum_u+"个省级区域";
-						                if(cityNum_u>0){
-						                	if(provinceNum_u>0) region_vip= region_vip+"、"
-						                	region_vip = region_vip+ cityNum_u+"个地市";
-						                }
-						         	}else {
-						         		region_vip="全国";
-						         	}
-						         	//行业
-						         	var industry_vip="";
-						         	if(!$.isEmptyObject(filterObj.addindustry)) {
-						         		if(filterObj.addindustry[0]=="no"){
-							         		industry_vip="无";
-							         	}else{
-							         		if(filterObj.addindustry.length==0){
-							         			industry_vip="全行业";
-							         		}else{
-							         			industry_vip=filterObj.addindustry.length+"个行业";
-							         		}
-							         	}
-						         	}else{
-					         			industry_vip="全行业";
-						         	}
-						         	//延长周期
-						         	var effectiveduration_vip="";
-						        	if(filterObj.cycleunit==1){
-								       effectiveduration_vip=filterObj.cyclecount+"年";
-								    }else if(filterObj.cycleunit==2){
-								       effectiveduration_vip=filterObj.cyclecount+"个月";
-								    }else if(filterObj.cycleunit==3){
-								       effectiveduration_vip=filterObj.cyclecount+"天";
-								    }else if (filterObj.cycleunit==-1){
-								        effectiveduration_vip="不延期";
-								    }
+											if(end_month > start_month){
+												year = end_year - start_year;
+												month = end_month - start_month;
+											}else{
+												year = end_year - start_year-1;
+												month = 12+Number(end_month)-start_month;
+												if (month==12){
+													year=Number(year)+1;
+													month=0;
+												}
+											}
+										}else if(end_year == start_year){
+											month = end_month - start_month;
+										}
+										
+										if(year != 0 && month !=0){
+											effectiveduration_vip=year+"年"+month+"个月";
+										}else if(year !== 0&& month ===0){
+											effectiveduration_vip=year+"年";
+										}else if(year === 0&& month !==0){
+											effectiveduration_vip=month+"个月";
+										}
+										//试用用户生成订单 周期
+										if (effectiveduration_vip==""){
+											if(cycleunit_vip==1){
+					                        	effectiveduration_vip=cyclecount_vip+"年";
+					                        }else if(cycleunit_vip==2){
+					                        	effectiveduration_vip=cyclecount_vip+"个月"
+					                        }else if(cycleunit_vip==3){
+					                        	effectiveduration_vip=cyclecount_vip+"天";	                    
+					                        }
+										}
+									}else{
+										if(cycleunit_vip==1){
+											effectiveduration_vip=cyclecount_vip+"年";
+										}else if(cycleunit_vip==2){
+											effectiveduration_vip=cyclecount_vip+"个月"
+										}else if(cycleunit_vip==3){
+											effectiveduration_vip=cyclecount_vip+"天";	                    
+										}
+									}
 								}
 								
 		                        
@@ -1524,7 +1604,7 @@
 		       	             	}else{
 		       	             		orderMoney_vip=orderMoney_vip1;
 		       	             	}
-								console.log(orderMoney_vip,"===",orderMoney)
+								var way=obj.pay_way;
 		                        if(orderStatus_vip==0){
 		                        	orderStatus_vip="待付款"
 		                        	orderHtml=""
@@ -1533,7 +1613,7 @@
 		                        	iconHtml=""
 		                        	iconHtml+='<div class="card-footer">'
 												+'<a  class="btn cancle" onclick="cancelOrder('+id_vip+',this)">取消订单</a>'
-												+'<a href="javascript:void(0)" onclick="choosePayWay_vip(\''+orderMoney_vip+'\',&quot;'+orderCode_vip+'&quot;,this)" class="gopay_btn pay" filterid="'+obj.filter_id+'" token="'+token_vip+'" id="'+id_vip+'" orderCode='+orderCode_vip+'>去支付</a>'
+												+'<a href="javascript:void(0)" onclick="choosePayWay_vip(\''+orderMoney_vip+'\',&quot;'+orderCode_vip+'&quot;,this,&quot;'+way+'&quot;)" class="gopay_btn pay" filterid="'+obj.filter_id+'" token="'+token_vip+'" id="'+id_vip+'" orderCode='+orderCode_vip+'>去支付</a>'
 											+'</div>'
 		                        }else if(orderStatus_vip==1){
 		                        	orderStatus_vip="已完成";
@@ -1572,7 +1652,7 @@
 												+'<div class="card-content">'
 													+'<a  eid='+orderCode_vip+' class="media" isvipOrder="true">'
 														+'<div class="media-img">'
-															+'<img src="/vipsubscribe/image/vip_order.png">'
+															+'<img src="/jyapp/vipsubscribe/image/vip_order.png">'
 														+'</div>'
 														+'<div class="media-info">'
 															+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
@@ -1602,7 +1682,7 @@
 														+'<div class="card-content">'
 															+'<a  eid='+orderCode_vip+' class="media" isvipOrder="true">'
 																+'<div class="media-img">'
-																	+'<img src="/vipsubscribe/image/vip_order.png">'
+																	+'<img src="/jyapp/vipsubscribe/image/vip_order.png">'
 																+'</div>'
 																+'<div class="media-info">'
 																	+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
@@ -1903,6 +1983,44 @@
 				function phoneHide(){
 					$('.jy-alert').hide();
 				}
+				//2.8.5升级续费更新
+				function getnewbuyset(newbuyset){
+					var region_vip="";
+					if(newbuyset.areacount!=-1){
+						var newcitys=newbuyset.newcitys;
+						var scatter=newcitys.length ;//分布
+						var citynum=0;
+						for(var k in newcitys){
+							citynum+=newcitys[k];
+						}
+						if(newbuyset.areacount>0){
+							region_vip=newbuyset.areacount+"个省级区域";
+							// if(citynum>1){
+							// 	region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
+							// }else{
+								if(citynum!=0){
+									region_vip+="、"+citynum+"个地市";
+								}
+							//}
+						}else{
+							//region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
+							region_vip+=citynum+"个地市";
+						}
+					}else{
+						region_vip="全国";
+					}
+					var buyerclasscount=newbuyset.buyerclasscount;
+					if(buyerclasscount>3){
+						buyerclasscount=filterObj.industry.length;
+						industry_vip="全行业("+buyerclasscount+"个行业)";
+					}else{
+						industry_vip=buyerclasscount+"个行业";
+					}
+					if(buyerclasscount==-1){
+						industry_vip="全行业";
+					}
+					return  [region_vip,industry_vip]
+				}
 		</script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}

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

@@ -16,7 +16,6 @@
 
 .personal .navbar .navbar_left {
     font-size: 18px;
-    font-weight: 200;
     color: #444444;
 }
 .personal .navbar{
@@ -73,7 +72,7 @@
         <!-- 账号信息 -->
 		<div class="user">
             <div class="user_img">
-                <img id="head_img" src="" onerror="this.src='/images/wx/persional/my_head.png?v=2'" >
+                <img id="head_img" src="" onerror="this.src='/jyapp/images/persional/my_head.png?v=2'" >
             </div>
             <div class="user_info">
                 <span class="user_name" ></span>
@@ -111,13 +110,13 @@
             </div>
         </div>
         <div class="menu">
-<!--            <a class="menu_list vip">
+            <a class="menu_list vip">
                 <div class="menu_list_left ">
                     <img src="/jyapp/me/images/my_vip.png" alt="">
                     <span>VIP订阅</span>
                 </div>
                 <img class="arrow_right" src="/jyapp/me/images/my_arrow_right.png" alt="">
-            </a> -->
+            </a> 
             <a class="menu_list toSieve" >
                 <div class="menu_list_left">
                     <img src="/jyapp/me/images/my_data_export.png" alt="">
@@ -210,6 +209,17 @@
     </div>
     <script src="/jyapp/js/jquery-3.2.1.min.js"></script>
     <script>
+		$(function () {
+			var isPageHide = false;   
+			window.addEventListener('pageshow', function () {      
+				if (isPageHide) {
+					location.reload();
+				}    
+			});    
+			window.addEventListener('pagehide', function () {
+				isPageHide = true;
+			});  
+		});
 		var nowTimestamp= (new Date()).valueOf();
 		var userId = {{session "userId"}};
 		var headimageurl = {{session "s_headimageurl"}};
@@ -223,7 +233,7 @@
 			$(".vip").on("click",function(){
 				$.post("/subscribepay/orderListDetails/isVip?v="+nowTimestamp,{},function(data){
 					if (data.isvip){
-						window.location.href="/jyapp/vipsubscribe/toSetPage";		//vip订阅入口  试用或正式vip
+						window.location.href="/jyapp/vipsubscribe/toSubVipSetPage";		//vip订阅入口  试用或正式vip
 					}else{
 						window.location.href="/jyapp/vipsubscribe/introducePage";		//vip订阅入口  非vip
 					}
@@ -276,7 +286,7 @@
 			})
 			//使用帮助
 			$(".useHelp").on("click",function(){
-				JyObj.openExternalLink('http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=3&sn=badf2d7da08654c58b58169e773f58f0#wechat_redirect','使用帮助');
+				JyObj.openExternalLink('https://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=3&sn=badf2d7da08654c58b58169e773f58f0#wechat_redirect','使用帮助');
 			})
 			//关于剑鱼标讯
 			$(".aboutJy").on("click",function(){

+ 92 - 67
src/jfw/modules/app/src/web/templates/me/setemail/bind_email.html

@@ -29,6 +29,9 @@
 			    background: transparent;
 			    display: none;
 			}
+			.email_input,.code_input{
+				line-height: 20px !important;
+			}
 		</style>
 		<div class="app-layout-header">
 			<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
@@ -57,6 +60,19 @@
 		<script src="{{Msg "seo" "cdn"}}/jyapp/myemail/js/public.js?v={{Msg "seo" "version"}}1"></script>
 		<script src="{{Msg "seo" "cdn"}}/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
 		<script>
+			$(function () {    
+				var isPageHide = false;   
+				window.addEventListener('pageshow', function () {      
+					if (isPageHide) {
+						location.reload();
+					}    
+				});    
+				window.addEventListener('pagehide', function () {
+					isPageHide = true;
+				});  
+			});
+			
+			var sendcode_flag=true;
 			$(function(){
 				var emailVal,code;
 				var userId={{.T.userId}}
@@ -65,7 +81,7 @@
 				var param = getParam('name');
 				var orderCode=getParam("orderCode");
 				if (param=="change"){
-					$(".email_input").attr("placeholder",{{.T.text_email}})
+					$(".email_input").attr("placeholder","输入新邮箱");
 					$("#bindBtn").html("确定");
 				}else if(param == "unbind"){
 					promptbox("解绑成功");
@@ -92,80 +108,89 @@
 					}else if(isEmail === false){
 						promptbox('邮箱格式不正确');
 					}else{
-						$.post("/subscribepay/orderListDetails/setEmail",{"email":emailVal},function(data){
-							userId=data.userId;
-							//发送成功
-							if(data.success){
-								sendCode(that,300);
-								$(".sendCode").prop("disabled","disabled");
-								$(".email_input").prop("readonly",true);
-								sessionStorage.setItem("send_mycode_"+userId, Date.parse(new Date())/1000);
-								//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_myemail_"+userId, $(".email_input").val().replace(/\s*/g,""));
-							}else{	
-								//发送失败
-								if(data.errCode==2){
-									console.log(data.time)
-									sendCode(that,data.time);
-									$(".email_input").attr("readonly",true);
+						if(sendcode_flag){
+							$.post("/subscribepay/orderListDetails/setEmail",{"email":emailVal},function(data){
+								userId=data.userId;
+								//发送成功
+								if(data.success){
+									sendcode_flag=false;
+									sendCode(that,300);
+									$(".sendCode").prop("disabled","disabled");
+									$(".email_input").prop("readonly",true);
+									$(".email_input").attr("unselectable","on");
+									$(".email_input").attr("onfocus","this.blur()");
+									$(".email_input").css("-webkit-user-select","none");
+									sessionStorage.setItem("send_mycode_"+userId, Date.parse(new Date())/1000);
 									//发送验证码后 sessionStorage邮箱 
-								sessionStorage.setItem("send_myemail_"+userId, $(".email_input").val().replace(/\s*/g,""));
-								}
-								promptbox(data.errMsg);
-							}
-						});
-						//验证码校验
-						$('.code_input').bind('input propertychange',()=>{
-							var verity=$(".code_input").val();
-							var email=$(".email_input").val().replace(/\s*/g,"");
-							if(verity.length==6){
-								$.post("/subscribepay/orderListDetails/checkMailCodeVerify",{
-									"email":email,
-									"emailVerity":verity,
-								},function(data){
-									if(data.success){
-										$(".sendcode").css("display","none");
-										$(".code_true").show();
-										$(".code_input").prop("readonly","true");
-										$("#bindBtn").removeAttr("disabled");
-									}else{
-										$(".code_true").hide();
-										$("#bindBtn").attr("disabled","disabled");
-										promptbox("邮箱验证码错误");
+									sessionStorage.setItem("send_myemail_"+userId, $(".email_input").val().replace(/\s*/g,""));
+								}else{	
+									//发送失败
+									if(data.errCode==2){
+										sendCode(that,data.time);
+										$(".email_input").attr("readonly",true);
+										//发送验证码后 sessionStorage邮箱 
+									sessionStorage.setItem("send_myemail_"+userId, $(".email_input").val().replace(/\s*/g,""));
 									}
-								});
-							}
-						}).on("blur",()=>{
-							var code_input_len=$(".code_input").val().length
-							if((code_input_len!=6)&&(code_input_len!=0)){
+									promptbox(data.errMsg);
+								}
+							});
+						}
+					}
+				})
+				//验证码校验
+				$('.code_input').bind('input propertychange',()=>{
+					var verity=$(".code_input").val();
+					var email=$(".email_input").val().replace(/\s*/g,"");
+					if(verity.length==6){
+						$.post("/subscribepay/orderListDetails/checkMailCodeVerify",{
+							"email":email,
+							"emailVerity":verity,
+						},function(data){
+							if(data.success){
+								$(".sendcode").css("display","none");
+								$(".code_true").show();
+								$(".code_input").prop("readonly","true");
+								$("#bindBtn").removeAttr("disabled");
+								$(".email_input").prop("readonly",true);
+								$(".code_input").attr("unselectable","on");
+								$(".code_input").attr("onfocus","this.blur()");
+								$(".code_input").css("-webkit-user-select","none");
+							}else{
 								$(".code_true").hide();
 								$("#bindBtn").attr("disabled","disabled");
 								promptbox("邮箱验证码错误");
 							}
 						});
-						
-						//绑定
-						$("#bindBtn").on("click",function(){
-							$.post("/subscribepay/orderListDetails/emailOperation",{
-								"operation":"binding",
-								"email":$(".email_input").val()
-								},function(data){
-								if(data.success){
-									if ($("#bindBtn").text()=="确定"){	//更改绑定
-										sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-										window.location.replace("/jyapp/front/myorder/setSuccess?name=changeEmail"); 
-									}else{
-										sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-										if((param="invoice")&&(orderCode!=null)){
-											window.location.replace("/jyapp/front/myorder/setSuccess?name=invoice&orderCode="+orderCode); 
-										}else{
-											window.location.replace("/jyapp/front/myorder/setSuccess?name=bindEmail"); 
-										}
-									}
-								}
-							})
-						})
 					}
+				}).on("blur",()=>{
+					var code_input_len=$(".code_input").val().length
+					if((code_input_len!=6)&&(code_input_len!=0)){
+						$(".code_true").hide();
+						$("#bindBtn").attr("disabled","disabled");
+						promptbox("邮箱验证码错误");
+					}
+				});
+				
+				//绑定
+				$("#bindBtn").on("click",function(){
+					$.post("/subscribepay/orderListDetails/emailOperation",{
+						"operation":"binding",
+						"email":$(".email_input").val()
+						},function(data){
+						if(data.success){
+							if ($("#bindBtn").text()=="确定"){	//更改绑定
+								sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
+								window.location.replace("/jyapp/front/myorder/setSuccess?name=changeEmail"); 
+							}else{
+								sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
+								if((param="invoice")&&(orderCode!=null)){
+									window.location.replace("/jyapp/front/myorder/setSuccess?name=invoice&orderCode="+orderCode); 
+								}else{
+									window.location.replace("/jyapp/front/myorder/setSuccess?name=bindEmail"); 
+								}
+							}
+						}
+					})
 				})
 			})
 			

+ 27 - 8
src/jfw/modules/app/src/web/templates/me/setemail/bind_success.html

@@ -19,7 +19,7 @@
 		<div class="app-layout-content-b">
 			<div class="bind_success">
 				<div class="success">
-					<img src="{{Msg "seo" "cdn"}}/wxmyemail/img/successed.png" >
+					<img src="{{Msg "seo" "cdn"}}/jyapp/myemail/img/successed.png" >
 					<p></p>
 				</div>
 				<button class="common_btn back">返回 <time class="time">()</time> </button>
@@ -29,18 +29,37 @@
 		<script src="{{Msg "seo" "cdn"}}/jyapp/myemail/js/public.js"></script>
 		<script src="{{Msg "seo" "cdn"}}/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
 		<script>
+			//ios返回刷新
+			$(function () {
+				var isPageHide = false;   
+				window.addEventListener('pageshow', function () {      
+					if (isPageHide) {
+						location.reload();
+					}    
+				});    
+				window.addEventListener('pagehide', function () {
+					isPageHide = true;
+				});  
+			});
+			
 			$(function(){
 				let param = getParam('name');//获取url传来的参数 判断显示成功的字幕
 				var orderCode=getParam("orderCode"); //开发票的订单
+				if(param!="invoice"){
+					//增加一条历史记录
+					history.pushState({},"","");
+					window.addEventListener('popstate', function(event){
+						window.location.replace('/jyapp/front/myorder/myEmail');
+					});
+				}
 				var time = 3;
 				function countDown(){
 					if(time == 0){
 						$('.time').html('');
 						if((param=="invoice")&&(orderCode!=null)){
-							//TODO
-							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
+							window.location.replace('/jyapp/vipsubscribe/toOrderDetailPage?orderCode='+orderCode);
 						}else{
-							window.location.replace('/jyapp/front/myorder/myEmail');
+							window.history.go(-1);
 						}
 					}else{
 						$('.time').html('(' + time + ')');
@@ -72,10 +91,10 @@
 				/* 返回 */
 				$('.back').on('click',() =>{
 					if((param=="invoice")&&(orderCode!=null)){
-							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
-						}else{
-							window.location.replace('/jyapp/front/myorder/myEmail');
-						}
+						window.location.replace('/jyapp/vipsubscribe/toOrderDetailPage?orderCode='+orderCode);
+					}else{
+						window.history.go(-1);
+					}
 				})
 			})
 		</script>

+ 14 - 9
src/jfw/modules/app/src/web/templates/me/setemail/unbind_email.html

@@ -22,7 +22,7 @@
 			<div class="unbind_email">
 				<div class="input_box mgT26">
 					<label>邮箱</label>
-					<input type="email" name="email" id="" value="{{.T.text_email}}" readonly="readonly"/>
+					<input type="email" name="email" id=""  value="{{.T.text_email}}" readonly="readonly" unselectable="on" onfocus="this.blur()" style="-webkit-user-select :none"/>
 				</div>
 				<button type="button" class="common_btn choose_email">更换邮箱</button>
 				<p class="text-algin">
@@ -58,17 +58,22 @@
 		<script src="{{Msg "seo" "cdn"}}/jyapp/myemail/js/zepto.js"></script>
 		<script src="{{Msg "seo" "cdn"}}/jyapp/js/common.js?v={{Msg "seo" "version"}}"></script>
 		<script>
+			$(function () {    
+				var isPageHide = false;   
+				window.addEventListener('pageshow', function () {      
+					if (isPageHide) {
+						location.reload();
+					}    
+				});    
+				window.addEventListener('pagehide', function () {
+					isPageHide = true;
+				});  
+			});
+			
 			$(function(){
 				/* 更换邮箱 */
 				$('.choose_email').on('click',() =>{
-					$('#choose_email_dialog').show(400);
-					$("#cancel_choose").on('click',() =>{
-						$('#choose_email_dialog').hide(400);
-					});
-					$('#sure_choose').on('click',() =>{
-						//sessionStorage.removeItem("send_myemail_"+{{.T.userId}});
-						window.location.replace("/jyapp/front/myorder/myEmail?name=change");
-					});
+					window.location.href="/jyapp/front/myorder/myEmail?name=change";
 				})
 				
 				

+ 2 - 2
src/jfw/modules/app/src/web/templates/staticpage/wx-serviceterms.html

@@ -4,7 +4,7 @@
     <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 href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link href="{{Msg "seo" "cdn"}}/jyapp/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <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"}}"/>
     <title>剑鱼标讯线上购买与服务条款</title>
@@ -122,7 +122,7 @@
 <body>
 <div class="app-layout-header">
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
-    VIP订阅
+    剑鱼标讯线上购买与服务条款
 </div>
 <div class="app-layout-content-b">
     <section style="margin: auto;padding: 2rem 1rem" class="main">

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

@@ -4,7 +4,8 @@
 <head>
 	{{include "/common/meta.html"}}
     <title>附加词</title>
-	{{include "/common/nnc.html"}}
+	<link href="{{Msg "seo" "cdn"}}/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link href="{{Msg "seo" "cdn"}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
@@ -73,12 +74,17 @@
 	<script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery-3.2.1.min.js?v=1412"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/weui.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/additionWord.js?v={{Msg "seo" "version"}}"></script>
+	{{include "/common/js.html"}}
     <script>
         var addition_kws = []//附加词
         var _addkws = "";
         var _addindex = -1;
 		var addkws_arr = {}
         $(function() {
+			(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', function(e) {
+				// 这里加了个类型判断,因为a等元素也会触发blur事件
+				['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(true)
+			}, true)
             if(sessionStorage&&sessionStorage.addition_kws!=undefined){
                 addition_kws = JSON.parse(sessionStorage.addition_kws);
                 appendHtml(addition_kws);

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels