xuzhiheng 5 gadi atpakaļ
vecāks
revīzija
d0da690690
42 mainītis faili ar 3368 papildinājumiem un 1135 dzēšanām
  1. 76 0
      src/jfw/front/front.go
  2. 4 1
      src/jfw/front/swordfish.go
  3. 28 3
      src/jfw/front/vipsubscribe.go
  4. 359 348
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css
  5. 29 21
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js
  6. 14 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html
  7. 31 4
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  8. 3 0
      src/jfw/modules/subscribepay/src/config/config.go
  9. 6 9
      src/jfw/modules/subscribepay/src/entity/subscribeVip.go
  10. 96 2
      src/jfw/modules/subscribepay/src/service/afterPay.go
  11. 28 13
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  12. 9 1
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  13. 2 0
      src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go
  14. 78 83
      src/jfw/modules/subscribepay/src/timetask/timetask.go
  15. 6 6
      src/jfw/modules/subscribepay/src/util/db.go
  16. 45 20
      src/jfw/modules/subscribepay/src/util/msgremind.go
  17. 49 9
      src/jfw/modules/weixin/src/wx/wx.go
  18. 656 0
      src/web/staticres/css/subscribe.css
  19. BIN
      src/web/staticres/images/subscribe/QR_code.png
  20. BIN
      src/web/staticres/images/subscribe/banner.png
  21. BIN
      src/web/staticres/images/subscribe/free.png
  22. BIN
      src/web/staticres/images/subscribe/line.png
  23. BIN
      src/web/staticres/images/subscribe/mengban.png
  24. BIN
      src/web/staticres/images/subscribe/vip-logo.png
  25. BIN
      src/web/staticres/images/subscribe/vip.png
  26. BIN
      src/web/staticres/images/subscribe/vip_tanchuang.png
  27. 3 1
      src/web/staticres/js/login.js
  28. 360 350
      src/web/staticres/vipsubscribe/css/choose_area_new.css
  29. 150 2
      src/web/staticres/vipsubscribe/css/keyWord.css
  30. 26 22
      src/web/staticres/vipsubscribe/js/editArea.js
  31. 93 0
      src/web/staticres/vipsubscribe/js/keyWord.js
  32. 1 1
      src/web/staticres/wxtsguide/main.js
  33. 892 0
      src/web/templates/pc/subscribe_new.html
  34. 222 114
      src/web/templates/weixin/dataExport/dataExport_toMyOrder.html
  35. 6 4
      src/web/templates/weixin/historypush.html
  36. 16 2
      src/web/templates/weixin/vipsubscribe/choose_area.html
  37. 48 97
      src/web/templates/weixin/vipsubscribe/keyWord.html
  38. 2 2
      src/web/templates/weixin/vipsubscribe/vip_introduce.html
  39. 22 14
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  40. 6 4
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  41. 1 1
      src/web/templates/weixin/wxkeyset/index.html
  42. 1 1
      src/web/templates/weixin/wxtsguide.html

+ 76 - 0
src/jfw/front/front.go

@@ -1,6 +1,7 @@
 package front
 
 import (
+	"encoding/hex"
 	"fmt"
 	"jfw/config"
 	"jfw/filter"
@@ -135,6 +136,8 @@ type Front struct {
 	dataService xweb.Mapper `xweb:"/front/dataService.html"`
 	//打赏页面
 	payIndex xweb.Mapper `xweb:"/weixin/reward/index"` //微信支付页面
+	//订阅付费消息提醒中转
+	msgremind xweb.Mapper `xweb:"/front/vipsubscribe/msgremind"`
 }
 
 var sewx util.SimpleEncrypt //微信的加密方法
@@ -624,6 +627,7 @@ func (f *Front) HasSign() error {
 
 //用户注销
 func (f *Front) SignOut() error {
+	log.Println("userId----1", f.GetSession("userId"))
 	f.DelSession("rpcBackUserInfo")
 	f.DelSession("user")
 	f.DelSession("s_nickname")
@@ -633,6 +637,7 @@ func (f *Front) SignOut() error {
 	f.DelSession("DataExportVerifyEmail_val")
 	f.DelSession("DataExportVerifyPhone_val")
 	f.ServeJson("ok")
+	log.Println("userId----2", f.GetSession("userId"))
 	//sess := f.GetSession("user")
 	//if user, ok := sess.(map[string]interface{}); ok {
 	//shareid := fmt.Sprint(user["shareid"])
@@ -664,6 +669,9 @@ func (f *Front) GetLoginNum(prestr string) error {
 	f.SetSession("Rref", Rref)
 	shareid, shareidot := qrmanager.QrCodeManager.GetQRCode(oid, prestr, f.Session(), f.Request)
 	//log.Println("登录获取shareid:", shareid)
+	if prestr == config.Seoconfig["jydyy"].(string) { //订阅页面扫码回复信息
+		redis.Put("sso", "pc_subscribe_reply_"+shareidot, "1", 15*60)
+	}
 	f.ServeJson(map[string]string{
 		"num":   se.EncodeString(shareid),
 		"numot": se.EncodeString(shareidot),
@@ -1406,3 +1414,71 @@ func (s *Front) UpdateShareStatus() error {
 func (s *Front) StaticPage(pagename string) error {
 	return s.Render("/staticpage/" + pagename)
 }
+
+//
+func (f *Front) 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("/weixin/pay/toOrderDetailPage?orderCode=" + param["ordercode"])
+	} else if t == "paid" {
+		if i_vip_status > 0 {
+			return f.Redirect("/front/vipsubscribe/toSetPage")
+		} else {
+			return f.Redirect("/weixin/pay/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("/front/vipsubscribe/toSetPage")
+			} else {
+				return f.Redirect("/weixin/pay/vipsubscribe_willExpire")
+			}
+		} 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("/front/vipsubscribe/toSetPage")
+			} else {
+				if now_unix > l_vip_endtime {
+					//未续费已到期,跳转到再次购买页面
+					return f.Redirect("/weixin/pay/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
+				} else {
+					//未续费未到期,跳转到续费页面
+					return f.Redirect("/weixin/pay/renewPayPage")
+				}
+			}
+		}
+	}
+	return f.Render("_error.html")
+}

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

@@ -2397,6 +2397,9 @@ func (f *Front) HasPushHistory() {
 			isExpire = 1 //即将到期
 		}
 	} else {
+		if (*user)["i_vip_status"] == nil {
+			isExpire = 0
+		}
 		var o_jy map[string]interface{}
 		if user != nil {
 			o_jy, _ = (*user)["o_jy"].(map[string]interface{})
@@ -2523,7 +2526,7 @@ func (m *Front) Subscribe() error {
 	m.T["nickname"] = mynickname
 	m.T["avatar"] = myavatar
 	m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
-	return m.Render("/pc/subscribe.html", &m.T)
+	return m.Render("/pc/subscribe_new.html", &m.T)
 }
 
 //获取高级查询所需的参数

+ 28 - 3
src/jfw/front/vipsubscribe.go

@@ -1,8 +1,12 @@
 package front
 
 import (
+	"fmt"
+	"jfw/config"
+	"jfw/jyutil"
 	"jfw/public"
 	"jfw/wx"
+	"net/url"
 	"qfw/util"
 	"time"
 
@@ -112,13 +116,34 @@ func (s *Subscribepay) ToSetPage() {
 func (s *Subscribepay) Introduce() error {
 	userId := util.ObjToString(s.GetSession("userId"))
 	if userId == "" {
-		return s.Redirect("/swordfish/about")
+		if s.GetString("state") == "wx" {
+			//微信跳回来的
+			code := s.GetString("code")
+			if code != "" {
+				openid := jyutil.Getopenid(code)
+				if openid != "" {
+					isSubscribe := CheckUserIsSubscribe(openid)
+					if isSubscribe {
+						FindUserAndCreateSess(openid, s.Session())
+					}
+				}
+			}
+		} else {
+			if public.CheckWxBrowser(s.Request) {
+				//所有参数都不再使用,跳到微信验证用户
+				return s.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(s.Site()+s.Url()), "wx"), 302)
+			}
+			return s.Redirect("/swordfish/about")
+		}
 	}
-	m, _ := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
-	if len(*m) == 0 {
+	m, ok := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
+	if !ok {
 		return s.Redirect("/swordfish/about")
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
+	if util.IntAll((*m)["i_vip_status"]) > 0 {
+		return s.Redirect("/front/vipsubscribe/toSetPage")
+	}
 	s.T["notShowTrial"] = util.IntAll((*obj)["i_trial"]) == -1 || (*m)["i_vip_status"] != nil
 	s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
 	return s.Render("/weixin/vipsubscribe/vip_introduce.html")

+ 359 - 348
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css

@@ -1,608 +1,619 @@
 @charset "UTF-8";
 .main {
-  width: 100%;
-  overflow: scroll;
+    width: 100%;
+    overflow: scroll;
 }
 
 .main::-webkit-scrollbar {
-  display: none;
+    display: none;
 }
 
 .layout_top-bottom {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
 }
 
 .layout_top-bottom .layou_top {
-  flex: 1;
-  overflow: scroll;
+    flex: 1;
+    overflow: scroll;
 }
 
 .bottom_button {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 100%;
-  height: .94rem;
+    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;
+    flex: 1;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .bottom_button .left_btn {
-  color: #2cb7ca;
-  background-color: #fff;
-  border-top: 1px solid #e0e0e0;
+    color: #2cb7ca;
+    background-color: #fff;
+    border-top: 1px solid #e0e0e0;
 }
 
 .bottom_button .right_btn {
-  color: #fff;
-  background-color: #2cb7ca;
-  border-top: 1px solid #2cb7ca;
+    color: #fff;
+    background-color: #2cb7ca;
+    border-top: 1px solid #2cb7ca;
 }
 
 .bottom_button button[disabled] {
-  opacity: .5;
+    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;
+    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;
+    display: flex;
+    position: relative;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .tips_btn .tips_discount {
-  width: 100%;
+    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);
+    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;
+    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;
+    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;
+    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;
+    background: #fff;
+    color: #2cb7ca;
+    border-top: 1px solid #e0e0e0;
 }
 
 .tips_btn .btns .save-btn {
-  background: #2cb7ca;
-  color: #fff;
-  border-top: 1px solid #2cb7ca;
+    background: #2cb7ca;
+    color: #fff;
+    border-top: 1px solid #2cb7ca;
 }
 
 .tips_btn .btns button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .jy_icon {
-  position: relative;
-  width: 100%;
-  height: 100%;
+    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%);
+    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);
+    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;
+    -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;
+    display: flex;
+    align-items: center;
 }
 
 .flex_alginC_justB {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .flex_alginC_justC {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .flex_column {
-  display: flex;
-  flex-direction: column;
+    display: flex;
+    flex-direction: column;
 }
 
 .flex_column_alignC {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
 }
 
 /* 自定义弹窗*/
 @-webkit-keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 @keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 .custom-dialog .weui-animate-fade-in {
-  -webkit-animation: c ease 0s forwards;
-  animation: c ease 0s forwards;
+    -webkit-animation: c ease 0s forwards;
+    animation: c ease 0s forwards;
 }
 
 @-webkit-keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 @keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 .custom-dialog .weui-animate-fade-out {
-  -webkit-animation: d ease 0s forwards;
-  animation: d ease 0s forwards;
+    -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;
+    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;
+    padding: .37rem 0;
+    color: #1D1D1D;
+    font-size: .32rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__ft:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__btn:after {
-  border: 0;
+    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;
+    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;
+    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;
+    background-color: #2CB7CA;
+    margin-right: 1rem;
 }
 
 .custom-dialog .weui-dialog__btn_default {
-  background-color: #BFBFC3;
+    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;
+    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);
+    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);
+    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;
+    border-color: #04be02;
+    background-color: #04be02;
 }
 
 .custom-switch.checked:before {
-  transform: scale(0);
+    transform: scale(0);
 }
 
 .custom-switch.checked:after {
-  transform: translateX(20px);
+    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%);
+    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;
 }
 
 .jymobile-tab-triangle {
-  position: relative;
+    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%);
+    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%);
+    border-color: transparent transparent #2cb7ca transparent;
+    transform: translate(140%, -70%);
 }
 
 .jymobile-tab-triangle.current {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 .jymobile-tab-triangle.current:after {
-  border-color: #2cb7ca transparent transparent transparent;
+    border-color: #2cb7ca transparent transparent transparent;
 }
 
 #choose_area {
-  display: flex;
-  justify-content: space-between;
-  flex-direction: column;
-  overflow: hidden;
-  height: 100%;
+    display: flex;
+    justify-content: space-between;
+    flex-direction: column;
+    overflow: hidden;
+    height: 100%;
 }
 
 #choose_area .form {
-  flex: 1;
-  overflow-y: scroll;
+    flex: 1;
+    overflow-y: scroll;
 }
 
 #choose_area .optional_count, #choose_area .all_area {
-  height: .88rem;
-  line-height: .88rem;
-  padding: 0 .3rem;
-  font-size: .3rem;
-  color: #1d1d1d;
+    height: .88rem;
+    line-height: .88rem;
+    padding: 0 .3rem;
+    font-size: .3rem;
+    color: #1d1d1d;
 }
 
 #choose_area .optional_count em, #choose_area .all_area em {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 #choose_area .result {
-  position: relative;
-  padding: .2rem .3rem;
-  font-size: .26rem;
-  text-align: justify;
+    position: relative;
+    padding: .2rem .3rem;
+    font-size: .26rem;
+    text-align: justify;
 }
 
 #choose_area .result .result_text {
-  position: relative;
-  min-height: 19px;
+    position: relative;
+    min-height: 19px;
 }
 
 #choose_area .result .line_two {
-  text-overflow: ellipsis;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 
 #choose_area .result .detail, #choose_area .result .packup {
-  display: inline-block;
-  width: 1.5rem;
-  padding-right: 0.1rem;
-  text-align: right;
-  color: #2cb7ca;
-  font-size: .26rem;
-  z-index: 999;
+    display: inline-block;
+    width: 1.5rem;
+    padding-right: 0.1rem;
+    text-align: right;
+    color: #2cb7ca;
+    font-size: .26rem;
+    z-index: 999;
 }
 
 #choose_area .result .detail {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
 }
 
 #choose_area .result .packup {
-  position: absolute;
-  right: 0.3rem;
-  bottom: 0;
-  margin-top: .1rem;
+    position: absolute;
+    right: 0.3rem;
+    bottom: 0;
+    margin-top: .1rem;
 }
 
 #choose_area .select-area-box {
-  padding-bottom: .94rem;
+    padding-bottom: .94rem;
 }
 
 #choose_area .select-area-box .tab {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  color: #1d1d1d;
-  background: #fff;
-  font-size: .3rem;
-  padding: .2rem .5rem;
-  border-bottom: 1px solid #e0e0e0;
-  box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #1d1d1d;
+    background: #fff;
+    font-size: .3rem;
+    padding: .2rem .5rem;
+    border-bottom: 1px solid #e0e0e0;
+    box-sizing: border-box;
 }
 
 #choose_area .select-area-box .tab .province {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 #choose_area .select-area-box .tab .province .checkbox {
-  width: .4rem;
-  height: .4rem;
-  border: 1px solid #ddd;
-  border-radius: 50%;
-  margin-right: .2rem;
-  -webkit-appearance: none;
-  background: #fff;
+    width: .4rem;
+    height: .4rem;
+    border: 1px solid #ddd;
+    border-radius: 50%;
+    margin-right: .2rem;
+    -webkit-appearance: none;
+    background: #fff;
 }
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
-  border: 0;
-  background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
+    background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
-  border: 0;
-  background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
+    background-size: 100% 100%;
+    opacity: 1;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half {
-  border: 0 !important;
-  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half[disabled] {
-  border: 0 !important;
-  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
+    opacity: 1 !important;
 }
 
 #choose_area .select-area-box .tab .optional {
-  color: #2CB7CA;
-  font-size: 0.28rem;
-  margin-left: -2.8rem;
+    color: #2CB7CA;
+    font-size: 0.28rem;
+    margin-left: -2.8rem;
 }
 
 #choose_area .select-area-box label::after {
-  font-size: 14px;
-  float: right;
-  margin-right: 15px;
+    font-size: 14px;
+    float: right;
+    margin-right: 15px;
 }
 
 #choose_area .select-area-box .tab_content {
-  display: none;
-  font-size: .28rem;
-  padding: .1rem .3rem;
-  text-align: center;
+    display: none;
+    font-size: .28rem;
+    padding: .1rem .3rem;
+    text-align: center;
 }
 
 #choose_area .select-area-box .tab_content .city {
-  float: left;
-  padding: .1rem .2rem;
-  background: #fff;
-  margin: .1rem 0 .1rem .1rem;
-  border-radius: 0.04rem;
-  font-size: .28rem;
+    float: left;
+    padding: .1rem .2rem;
+    background: #fff;
+    margin: .1rem 0 .1rem .1rem;
+    border-radius: 0.04rem;
+    font-size: .28rem;
 }
 
 #choose_area .select-area-box .tab_content .active {
-  background: #2cb7ca;
-  color: #fff;
+    background: #2cb7ca;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .active[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .city[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .index {
-  padding: .3rem .3rem .1rem .3rem;
-  font-size: .32rem;
+    padding: .3rem .3rem .1rem .3rem;
+    font-size: .32rem;
 }
 
 #choose_area .slide {
-  background: transparent;
-  position: fixed;
-  right: 0;
-  top: 50%;
-  height: 8.5rem;
-  width: .4rem;
-  font-size: .26rem;
-  text-align: center;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  padding: .1rem 0;
-  align-items: center;
-  margin-top: -4.25rem;
-  z-index: 9999;
+    background: transparent;
+    position: fixed;
+    right: 0;
+    top: 50%;
+    height: 8.5rem;
+    width: .4rem;
+    font-size: .26rem;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    padding: .1rem 0;
+    align-items: center;
+    margin-top: -4.25rem;
+    z-index: 9999;
 }
 
 #choose_area .slide a {
