Răsfoiți Sursa

pc端订阅

wangkaiyue 5 ani în urmă
părinte
comite
d7587bf176

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

@@ -624,6 +624,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 +634,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 +666,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),

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

@@ -2523,7 +2523,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")

+ 9 - 5
src/jfw/modules/weixin/src/config.json

@@ -8,11 +8,11 @@
     "weixinrpcport": "8083",
     "webrpcport": "127.0.0.1:8084",
     "jyop_webrpcport": "127.0.0.1:8012",
-    "webdomain": "http://web-jydev-wky.jianyu360.cn",
-    "appid": "wx79f2cc873dbea989",
-    "apptoken": "top2016top2016",
-    "appsecret": "fb3f77e9c6725811b5c39f6d58bd58a3",
-    "proxysess": "http://web-jydev-wky.jianyu360.cn/front/sess/%s",
+    "webdomain": "http://web-jydev-xzh.jianyu360.cn",
+    "appid": "wx41a95e706276804d",
+    "apptoken": "topnet2018topnet2018",
+    "appsecret": "1b385c7dd14274c5e0898b9b208580b7",
+    "proxysess": "http://web-jydev-xzh.jianyu360.cn/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼标讯,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼标讯,让投标无限可能!",
     "tpl_subscribe_push_id": "IY_RWWzMlwDK6hcd6RAzTec6qre8n5r8PNOOUM_hgk0",
@@ -56,6 +56,10 @@
         "project_repeat": "您已关注过此项目 “%s”。<a href='%s'>点击此处查看我关注的项目列表信息。</a>",
         "project_fail": "抱歉!无法添加项目“%s”,<a href='%s'>因为您关注的项目,达到了系统上限,您可以点击此处删除多余的项目,然后重新添加。</a>"
     },
+    "vipSubscribeReply": {
+        "href":"/front/vipsubscribe/introducePage",
+        "content":"<a href='%s'>点击立即体验VIP订阅。</a>"
+    },
     "company": {
         "company_success": "已为您添加关注企业 “%s”。<a href='%s'>点击此处查看该企业的最新信息。</a>",
         "company_repeat": "您已关注过此企业 “%s”。<a href='%s'>点击此处查看我关注的企业列表信息。</a>",

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

@@ -288,6 +288,10 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 							o_jy["a_key"] = tmp
 							result = "ok"
 						}
+						//pc端订阅页面 扫码回复vip连接也需要用此码
+						if pccodepre == "11" {
+							redis.Del("sso", "pc_subscribe_"+shareid)
+						}
 					} else {
 						for _, key := range keys {
 							tmp = append(tmp, map[string]interface{}{"key": []string{key}})
@@ -321,6 +325,10 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 		}
 	} 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)
 		}
 	}
@@ -628,11 +639,15 @@ func Subscribe(w ResponseWriter, r *Request) {
 		if pccodepre == "12" || pccodepre == "11" || pccodepre == "19" || pccodepre == "17" { //12pc搜索关键词,11pc订阅=11,19拟建项目搜索关键词 22落地页订阅关键词
 			pchints := config.Sysconfig["pchints"].(map[string]interface{})
 			if pcresult == "ok" {
+				log.Println("465464164156")
 				w.ReplyText(fmt.Sprintf(fmt.Sprint(pchints["key_success"]), subkey, autoReplUrl))
 			} else if pcresult == "repeat" {
 				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{})
+				w.ReplyText(fmt.Sprintf(fmt.Sprint(vipsubReply["content"]), config.Sysconfig["webdomain"].(string)+vipsubReply["href"].(string)))
 			} else {
 				if subkey != "" {
 					w.ReplyText(fmt.Sprintf(fmt.Sprint(pchints["key_fail"]), subkey, autoReplUrl))
@@ -924,9 +939,13 @@ 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{})
+						w.ReplyText(fmt.Sprintf(fmt.Sprint(vipsubReply["content"]), config.Sysconfig["webdomain"].(string)+vipsubReply["href"].(string)))
+					}
 				}
 			}
 		} else {
@@ -964,15 +983,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{}{
@@ -985,6 +1015,7 @@ func ScanHandler(w ResponseWriter, r *Request) {
 					}, false, false)
 				}
 				if pcresult == "ok" {
+					log.Println("asdasdasdasdasd")
 					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_success"]), subkey, url))
@@ -996,6 +1027,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) //企业名称

+ 471 - 222
src/web/staticres/css/subscribe.css

@@ -1,407 +1,656 @@
 /* banner图板块 */