-  margin-bottom: .1rem;
+    margin-bottom: .1rem;
+}
+
+.icon.iconfont {
+    display: inline-block;
 }
+
+.icon.iconfont.up {
+    display: inline-block;
+    transform: rotate(-180deg);
+}

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

@@ -54,18 +54,28 @@ function createMoreCity(arr) {
     return tempHtml
 }
 
+var animatedRuning = false;
+
+function checkAnimatedRuning() {
+    if (animatedRuning) {
+        return true
+    }
+    animatedRuning = true;
+    setTimeout(function () {
+        animatedRuning = false;
+    }, 500);
+    return false
+}
+
 // 省下拉市事件
 function slideFun(obj) {
+    if (checkAnimatedRuning()) {
+        return
+    }
     if (obj.next('.tab_content:not(:animated)').css("display") == "block") {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(0)"
-        })
+        obj.children().children('i').removeClass("up");
     } else {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(-180deg)"
-        })
+        obj.children().children('i').addClass("up");
     }
     obj.toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
     obj.parent().siblings().children('.tab').removeClass('selected');
@@ -169,7 +179,7 @@ function initResult() {
                     // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
                     if (isAll != -1) {
                         $(this).parent().siblings().children('.city').addClass('active').attr('disabled', true);
-                        $(this).parent('.tab').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
+                        $(this).parent('.tab').unbind('click').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
                     } else {
                         $(this).parent().siblings().children('.city').addClass('active').removeAttr('disabled')
                     }
@@ -189,7 +199,7 @@ function initResult() {
                         that.bind('click', function () {
                             slideFun($(this));
                         })
-                        $(this).addClass('active').parent().siblings('.tab').find('input').addClass('half');
+                        $(this).addClass('active').removeAttr('disabled').parent().siblings('.tab').find('input').addClass('half');
                         return;
                     }
                 })
@@ -233,18 +243,15 @@ function initResult() {
 $(function () {
     // 省下拉事件
     $('.tab:not(.municipality)').on('click', function () {
+        if (checkAnimatedRuning()) {
+            return
+        }
         if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(0)"
-            })
+            $(this).children().children('i').removeClass("up");
         } else {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(-180deg)"
-            })
+            $(this).children().children('i').addClass("up");
         }
-        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500);
         $(this).parent().siblings().children('.tab').removeClass('selected');
     });
     getData();
@@ -358,7 +365,8 @@ $(function () {
         $('.checkbox').prop('checked', false).removeAttr('disabled');
         $('.city').removeClass('active');
         $('.tab_content').slideUp();
-        $('.optional').remove()
+        $('.optional').remove();
+        $('.tab').find('i').removeClass("up");
         init();
     })
     // 确定修改事件
@@ -380,4 +388,4 @@ function theSameAs(select) {
     let tmp1 = getAreaClassArr(select);
     let tmp2 = getAreaClassArr(areaData.data.area);
     return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
-}
+}

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

@@ -658,6 +658,9 @@
                 document.querySelector('#' + s).scrollIntoView({block: 'center'});
             })
             $(".select-area-box .tab:not(.municipality)").on('click', function (event) {
+                if (AreaChoose.checkAnimatedRuning()) {
+                    return
+                }
                 if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
                     $(this).children().children('i').css({
                         "display": "inline-block",
@@ -766,6 +769,17 @@
                 $('.tips_d_money').text('¥' + price);
             }
 
+        },
+        animatedRuning: false,
+        checkAnimatedRuning: function () {
+            if (AreaChoose.animatedRuning) {
+                return true
+            }
+            AreaChoose.animatedRuning = true;
+            setTimeout(function () {
+                AreaChoose.animatedRuning = false;
+            }, 500);
+            return false
         }
     };
 

+ 31 - 4
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -295,6 +295,7 @@
                     this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
                 }
                 {{if eq .T.orderType 5 }}
+                $('#payHandle').text("立即续费");
                 //即将到期 回显已购买
                 if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
                     $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
@@ -315,7 +316,33 @@
                     }, false)
                 }
                 {{end}}
+                {{if .T.again}}    //再次购买回显
+                {{if eq .T.again 1 }}
+                var orderCode = getParam("orderCode")
+                if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                    $DoPost("/subscribepay/orderListDetails/getVipOrderInfo", {"orderCode": orderCode}, function (r) {
+                        if (!$.isEmptyObject(r.data.area)) {
+                            purchase.areaSelect = r.data.area
+                        } else {
+                            purchase.areaSelect = {"全国": []}
+                        }
+                        if (r.data.industry.length != 0) {
+                            purchase.industrySelect = r.data.industry
+                        } else {
+                            purchase.industrySelect = ["全部行业"]
+                        }
+//                          if (r.timeSelect!=undefined&&r.company!=undefined){
+//                         		purchase.timeSelect=[r.timeSelect,r.company];
+//                          }
+                        $(".weui-icon-checked").click();
+                        sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                        sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                        //sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
 
+                    }, false)
+                }
+                {{end}}
+                {{end}}
                 if (sessionStorage.getItem("vipSubSelectTime")) {
                     this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
                 }
@@ -363,9 +390,9 @@
                 }
                 $(".choose_area").val(tipTxt);
                 //$(".add_tips.area").text(tipTxt).css("display", "");
-            }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+            } else if (!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"]) {
                 $(".choose_area").val("全国");
-            }else {
+            } else {
                 $(".choose_area").val("");
             }
         },
@@ -396,9 +423,9 @@
             }*/
             if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
                 $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
-            }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+            } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                 $(".choose_industry").val("全部行业");
-            }else{
+            } else {
                 $(".choose_industry").val("");
             }
         },

+ 3 - 0
src/jfw/modules/subscribepay/src/config/config.go

@@ -35,6 +35,9 @@ type config struct {
 		Pwd  string
 		User string
 	}
+	ExpireRemind   []int
+	WxTplExpire    string
+	OrderCountdown interface{}
 }
 type timeTaskConfig struct {
 	ExpireRemind   string   //到期提醒

+ 6 - 9
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -76,7 +76,7 @@ func (this *vipSubscribeStruct) PayCallBack(param *CallBackParam) bool {
 	orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 		"out_trade_no": param.OutTradeno,
 		"order_money":  param.TotalFee,
-	}, "id,filter,order_code,order_status,user_id,vip_starttime,vip_endtime", "")
+	}, "id,filter,order_code,order_status,user_id,vip_starttime,vip_endtime,vip_type,prepay_time", "")
 	pay_time := qutil.FormatDate(&now, qutil.Date_Full_Layout)
 	if orderdata == nil {
 		log.Println("未找到订单")
@@ -142,8 +142,11 @@ func (this *vipSubscribeStruct) PayCallBack(param *CallBackParam) bool {
 		//	} else if vmsg.OrderType == 6 { //下月升级未生效再次升级
 		//		flag = JyVipSubStruct.UpgradeSubVipTwo(userid, vmsg, qutil.ObjToString((*orderdata)["vip_endtime"]), false)
 	}
-	//支付成功后 其他未支付vip订阅订单 变为已取消
+	//支付成功后
 	if flag {
+		//支付提醒
+		util.MsgRemind.PaySuccess(qutil.IntAll((*orderdata)["id"]), qutil.ObjToString((*orderdata)["order_code"]), qutil.ObjToString((*orderdata)["user_id"]), qutil.ObjToString((*orderdata)["prepay_time"]), qutil.IntAllDef((*orderdata)["vip_type"], -1))
+		//其他未支付vip订阅订单 变为已取消
 		go PayCancel(userid)
 	}
 	return flag
@@ -151,13 +154,7 @@ func (this *vipSubscribeStruct) PayCallBack(param *CallBackParam) bool {
 
 //设置开始使用vip订阅
 func (this *vipSubscribeStruct) StartSubVip(userId string, vmsg VipSimpleMsg, startTime, endTime time.Time, isTrial bool) bool {
-	buyset := &SubvipBuySet{}
-	if !isTrial { //购买
-		buyset = JyVipSubStruct.NewBuySet(vmsg.Area, vmsg.Industry)
-	} else { //试用
-		buyset.AreaCount = -1       //城市数量
-		buyset.BuyerclassCount = -1 //行业数量
-	}
+	buyset := JyVipSubStruct.NewBuySet(vmsg.Area, vmsg.Industry)
 	if !util.MQFW.UpdateById("user", userId,
 		bson.M{"$set": bson.M{
 			"o_vipjy.i_trial":      -1,                      //已激活试用

+ 96 - 2
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -22,6 +22,93 @@ type AfterPay struct {
 	updateUserTips xweb.Mapper `xweb:"/afterPay/updateUserTips"` //修改用户未分类关键词提醒
 	directSubKWS   xweb.Mapper `xweb:"/afterPay/directSubKWS"`   //搜索列表直接订阅关键词
 	checkOrder     xweb.Mapper `xweb:"/afterPay/checkOrder"`     //是否有未执行的订单
+	fastImport     xweb.Mapper `xweb:"/afterPay/fastImport"`     //快速导入关键词
+}
+
+//
+func (a *AfterPay) FastImport() error {
+	defer qutil.Catch()
+	userId, _ := a.GetSession("userId").(string)
+	flagInt := 0
+	var _keys []map[string]interface{}
+	kwsCount := 0
+	classify_index := 0
+	kws_index := 0
+	if userId != "" {
+		data, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1,"i_vip_fastimport":1}`)
+		if ok && data != nil && len(*data) > 0 {
+			o_jy, _ := (*data)["o_jy"].(map[string]interface{})
+			if o_jy["a_key"] != nil && len(o_jy["a_key"].([]interface{})) > 0 { //普通用户存在设置的关键词
+				_keys = qutil.ObjArrToMapArr(o_jy["a_key"].([]interface{})) //普通用户设置的关键词
+				o_vipjy, _ := (*data)["o_vipjy"].(map[string]interface{})
+				if o_vipjy["a_items"] != nil {
+					a_items := o_vipjy["a_items"].([]interface{})
+					for k, v := range a_items {
+						tmp := qutil.ObjToMap(v.(map[string]interface{}))
+						a_key := (*tmp)["a_key"].([]interface{})
+						kwsCount = kwsCount + len(a_key)
+						if (*tmp)["s_item"] == "未分类" {
+							classify_index = k
+							kws_index = len(a_key)
+						}
+						for _, n := range a_key {
+							ntmp := qutil.ObjToMap(n.(interface{}))
+							nkey := qutil.ObjArrToStringArr((*ntmp)["key"].([]interface{}))
+							for i, m := range _keys {
+								mkey := qutil.ObjArrToStringArr(m["key"].([]interface{}))
+								if strings.Join(nkey, " ") == strings.Join(mkey, " ") {
+									_keys = append(_keys[:i], _keys[i+1:]...)
+								}
+							}
+						}
+					}
+				}
+				if len(_keys) > 0 {
+					if kwsCount >= 300 {
+						flagInt = -3 //超过最大设置量
+					} else {
+						if len(_keys)+kwsCount >= 300 {
+							_keys = _keys[:(300 - kwsCount)]
+						}
+						if classify_index == 0 && kws_index == 0 {
+							//首次添加分类和关键词
+							var o_kws = make(map[string]interface{})
+							classify_name := "未分类"
+							o_kws["s_item"] = classify_name
+							o_kws["i_tips"] = 0
+							o_kws["a_key"] = _keys
+							ok := util.MQFW.UpdateById("user", userId, bson.M{
+								"$push": bson.M{"o_vipjy.a_items": o_kws},
+								"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix(), "i_vip_fastimport": 1},
+							})
+							if ok {
+								flagInt = 1 //导入成功
+							}
+						} else {
+							ok := util.MQFW.UpdateById("user", userId, bson.M{
+								"$push": bson.M{"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".a_key": bson.M{"$each": _keys}},
+								"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix(), "i_vip_fastimport": 1},
+							})
+							if ok {
+								flagInt = 1 //导入成功
+							}
+						}
+					}
+				} else {
+					flagInt = -2 //普通用户的关键词都已存在
+				}
+				log.Println(classify_index, kws_index, _keys)
+
+			} else {
+				flagInt = -1 //普通用户暂未设置关键词
+			}
+		}
+	}
+	a.ServeJson(map[string]interface{}{
+		"flagInt": flagInt,
+		"kwMap":   _keys,
+	})
+	return nil
 }
 
 //
@@ -301,10 +388,17 @@ func (a *AfterPay) GetUserInfo() error {
 	userId, _ := a.GetSession("userId").(string)
 	var userData *map[string]interface{}
 	if userId != "" {
-		userData, _ = util.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1}`)
+		userData, _ = util.MQFW.FindById("user", userId, `{"o_vipjy":1,"o_jy":1,"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1,"i_vip_fastimport":1}`)
 		if *userData != nil && (qutil.IntAll((*userData)["i_vip_status"]) == 1 || qutil.IntAll((*userData)["i_vip_status"]) == 2) {
 			data := qutil.ObjToMap((*userData)["o_vipjy"])
 			i_vip_status := qutil.IntAll((*userData)["i_vip_status"])
+			o_jy, _ := (*userData)["o_jy"].(map[string]interface{})
+			if o_jy["a_key"] != nil && len(o_jy["a_key"].([]interface{})) > 0 { //普通用户存在设置的关键词
+				(*userData)["ordinarykc"] = len(o_jy["a_key"].([]interface{}))
+			} else {
+				(*userData)["ordinarykc"] = 0
+			}
+			delete((*userData), "o_jy")
 			//区域
 			_buyset := qutil.ObjToMap((*data)["o_buyset"].(interface{}))
 			var area_i = qutil.IntAll((*_buyset)["areacount"])
@@ -371,7 +465,7 @@ func (a *AfterPay) GetUserInfo() error {
 			} else {
 				(*data)["a_infotype"] = ""
 			}
-
+			(*userData)["i_vip_fastimport"] = qutil.IntAll((*userData)["i_vip_fastimport"])
 		}
 		log.Println("userId:", userId)
 		a.ServeJson(map[string]interface{}{

+ 28 - 13
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -58,6 +58,15 @@ func (this *OrderListDetails) GetOrderPayAllMsg() {
 			//"order_status": 1,
 		}
 		oData := util.Mysql.FindOne(tableName_order, query, "prepay_time,create_time,pay_time,pay_way,original_price,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type", "")
+
+		//配置订单到期时间
+		order_countdown := config.Config.OrderCountdown //配置文件读取
+		if strings.Contains(qutil.ObjToString(order_countdown), "h") {
+			(*oData)["order_countdown"] = qutil.ObjToString(order_countdown)
+		} else {
+			(*oData)["order_countdown"] = qutil.IntAll(order_countdown)
+		}
+
 		//查询订单信息
 		if oData == nil || len(*oData) == 0 {
 			return &entity.FuncResult{false, errors.New("未找到此订单"), nil}
@@ -113,7 +122,9 @@ func (o *OrderListDetails) MyOrder() error {
 		queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 	}
 	//总数
-	haveNextPage, res, _ := o.Datas(queryM, 1)
+	page_size := o.GetString("page_size")
+	i_page_size, _ := strconv.Atoi(page_size)
+	haveNextPage, res, _ := o.Datas(queryM, 1, i_page_size)
 	if res != nil {
 		o.SetRes(res, queryM)
 	}
@@ -151,7 +162,7 @@ func (o *OrderListDetails) MyOrderPaging() error {
 	} else {
 		queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 	}
-	haveNextPage, res, _ := o.Datas(queryM, pageNum)
+	haveNextPage, res, _ := o.Datas(queryM, pageNum, 10)
 	if res != nil {
 		o.SetRes(res, queryM)
 	}
@@ -189,7 +200,7 @@ func (o *OrderListDetails) DeleteOrder() error {
 		} else {
 			queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 		}
-		haveNextPage, res, _ := o.Datas(queryM, pageNum)
+		haveNextPage, res, _ := o.Datas(queryM, pageNum, 10)
 		if len(res) > 0 {
 			res = res[0:1]
 			//用于删除订单后 判断新增的订单之后 是否有下一页
@@ -415,22 +426,26 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 	queryM["product_type"] = "VIP订阅"
 	lastbuy := *util.Mysql.Find(tableName_order, queryM, "order_code,pay_time", "pay_time desc", -1, 0)
 	lastbuy_code := ""
+	var create_time_stamp int64 = 0
 	if len(lastbuy) > 0 && lastbuy != nil {
 		lastbuy_code = qutil.ObjToString(lastbuy[0]["order_code"])
 	}
 	delete(queryM, "product_type")
 	for _, v := range res {
-		//获取单号 如果是vip 48小时取消
+		//获取单号 如果是vip xx小时取消
 		order_code := qutil.ObjToString(v["order_code"])
 		create_time_str := qutil.ObjToString(v["create_time"])
 		//创建时间戳
 		create_time, _ := time.ParseInLocation(qutil.Date_Full_Layout, create_time_str, time.Local)
-		//48小时后的时间戳
-		//create_time_stamp_48 := create_time.AddDate(0, 0, 2).Unix()
-		//测试暂时改成1h
-		onehour, _ := time.ParseDuration("1h")
-		create_time_stamp := create_time.Add(onehour).Unix()
-		//当前时间时间戳
+
+		order_countdown := config.Config.OrderCountdown //配置文件读取
+		if strings.Contains(qutil.ObjToString(order_countdown), "h") {
+			onehour, _ := time.ParseDuration(qutil.ObjToString(order_countdown))
+			create_time_stamp = create_time.Add(onehour).Unix()
+		} else {
+			i_countdown := qutil.IntAll(order_countdown)
+			create_time_stamp = create_time.AddDate(0, 0, i_countdown).Unix()
+		}
 		now_time_stamp := time.Now().Unix()
 		if create_time_stamp < now_time_stamp && qutil.ObjToString(v["product_type"]) == "VIP订阅" {
 			if v["order_status"] != nil {
@@ -481,8 +496,8 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 }
 
 //查询数据
-func (o *OrderListDetails) Datas(queryM map[string]interface{}, pageNum int) (haveNextPage bool, result []map[string]interface{}, err error) {
-	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company", "create_time desc", -1, 0)
+func (o *OrderListDetails) Datas(queryM map[string]interface{}, pageNum, pagesize_max int) (haveNextPage bool, result []map[string]interface{}, err error) {
+	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type", "create_time desc", -1, 0)
 	if len(res) > 0 {
 		start := (pageNum - 1) * pagesize_max
 		end := pageNum * pagesize_max
@@ -526,7 +541,7 @@ func getPayTransactionId(payWay, tradeNo string) (transaction_id string) {
 	return
 }
 
-//检查vip订单是否到期,如果到期 订单取消48h
+//检查vip订单是否到期,如果到期 订单取消
 func FortyEightHoursCancel(order string, create_time_stamp, now_time_stamp int64) {
 	//查询vip订单条件
 	queryM := map[string]interface{}{

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

@@ -146,6 +146,8 @@ func (this *SubVipPayOrder) CreateOrder() {
 		if orderid == -1 {
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
 		}
+		//支付提醒
+		util.MsgRemind.Add(qutil.IntAll(orderid), totalfee, -1, 0, ordercode, userId, now.Unix())
 		return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode, "res": payStr}}
 	}()
 	if r.Err != nil {
@@ -172,7 +174,7 @@ func (this *SubVipPayOrder) OrderToPay() {
 			"order_code":   orderCode,
 			"order_status": 0,
 		}
-		oData := util.Mysql.FindOne("dataexport_order", query, "code_url,prepay_time,pay_way,order_money", "")
+		oData := util.Mysql.FindOne("dataexport_order", query, "id,code_url,prepay_time,pay_way,order_money,vip_type", "")
 		if oData == nil || len(*oData) == 0 {
 			return &entity.FuncResult{false, errors.New("未知订单"), nil}
 		}
@@ -233,6 +235,12 @@ func (this *SubVipPayOrder) OrderToPay() {
 		if !ok {
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
 		}
+		vip_type := qutil.IntAll((*oData)["vip_type"])
+		if vip_type == 0 {
+			vip_type = -1
+		}
+		//刷新支付提醒
+		util.MsgRemind.Add(qutil.IntAll((*oData)["id"]), totalfee, vip_type, 0, orderCode, userId, now.Unix())
 		return &entity.FuncResult{true, nil, map[string]interface{}{"res": jsPayParam}}
 	}()
 	if r.Err != nil {

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

@@ -324,6 +324,8 @@ func (this *TrialOrder) TrialPay() {
 		if !entity.JyVipSubStruct.StartSubVip(userId, filter, now, endTime, true) { //设置开始试用
 			return &entity.FuncResult{false, errors.New("开通试用异常"), nil}
 		}
+		//支付提醒
+		util.MsgRemind.PaySuccess(qutil.IntAll(orderid), ordercode, userId, qutil.FormatDate(&now, qutil.Date_Full_Layout), 0)
 		return &entity.FuncResult{true, nil, map[string]interface{}{"code": ordercode}}
 	}()
 	if r.Err != nil {

+ 78 - 83
src/jfw/modules/subscribepay/src/timetask/timetask.go

@@ -2,6 +2,7 @@ package timetask
 
 import (
 	. "config"
+	"encoding/hex"
 	"fmt"
 	"log"
 	qutil "qfw/util"
@@ -71,7 +72,7 @@ func syncVipUpgrade() {
 
 //每天0点 检查试用、vip服务是否到期
 func checkIsExpire() {
-	crontab(true, TimeTaskConfig.CheckIsExpire, func() {
+	crontab(false, TimeTaskConfig.CheckIsExpire, func() {
 		log.Println("定时任务,开始更新vip状态")
 		now_unix := time.Now().Unix()
 		sess := util.MQFW.GetMgoConn()
@@ -96,6 +97,7 @@ func checkIsExpire() {
 						"i_vip_status":     -i_vip_status,
 						"i_vip_expire_tip": 2,
 						"i_vip_subtips":    0,
+						"i_vip_fastimport": 0,
 					},
 				})
 				delSess := util.MQFW.GetMgoConn()
@@ -125,7 +127,7 @@ func checkIsExpire() {
 
 //即将到期或者已到期发推送消息
 func expireRemind() {
-	crontab(true, TimeTaskConfig.ExpireRemind, func() {
+	crontab(false, TimeTaskConfig.ExpireRemind, func() {
 		log.Println("定时任务,到期提醒,开始推送消息")
 		sess := util.MQFW.GetMgoConn()
 		defer util.MQFW.DestoryMongoConn(sess)
@@ -151,90 +153,83 @@ func expireRemind() {
 			i_vip_status := qutil.IntAll(m["i_vip_status"])
 			i_vip_expire_tip := qutil.IntAll(m["i_vip_expire_tip"])
 			wxPushOk, appPushOk := false, false
-			if i_vip_expire_tip == 1 || i_vip_expire_tip == 2 {
-				tp := "will"
-				if i_vip_expire_tip == 2 {
-					tp = "exprie"
+			if i_vip_expire_tip != 1 && i_vip_expire_tip != 2 {
+				continue
+			}
+			l_vip_starttime := qutil.Int64All(m["l_vip_starttime"])
+			l_vip_endtime := qutil.Int64All(m["l_vip_endtime"])
+			s_m_openid := qutil.ObjToString(m["s_m_openid"])
+			isPushWx := qutil.IntAllDef(m["i_ispush"], 1)
+			s_jpushid := qutil.ObjToString(m["s_jpushid"])
+			s_opushid := qutil.ObjToString(m["s_opushid"])
+			s_appponetype := qutil.ObjToString(m["s_appponetype"])
+			log.Println("到期提醒,推送消息", _id, "i_vip_status", i_vip_status, "l_vip_starttime", l_vip_starttime, "l_vip_endtime", l_vip_endtime, "i_vip_expire_tip", i_vip_expire_tip, "s_m_openid", s_m_openid, "isPushWx", isPushWx, "s_appponetype", s_appponetype, "s_jpushid", s_jpushid, "s_opushid", s_opushid)
+			tp := ""
+			tplId, first_value, keyword1_value, keyword2_value, keyword3_value, keyword4_value, remark := "", "", "", "", "", "", ""
+			switch i_vip_status {
+			case 1, -1:
+				if i_vip_expire_tip == 1 {
+					tp = "ontrial_soonexprie"
+					tplId = MessageConfig.WxTpl_OnTrial_SoonExpire.Id
+					first_value = MessageConfig.WxTpl_OnTrial_SoonExpire.First.Value
+					remark = MessageConfig.WxTpl_OnTrial_SoonExpire.Remark.Value
+				} else if i_vip_expire_tip == 2 {
+					tp = "ontrial_expried"
+					tplId = MessageConfig.WxTpl_OnTrial_Expired.Id
+					first_value = MessageConfig.WxTpl_OnTrial_Expired.First.Value
+					remark = MessageConfig.WxTpl_OnTrial_Expired.Remark.Value
 				}
-				l_vip_starttime := qutil.Int64All(m["l_vip_starttime"])
-				l_vip_endtime := qutil.Int64All(m["l_vip_endtime"])
-				s_m_openid := qutil.ObjToString(m["s_m_openid"])
-				isPushWx := qutil.IntAllDef(m["i_ispush"], 1)
-				s_jpushid := qutil.ObjToString(m["s_jpushid"])
-				s_opushid := qutil.ObjToString(m["s_opushid"])
-				s_appponetype := qutil.ObjToString(m["s_appponetype"])
-				order := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
-					"user_id":      _id,
-					"order_status": 1,
-					"product_type": "VIP订阅",
-				}, "id", "pay_time desc")
-				orderId := ""
-				if order != nil && len(*order) > 0 {
-					orderId = fmt.Sprint((*order)["id"])
+				keyword1_value = qutil.ObjToString(m["s_nickname"])
+				keyword2_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
+				break
+			case 2, -2:
+				if i_vip_expire_tip == 1 {
+					tp = "soonexprie"
+					tplId = MessageConfig.WxTpl_SoonExpire.Id
+					first_value = MessageConfig.WxTpl_SoonExpire.First.Value
+					keyword2_value = MessageConfig.WxTpl_SoonExpire.Keyword2.Value
+					keyword3_value = MessageConfig.WxTpl_SoonExpire.Keyword3.Value
+					remark = MessageConfig.WxTpl_SoonExpire.Remark.Value
+				} else if i_vip_expire_tip == 2 {
+					tp = "expried"
+					tplId = MessageConfig.WxTpl_Expired.Id
+					first_value = MessageConfig.WxTpl_Expired.First.Value
+					keyword2_value = MessageConfig.WxTpl_Expired.Keyword2.Value
+					keyword3_value = MessageConfig.WxTpl_Expired.Keyword3.Value
+					remark = MessageConfig.WxTpl_Expired.Remark.Value
 				}
-				log.Println("到期提醒,推送消息", _id, "i_vip_status", i_vip_status, "orderId", orderId, "l_vip_starttime", l_vip_starttime, "l_vip_endtime", l_vip_endtime, "i_vip_expire_tip", i_vip_expire_tip, "s_m_openid", s_m_openid, "isPushWx", isPushWx, "s_appponetype", s_appponetype, "s_jpushid", s_jpushid, "s_opushid", s_opushid)
-				if isPushWx == 1 && s_m_openid != "" {
-					tplId, first_value, keyword1_value, keyword2_value, keyword3_value, keyword4_value, remark := "", "", "", "", "", "", ""
-					switch i_vip_status {
-					case 1, -1:
-						if i_vip_expire_tip == 1 {
-							tplId = MessageConfig.WxTpl_OnTrial_SoonExpire.Id
-							first_value = MessageConfig.WxTpl_OnTrial_SoonExpire.First.Value
-							remark = MessageConfig.WxTpl_OnTrial_SoonExpire.Remark.Value
-						} else if i_vip_expire_tip == 2 {
-							tplId = MessageConfig.WxTpl_OnTrial_Expired.Id
-							first_value = MessageConfig.WxTpl_OnTrial_Expired.First.Value
-							remark = MessageConfig.WxTpl_OnTrial_Expired.Remark.Value
-						}
-						keyword1_value = qutil.ObjToString(m["s_nickname"])
-						keyword2_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
-						break
-					case 2, -2:
-						if i_vip_expire_tip == 1 {
-							tplId = MessageConfig.WxTpl_SoonExpire.Id
-							first_value = MessageConfig.WxTpl_SoonExpire.First.Value
-							keyword2_value = MessageConfig.WxTpl_SoonExpire.Keyword2.Value
-							keyword3_value = MessageConfig.WxTpl_SoonExpire.Keyword3.Value
-							remark = MessageConfig.WxTpl_SoonExpire.Remark.Value
-						} else if i_vip_expire_tip == 2 {
-							tplId = MessageConfig.WxTpl_Expired.Id
-							first_value = MessageConfig.WxTpl_Expired.First.Value
-							keyword2_value = MessageConfig.WxTpl_Expired.Keyword2.Value
-							keyword3_value = MessageConfig.WxTpl_Expired.Keyword3.Value
-							remark = MessageConfig.WxTpl_Expired.Remark.Value
-						}
-						keyword1_value = qutil.ObjToString(m["s_nickname"])
-						keyword4_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
-						break
-					}
-					tmplData := map[string]*qrpc.TmplItem{
-						"first": &qrpc.TmplItem{
-							Value: first_value,
-						},
-						"keyword1": &qrpc.TmplItem{
-							Value: keyword1_value,
-						},
-						"keyword2": &qrpc.TmplItem{
-							Value: keyword2_value,
-						},
-						"keyword3": &qrpc.TmplItem{
-							Value: keyword3_value,
-						},
-						"keyword4": &qrpc.TmplItem{
-							Value: keyword4_value,
-						},
-						"remark": &qrpc.TmplItem{
-							Value: remark,
-						},
-					}
-					wxPushOk, _ = qrpc.WxSendTmplMsg(Config.Weixinrpc, &qrpc.WxTmplMsg{
-						OpenId:   s_m_openid,
-						TplId:    tplId,
-						TmplData: tmplData,
-						Url:      Config.WebDomain + "/front/sess/" + util.Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprint("type=%s&orderid=%d", tp, orderId),
-					})
-					log.Println("到期提醒,微信推送", _id, wxPushOk)
+				keyword1_value = qutil.ObjToString(m["s_nickname"])
+				keyword4_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
+				break
+			}
+			if isPushWx == 1 && s_m_openid != "" {
+				tmplData := map[string]*qrpc.TmplItem{
+					"first": &qrpc.TmplItem{
+						Value: first_value,
+					},
+					"keyword1": &qrpc.TmplItem{
+						Value: keyword1_value,
+					},
+					"keyword2": &qrpc.TmplItem{
+						Value: keyword2_value,
+					},
+					"keyword3": &qrpc.TmplItem{
+						Value: keyword3_value,
+					},
+					"keyword4": &qrpc.TmplItem{
+						Value: keyword4_value,
+					},
+					"remark": &qrpc.TmplItem{
+						Value: remark,
+					},
 				}
+				wxPushOk, _ = qrpc.WxSendTmplMsg(Config.Weixinrpc, &qrpc.WxTmplMsg{
+					OpenId:   s_m_openid,
+					TplId:    tplId,
+					TmplData: tmplData,
+					Url:      Config.WebDomain + "/front/sess/" + util.Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + hex.EncodeToString([]byte(fmt.Sprintf("type=%s", tp))),
+				})
+				log.Println("到期提醒,微信推送", _id, wxPushOk)
 			}
 			if wxPushOk || appPushOk {
 				util.MQFW.UpdateById("user", _id, map[string]interface{}{

+ 6 - 6
src/jfw/modules/subscribepay/src/util/db.go

@@ -17,12 +17,12 @@ var Ca_Log = &ca.Cassandra{}
 
 func init() {
 	//初始化cassandra
-	// Ca_Log.ViewCacheLen = true
-	// Ca_Log.InitCassandra("jianyu",
-	// 	Config.Cassandra.Size,
-	// 	Config.Cassandra.Host,
-	// 	map[string]int{"port": Config.Cassandra.Port},
-	// )
+	Ca_Log.ViewCacheLen = true
+	Ca_Log.InitCassandra("jianyu",
+		Config.Cassandra.Size,
+		Config.Cassandra.Host,
+		map[string]int{"port": Config.Cassandra.Port},
+	)
 	//初始化elastic
 	elastic.InitElasticSize(
 		Config.Elasticsearch,

+ 45 - 20
src/jfw/modules/subscribepay/src/util/msgremind.go

@@ -3,6 +3,7 @@ package util
 
 import (
 	. "config"
+	"encoding/hex"
 	"fmt"
 	"log"
 	"math"
@@ -26,7 +27,7 @@ type unpaidOrder struct {
 	orderId      int    //订单id
 	orderCode    string //订单编号
 	userId       string //用户id
-	createTime   int64  //下单时间
+	prepayTime   int64  //下单时间
 	remindStatus int    //1-下单时间2小时提醒 2-剩余2小时自动关闭时再次提醒
 	vipType      int    //-1:直接购买 0:试用 1:续费 2:升级
 	orderMoney   int    //订单金额
@@ -39,14 +40,14 @@ type unpaidOrder struct {
  *@param remindStatus 1-下单时间2小时提醒 2-剩余2小时自动关闭时再次提醒
  *@param orderCode 订单编号
  *@param userId 用户id
- *@param createTime 购买时间
+ *@param prepayTime 购买时间
  */
-func (m *msgRemind) Add(orderId, orderMoney, vipType, remindStatus int, orderCode, userId string, createTime int64) {
-	log.Println("未支付待提醒订单加入", orderId, orderCode, userId, createTime)
+func (m *msgRemind) Add(orderId, orderMoney, vipType, remindStatus int, orderCode, userId string, prepayTime int64) {
+	log.Println("未支付待提醒订单加入", orderId, orderCode, userId, prepayTime)
 	m.unpaidOrders.Store(orderId, &unpaidOrder{
 		orderCode:    orderCode,
 		userId:       userId,
-		createTime:   createTime,
+		prepayTime:   prepayTime,
 		orderId:      orderId,
 		orderMoney:   orderMoney,
 		vipType:      vipType,
@@ -59,13 +60,13 @@ func (m *msgRemind) Add(orderId, orderMoney, vipType, remindStatus int, orderCod
  *@param orderId 订单id
  *@param orderCode 订单编号
  *@param userId 用户id
- *@param createTime 购买时间
+ *@param prepayTime 购买时间
  *@param vipType -1:直接购买 0:试用 1:续费 2:升级
  */
-func (m *msgRemind) PaySuccess(orderId int, orderCode, userId, createTime string, vipType int) {
+func (m *msgRemind) PaySuccess(orderId int, orderCode, userId, prepayTime string, vipType int) {
 	go func() {
 		defer util.Catch()
-		log.Println("支付成功以后,消息提醒处理", orderId, orderCode, userId, createTime)
+		log.Println("支付成功以后,消息提醒处理", orderId, orderCode, userId, prepayTime)
 		m.unpaidOrders.Delete(orderId)
 		user, ok := MQFW.FindById("user", userId, `{"s_m_openid":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_ispush":1,"l_vip_endtime":1}`)
 		if !ok || user == nil || len(*user) == 0 {
@@ -94,19 +95,29 @@ func (m *msgRemind) PaySuccess(orderId int, orderCode, userId, createTime string
 						Value: orderCode,
 					},
 					"keyword3": &qrpc.TmplItem{
-						Value: strings.Split(createTime, " ")[0],
+						Value: strings.Split(prepayTime, " ")[0],
 					},
 					"keyword4": &qrpc.TmplItem{
 						Value: expireTime,
 					},
 				},
-				Url: Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprintf("type=paid&orderid=%d", orderId),
+				Url: Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + hex.EncodeToString([]byte(fmt.Sprintf("type=paid"))),
 			})
 			log.Println("支付成功,微信推送", userId, wxPushOk)
 		}
 	}()
 }
 
+func (m *msgRemind) getExpireTime() int64 {
+	order_countdown := Config.OrderCountdown //配置文件读取
+	if strings.Contains(util.ObjToString(order_countdown), "h") {
+		onehour, _ := time.ParseDuration(util.ObjToString(order_countdown))
+		return int64(onehour.Seconds())
+	} else {
+		return util.Int64All(order_countdown) * 24 * 60 * 60
+	}
+}
+
 func (m *msgRemind) getVipType(vipType int) string {
 	switch vipType {
 	case 0:
@@ -130,9 +141,9 @@ func (m *msgRemind) run() {
 			now_unix := time.Now().Unix()
 			remind_status := 0
 			//剩余2小时
-			if unpaidOrder.remindStatus != 2 && now_unix >= unpaidOrder.createTime+259200-TimeTaskConfig.UnpaidRemind.BeforeExpire {
+			if unpaidOrder.remindStatus != 2 && unpaidOrder.prepayTime+m.getExpireTime() < now_unix && now_unix >= unpaidOrder.prepayTime+m.getExpireTime()-TimeTaskConfig.UnpaidRemind.BeforeExpire {
 				remind_status = 2
-			} else if unpaidOrder.remindStatus == 0 && now_unix > unpaidOrder.createTime+TimeTaskConfig.UnpaidRemind.AfterOrder { //下单时间后2小时未支付
+			} else if unpaidOrder.remindStatus == 0 && now_unix > unpaidOrder.prepayTime+TimeTaskConfig.UnpaidRemind.AfterOrder { //下单时间后2小时未支付
 				remind_status = 1
 			}
 			if remind_status == 0 {
@@ -155,7 +166,7 @@ func (m *msgRemind) run() {
 						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.First.Value, unpaidOrder.orderCode),
 					},
 					"keyword1": &qrpc.TmplItem{
-						Value: util.FormatDateByInt64(&unpaidOrder.createTime, util.Date_Short_Layout),
+						Value: util.FormatDateByInt64(&unpaidOrder.prepayTime, util.Date_Short_Layout),
 					},
 					"keyword2": &qrpc.TmplItem{
 						Value: unpaidOrder.orderCode,
@@ -176,7 +187,7 @@ func (m *msgRemind) run() {
 					OpenId:   s_m_openid,
 					TplId:    MessageConfig.WxTpl_Unpaid.Id,
 					TmplData: tmplData,
-					Url:      Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprintf("type=unpaid&orderid=%d", orderId),
+					Url:      Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + hex.EncodeToString([]byte(fmt.Sprintf("type=unpaid&ordercode=%s", unpaidOrder.orderCode))),
 				})
 				log.Println("未支付订单,微信推送", unpaidOrder.userId, wxPushOk)
 			}
@@ -198,12 +209,25 @@ func (m *msgRemind) run() {
 		m.run()
 	})
 }
-
+func (m *msgRemind) gc() {
+	log.Println(m.getExpireTime())
+	time.AfterFunc(5*time.Minute, func() {
+		defer util.Catch()
+		m.unpaidOrders.Range(func(k interface{}, v interface{}) bool {
+			unpaidOrder, _ := v.(*unpaidOrder)
+			if time.Now().Unix() > unpaidOrder.prepayTime+m.getExpireTime() {
+				m.unpaidOrders.Delete(k)
+			}
+			return true
+		})
+		m.gc()
+	})
+}
 func init() {
 	go func() {
 		log.Println("开始加载72小时内的订单到内存中。。。")
 		startTime := time.Now().Local().AddDate(0, 0, -3).Format(util.Date_Full_Layout)
-		list := Mysql.SelectBySql("select id,order_code,order_money,user_id,create_time,remind_status,vip_type from dataexport_order where create_time>=? and product_type='VIP订阅' and order_status=0 and (remind_status<>2 or remind_status is null)", startTime)
+		list := Mysql.SelectBySql("select id,order_code,order_money,user_id,prepay_time,remind_status,vip_type from dataexport_order where prepay_time>=? and product_type='VIP订阅' and order_status=0 and (remind_status<>2 or remind_status is null)", startTime)
 		if list == nil {
 			log.Println("加载72小时内的订单到内存中失败")
 			return
@@ -211,18 +235,19 @@ func init() {
 		for _, v := range *list {
 			order_code, _ := v["order_code"].(string)
 			user_id, _ := v["user_id"].(string)
-			create_time, _ := v["create_time"].(string)
-			if order_code == "" || user_id == "" || create_time == "" {
+			prepay_time, _ := v["prepay_time"].(string)
+			if order_code == "" || user_id == "" || prepay_time == "" {
 				continue
 			}
-			createTime, err := time.ParseInLocation(util.Date_Full_Layout, create_time, time.Local)
+			prepayTime, err := time.ParseInLocation(util.Date_Full_Layout, prepay_time, time.Local)
 			if err != nil {
 				continue
 			}
 			orderId := util.IntAll(v["id"])
-			MsgRemind.Add(orderId, util.IntAll(v["order_money"]), util.IntAllDef(v["vip_type"], -1), util.IntAll(v["remind_status"]), order_code, user_id, createTime.Unix())
+			MsgRemind.Add(orderId, util.IntAll(v["order_money"]), util.IntAllDef(v["vip_type"], -1), util.IntAll(v["remind_status"]), order_code, user_id, prepayTime.Unix())
 		}
 		log.Println("加载72小时内的订单到内存中结束。。。", len(*list))
 	}()
 	MsgRemind.run()
+	MsgRemind.gc()
 }

+ 49 - 9
src/jfw/modules/weixin/src/wx/wx.go

@@ -319,8 +319,16 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 			}
 			result = "ok"
 		}
+		//pc端订阅页面 扫码回复vip连接也需要用此码
+		if pccodepre == "11" {
+			redis.Del("sso", "pc_subscribe_"+shareid)
+		}
 	} else {
 		subkey = ""
+		//如果vip订阅扫码
+		if pccodepre == "11" && util.ObjToString(redis.Get("sso", "pc_subscribe_reply_"+shareid)) == "1" {
+			result = "vipsubscribe##reply"
+		}
 	}
 	return user, result, fmt.Sprint(subkey)
 }
@@ -498,6 +506,9 @@ func saveUser(u *UserInfo, source, pre, RSource string) (bool, string, string) {
 				}
 				fg = true
 			}
+			if pcresult == "vipsubscribe##reply" {
+				fg = true
+			}
 			updateIsPush(util.ObjToString(tuser["s_m_openid"]), 1)
 		}
 	}
@@ -633,6 +644,12 @@ func Subscribe(w ResponseWriter, r *Request) {
 				fastSubscribeText := config.Sysconfig["fastSubscribe"].(map[string]interface{})
 				exists := fastSubscribeText["exists"].(string)
 				w.ReplyText(fmt.Sprintf(exists, subkey, fastSubscribeText["skill"].(string)))
+			} else if pcresult == "vipsubscribe##reply" { //关注
+				vipsubReply := config.Sysconfig["vipSubscribeReply"].(map[string]interface{})
+				time.AfterFunc(time.Second/2, func() {
+					w.PostText(fmt.Sprintf(fmt.Sprint(vipsubReply["content"]), config.Sysconfig["webdomain"].(string)+vipsubReply["href"].(string)))
+				})
+				isAutoRepl = true
 			} else {
 				if subkey != "" {
 					w.ReplyText(fmt.Sprintf(fmt.Sprint(pchints["key_fail"]), subkey, autoReplUrl))
@@ -924,9 +941,15 @@ func ScanHandler(w ResponseWriter, r *Request) {
 			if err != nil {
 				log.Println(err)
 			} else {
-				if b, _, _ := saveUser(user, r.EventKey, pccodepre, RSource); b {
+				if b, pcresult, _ := saveUser(user, r.EventKey, pccodepre, RSource); b {
 					url := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",rssset"))
 					w.ReplyText(fmt.Sprintf(config.Sysconfig["welcomemsg"].(string), url))
+					if pcresult == "vipsubscribe##reply" { //新用户扫码
+						vipsubReply := config.Sysconfig["vipSubscribeReply"].(map[string]interface{})
+						time.AfterFunc(time.Second/2, func() {
+							w.PostText(fmt.Sprintf(fmt.Sprint(vipsubReply["content"]), config.Sysconfig["webdomain"].(string)+vipsubReply["href"].(string)))
+						})
+					}
 				}
 			}
 		} else {
@@ -964,15 +987,26 @@ func ScanHandler(w ResponseWriter, r *Request) {
 				if (*m)["i_vip_status"] != nil && util.IntAll((*m)["i_vip_status"]) > 0 {
 					shareid := util.ObjToString(r.EventKey)
 					subkey = util.ObjToString(redis.Get("sso", "pc_subscribe_"+shareid))
-					resNum := 0
-					resNum, subkey, _ = vipFastSubscribe(m, subkey, openid)
-					if resNum == -2 {
-						pcresult = "repeat"
-					} else if resNum == -3 {
-						pcresult = "fail"
-					} else if resNum == 1 {
-						pcresult = "ok"
+					if subkey != "" {
+						resNum := 0
+						resNum, subkey, _ = vipFastSubscribe(m, subkey, openid)
+						if resNum == -2 {
+							pcresult = "repeat"
+						} else if resNum == -3 {
+							pcresult = "fail"
+						} else if resNum == 1 {
+							pcresult = "ok"
+						}
+						//pc端订阅页面 扫码回复vip连接也需要用此码
+						if pccodepre == "11" && resNum != -3 {
+							redis.Del("sso", "pc_subscribe_"+shareid)
+						}
+					} else {
+						if util.ObjToString(redis.Get("sso", "pc_subscribe_reply_"+shareid)) == "1" {
+							pcresult = "vipsubscribe##reply"
+						}
 					}
+
 				} else {
 					pcUser, pcresult, subkey = pcSetUserKeys(*m, r.EventKey, pccodepre)
 					go tools.MQFW.Update("user", &map[string]interface{}{
@@ -996,6 +1030,9 @@ func ScanHandler(w ResponseWriter, r *Request) {
 					pchints := config.Sysconfig["pchints"].(map[string]interface{})
 					url := fmt.Sprintf(config.Sysconfig["proxysess"].(string), se.EncodeString(openid+","+user.UnionId+","+strconv.Itoa(int(time.Now().Unix()))+",rssset"))
 					w.ReplyText(fmt.Sprintf(fmt.Sprint(pchints["key_fail"]), subkey, url))
+				} else if pcresult == "vipsubscribe##reply" { //老用户扫码
+					vipsubReply := config.Sysconfig["vipSubscribeReply"].(map[string]interface{})
+					w.ReplyText(fmt.Sprintf(fmt.Sprint(vipsubReply["content"]), config.Sysconfig["webdomain"].(string)+vipsubReply["href"].(string)))
 				}
 			} else if pccodepre == "18" { //关注企业
 				company := redis.GetStr("sso", "pc_subscribe_"+r.EventKey) //企业名称
@@ -1513,6 +1550,9 @@ func updateIsPush(openid string, status int) {
 
 //
 func vipFastSubscribe(user *map[string]interface{}, keyWord, openId string) (returnValue int, content string, hasOldKey bool) {
+	if keyWord == "" {
+		return
+	}
 	o_vipjy, _ := (*user)["o_vipjy"].(map[string]interface{})
 	var classify_index = 0 //未分类索引
 	//var keys_index = 0     未分类关键词组数量

+ 656 - 0
src/web/staticres/css/subscribe.css

@@ -0,0 +1,656 @@
+/* banner图板块 */
+.tender-1 {
+    width: 100%;
+    height: 475px;
+}
+
+.tender-1 .imgauto {
+    width: 100%;
+    height: 100%;
+    /* margin: 0 auto; */
+}
+
+.tender-1 .imgauto img {
+    width: 100%;
+    z-index: 1;
+}
+
+/* 订阅模式选择板块 */
+
+.subscription {
+    width: 100%;
+    height: 268px;
+    margin-top: -110px;
+}
+
+.subscription .sub-center {
+    width: 840px;
+    height: 268px;
+    margin: 0 auto;
+    display: flex;
+    justify-content: center;
+}
+
+.subscription .sub-center .sub-free {
+    width: 402px;
+    height: 250px;
+    background: url('/images/subscribe/free.png') no-repeat;
+}
+
+.subscription .sub-center .sub-free .free-title {
+    width: 402px;
+    height: 26px;
+    margin-top: 57px;
+    text-align: center;
+    font-size: 20px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 26px;
+    color: rgba(255, 255, 255, 1);
+    opacity: 1;
+}
+
+.subscription .sub-center .sub-free .free-btn {
+    width: 180px;
+    height: 46px;
+    background: rgba(44, 183, 202, 1);
+    opacity: 1;
+    border-radius: 6px;
+    margin: 76px auto;
+    display: block;
+    text-align: center;
+    font-size: 18px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 46px;
+    color: rgba(255, 255, 255, 1);
+    opacity: 1;
+}
+
+.subscription .sub-center .sub-vip {
+    width: 402px;
+    height: 250px;
+    background: url('/images/subscribe/vip.png') no-repeat;
+    background-position-x: center;
+    /* margin-left: 54px; */
+}
+
+.subscription .sub-center .sub-vip .vip-logo {
+    width: 402px;
+    height: 38px;
+    margin-top: 57px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+
+.subscription .sub-center .sub-vip .vip-logo img {
+    width: 38px;
+    height: 38px;
+    margin-right: 10px;
+}
+
+.subscription .sub-center .sub-vip .vip-logo .vip-title {
+    font-size: 20px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 26px;
+    color: rgba(255, 218, 177, 1);
+    opacity: 1;
+}
+
+.subscription .sub-center .sub-vip .vip-btn {
+    width: 180px;
+    height: 46px;
+    background: rgba(52, 53, 90, 1);
+    margin: 69px auto;
+    opacity: 1;
+    border-radius: 6px;
+    display: block;
+    text-align: center;
+    font-size: 18px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 46px;
+    color: rgba(255, 218, 177, 1);
+}
+
+/* 订阅模式对比板块 */
+.sub-contrast {
+    width: 100%;
+    height: 666px;
+    margin-top: 79px;
+}
+
+.sub-contrast .contrast-header {
+    width: 100%;
+    height: 31px;
+}
+
+.sub-contrast .contrast-header .header-title {
+    width: 331px;
+    height: 31px;
+    line-height: 31px;
+    margin: 0 auto;
+    background: url('/images/subscribe/line.png') no-repeat;
+    font-size: 24px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: rgba(29, 29, 29, 1);
+    opacity: 1;
+    text-align: center;
+    background-position: center;
+}
+
+.sub-contrast .contrast-main {
+    width: 100%;
+    height: 422px;
+    margin-top: 85px;
+}
+
+.sub-contrast .contrast-main .contrast-main-center {
+    width: 960px;
+    height: 422px;
+    margin: 0 auto;
+    display: flex;
+    /* border: 1px solid rgba(224,224,224,1); */
+}
+
+/* 功能/价格 */
+/* li+li表示选中除第一个li其他所有的li */
+.sub-contrast .contrast-main .contrast-main-center .center-left {
+    width: 200px;
+    height: 422px;
+
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-left > ul {
+    width: 200px;
+    height: 422px;
+    margin: 0;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-left > ul .modify-left {
+    border-left: 1px solid rgba(224, 224, 224, 1);
+    border-top: 1px solid rgba(224, 224, 224, 1);
+    width: 100%;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-left > ul li + li {
+    width: 200px;
+    height: 58px;
+    text-align: center;
+    line-height: 60px;
+    font-size: 16px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: rgba(29, 29, 29, 1);
+    opacity: 1;
+    border-left: 1px solid rgba(224, 224, 224, 1);
+    border-bottom: 1px solid rgba(224, 224, 224, 1);
+    border-right: 1px solid rgba(224, 224, 224, 1);
+}
+
+/* 免费版 */
+.sub-contrast .contrast-main .contrast-main-center .center-center {
+    width: 259px;
+    height: 422px;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center > ul {
+    width: 259px;
+    transition: all 0.5s;
+    height: 422px;
+    margin: 0;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center > ul li + li {
+    transition: all 0.5s;
+    width: 259px;
+    height: 58px;
+    text-align: center;
+    line-height: 60px;
+    font-size: 16px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: rgba(29, 29, 29, 1);
+    opacity: 1;
+    border-bottom: 1px solid rgba(224, 224, 224, 1);
+    border-right: 1px solid rgba(224, 224, 224, 1);
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center > ul li:nth-child(7) {
+    background-color: rgba(246, 246, 246, 1);
+    border-right: 1px solid rgba(224, 224, 224, 1);
+    display: flex;
+    transition: all 0.5s;
+    justify-content: center;
+    align-items: center;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center ul li:nth-child(7) .btn-free {
+    display: block;
+    cursor: pointer;
+    transition: all 0.5s;
+    width: 90px;
+    height: 30px;
+    background: rgba(246, 246, 246, 1);
+    opacity: 1;
+    border-radius: 4px;
+    font-size: 16px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 26px;
+    color: rgba(104, 104, 104, 1);
+}
+
+/* 免费版滑过特效 */
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul {
+    height: 460px;
+    /* transform: scaleY(1.1); */
+    transition: 0.5s;
+    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
+    margin-top: -22px;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul .modify-center {
+    height: 90px;
+    line-height: 90px;
+    transition: 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul li:nth-child(7) {
+    height: 80px;
+    width: 259px;
+    transition: 0.5s;
+    line-height: 80px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul li:nth-child(7) .btn-free {
+    transition: 0.5s;
+    background: rgba(44, 183, 202, 1);
+    color: white;
+}
+
+/* VIP订阅专属服务 */
+.sub-contrast .contrast-main .contrast-main-center .center-right {
+    width: 500px;
+    height: 422px;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul {
+    width: 500px;
+    height: 422px;
+    margin: 0;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul li + li {
+    width: 500px;
+    height: 58px;
+    text-align: center;
+    transition: all 0.5s;
+    line-height: 60px;
+    font-size: 16px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: rgba(29, 29, 29, 1);
+    opacity: 1;
+    border-bottom: 1px solid rgba(224, 224, 224, 1);
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul li:nth-child(7) {
+    background-color: #FBF2EA;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul li:nth-child(7) .On-trial {
+    width: 90px;
+    height: 30px;
+    border: 1px solid rgba(207, 173, 137, 1);
+    transition: all 0.5s;
+    opacity: 1;
+    border-radius: 4px;
+    display: block;
+    text-align: center;
+    line-height: 30px;
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    color: rgba(207, 173, 137, 1);
+    margin-left: 16px;
+}
+
+/* VIP订阅滑过特效 */
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul {
+    height: 460px;
+    margin-top: -22px;
+    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul .modify-right {
+    height: 90px;
+    line-height: 90px;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul li:nth-child(7) {
+    height: 80px;
+    line-height: 80px;
+    transition: all 0.5s;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul li:nth-child(7) .On-trial {
+    background: #34355A;
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    line-height: 30px;
+    color: rgba(255, 218, 177, 1);
+    transition: all 0.5s;
+    opacity: 1;
+    text-decoration: none;
+}
+
+.sub-contrast .contrast-main .contrast-main-center ul .top-title {
+    height: 68px;
+    text-align: center;
+    transition: all 0.5s;
+    line-height: 68px;
+    font-size: 20px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: rgba(29, 29, 29, 1);
+    opacity: 1;
+    /* border-left: 1px solid rgba(224,224,224,1); */
+    border-bottom: 1px solid rgba(224, 224, 224, 1);
+    /* border-right: 1px solid rgba(224,224,224,1); */
+}
+
+/* 选中免费版 */
+.sub-contrast .contrast-main .contrast-main-center ul .modify-center {
+    background: rgba(238, 238, 238, 1);
+    width: 100%;
+}
+
+/* 选中VIP订阅专属服务 */
+.sub-contrast .contrast-main .contrast-main-center ul .modify-right {
+    background: rgba(52, 53, 90, 1);
+    color: rgba(255, 218, 177, 1);
+    position: relative;
+    border-right: 0;
+    width: 100%;
+}
+
+.sub-contrast .contrast-main .contrast-main-center ul .modify-right img {
+    background: rgba(52, 53, 90, 1);
+    color: rgba(255, 218, 177, 1);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    width: 174px;
+}
+
+/* 选中关键词设置颜色 */
+.sub-contrast .contrast-main .contrast-main-center ul li > span {
+    color: #CFAD89;
+}
+
+/* VIP弹窗 */
+.modal-dialog-subvip {
+    width: 335px !important;
+    height: 390px;
+    margin-top: 40px !important;
+    margin: 30px auto;
+}
+
+.modal-content {
+    width: 335px;
+    height: 400px;
+    position: relative;
+}
+
+.modal-content > img {
+    margin: -46px 0 0 -1px;
+    /* height: 447px; */
+}
+
+.modal-content .vip-code {
+    position: absolute;
+    width: 170px;
+    height: 197px;
+    left: 30%;
+    bottom: 10%;
+}
+
+.modal-content .vip-code .vip-text {
+    width: 170px;
+    height: 21px;
+    font-size: 16px;
+    font-family: MicrosoftYaHei;
+    line-height: 24px;
+    color: rgba(59, 33, 5, 1);
+    opacity: 1;
+    margin: 20px 0 0 -15px;
+}
+
+.modal-open {
+    overflow: auto !important;
+    padding-right: 0 !important;
+}
+
+/*扫码框样式*/
+.jy_province li > font > a {
+    font-size: 14px !important;
+}
+
+#jydialog {
+    position: fixed;
+    background-color: rgba(0, 0, 0, 0.7);
+    top: 50%;
+    color: #fff;
+    z-index: 999;
+    border-radius: 5px;
+    text-align: center;
+    padding: 20px;
+    left: 50%;
+    margin-top: -50px;
+    margin-left: -145px;
+}
+
+.s-com-1 {
+    min-width: 1200px;
+    margin: 0 auto;
+    position: relative;
+    -webkit-font-smoothing: antialiased;
+    width: 100%;
+    overflow: hidden;
+    height: 600px;
+}
+
+.s-com-1-con {
+    width: 1920px;
+    overflow: hidden;
+    left: 50%;
+    margin-left: -960px !important;
+    position: absolute;
+}
+
+.j-text {
+    width: 1200px;
+    height: 250px;
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    margin-top: -125px;
+    text-align: center;
+    color: #fff;
+    margin-left: -600;
+}
+
+.j-text-1 {
+    font-family: 微软雅黑;
+    font-weight: bold;
+    font-size: 36px;
+}
+
+.j-text-1 span {
+    color: #ffcc00;
+}
+
+.j-text-2 {
+    font-family: "Microsoft YaHei";
+    font-size: 34px;
+    margin: 8px auto 36px;
+    font-weight: bold;
+}
+
+.j-text-3 {
+    font-family: 微软雅黑;
+    font-size: 18px;
+    line-height: 32px;
+    margin-top: 32px;
+}
+
+.j-text-4 #scfree {
+    font-family: 微软雅黑;
+    font-size: 18px;
+    color: #2cb7ca;
+    background-color: rgba(255, 255, 255, 1);
+    border: 1px solid #fff;
+    margin-top: 50px;
+    padding: 10px 43px;
+    border-radius: 6px;
+    font-weight: bold;
+}
+
+.j-com-2-1 {
+    min-width: 1200px;
+    margin: 0 auto;
+    -webkit-font-smoothing: antialiased;
+    width: 100%;
+    overflow: hidden;
+    height: 760px;
+}
+
+.inner-left {
+    width: 1200px;
+    margin: auto;
+    left: 42%;
+    height: 760px;
+    margin-left: -600px
+}
+
+.divnext {
+    position: absolute;
+    left: 1150px;
+    top: 587px;
+    width: 120px;
+    height: 120px;
+    z-index: 9999;
+    border-radius: 60px;
+    cursor: pointer;
+}
+
+.divprev {
+    position: absolute;
+    left: 1150px;
+    top: 36px;
+    width: 120px;
+    height: 120px;
+    z-index: 9999;
+    border-radius: 60px;
+    cursor: pointer;
+}
+
+/*j-wx-code Start*/
+.j-wx-code {
+    width: 335px;
+    height: 355px;
+    background-color: #fff;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+    position: relative;
+    /*margin: 100px auto;*/
+}
+
+.j-wx-code > .code-close {
+    width: 40px;
+    height: 40px;
+    position: absolute;
+    right: -20px;
+    top: -20px;
+    cursor: pointer;
+    -webkit-transition: all 1s;
+    -o-transition: all 1s;
+    -moz-transition: all 1s;
+    transition: all 1s;
+}
+
+.j-wx-code > .code-close:hover {
+    -webkit-transform: scale(1.2);
+    -moz-transform: scale(1.2);
+    -ms-transform: scale(1.2);
+    -o-transform: scale(1.2);
+    transform: scale(1.2);
+}
+
+.j-wx-code > .code-title {
+    height: 82px;
+    background: url(/images/j-wx-code-title.png) center center no-repeat;
+    -webkit-animation: moveYun 15s infinite linear both;
+    -moz-animation: moveYun 15s infinite linear both;
+    -o-animation: moveYun 15s infinite linear both;
+    animation: moveYun 15s infinite linear both;
+}
+
+.j-wx-code > .code-wxm {
+    text-align: center;
+    margin-bottom: -6px;
+    margin-top: -16px;
+
+}
+
+.j-wx-code > .code-wxm > img {
+    width: 200px;
+    height: 200px;
+    margin-top: -5px;
+}
+
+.j-wx-code > .code-text {
+    font: 16px "microsoft yahei";
+    text-align: center;
+    color: #252627;
+}
+
+.j-wx-code > .code-bottom {
+    width: 470px;
+    height: 211px;
+    position: absolute;
+    bottom: -113px;
+    left: -73px;
+    background: url(/images/j-wx-code-bottom.png) 0 0 no-repeat;
+}
+
+.j-wx-code > .code-bottom > img {
+    position: absolute;
+    left: 280px;
+    top: 88px;
+    -webkit-animation: codeWxMove 10s linear both;
+    -moz-animation: codeWxMove 10s linear both;
+    -o-animation: codeWxMove 10s linear both;
+    animation: codeWxMove 10s linear both;
+    -webkit-animation-fill-mode: forwards;
+    -moz-animation-fill-mode: forwards;
+    -o-animation-fill-mode: forwards;
+    animation-fill-mode: forwards
+}
+

BIN
src/web/staticres/images/subscribe/QR_code.png


BIN
src/web/staticres/images/subscribe/banner.png


BIN
src/web/staticres/images/subscribe/free.png


BIN
src/web/staticres/images/subscribe/line.png


BIN
src/web/staticres/images/subscribe/mengban.png


BIN
src/web/staticres/images/subscribe/vip-logo.png


BIN
src/web/staticres/images/subscribe/vip.png


BIN
src/web/staticres/images/subscribe/vip_tanchuang.png


+ 3 - 1
src/web/staticres/js/login.js

@@ -208,6 +208,7 @@ var getNewShareId = function(num){
 					$("#dyym-1 img").attr("src","/front/share/"+kopshareid);
 					$("#dyym-2").attr("src","/front/share/"+pageshareid);
 					$(".secondleft img").attr("src","/front/share/"+pageshareid);
+					$("#vipCode").attr("src","/front/share/"+kopshareid);
 					break;
 				case "12"://搜索列表页
 					$("#layerImg").attr("src","/front/share/"+pageshareid);
@@ -369,7 +370,8 @@ var processpage = function(shareid,num){
 //			}
 			break;
 		case "11"://11订阅页面
-			$("#myModal-01").click();
+			//$("#myModal-01").click();
+			$(".modal").click();
 			break;
 		case "12"://12搜索列表
 			var ful = $("#myModal").attr("aria-hidden");

+ 360 - 350
src/web/staticres/vipsubscribe/css/choose_area_new.css

@@ -1,610 +1,620 @@
 @charset "UTF-8";
 .main {
-  width: 100%;
-  overflow: scroll;
+    width: 100%;
+    overflow: scroll;
 }
 
 .main::-webkit-scrollbar {
-  display: none;
+    display: none;
 }
 
 .layout_top-bottom {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
 }
 
 .layout_top-bottom .layou_top {
-  flex: 1;
-  overflow: scroll;
+    flex: 1;
+    overflow: scroll;
 }
 
 .bottom_button {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 100%;
-  height: .94rem;
+    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;
+    flex: 1;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .bottom_button .left_btn {
-  color: #2cb7ca;
-  background-color: #fff;
-  border-top: 1px solid #e0e0e0;
+    color: #2cb7ca;
+    background-color: #fff;
+    border-top: 1px solid #e0e0e0;
 }
 
 .bottom_button .right_btn {
-  color: #fff;
-  background-color: #2cb7ca;
-  border-top: 1px solid #2cb7ca;
+    color: #fff;
+    background-color: #2cb7ca;
+    border-top: 1px solid #2cb7ca;
 }
 
 .bottom_button button[disabled] {
-  opacity: .5;
+    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;
+    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;
+    display: flex;
+    position: relative;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .tips_btn .tips_discount {
-  width: 100%;
+    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);
+    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;
+    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;
+    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;
+    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;
+    background: #fff;
+    color: #2cb7ca;
+    border-top: 1px solid #e0e0e0;
 }
 
 .tips_btn .btns .save-btn {
-  background: #2cb7ca;
-  color: #fff;
-  border-top: 1px solid #2cb7ca;
+    background: #2cb7ca;
+    color: #fff;
+    border-top: 1px solid #2cb7ca;
 }
 
 .tips_btn .btns button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .jy_icon {
-  position: relative;
-  width: 100%;
-  height: 100%;
+    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%);
+    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);
+    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;
+    -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;
+    display: flex;
+    align-items: center;
 }
 
 .flex_alginC_justB {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .flex_alginC_justC {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .flex_column {
-  display: flex;
-  flex-direction: column;
+    display: flex;
+    flex-direction: column;
 }
 
 .flex_column_alignC {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
 }
 
 /* 自定义弹窗*/
 @-webkit-keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 @keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 .custom-dialog .weui-animate-fade-in {
-  -webkit-animation: c ease 0s forwards;
-  animation: c ease 0s forwards;
+    -webkit-animation: c ease 0s forwards;
+    animation: c ease 0s forwards;
 }
 
 @-webkit-keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 @keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 .custom-dialog .weui-animate-fade-out {
-  -webkit-animation: d ease 0s forwards;
-  animation: d ease 0s forwards;
+    -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;
+    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;
+    padding: .37rem 0;
+    color: #1D1D1D;
+    font-size: .32rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__ft:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__btn:after {
-  border: 0;
+    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;
+    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;
+    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;
+    background-color: #2CB7CA;
+    margin-right: 1rem;
 }
 
 .custom-dialog .weui-dialog__btn_default {
-  background-color: #BFBFC3;
+    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;
+    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);
+    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);
+    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;
+    border-color: #04be02;
+    background-color: #04be02;
 }
 
 .custom-switch.checked:before {
-  transform: scale(0);
+    transform: scale(0);
 }
 
 .custom-switch.checked:after {
-  transform: translateX(20px);
+    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%);
+    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;
 }
 
 .jymobile-tab-triangle {
-  position: relative;
+    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%);
+    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%);
+    border-color: transparent transparent #2cb7ca transparent;
+    transform: translate(140%, -70%);
 }
 
 .jymobile-tab-triangle.current {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 .jymobile-tab-triangle.current:after {
-  border-color: #2cb7ca transparent transparent transparent;
+    border-color: #2cb7ca transparent transparent transparent;
 }
 
 #choose_area {
-  display: flex;
-  justify-content: space-between;
-  flex-direction: column;
-  overflow: hidden;
-  height: 100%;
+    display: flex;
+    justify-content: space-between;
+    flex-direction: column;
+    overflow: hidden;
+    height: 100%;
 }
 
 #choose_area .form {
-  flex: 1;
-  overflow-y: scroll;
+    flex: 1;
+    overflow-y: scroll;
 }
 
 #choose_area .optional_count, #choose_area .all_area {
-  height: .88rem;
-  line-height: .88rem;
-  padding: 0 .3rem;
-  font-size: .3rem;
-  color: #1d1d1d;
+    height: .88rem;
+    line-height: .88rem;
+    padding: 0 .3rem;
+    font-size: .3rem;
+    color: #1d1d1d;
 }
 
 #choose_area .optional_count em, #choose_area .all_area em {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 #choose_area .result {
-  position: relative;
-  padding: .2rem .3rem;
-  font-size: .26rem;
-  text-align: justify;
+    position: relative;
+    padding: .2rem .3rem;
+    font-size: .26rem;
+    text-align: justify;
 }
 
 #choose_area .result .result_text {
-  position: relative;
-  min-height: 19px;
+    position: relative;
+    min-height: 19px;
 }
 
 #choose_area .result .line_two {
-  text-overflow: ellipsis;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 
 #choose_area .result .detail, #choose_area .result .packup {
-  display: inline-block;
-  width: 1.5rem;
-  padding-right: 0.1rem;
-  text-align: right;
-  color: #2cb7ca;
-  font-size: .26rem;
-  z-index: 999;
+    display: inline-block;
+    width: 1.5rem;
+    padding-right: 0.1rem;
+    text-align: right;
+    color: #2cb7ca;
+    font-size: .26rem;
+    z-index: 999;
 }
 
 #choose_area .result .detail {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
 }
 
 #choose_area .result .packup {
-  position: absolute;
-  right: 0.3rem;
-  bottom: 0;
-  margin-top: .1rem;
+    position: absolute;
+    right: 0.3rem;
+    bottom: 0;
+    margin-top: .1rem;
 }
 
 #choose_area .select-area-box {
-  padding-bottom: .94rem;
+    padding-bottom: .94rem;
 }
 
 #choose_area .select-area-box .tab {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  color: #1d1d1d;
-  background: #fff;
-  font-size: .3rem;
-  padding: .2rem .5rem;
-  border-bottom: 1px solid #e0e0e0;
-  box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #1d1d1d;
+    background: #fff;
+    font-size: .3rem;
+    padding: .2rem .5rem;
+    border-bottom: 1px solid #e0e0e0;
+    box-sizing: border-box;
 }
 
 #choose_area .select-area-box .tab .province {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 #choose_area .select-area-box .tab .province .checkbox {
-  width: .4rem;
-  height: .4rem;
-  border: 1px solid #ddd;
-  border-radius: 50%;
-  margin-right: .2rem;
-  -webkit-appearance: none;
-  background: #fff;
+    width: .4rem;
+    height: .4rem;
+    border: 1px solid #ddd;
+    border-radius: 50%;
+    margin-right: .2rem;
+    -webkit-appearance: none;
+    background: #fff;
 }
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
-  border: 0;
-  background: url(/vipsubscribe/image/xuanzhong.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/vipsubscribe/image/xuanzhong.png) no-repeat center center;
+    background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
-  border: 0;
-  background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
-  background-size: 100% 100%;
-  opacity: 1;
+    border: 0;
+    background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
+    background-size: 100% 100%;
+    opacity: 1;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half {
-  border: 0 !important;
-  background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half[disabled] {
-  border: 0 !important;
-  background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
-  opacity: 1!important;
+    border: 0 !important;
+    background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
+    opacity: 1 !important;
 }
 
 #choose_area .select-area-box .tab .optional {
-  color: #2CB7CA;
-  font-size: 0.28rem;
-  margin-left: -2.8rem;
+    color: #2CB7CA;
+    font-size: 0.28rem;
+    margin-left: -2.8rem;
 }
 
 #choose_area .select-area-box label::after {
-  font-size: 14px;
-  float: right;
-  margin-right: 15px;
+    font-size: 14px;
+    float: right;
+    margin-right: 15px;
 }
 
 #choose_area .select-area-box .tab_content {
-  display: none;
-  font-size: .28rem;
-  padding: .1rem .3rem;
-  text-align: center;
+    display: none;
+    font-size: .28rem;
+    padding: .1rem .3rem;
+    text-align: center;
 }
 
 #choose_area .select-area-box .tab_content .city {
-  float: left;
-  padding: .1rem .2rem;
-  background: #fff;
-  margin: .1rem 0 .1rem .1rem;
-  border-radius: 0.04rem;
-  font-size: .28rem;
+    float: left;
+    padding: .1rem .2rem;
+    background: #fff;
+    margin: .1rem 0 .1rem .1rem;
+    border-radius: 0.04rem;
+    font-size: .28rem;
 }
 
 #choose_area .select-area-box .tab_content .active {
-  background: #2cb7ca;
-  color: #fff;
+    background: #2cb7ca;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .active[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .city[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .index {
-  padding: .3rem .3rem .1rem .3rem;
-  font-size: .32rem;
+    padding: .3rem .3rem .1rem .3rem;
+    font-size: .32rem;
 }
 
 #choose_area .slide {
-  background: transparent;
-  position: fixed;
-  right: 0;
-  top: 50%;
-  height: 8.5rem;
-  width: .4rem;
-  font-size: .26rem;
-  text-align: center;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  padding: .1rem 0;
-  align-items: center;
-  margin-top: -4.25rem;
-  z-index: 9999;
+    background: transparent;
+    position: fixed;
+    right: 0;
+    top: 50%;
+    height: 8.5rem;
+    width: .4rem;
+    font-size: .26rem;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    padding: .1rem 0;
+    align-items: center;
+    margin-top: -4.25rem;
+    z-index: 9999;
 }
 
 #choose_area .slide a {
-  margin-bottom: .1rem;
+    margin-bottom: .1rem;
 }
+
+.icon.iconfont {
+    display: inline-block;
+}
+
+.icon.iconfont.up {
+    display: inline-block;
+    transform: rotate(-180deg);
+}
+

+ 150 - 2
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -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;
@@ -470,4 +470,152 @@
     width: 50px;
 }
 .enter.addkeyWord{
-	margin-bottom: .2rem;
+	margin-bottom: .2rem;
+}
+
+.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;
+}
+.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.2rem;
+    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: .2rem;
+    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;
+}

+ 26 - 22
src/web/staticres/vipsubscribe/js/editArea.js

@@ -54,18 +54,28 @@ function createMoreCity(arr) {
     return tempHtml
 }
 
+var animatedRuning = false;
+
+function checkAnimatedRuning() {
+    if (animatedRuning) {
+        return true
+    }
+    animatedRuning = true;
+    setTimeout(function () {
+        animatedRuning = false;
+    }, 500);
+    return false
+}
+
 // 省下拉市事件
 function slideFun(obj) {
+    if (checkAnimatedRuning()) {
+        return
+    }
     if (obj.next('.tab_content:not(:animated)').css("display") == "block") {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(0)"
-        })
+        obj.children().children('i').removeClass("up");
     } else {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(-180deg)"
-        })
+        obj.children().children('i').addClass("up");
     }
     obj.toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
     obj.parent().siblings().children('.tab').removeClass('selected');
@@ -233,18 +243,15 @@ function initResult() {
 $(function () {
     // 省下拉事件
     $('.tab:not(.municipality)').on('click', function () {
+        if (checkAnimatedRuning()) {
+            return
+        }
         if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(0)"
-            })
+            $(this).children().children('i').removeClass("up");
         } else {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(-180deg)"
-            })
+            $(this).children().children('i').addClass("up");
         }
-        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500);
         $(this).parent().siblings().children('.tab').removeClass('selected');
     });
     getData();
@@ -359,10 +366,7 @@ $(function () {
         $('.city').removeClass('active');
         $('.tab_content').slideUp();
         $('.optional').remove();
-        $('.tab').find('i').css({
-            "display": "inline-block",
-            "transform": "rotate(0)"
-        })
+        $('.tab').find('i').removeClass("up");
         init();
     })
     // 确定修改事件
@@ -384,4 +388,4 @@ function theSameAs(select) {
     let tmp1 = getAreaClassArr(select);
     let tmp2 = getAreaClassArr(areaData.data.area);
     return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
-}
+}

+ 93 - 0
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -268,6 +268,99 @@ 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: {},
+            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">删除</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') }
+		            });
+				}
+            }
+        });
+    })
+    // 关键词分类 - 取消按钮点击事件
+    $('.classify-fast-pop .dialog__btn_cancel').on('click', function() {
+        $('.classify-fast-pop').hide();
+    })
     //
 
     $('.classify-edit-pop .classify-keyword').bind('input propertychange', function() {

+ 1 - 1
src/web/staticres/wxtsguide/main.js

@@ -63,7 +63,7 @@ var Guide = {
 			localStorage.removeItem("tsGuide_step");
 		}
 		$.post("/front/tenderSubscribe/guide",{reqType: "over"},function(){
-			window.location.href = "/wxkeyset/keyset/index";
+			window.location.replace("/wxkeyset/keyset/index");
 		});
 	},
 	//下一步

+ 892 - 0
src/web/templates/pc/subscribe_new.html

@@ -0,0 +1,892 @@
+<html>
+<head>
+    <title>招标订阅_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
+    <meta name="Keywords" content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯"/>
+    <meta name="Description" content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。"/>
+    <meta name="renderer" content="webkit">
+    <meta content="telephone=no" name="format-detection"/>
+    {{include "/common/pnc.html"}}
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/css/subscribe.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/reset_pc.css"/>
+    {{/*<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/zhaobiao.css"/>*/}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}"></script>
+    <script>
+        $(function () {
+            $(window).scroll(function () {
+                if ($(this).scrollTop() > 0) {
+                    $("#backTop").show();
+                } else {
+                    $("#backTop").hide();
+                }
+            });
+        });
+    </script>
+<body>
+{{include "/common/pchead.html"}}
+<!--内容-->
+<!-- banner图板块 -->
+<div class="tender-1">
+    <div class="imgauto">
+        <img src="{{Msg "seo" "cdn"}}/images/subscribe/banner.png?v={{Msg "seo" "version"}}" alt="">
+    </div>
+</div>
+<!-- 订阅模式选择板块 -->
+<div class="subscription">
+    <div class="sub-center">
+        <div class="sub-free">
+            <h3 class="free-title">免费版订阅</h3>
+            <button class="free-btn scfree">立即免费订阅</button>
+        </div>
+        <div class="sub-vip">
+            <div class="vip-logo">
+                <img src="{{Msg "seo" "cdn"}}/images/subscribe/vip-logo.png?v={{Msg "seo" "version"}}" alt="">
+                <h3 class="vip-title">VIP订阅</h3>
+            </div>
+            <button class="vip-btn" data-toggle="modal" data-target=".bs-example-modal-sm">免费试用</button>
+        </div>
+    </div>
+</div>
+<!-- VIP弹窗 -->
+
+<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
+    <div class="modal-dialog modal-dialog-subvip modal-sm" role="document">
+        <div class="modal-content">
+            <img src="{{Msg "seo" "cdn"}}/images/subscribe/vip_tanchuang.png?v={{Msg "seo" "version"}}" alt="">
+            <div class="vip-code">
+                <img id="vipCode" alt="" style="width: 139px;height: 139px">
+                <p class="vip-text">扫描二维码体验VIP订阅</p>
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
+    <div class="modal-dialog modal-sm" role="document">
+        <div class="modal-content">
+
+        </div>
+    </div>
+</div> -->
+<!-- 订阅模式对比板块 -->
+<div class="sub-contrast">
+    <div class="contrast-header">
+        <div class="header-title">
+            对比
+        </div>
+    </div>
+    <div class="contrast-main">
+        <div class="contrast-main-center">
+            <div class="center-left">
+                <ul>
+                    <li class="top-title modify-left">功能/价格</li>
+                    <li>项目匹配</li>
+                    <li>行业订阅</li>
+                    <li>关键词</li>
+                    <li>匹配方式</li>
+                    <li>订阅区域</li>
+                    <li>价格</li>
+                </ul>
+            </div>
+            <div class="center-center">
+                <ul>
+                    <li class="top-title modify-center">免费版</li>
+                    <li>匹配单次公告信息</li>
+                    <li>—</li>
+                    <li>10组关键词</li>
+                    <li>仅支持标题匹配</li>
+                    <li>订阅区域精确到省</li>
+                    <li><i class="btn-free scfree">免费</i></li>
+                </ul>
+            </div>
+            <div class="center-right">
+                <ul>
+                    <li class="top-title modify-right">
+                        VIP订阅专属服务
+                        <img src="{{Msg "seo" "cdn"}}/images/subscribe/mengban.png?v={{Msg "seo" "version"}}" alt="">
+                    </li>
+                    <li><span>匹配项目信息</span>,为你推送所匹配项目后续的全部动态</li>
+                    <li>按采购单位类型订阅,无需繁琐关键词设置</li>
+                    <li><span>300组</span>关键词,获取招标信息更全面</li>
+                    <li>支持<span>标题匹配+全文匹配</span>,信息筛选更灵活</li>
+                    <li>订阅区域<span>精确到地级市</span>,只看你最关注的</li>
+                    <li>低至5.8元/月
+                        <a href="#" class="On-trial vip-btn" data-toggle="modal"
+                           data-target=".bs-example-modal-sm">免费试用</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</div>
+<button class="btn hidden" id="cb-01" data-toggle="modal" data-target="#myModal-01"></button>
+<!--内容-->
+
+<!--免费订阅弹框-->
+<div class="modal fade" id="myModal-01" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+    <div class="modal-dialog">
+        <div id="firstPopup" class="modal-content" style="width: 800px;margin: auto;height: 515px;">
+            <div class="modal-header">
+            </div>
+            <div class="modal-body">
+                <div class="firstleft">
+                    <div class="floorone">
+                        <div class="lineleft"></div>
+                        <div class="lineright"></div>
+                        <div class="firstdrop"></div>
+                        <div class="seconddrop"></div>
+                        <div class="thriddrop"></div>
+                    </div>
+                    <div class="floortwo">
+                        <span>欢迎使用剑鱼标讯!请选择您的行业,可多选</span>
+                    </div>
+                    <div class="floorthree">
+                        <ul>
+                        </ul>
+                    </div>
+                    <div class="floorfour">
+                        <div class="noSub">
+                            <button type="button" class="btn" id="noSub" data-dismiss="modal">我不需要订阅</button>
+                        </div>
+                        <div class="firstNext">
+                            <button type="button" class="btn" id="firstNext" onclick="next(1)">下一步</button>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </div>
+                <div class="secondleft">
+                    <img src="/front/share/{{.T.shareid}}"/>
+                    <br>
+                    <span>老用户请到剑鱼标讯公众号<br>进行订阅操作</span>
+                </div>
+                <div style="clear:both;"></div>
+            </div>
+            <div class="modal-footer">
+            </div>
+        </div><!-- /.modal-content -->
+        <div id="secondPopup" class="modal-content hidden" style="width: 488px;margin: auto;height: 506px;">
+            <div class="modal-header">
+            </div>
+            <div class="modal-body">
+                <div class="floorone">
+                    <div class="lineleft"></div>
+                    <div class="lineright"></div>
+                    <div class="firstdrop"></div>
+                    <div class="seconddrop"></div>
+                    <div class="thriddrop"></div>
+                </div>
+                <div class="floortwo">
+                    <span>请输入关键词,比如:“教学设备”、“税务局 软件”</span>
+                </div>
+                <div class="floorthree">
+                    <input type="text" class="form-control" id="kword" placeholder="请输入关键词">
+                </div>
+                <div class="floorfour">
+
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn" id="noSub" data-dismiss="modal">我不需要订阅</button>
+                <button type="button" class="btn" id="firstPage" onclick="prev(2)">上一步</button>
+                <button type="button" class="btn" id="secondNext" onclick="next(2)">下一步</button>
+            </div>
+        </div><!-- /.modal-content -->
+        <div id="thirdPopup" class="modal-content hidden" style="width: 488px;margin: auto;height: 440px;">
+            <div class="modal-header">
+            </div>
+            <div class="modal-body" style="height:330px;">
+                <div class="floorone" id="dyym-1">
+                    <img src="/front/share/{{.T.shareid}}"/>
+                </div>
+                <div class="floortwo">
+                    <span>微信扫一扫,订阅关键词:“<span id="thirdkw">办公室 绿化;净化器;中央空调</span>”</span>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn" id="noSub" data-dismiss="modal">我不需要订阅</button>
+                <button type="button" class="btn" id="secondPage" onclick="prev(3)">上一步</button>
+            </div>
+        </div><!-- /.modal-content -->
+        <div id="fourthPopup" class="modal-content hidden" style="width: 488px;margin: auto;height: 320px;">
+            <div class="modal-header">
+                <button style="margin-top:-25px;margin-right:-15px;" type="button" class="close" data-dismiss="modal"
+                        aria-hidden="true">&times;
+                </button>
+            </div>
+            <div class="modal-body" style="height: 240px;">
+                <div class="floorone" style="text-align: center;">
+                    <img style="width:180px;height:180px;"
+                         src="{{Msg "seo" "cdn"}}/images/swordfish/sf_01_01.png?v={{Msg "seo" "version"}}"/>
+                </div>
+                <div class="floortwo" style="padding: 20px 30px;">
+                    <span>请微信扫码进行订阅操作</span>
+                </div>
+            </div>
+            <div class="modal-footer">
+            </div>
+        </div><!-- /.modal-content -->
+    </div><!-- /.modal -->
+</div>
+
+<!--百度统计start-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--百度统计end-->
+
+<script>
+    //关键词不合规范提示
+    var hintcon = ["您订阅的关键词较多,<br>可能会收不到推送信息。", "您订阅的关键词字数过多,<br>可能会收不到推送信息。", "您订阅的关键词包含特殊符号,<br>可能会收不到推送信息。"]
+    var Guide = {
+        industry_keyword: {
+            "工程建筑": ["道路", "桥梁", "房屋", "钢结构", "土方", "建筑工程", "混凝土", "钢材", "勘察", "设计", "施工", "监理", "装修", "安装"],
+            "水利水电": ["水利工程", "水利设施", "水电工程", "水电站", "水电安装", "给水", "给排水", "水库", "节水", "电力", "配电", "闸门", "水泵"],
+            "能源化工": ["太阳能", "光伏", "新能源", "煤炭", "石油", "皮带机", "电网", "水电", "风电", "电缆", "线路迁改", "开关"],
+            "弱电安防": ["安防", "弱电", "机房", "楼宇对讲", "智能家居", "入侵检测", "门禁", "报警器", "电子围栏", "一卡通", "监控", "综合布线", "物联网"],
+            "信息技术": ["软件", "网络", "信息化", "系统集成", "交换机", "路由器", "基站", "服务器", "网站", "视频", "云计算", "虚拟化", "大数据", "VPN", "UPS", "存储", "无人机"],
+            "办公用具": ["图书", "课桌椅", "体育器材", "篮球架", "健身器材", "会议桌", "办公桌", "沙发", "电脑桌", "座椅", "耗材", "家具", "办公设备"],
+            "机械设备": ["工程机械", "搅拌站", "压路机", "塔吊", "起重机", "发电机", "养护机械", "机械设备", "挖掘机", "自卸车", "机器人"],
+            "交通运输": ["交通运输", "铁路", "轨道", "车辆", "隧道", "仓储", "道路", "护栏", "公交车", "高速公路", "信号灯", "标识牌"],
+            "医疗卫生": ["监测仪", "分析仪", "核磁共振", "供氧材料", "注射器", "心电图", "呼吸机", "彩超", "CT", "医疗设备", "医疗器械"],
+            "市政设施": ["城市道路", "地下通道", "涵洞", "过街天桥", "防洪排水", "景观照明", "绿化", "洗扫车", "管网", "路灯", "排污管道"],
+            "其它": ["翻译", "物业服务", "法律咨询", "法律服务"]
+        },
+        //所选的行业
+        selectIndustrys: [],
+        selectLastData: [],
+        action: 1,
+        sst: '',
+        clientH: 0
+    }
+    //
+    $(function () {
+        selcetIndexNav(1);
+        //setTimeout("$('#inerPre').click()",1000);
+        $("#inerNextDiv").click(function () {
+            $('#inerNext').click();
+            $(this).addClass("hidden");
+            setTimeout(function () {
+                $("#inerNextDiv").removeClass("hidden");
+            }, 500)
+        })
+        $("#inerPreDiv").click(function () {
+            $('#inerPre').click();
+            $(this).addClass("hidden");
+            setTimeout(function () {
+                $("#inerPreDiv").removeClass("hidden");
+            }, 500)
+        })
+        haslogin({{.T.logid}});
+        //saveuserlogs({{.T.shareid}});
+        Guide.clientH = document.body.clientHeight;
+        //
+        $(".scfree").click(function () {
+            //判断用户是否登录
+            OrLogin()
+        })
+        //头部导航
+        $(".j-nav .j-nav-link:eq(4)").addClass("active");
+        //动画开始
+        var rollflag = true
+
+        $(window).scroll(function () {
+            if ($(this).scrollTop() > 900) {
+                if (rollflag) {
+                    startAnimation();
+                    rollflag = false;
+                }
+            }
+        });
+        //加载行业
+        var html = "";
+        for (var i in Guide.industry_keyword) {
+            html += '<li>' + i + '</li>';
+        }
+        $("#firstPopup .floorthree ul").html(html)
+        //
+        $("#firstPopup .floorthree li").click(function () {
+            $(this).toggleClass("active");
+        })
+        //
+        $("#kword").bind("input propertychange", function () {
+            setTimeout(function () {
+                if (!$(this).prop('comStart')) {
+                    saveKeyWord(this.value);
+                    new RecomKWs().loadSubscribeRecom();
+                }
+            }, 500)
+        }).on('compositionstart', function () {
+            $(this).prop('comStart', true);
+        }).on('compositionend', function () {
+            $(this).prop('comStart', false);
+        });
+        //
+        new RecomKWs().structureHtml("");
+        //
+        $("#myModal-01").click(function () {
+            $("body").css("overflow", "");
+            setTimeout(function () {
+                var aria = $("#myModal-01").attr("aria-hidden");
+                if (aria == "true") {
+                    behaviorRecord();
+                }
+            }, 500)
+        })
+        //
+        $("#myModal").click(function () {
+            $("body").css("overflow", "hidden");
+            setTimeout(function () {
+                $("body").css("overflow", "");
+                $("body").addClass("modal-open");
+            }, 500)
+        })
+    })
+    //是否登录
+    var OrLogin = function () {
+        $("#fourthPopup").addClass("hidden");
+        $("#secondPopup").addClass("hidden");
+        $("#thirdPopup").addClass("hidden");
+        if (loginflag) {
+            $("#fourthPopup").removeClass("hidden");
+            $("#firstPopup").addClass("hidden");
+            $("#myModal-01 .modal-dialog").css("width", "488px");
+            $("#thirdPopup").css("margin-top", (Guide.clientH - 320) / 2);
+        } else {
+            $("#firstPopup").removeClass("hidden");
+            $("#fourthPopup").addClass("hidden");
+            Guide.action = 1;
+            $("#myModal-01 .modal-dialog").css("width", "800px");
+            $("#myModal-01 .modal-dialog").css("margin-top", "100px;");
+            $("#firstPopup").css("margin-top", (Guide.clientH - 515) / 2);
+        }
+        $("#cb-01").click();
+    }
+    //动画开始
+    var startAnimation = function () {
+        var liLength = $(".warp-progress li").length;
+        var liWidth = $(".container-page").width();
+        var t = null;
+        /*初始化宽度*/
+        $(".warp-container").css({
+            width: liLength * liWidth
+        })
+
+        $('.warp-progress-items').on('animationend', function () {
+            $(this).addClass('active stop')
+            if ($(this).next().html() != undefined) {
+                $(this).next().trigger("click");
+            } else {
+                $('.warp-progress-items').removeClass("active stop");
+                t = setTimeout(function () {
+                    $(".warp-progress-items").eq(0).trigger("click")
+                }, 100)
+                return false;
+            }
+            ;
+        })
+        $(".warp-progress-items").on("click", function () {
+            var _this = $(this)
+            $(".container-page").find(".container-page-title").stop(false, true).css({
+                top: 800
+            })
+            $('.warp-progress-items').each(function (i) {
+                if (i < $(_this).index()) {
+                    $(this).addClass("active stop");
+                } else {
+                    $(this).removeClass('active stop')
+                }
+            })
+            $(this).addClass('active');
+            $(".container-page").stop(false, false).animate({
+                left: -$(this).index() * liWidth
+            }, 1000, function () {
+                $(".container-page").find(".container-page-title").eq(_this.index()).stop(false, false).animate({
+                    top: 240
+                }, 800)
+            })
+            return false;
+        })
+        t = setTimeout(function () {
+            $(".warp-progress-items").eq(0).trigger("click")
+        }, 100)
+    }
+    //记录用户行为
+    var behaviorRecord = function () {
+        var bevalue = ''
+        if (Guide.action == 1) {
+            bevalue += '第一弹出框,行业:'
+            $("#firstPopup .floorthree li.active").each(function () {
+                bevalue += $(this).text() + ";";
+            });
+        } else if (Guide.action == 2) {
+            bevalue += '第二弹出框,关键词:'
+            $("#secondPopup .floorfour li.active").each(function () {
+                bevalue += $(this).text() + ";";
+            });
+            bevalue += $("#kword").val();
+        } else if (Guide.action == 3) {
+            bevalue += '第三弹出框,扫码操作。'
+        }
+        $("#kword").val("");
+        clearInterval(Guide.sst);
+        $.post("/member/behaviorRecord", {"source": "pc", "value": bevalue, "type": "subscribe_pc"});
+    }
+    //下一页
+    var next = function (index) {
+        if (index == 1) {
+            Guide.selectIndustrys = [];
+            $("#firstPopup .floorthree li.active").each(function () {
+                Guide.selectIndustrys.push($(this).text());
+            });
+            new RecomKWs().loadIndustryRecom();
+            $("#firstPopup").addClass("hidden");
+            $("#secondPopup").removeClass("hidden");
+            $("#thirdPopup").addClass("hidden");
+            $("#myModal-01 .modal-dialog").css("width", "488px");
+            $("#secondPopup").css("margin-top", (Guide.clientH - 506) / 2);
+            $("#kword").val("");
+            Guide.action = 2;
+        } else if (index == 2) {
+            Guide.action = 3;
+            $("#myModal-01 .modal-dialog").css("width", "488px");
+            $("#firstPopup").addClass("hidden");
+            $("#secondPopup").addClass("hidden");
+            $("#thirdPopup").removeClass("hidden");
+            $("#thirdPopup").css("margin-top", (Guide.clientH - 440) / 2);
+            generateQR();
+        }
+    }
+    //上一页
+    var prev = function (index) {
+        if (index == 2) {
+            $("#firstPopup").removeClass("hidden");
+            $("#secondPopup").addClass("hidden");
+            $("#thirdPopup").addClass("hidden");
+            $("#myModal-01 .modal-dialog").css("width", "800px");
+            Guide.action = 1;
+        } else if (index == 3) {
+            $("#firstPopup").addClass("hidden");
+            $("#secondPopup").removeClass("hidden");
+            $("#thirdPopup").addClass("hidden");
+            $("#myModal-01 .modal-dialog").css("width", "488px");
+            Guide.action = 2;
+        }
+
+    }
+    var generateQR = function () {
+        var selectKW = []
+        $("#secondPopup .floorfour li.active").each(function () {
+            selectKW.push($(this).text());
+        });
+        selectKW.push($("#kword").val());
+        var strkw = selectKW.join(";")
+        if ($("#kword").val() == "") {
+            strkw = strkw.substring(0, strkw.length - 1)
+        }
+        $("#thirdkw").text(strkw)
+        var shareid = kopshareid;
+        //$.post("/front/getLoginNum/101",function(data){
+        //	if(data&&data.num){
+        //		$("#thirdPopup .floorone img").attr("src","/front/share/"+data.num);
+        saveStKw(strkw, shareid)
+        //setSubscribeTimes(30,data.num)
+        //	}
+        //},'json');
+    }
+    //
+    var saveStKw = function (skw, num) {
+        if (skw != "" && num != "") {
+            $.post("/front/rediskw", {"skw": skw, "num": num});
+        }
+    }
+    //
+    var spkw = function (t) {
+        $(t).toggleClass("active");
+    }
+    //
+    var RecomKWs = function () {
+        this.count = 6;
+        //根据选择的行业,获取对应的关键词,目的去重
+        this.getIndustrys = function () {
+            var industry_keyword = {};
+            for (var i in Guide.selectIndustrys) {
+                industry_keyword[Guide.selectIndustrys[i]] = Guide.industry_keyword[Guide.selectIndustrys[i]];
+            }
+            for (var i in industry_keyword) {
+                var keywords = [];
+                for (var k in industry_keyword[i]) {
+                    var isExists = false;
+                    var kWord = industry_keyword[i][k];
+                    for (var m in industry_keyword) {
+                        if (isExists) {
+                            break;
+                        }
+                        for (var n in industry_keyword[m]) {
+                            var nWord = industry_keyword[m][n];
+                            if (i == m && k == n) {
+                                continue;
+                            }
+                            if (kWord == nWord) {
+                                isExists = true;
+                                break;
+                            }
+                        }
+                    }
+                    if (!isExists) {
+                        keywords.push(kWord);
+                    }
+                }
+                industry_keyword[i] = keywords;
+            }
+            return industry_keyword;
+        }
+        //加载行业对应的关键词
+        this.loadIndustryRecom = function () {
+            var industry_keyword = this.getIndustrys();
+            var lastData = [];
+            var dataTemp = [];
+            var datalength = 0;
+            for (var i in industry_keyword) {
+                if (datalength < industry_keyword[i].length) {
+                    datalength = industry_keyword[i].length
+                }
+            }
+            for (var k = 0; k < datalength; k++) {
+                for (var key in industry_keyword) {
+                    if (industry_keyword[key][k]) {
+                        dataTemp.push({
+                            "index": key,
+                            "value": industry_keyword[key][k]
+                        });
+                    }
+                }
+            }
+            dataTemp = dataTemp.slice(0, this.count);
+            for (var i in dataTemp) {
+                lastData.push(dataTemp[i]["value"]);
+            }
+            Guide.selectLastData = lastData
+            this.structureHtml(lastData);
+        }
+        this.loadSubscribeRecom = function () {
+            var valueArray = [];
+            var inputValue = $.trim($("#kword").val()).replace(/\s+/g, "+");
+            if (inputValue != "") {
+                valueArray.push(inputValue);
+                this.getData(valueArray, 6);
+            } else {
+                this.structureHtml(Guide.selectLastData);
+            }
+        }
+        this.getData = function (valueArray, reqCount) {
+            var thisClass = this;
+            $.post("/member/getRecomKWs", {
+                count: reqCount + 1,
+                value: valueArray.join(" ").toUpperCase()
+            }, function (r) {
+                if (typeof (r) == "undefined" || r == null || r.length == 0) {
+                    r = [];
+                }
+                r = thisClass.filterRecomDatas(r, valueArray);
+                thisClass.processKWdata(r.slice(0, 6));
+            });
+        }
+        this.processKWdata = function (r) {
+            var lastData = [];
+            if (r.length == 0) {
+                lastData = Guide.selectLastData
+            } else {
+                for (var i in r) {
+                    lastData.push(r[i]["word"]);
+                }
+            }
+            this.structureHtml(lastData);
+        }
+        //过滤
+        this.filterRecomDatas = function (words, valueArrayTemp) {
+            var newWords = [];
+            for (var i in words) {
+                var isDel = false;
+                var currentWord = $.trim(words[i]["word"]).toUpperCase();
+                //已订阅的关键词
+                if (!isDel) {
+                    for (var n = 0; n < valueArrayTemp.length; n++) {
+                        if (isDel) {
+                            break;
+                        }
+                        var vat = valueArrayTemp[n].split("+");
+                        for (var m = 0; m < vat.length; m++) {
+                            if (currentWord == vat[m].toUpperCase()) {
+                                isDel = true;
+                                break;
+                            }
+                        }
+                    }
+                }
+                //数字和一个字的不显示
+                if (!isDel) {
+                    if (/^(-?\d+)(\.\d+)?$/.test(currentWord) || /^[0-9]*$/.test(currentWord) || currentWord.length == 1 || currentWord == "" || currentWord.indexOf("�") > -1) {
+                        isDel = true;
+                    }
+                }
+                if (!isDel) {
+                    //去重
+                    for (var k in words) {
+                        if (isDel) {
+                            break;
+                        }
+                        if (i == k) {
+                            continue;
+                        }
+                        if (currentWord == words[k]["word"].toUpperCase()) {
+                            isDel = true;
+                            break;
+                        }
+                    }
+                }
+                if (!isDel) {
+                    newWords.push(words[i]);
+                }
+            }
+            newWords.sort(function (a, b) {
+                if (a.sim < b.sim) {
+                    return 1;
+                } else if (a.sim > b.sim) {
+                    return -1;
+                } else {
+                    return 0;
+                }
+            });
+            return newWords;
+        }
+        this.structureHtml = function (data) {
+            var shtml = '<div>剑鱼标讯为您推荐以下关键词</div>';
+            if (data.length != 0) {
+                shtml += '<ul>'
+                for (var i = 0; i < data.length; i++) {
+                    shtml += '<li class="active" onclick="spkw(this)">' + data[i] + '</li>'
+                }
+                shtml += '</ul>';
+                $("#secondPopup .floorfour").html(shtml);
+            } else if (data == "") {
+                this.hotWord();
+            }
+
+        }
+
+        //最热推荐词
+        this.hotWord = function () {
+            $.ajax({
+                type: "POST",
+                url: "/front/gethotkey",
+                data: {},
+                success: function (r) {
+                    var shtml = '<div>剑鱼标讯为您推荐以下关键词</div><ul>';
+                    if (r.length != 0) {
+                        for (var i = 0; i < r.length; i++) {
+                            shtml += '<li class="active" onclick="spkw(this)">' + r[i] + '</li>';
+                        }
+                    } else {
+                        var m = 0;
+                        for (var i in Guide.industry_keyword) {
+                            m++
+                            if (m < 7) {
+                                shtml += '<li class="active" onclick="spkw(this)">' + i + '</li>';
+                            } else {
+                                break
+                            }
+                        }
+
+                    }
+                    shtml += '</ul>'
+                    $("#secondPopup .floorfour").html(shtml);
+                }
+            })
+        }
+    }
+    //
+    var JYAlert = function (T) {
+        if (T != "") {
+            $(".jyhead_mask").html(T)
+            //$("#jydialog").css({"left":"50%","margin-top":"-50px","margin-left":"-120px"});
+            $("#myModal").modal("show");
+        }
+    }
+    //
+    var saveKeyWord = function (text) {
+        if (typeof (text) != "undefined") {
+            text = $.trim(text);
+            if (text != "") {
+                if (text.match(/[^0-9a-zA-Z\u4E00-\u9FFF\s]/g)) {
+                    JYAlert(hintcon[2]);
+                } else {
+                    text = text.replace(/\s+/g, " ");
+                    texts = text.split(" ")
+                    for (k = 0; k < texts.length; k++) {
+                        if (k > 1) {
+                            JYAlert(hintcon[0]);
+                        } else {
+                            if (texts[k].length > 19) {
+                                JYAlert(hintcon[1]);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    //
+    $(function () {
+        var rotateInner = function () {
+            var $pre = $('#inerPre'),
+                $next = $('#inerNext'),
+                $inner = $('#inner'),
+                $ulLists = $('#inner ul li'),
+                /*度数*/
+                num = 0,
+                /*索引*/
+                index = null,
+                /*圈数*/
+                circle = null;
+
+            return {
+
+                next: function () {
+                    $next.on('click', function () {
+                        num = num + 24;
+                        setTimeout(rotateInner.nowActive, 100)
+
+                        $inner.css({
+                            "transform": "rotate(" + (-num) + "deg)"
+                        })
+                    })
+                },
+                pre: function () {
+                    $pre.on('click', function () {
+                        num = num - 24;
+                        setTimeout(rotateInner.nowActive, 100)
+                        $inner.css({
+                            "transform": "rotate(" + (-num) + "deg)"
+                        })
+                    })
+                },
+                nowActive: function () {
+                    /*获取圈数*/
+                    circle = Math.floor(num / 360);
+                    /*获取索引*/
+                    index = (num - circle * 360) / 24;
+                    /*左边图片*/
+                    var $leftImg = $('.inner-left img');
+
+                    /*active时的图片路径*/
+                    var imgSrc = $ulLists.eq(index).find(".icon").attr('acTimg');
+
+                    /*当前索引添加class*/
+                    $ulLists.eq(index).addClass("nowImg").siblings().removeClass('nowImg');
+                    $.each($ulLists, function (i) {
+                        if ($($ulLists[i]).hasClass("nowImg")) {
+                            $($ulLists[i]).find(".icon").attr({
+                                "src": imgSrc
+                            }).removeClass("animteOpacity").addClass("animteOpacity");
+                        } else {
+                            /*原图片路径*/
+                            var imgSrc_src = $($ulLists[i]).find(".icon").attr('srcImg');
+                            $($ulLists[i]).find(".icon").attr({
+                                "src": imgSrc_src
+                            }).removeClass("animteOpacity");
+                        }
+                    });
+
+                    /*给当前索引的 数字添加类名 删除其他类名*/
+                    $ulLists.eq(index).find("i").addClass('active').end().siblings().find("i").removeClass('active');
+                    /*显示frText和隐藏*/
+                    $ulLists.eq(index).find(".frText").stop().fadeIn(1000).end().siblings().find(".frText").stop().fadeOut(10);
+                    /*左边图片显示*/
+                    $leftImg.eq(index).stop().animate({
+                        "opacity": "1",
+                        "top": "90px"
+                    }, 1000).siblings().stop().css({
+                        "opacity": "0",
+                        "top": "400px"
+                    })
+                },
+                tigerClick: function () {
+                    var $innerBtn = $('.innerBtn');
+
+                    t = setInterval(tirclick, 8000);
+
+                    //$inner.on('mouseover', function() {
+                    //	clearInterval(t)
+                    //});
+                    $innerBtn.on('mouseover', function () {
+                        clearInterval(t)
+                    });
+
+                    //$inner.on('mouseout', function() {
+                    //	t = setInterval(tirclick, 8000);
+                    //});
+                    $innerBtn.on('mouseout', function () {
+                        t = setInterval(tirclick, 8000);
+                    });
+
+                    function tirclick() {
+                        $pre.triggerHandler('click');
+                    }
+
+                    $(document).on('visibilitychange', function () {
+                        //document.title = document.hidden? "你走了":"你回来了";
+                        document.hidden ? clearInterval(t) : t = setInterval(tirclick, 8000);
+                    })
+                }
+            }
+        }()
+        /*调用*/
+        rotateInner.next()
+        rotateInner.pre()
+
+        var rollnext = true
+        var thisHeight = window.screen.height;
+        if (thisHeight > 800) {
+            if (rollnext) {
+                setTimeout(function () {
+                    $('#inerPre').click()
+                }, 1000);
+                rotateInner.tigerClick()
+                rollnext = false;
+            }
+        } else {
+            $(window).scroll(function () {
+                if ($(this).scrollTop() > 200) {
+                    if (rollnext) {
+                        setTimeout(function () {
+                            $('#inerPre').click()
+                        }, 1000);
+                        rotateInner.tigerClick()
+                        rollnext = false;
+                    }
+                }
+            });
+        }
+    })
+
+    $('.vip-btn').click(function () {
+        $('.madal').css('display', 'block');
+        $('body').removeClass('modal-open')
+        setTimeout(() => {
+            $('.modal-backdrop').attr('id', 'modalhide')
+        }, 100)
+    })
+    console.log($('#modalhide'))
+    $('#modalhide').click(function () {
+        $('modal-backdrop').attr('id')
+        $('.modal-backdrop').fadeOut(200);
+        $('.modal').slideUp(200);
+    })
+</script>
+</body>
+</html>

+ 222 - 114
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -599,7 +599,9 @@
 			}
 			
 			function setSessionStorage(){
+				sessionStorage.orderScrollTop=$(".main")[0].scrollTop;
 				sessionStorage.orderTabActive=$("ul .active").index();
+				sessionStorage.orderPageNum=parseInt(pageIndex)-1;
 			}
 			
 			function onceMore(e){
@@ -609,7 +611,7 @@
 			}
 			//续费 1 再次购买 2
 			function renewalOrBuyAgain(pattern,e){
-				sessionStorage.orderTabActive=$("ul .active").index();
+				setSessionStorage();
 				var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
 				if (pattern==1){
 					var checkOrder_bl=checkOrder()
@@ -715,7 +717,7 @@
 			                                   					 }else{
 			                                   					 	$(obj).parent().parent().remove();
 																	$(".card_lists").empty();
-			                                   					 	queryOrder($("ul .active").index());
+			                                   					 	queryOrder($("ul .active").index(),10);
 			                                   					 }
 			                                   					
 			                                                }
@@ -754,10 +756,13 @@
 				sessionStorage.removeItem("applysuccess");
 				sessionStorage.removeItem("companyName");
 				sessionStorage.removeItem("taxNumer");
-				$("body").scroll(function(){
-					scrollTop=$("body").scrollTop()
-				});
+//				$("#order_list").on('scroll' ,function(){
+//					scrollTop=$(".main")[0].scrollTop
+//					console.log(scrollTop)
+//					console.log(this)
+//				});
 				//var i=0
+				
 				$(".buttons-tab .tab-link").each(function() {
 					$(".loading_").hide();
 					var index = $(this).index();
@@ -769,8 +774,7 @@
 						$(".tabs>.tab").eq(index).show().siblings().hide();
 						typ=$("ul .active").index();
 						$(".card_lists").empty();
-						$("body").scrollTop(0);
-						queryOrder(index);
+						queryOrder(index,10);
 					})
 				})
 
@@ -786,22 +790,46 @@
 				}
 				if(sessionStorage.orderTabActive){
 					$(".buttons-tab .tab-link").eq(sessionStorage.orderTabActive).addClass("active").siblings().removeClass("active");
-					queryOrder(sessionStorage.orderTabActive);
+					var orderPageNum=parseInt(sessionStorage.orderPageNum);
+					queryOrder(sessionStorage.orderTabActive,orderPageNum*10);
+					sessionStorage.removeItem("orderPageNum");
 					sessionStorage.removeItem("orderTabActive");
+					if(sessionStorage.orderScrollTop){
+						setTimeout(function(){
+							$(".main")[0].scrollTop=parseInt(sessionStorage.orderScrollTop);
+						},500)
+						setTimeout(function(){
+							sessionStorage.removeItem("orderScrollTop");
+						},2000)
+						
+					}
 				}else{
-					queryOrder();
+					//后续版本用
+					var active=getParam("active");
+					if (active){
+						$(".buttons-tab .tab-link").eq(active).addClass("active").siblings().removeClass("active");
+						$(".tabs>.tab").eq(active).show().siblings().hide();
+						$(".card_lists").empty();
+						queryOrder(active,10);
+					}else{
+						queryOrder(0,10);
+					}
 				}
 			})
 			
 				//查询订单ajax
 				//typ  0全部 1未支付 2已支付
-				function queryOrder(typ,objD){
+				function queryOrder(typ,page_size){
 					var result = true;
-					$.post("/subscribepay/orderListDetails/myOrder",{"type":typ},function(data){
+					$.post("/subscribepay/orderListDetails/myOrder",{"type":typ,"page_size":page_size},function(data){
 							$(".loading_").hide();
 							var list=data.res;
 							dataCache =data.res;
-							pageIndex=2;
+							if(page_size!=10){
+								pageIndex=parseInt(page_size/10)+1;
+							}else{
+								pageIndex=2;
+							}
 						    hasNextPage=data.hasNextPage;
 							if (data.res&&data.res.length>0){
 								structureHtml(data.res);	
@@ -824,21 +852,21 @@
 								        scrollArea : $(".main"),
 								        loadDownFn : function(me){
 											$.post('/subscribepay/orderListDetails/myOrderPaging', {"pageNum": pageIndex,"type":typ},function(data){
-													//没有数据
-													if(data.res==null||data.res.length==0){
-														noMoreData(me);
+												//没有数据
+												if(data.res==null||data.res.length==0){
+													noMoreData(me);
+												}else{
+													dataCache=dataCache.concat(data.res);
+													pageIndex++;
+													structureHtml(data.res);
+													if(data.hasNextPage){
+														// 每次数据插入,必须重置
+														me.resetload();
 													}else{
-														dataCache=dataCache.concat(data.res);
-														pageIndex++;
-														structureHtml(data.res);
-														if(data.hasNextPage){
-															// 每次数据插入,必须重置
-															me.resetload();
-														}else{
-															noMoreData(me);
-														}
+														noMoreData(me);
 													}
-												});
+												}
+											});
 										}
 									});
 								}else{
@@ -1004,87 +1032,145 @@
 	                        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;
-							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;
+	                        //判断该订单是否是升级订单
+	                        var vip_type = obj.vip_type;
+	                       if (vip_type != 2){
+		                       	 //地区
+								var region_vipArr = filter_vip.area;
+		                        var region_vip=""
+		                        var province_length=0;
+		                        var city_length=0;
+								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="全国";
 								}
-							}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{
-					    				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+"天";	                    
+								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{
+						    				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="不延期";
+							    }
+	                       }
 	                        
 	                        var vip_status =obj.i_vip_status;	// 1:试用 2:正式 -1:试用到期 -2:正式到期
 	                        //订单状态 0待支付 1已完成 -1删除  
@@ -1159,11 +1245,21 @@
 													+'<div class="media-img">'
 														+'<img src="/vipsubscribe/image/vip_order.png">'
 													+'</div>'
-													+'<div class="media-info">'
-														+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
-														+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
-														+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
-													+'</div>'
+													+'<div class="media-info">';
+														if (vip_type==1){//续费
+															listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
+															+'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>';
+														}else if (vip_type ==2){//升级
+															listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
+															+'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>';
+														}else{
+															listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'</p>'
+															+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>';
+														}
+													listhtml+='</div>'
 												+'</a>'
 												+'<div class="price">'
 													+'<strong class="current">¥'+orderMoney_vip+'</strong>'
@@ -1189,12 +1285,24 @@
 															+'<div class="media-img">'
 																+'<img src="/vipsubscribe/image/vip_order.png">'
 															+'</div>'
-															+'<div class="media-info">'
-																+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
-																+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
-																+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
-																+'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>'
-															+'</div>'
+															+'<div class="media-info">';
+																if(vip_type==1){ //续费
+																	listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
+																			 +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}else if (vip_type==2){ //升级
+																	listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
+																			 +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}else {
+																	listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">行业:'+ industry_vip +'</p>'
+																			 +'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}
+															listhtml+='</div>'
 														+'</a>'
 														+'<div class="price">'
 															+'<strong class="current">¥'+orderMoney_vip+'</strong>'

+ 6 - 4
src/web/templates/weixin/historypush.html

@@ -244,6 +244,9 @@
 				if(isPassCount){
 					$(".open_remind").show();
 				}
+				if(parseInt(isExpire)<0){
+					$(".nv_renew_toast").show();
+				}
 				if(!firstPage.length>0 && !haskey){
 					if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
 						sessionStorage.removeItem("keysetindexToHistory");
@@ -271,14 +274,12 @@
 				}
 				if(parseInt(isOnTail)!=1){
 					$('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
-					if(parseInt(isExpire)!=0){
+					if(parseInt(isExpire)>0){
 						$(".isExpire").text(parseInt(isExpire));
 						$(".renew_toast").show();
 					}
 				}else{
-					if(parseInt(isExpire)<0){
-						$(".nv_renew_toast").show();
-					}else{
+					if(parseInt(isExpire)>0){
 						$(".isExpire").text(parseInt(isExpire));
 						$(".renew_toast").show();
 					}
@@ -537,6 +538,7 @@
 				async: false,
 				dataType: 'json',
 				success: function (data) {
+					_scrollTop = 0;//定位重置
 					pageIndex=2;
 					lasttime = data.thistime;
 					firstPage = data.data;

+ 16 - 2
src/web/templates/weixin/vipsubscribe/choose_area.html

@@ -653,6 +653,9 @@
                 document.querySelector('#' + s).scrollIntoView({block: 'center'});
             })
             $(".select-area-box .tab:not(.municipality)").on('click', function (event) {
+                if (AreaChoose.checkAnimatedRuning()) {
+                    return
+                }
                 if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
                     $(this).children().children('i').css({
                         "display": "inline-block",
@@ -761,11 +764,22 @@
                 $('.tips_d_money').text('¥' + price);
             }
 
+        },
+        animatedRuning: false,
+        checkAnimatedRuning: function () {
+            if (AreaChoose.animatedRuning) {
+                return true
+            }
+            AreaChoose.animatedRuning = true;
+            setTimeout(function () {
+                AreaChoose.animatedRuning = false;
+            }, 500);
+            return false
         }
-    }
+    };
 
     $(function () {
-        AreaChoose.isOpen()
+        AreaChoose.isOpen();
         AreaChoose.inintData(); //初始化 已选择和已购买数据
         AreaChoose.inintPage(); //初始化城市数据
 

+ 48 - 97
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -12,103 +12,6 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/keyWord.css?v={{Msg "seo" "version"}}">
     <style>
-        .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;
-        }
-        .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;
-      }
     </style>
 </head>
 
@@ -126,6 +29,9 @@
                 <p class="classify-tips">
                     关键词分类便于对同类别关键词做整合管理
                 </p>
+                <p class="classify-fast" style="display:none;">
+                    快速导入
+                </p>
             </div>
             <section class="content">
                 <!-- 添加关键词 -->
@@ -224,6 +130,23 @@
                 </div>
             </div>
         </div>
+        <!-- 快速导入说明 -->
+        <div class="classify-fast-pop dialog-container">
+            <!-- <div class="weui-mask weui-animate-fade-in"></div> -->
+            <div class="weui-dialog weui-animate-fade-in">
+                <div class="weui-dialog__hd">
+                    <strong class="weui-dialog__title">快速导入</strong>
+                </div>
+                <div class="weui-dialog__bd">
+                    快速导入可将免费版招标订阅内所设置的关键词及其排除词将一并导入至“未分类"关键词分类内,无需再次手动输入,简化您的订阅过程。
+					<p style="color:#888;">注:地区与行业分类以VIP订阅设置内为准,不做导入。</p>
+                </div>
+                <div class="weui-dialog__ft">
+                    <a href="javascript:;" class="dialog__btn dialog__btn_confirm">确定</a> 
+                    <a href="javascript:;" class="dialog__btn dialog__btn_cancel">取消</a>
+                </div>
+            </div>
+        </div>
     </div>
     
     <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
@@ -246,6 +169,7 @@
         var classify_arr = [];//分类对象
         var kws_arr = {};//所有关键词对象
         var kws_tips = 0;
+		var fastimport = 0;//快速导入功能
         // 页面状态
         var pageState = {
             //是否第一次设置关键词
@@ -347,6 +271,12 @@
                 kws_index = sessionStorage.kws_index;
                 modifyFlag = true;
                 kws_count = sessionStorage.kws_count;
+				fastimport = parseInt(sessionStorage.fastimport);
+				if(fastimport==0){
+					$(".classify-fast").show();
+				}else{
+					$(".classify-fast").hide();
+				}
                 $(".kws_count").text(kws_count);
                $(".add-keyword-container .addNewKeyword i").hide();
                 toSetKws();
@@ -356,6 +286,15 @@
                     if(r.userData){
                         var _userData = r.userData;
                         var _vipData = _userData["o_vipjy"];
+						var ordinarykc = parseInt(_userData["ordinarykc"])
+						fastimport = parseInt(_userData["i_vip_fastimport"]);
+						if(fastimport==0&&ordinarykc>0){
+							sessionStorage.fastimport = fastimport;
+							$(".classify-fast").show();
+						}else{
+							sessionStorage.fastimport = 1;
+							$(".classify-fast").hide();
+						}
                         modifyFlag = false;
                         if (_vipData["a_items"]!=undefined&&_vipData["a_items"].length>0){
                             a_items = _vipData["a_items"]
@@ -777,6 +716,18 @@
 		    }
 		    $('input.classify-keyword').val(currentClassifyName).focus()
 		}
+		//
+		function modalTwo(){
+		    // 如果是苹果手机,打开时候要设置top
+		    var agent = navigator.userAgent.toLowerCase();
+		    var dialog = $('.classify-fast-pop .weui-dialog')
+		    if( /iphone|ipod|ipad|ios/.test(agent) ){
+		        dialog.css({ 'top': '30%' })
+		    } else {
+		        dialog.css({ 'top': '50%' })
+		    }
+		    $('.classify-fast-pop').show();
+		}
     </script>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}23"></script>
     <script>

+ 2 - 2
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -127,9 +127,9 @@
         </div>
         <div class="menu">
             {{if not .T.notShowTrial }}
-            <a onclick="window.location.replace('/front/vipsubscribe/trialInfo')" class="try_btn">试用7天</a>
+            <a onclick="window.location.href='/front/vipsubscribe/trialInfo'" class="try_btn">试用7天</a>
             {{end}}
-            <a onclick="window.location.replace('/weixin/pay/vipsubscribe_new')"  class="subscribe_btn">去订阅</a>
+            <a onclick="window.location.href='/weixin/pay/vipsubscribe_new'"  class="subscribe_btn">去订阅</a>
         </div>
     </div>
     {{include "/common/weixin.html"}}

+ 22 - 14
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -268,19 +268,20 @@ try{
                 let citys_u=filterObj.addarea[i];
                 if (citys_u=="no"){
                 	$(".areaNum").text("无");
-                }
-                if (citys_u.length>0){
-                	cityNum_u+=citys_u.length;
                 }else{
-                	provinceNum_u++;
-                }
-                var areaText_u="";//1个省级区域、4个地市
-                if(provinceNum_u>0) areaText_u= areaText_u + provinceNum_u+"个省级区域";
-                if(cityNum_u>0){
-                  if(provinceNum_u>0) areaText_u= areaText_u+"、"
-                  areaText_u = areaText_u+ cityNum_u+"个地市";
-                }
-              $(".areaNum").text(areaText_u);
+                	 if (citys_u.length>0){
+	                	cityNum_u+=citys_u.length;
+	                }else{
+	                	provinceNum_u++;
+	                }
+	                var areaText_u="";//1个省级区域、4个地市
+	                if(provinceNum_u>0) areaText_u= areaText_u + provinceNum_u+"个省级区域";
+	                if(cityNum_u>0){
+	                  if(provinceNum_u>0) areaText_u= areaText_u+"、"
+	                  areaText_u = areaText_u+ cityNum_u+"个地市";
+	                }
+              		$(".areaNum").text(areaText_u);
+              	}
               }
          	}else {
          		$(".areaNum").text("全国");
@@ -476,8 +477,15 @@ try{
 	    	//倒计时 未购买
 			var create_time=r.data.order.create_time;
 			create_time=create_time.replace(/-/g,'/')
-			//var clock_end = +new Date(create_time) + 172800000;
-			var clock_end = +new Date(create_time) + 3600000;
+			var h;
+			var order_countdown = r.data.order.order_countdown;
+      		if(!(typeof order_countdown=="number")){	//精确小时
+      			var countdown = order_countdown.slice(0,(order_countdown.length-1));
+      			h=countdown*3600000;
+      		}else{	//精确天 
+      			h=order_countdown*86400000;
+      		}
+  			var clock_end = +new Date(create_time) + h;
 			setTimeFunc(clock_end); 
 			setInterval(function(){
 				setTimeFunc(clock_end);

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

@@ -347,6 +347,7 @@
                         this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
                     }
                     {{if eq .T.orderType 5 }}
+                    $('#payHandle').text("立即续费");
                     //即将到期 回显已购买
                     if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
                         $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
@@ -439,9 +440,9 @@
                     }
                     $(".choose_area").val(tipTxt);
                     //$(".add_tips.area").text(tipTxt).css("display", "");
-                }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+                } else if (!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"]) {
                     $(".choose_area").val("全国");
-                }else {
+                } else {
                     $(".choose_area").val("");
                 }
             },
@@ -467,9 +468,9 @@
                 }*/
                 if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
                     $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
-                }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+                } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                     $(".choose_industry").val("全部行业");
-                }else{
+                } else {
                     $(".choose_industry").val("");
                 }
             },
@@ -754,6 +755,7 @@
             sessionStorage.removeItem("vipSubSelectIndustry");
             sessionStorage.removeItem("vipSubSelectTime");
             sessionStorage.removeItem("vipSub_read");
+            sessionStorage.removeItem("historypushDataCache");
         }
 
         /******* 获取url参数(正则)********/

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

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

+ 1 - 1
src/web/templates/weixin/wxtsguide.html

@@ -12,7 +12,7 @@ var isBodyShow = true;
 <link href="/css/jy.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="/wxtsguide/main.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script src="/js/jquery.js"></script>
-<script src="/wxtsguide/main.js?v={{Msg "seo" "version"}}"></script>
+<script src="/wxtsguide/main.js?v={{Msg "seo" "version"}}1"></script>
 <script src="/js/common.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/js/bootstrap.min.js"></script>
 </head>