-.tender-1{
+.tender-1 {
     width: 100%;
     height: 475px;
 }
-.tender-1 .imgauto{
+
+.tender-1 .imgauto {
     width: 100%;
     height: 100%;
     /* margin: 0 auto; */
 }
-.tender-1 .imgauto img{
+
+.tender-1 .imgauto img {
     width: 100%;
     z-index: 1;
 }
 
 /* 订阅模式选择板块 */
 
-.subscription{
+.subscription {
     width: 100%;
     height: 268px;
-    margin-top: 30px;
+    margin-top: -110px;
 }
-.subscription .sub-center{
+
+.subscription .sub-center {
     width: 840px;
     height: 268px;
     margin: 0 auto;
     display: flex;
+    justify-content: center;
 }
-.subscription .sub-center .sub-free{
-    width: 354px;
-    height: 214px;
-    padding: 27px;
+
+.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: 100%;
+
+.subscription .sub-center .sub-free .free-title {
+    width: 402px;
     height: 26px;
-    margin-top: 28px;
+    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;
+    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: 354px;
-    height: 214px;
-    padding: 27px;
+    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: 100%;
+.subscription .sub-center .sub-vip .vip-logo {
+    width: 402px;
     height: 38px;
-    margin-top: 22px;
+    margin-top: 57px;
     display: flex;
     justify-content: center;
     align-items: center;
 }
-.subscription .sub-center .sub-vip .vip-logo img{
+
+.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);
+
+.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;
+    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);
+    font-size: 18px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    line-height: 46px;
+    color: rgba(255, 218, 177, 1);
 }
+
 /* 订阅模式对比板块 */
-.sub-contrast{
+.sub-contrast {
     width: 100%;
     height: 666px;
     margin-top: 79px;
 }
-.sub-contrast .contrast-header{
+
+.sub-contrast .contrast-header {
     width: 100%;
     height: 31px;
 }
-.sub-contrast .contrast-header .header-title{
+
+.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;
+    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{
+
+.sub-contrast .contrast-main {
     width: 100%;
     height: 422px;
     margin-top: 85px;
 }
-.sub-contrast .contrast-main .contrast-main-center{
+
+.sub-contrast .contrast-main .contrast-main-center {
     width: 960px;
     height: 422px;
     margin: 0 auto;
     display: flex;
-    border: 1px solid rgba(224,224,224,1);
+    /* border: 1px solid rgba(224,224,224,1); */
 }
+
 /* 功能/价格 */
 /* li+li表示选中除第一个li其他所有的li */
-.sub-contrast .contrast-main .contrast-main-center .center-left{
-    width: 201px;
+.sub-contrast .contrast-main .contrast-main-center .center-left {
+    width: 200px;
     height: 422px;
+
 }
-.sub-contrast .contrast-main .contrast-main-center .center-left>ul{
-    width: 201px;
+
+.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 li+li{
+
+.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-bottom: 1px solid rgba(224,224,224,1);
-    border-right: 1px solid rgba(224,224,224,1);
+    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{
+.sub-contrast .contrast-main .contrast-main-center .center-center {
     width: 259px;
     height: 422px;
-    transition:all 0.5s;
+    transition: all 0.5s;
 }
-.sub-contrast .contrast-main .contrast-main-center .center-center>ul{
+
+.sub-contrast .contrast-main .contrast-main-center .center-center > ul {
     width: 259px;
-    transition:all 0.5s;
+    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: 258px;
+.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){
+    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) ;
+    border-right: 1px solid rgba(224, 224, 224, 1);
     display: flex;
-    transition:all 0.5s;
+    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{
+
+.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);
+    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: 463px;
+.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);
+    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{
+
+.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){
+
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul li:nth-child(7) {
     height: 80px;
-    width: 258px;
+    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{
+
+.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);
+    background: rgba(44, 183, 202, 1);
     color: white;
 }
+
 /* VIP订阅专属服务 */
-.sub-contrast .contrast-main .contrast-main-center .center-right{
+.sub-contrast .contrast-main .contrast-main-center .center-right {
     width: 500px;
     height: 422px;
-    transition:all 0.5s;
+    transition: all 0.5s;
 }
-.sub-contrast .contrast-main .contrast-main-center .center-right>ul{
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul {
     width: 500px;
     height: 422px;
     margin: 0;
-    transition:all 0.5s;
+    transition: all 0.5s;
 }
-.sub-contrast .contrast-main .contrast-main-center .center-right>ul li+li{
+
+.sub-contrast .contrast-main .contrast-main-center .center-right > ul li + li {
     width: 500px;
     height: 58px;
     text-align: center;
-    transition:all 0.5s;
+    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){
+    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;
+    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);
+    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: 463px;
+.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;
+    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{
+
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul .modify-right {
     height: 90px;
     line-height: 90px;
-    transition:all 0.5s;
+    transition: all 0.5s;
 }
-.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul li:nth-child(7){
-    height:80px;
+
+.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;
+    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{
+
+.sub-contrast .contrast-main .contrast-main-center ul .top-title {
     height: 68px;
     text-align: center;
-    transition:all 0.5s;
+    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-bottom: 1px solid rgba(224,224,224,1);
-    border-right: 1px solid rgba(224,224,224,1);
+    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{
+.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);
+.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);
+
+.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{
+.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;
+}
 
-.hide{
-    display:none;
-}
-.modal{
-    position:fixed;
-    left:50%;
-    top:50%;
-    width:335px;
-    height:395px;
-    margin-left:-200px;
-    margin-top:-250px;
-    z-index:10;
-    background-color:white;
-}
-.modal .modal-dialog{
+.modal-content {
     width: 335px;
-    height: 395px;
+    height: 400px;
     position: relative;
 }
-.modal .modal-dialog img{
-    margin-top: -48px;
+
+.modal-content > img {
+    margin: -46px 0 0 -1px;
+    /* height: 447px; */
 }
-.modal .modal-dialog .vip-code{
+
+.modal-content .vip-code {
     position: absolute;
     width: 170px;
     height: 197px;
     left: 30%;
-    bottom: 0%;
-}
-.modal .modal-dialog .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;
+    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;
 }
-.shade{
-    position:fixed;
-    left:0;
-    right:0;
-    top:0;
-    bottom:0;
-    opacity:0.6;
-    background-color:black;
-    z-index:9;
+
+.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;
 }
-.vip-text{
-    text-align:center;
+
+.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
+}
+

+ 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");

+ 777 - 21
src/web/templates/pc/subscribe_new.html

@@ -15,7 +15,7 @@
     <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"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}"></script>
     <script>
         $(function () {
             $(window).scroll(function () {
@@ -33,7 +33,7 @@
 <!-- banner图板块 -->
 <div class="tender-1">
     <div class="imgauto">
-        <img src="/images/subscribe/banner.png" alt="">
+        <img src="{{Msg "seo" "cdn"}}/images/subscribe/banner.png?v={{Msg "seo" "version"}}" alt="">
     </div>
 </div>
 <!-- 订阅模式选择板块 -->
@@ -41,28 +41,38 @@
     <div class="sub-center">
         <div class="sub-free">
             <h3 class="free-title">免费版订阅</h3>
-            <button class="free-btn">立即免费订阅</button>
+            <button class="free-btn scfree">立即免费订阅</button>
         </div>
         <div class="sub-vip">
             <div class="vip-logo">
-                <img src="/images/subscribe/vip-logo.png" alt="">
+                <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 btn btn-primary">免费试用</button>
+            <button class="vip-btn" data-toggle="modal" data-target=".bs-example-modal-sm">免费试用</button>
         </div>
     </div>
 </div>
 <!-- VIP弹窗 -->
-<div class="modal hide">
-    <div class="modal-dialog">
-        <img src="/images/subscribe/vip_tanchuang.png" alt="">
-        <div class="vip-code">
-            <img src="/images/subscribe/QR_code.png" alt="">
-            <p class="vip-text">扫描二维码体验VIP订阅</p>
+
+<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="shade hide"></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">
@@ -91,14 +101,14 @@
                     <li>10组关键词</li>
                     <li>仅支持标题匹配</li>
                     <li>订阅区域精确到省</li>
-                    <li><i class="btn-free">免费</i></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="/images/subscribe/mengban.png" alt="">
+                        <img src="{{Msg "seo" "cdn"}}/images/subscribe/mengban.png?v={{Msg "seo" "version"}}" alt="">
                     </li>
                     <li><span>匹配项目信息</span>,为你推送所匹配项目后续的全部动态</li>
                     <li>按采购单位类型订阅,无需繁琐关键词设置</li>
@@ -106,15 +116,122 @@
                     <li>支持<span>标题匹配+全文匹配</span>,信息筛选更灵活</li>
                     <li>订阅区域<span>精确到地级市</span>,只看你最关注的</li>
                     <li>低至5.8元/月
-                        <a href="javascript:;" class="On-trial vip-btn">免费试用</a>
+                        <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"}}
@@ -122,14 +239,653 @@
 <!--百度统计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 () {
-        $('.hide').fadeIn(300);
-        $('.modal,.shade').slideDown(300);
-        // $('.hide').removeClass('hide');
+        $('.madal').css('display', 'block');
+        $('body').removeClass('modal-open')
+        setTimeout(() => {
+            $('.modal-backdrop').attr('id', 'modalhide')
+        }, 100)
     })
-    $('.shade').click(function () {
-        $('.hide').fadeOut(300);
-        $('.modal,.shade').slideUp(300);
+    console.log($('#modalhide'))
+    $('#modalhide').click(function () {
+        $('modal-backdrop').attr('id')
+        $('.modal-backdrop').fadeOut(200);
+        $('.modal').slideUp(200);
     })
 </script>
 </body>

+ 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"}}