Bladeren bron

企明星剑鱼修改

wangshan 9 jaren geleden
bovenliggende
commit
3b5960e5a4

+ 12 - 1
core/src/qfw/mobile/wxmenu.go

@@ -4,6 +4,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"github.com/go-xweb/xweb"
+	. "gopkg.in/mgo.v2/bson"
 	"log"
 	"math/rand"
 	"net/rpc"
@@ -49,6 +50,7 @@ func (m *Mobile) Share(shareid string) error {
 
 //进入订阅页面
 func (m *Mobile) Wxrssset() error {
+	var newsubscribe = "N"
 	searchname := m.GetString("searchnametwo")
 	s_type := m.GetString("s_typetwo")
 	if s_type == "1" {
@@ -74,6 +76,15 @@ func (m *Mobile) Wxrssset() error {
 		m.T["signature"] = GetSignature(m.Action)
 		userInfo := mongodb.FindById("user", m.GetSession("userId").(string), nil)
 		if *userInfo != nil {
+			if (*userInfo)["s_m_openid"] != nil || (*userInfo)["s_m_openid"] != "" {
+				var opid = (*userInfo)["s_m_openid"]
+				query := make(M)
+				query["s_m_openid"] = opid
+				jysb := mongodb.Find("jy_subscribe", query, `{"l_date":-1}`, `{"s_event":1}`, false, 0, 1)
+				if (*jysb)[0]["s_event"] == "subscribe" {
+					newsubscribe = "Y"
+				}
+			}
 			if i_m_guide := (*userInfo)["i_m_guide"]; util.IntAll(i_m_guide) == 0 {
 				mongodb.Update("user", `{"_id":"`+m.GetSession("userId").(string)+`"}`, map[string]interface{}{
 					"$set": map[string]interface{}{
@@ -110,7 +121,7 @@ func (m *Mobile) Wxrssset() error {
 			//取Shareid
 			m.T["shareid"] = cutil.FindMyShareId("topjy", m.Session().Get("s_m_openid").(string))
 		}
-
+		m.T["newsubscribe"] = newsubscribe
 		return m.Render("/swordfish/wxrssset.html", &m.T)
 	} else {
 		return m.Redirect("/swordfish/share/-1")

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-06-13 10:20:06"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-06-13 10:20:06"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-06-28 14:54:06"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-06-28 14:54:06"}},"marketisstart":true,"marketrate":300}

BIN
core/src/web/staticres/images/swordfish/sf_01.jpg


+ 45 - 1
core/src/web/staticres/wxswordfish/style.css

@@ -706,4 +706,48 @@ img{
 	top: 0px;
 	bottom: 0px;
 	display: none;
-}
+}
+.hidden{
+	display:none;
+}
+.text-center{
+	text-align:center;
+}
+.sf_promptone{
+	padding:40px 20px 0px 10px;
+}
+.sf_promptone div{
+	width:100%;
+}
+.sf_font1{
+	color:#999;
+	text-align:left;
+}
+.sf_promptone img{
+	width: 80%;
+}
+.sf_button span{
+    border: 1px solid #24C0D7;
+    display: inline-block;
+    width: 20%;
+    padding: 7px;
+    border-radius: 6px;
+	margin-bottom:20px;
+}
+.sf_tis{
+	text-align:center;
+	padding:20px;
+}
+.sf_tis img{
+	text-align:center;
+	width:60%;
+}
+.sf_mc a{
+	text-decoration:none;
+	color:blue;
+}
+
+
+
+
+

+ 11 - 0
core/src/web/templates/swordfish/wxpush.html

@@ -177,6 +177,17 @@ a{
 </style>
 </head>
 <body>
+<div class="sf_tis">
+<div>长按图片、选择“识别二维码”</div>
+<br>
+<div>关注“剑鱼招标订阅”</div>
+<div><img src="/images/swordfish/sf_01.jpg"/></div>
+<br>
+<div style="text-align:left;">  您不用担心原订阅记录会消失,只要扫码关注新服务号,订阅关键词依然还在,招标信息将会通过新号继续向您推送,使用剑鱼将不再消耗积分。您在启用新服务号并成功订阅后,原“企明星”的订阅服务将会自动关闭。</div>
+
+
+
+</div>
 {{include "/swordfish/wxtoolbar.html"}}
 {{include "/common/baiducc.html"}}
 </body>

+ 30 - 2
core/src/web/templates/swordfish/wxrssset.html

@@ -21,11 +21,38 @@ if(sessionStorage&&sessionStorage.version=="1"){
 <script>
 	var msgset= {{.T.msgset}};
 	initShare({{.T.signature}},{{.T.shareid}});
-	var searchname = {{.T.searchname}}
-	var s_type = {{.T.s_type}}
+	var searchname = {{.T.searchname}};
+	var s_type = {{.T.s_type}};
+	var newsubscribe = {{.T.newsubscribe}};
+	$(function(){
+		if (newsubscribe == "Y"){	window.location.href="http://mp.weixin.qq.com/s?__biz=MzIyNTM1NDUyNw==&mid=100000024&idx=1&sn=c2f4271a361bfb90b22abb1d6818accc#rd";
+		return false;
+		}else{
+			$(".sf_promptone").removeClass("hidden");
+		};
+		$(".sf_button").click(function(){
+			$(".sf_promptone").addClass("hidden");
+			$(".sf_all").removeClass("hidden");
+		});
+	})
 </script>
 </head>
 <body>
+<div class="sf_promptone text-center hidden">
+
+<div class="sf_font1">为了提供更好的服务,剑鱼招标订阅开通了独立的微信公众号,企明星公众号中的剑鱼很快将不再更新。</div>
+<br>
+<div>请长按下面的图片、选择“识别二维码”。</div>
+<div><img src="/images/swordfish/sf_01.jpg" alt="剑鱼招标订阅微信公众号"></div>
+<div>关注“剑鱼招标订阅”</div>
+<br>
+<div class="sf_font1">  您不用担心原订阅记录会消失,只要扫码关注新服务号,订阅关键词依然还在,招标信息将会通过新号继续向您推送,使用剑鱼将不再消耗积分。您在启用新服务号并成功订阅后,原“企明星”的订阅服务将会自动关闭。</div>
+<br>
+<div class="sf_button text-center"><span>跳 过</span></div>
+</div>
+
+
+<div class="sf_all hidden">
 <div class="credit-tip visible">
 	<div class="tip">
 		<div id="txt_tip"></div>
@@ -180,5 +207,6 @@ if(sessionStorage&&sessionStorage.version=="1"){
 		</div>
 	</div>
 	{{include "/swordfish/wxtoolbar.html"}}
+</div>
 </body>
 </html>

+ 1 - 2
push/src/config.json

@@ -1,2 +1 @@
-{"bid":{"interval":60,"lastpushtime":"2015-10-10 10:10:10"},"bidStartTime":"2015-12-30 17:28:48","bidTitle":"亲!剑鱼为您速报最新鲜的中标信息啦","bidViewDomain":"192.168.3.132","durationMinutes":10,"fixPush":"oJULtwzXo6EFV1Ah-XeyRBimXGM8","mail_bid":"\u003cdiv\u003e%s\u003c/div\u003e,想了解更多信息,请访问http://www.qimingxing.info。","maxPushSize":50,"mgoAddr":"192.168.3.18:27080","mgoSize":10,"province":{"上海":9,"云南":25,"内蒙古":5,"北京":1,"台湾":32,"吉林":7,"四川":13,"天津":2,"宁夏":30,"安徽":12,"山东":15,"山西":4,"广东":19,"广西":20,"新疆":31,"江苏":10,"江西":14,"河北":3,"河南":16,"浙江":11,"海南":21,"湖北":17,"湖南":18,"澳门":34,"甘肃":28,"福建":13,"西藏":26,"贵州":24,"辽宁":6,"重庆":22,"陕西":27,"青海":29,"香港":33,"黑龙江":8},"pushInfoScopeDays":50,"rpcPort":"8766","smtpAddr":"smtp.exmail.qq.com","smtpFromUser":"企明星","smtpPort":465,"smtpPwd":"qy123456","smtpUser":"qyfw@topnet.net.cn","tenderStartTime":"2016-05-25 18:10:19","tenderTitle":"亲!剑鱼为您速报最新鲜的招标信息啦","weixinRpcServer":"127.0.0.1:82","weixin_bid":"\u003cdiv\u003e%s最新招标信息\u003c/div\u003e\u003cdiv\u003e%s\u003c/div\u003e","wxRpcRemark":"请到网站个人中心查看详细."}
-
+{"bid":{"interval":60,"lastpushtime":"2015-10-10 10:10:10"},"bidStartTime":"2016-05-26 00:00:00","bidTitle":"亲!剑鱼为您速报最新鲜的中标信息啦","bidViewDomain":"192.168.3.132","durationMinutes":10,"fixPush":"oJULtwzXo6EFV1Ah-XeyRBimXGM8","mail_bid":"\u003cdiv\u003e%s\u003c/div\u003e,想了解更多信息,请访问http://www.qimingxing.info。","maxPushSize":50,"mgoAddr":"192.168.3.18:27080","mgoSize":10,"province":{"上海":9,"云南":25,"内蒙古":5,"北京":1,"台湾":32,"吉林":7,"四川":13,"天津":2,"宁夏":30,"安徽":12,"山东":15,"山西":4,"广东":19,"广西":20,"新疆":31,"江苏":10,"江西":14,"河北":3,"河南":16,"浙江":11,"海南":21,"湖北":17,"湖南":18,"澳门":34,"甘肃":28,"福建":13,"西藏":26,"贵州":24,"辽宁":6,"重庆":22,"陕西":27,"青海":29,"香港":33,"黑龙江":8},"pushInfoScopeDays":50,"rpcPort":"8766","smtpAddr":"smtp.exmail.qq.com","smtpFromUser":"企明星","smtpPort":465,"smtpPwd":"qy123456","smtpUser":"qyfw@topnet.net.cn","tenderStartTime":"2016-05-30 17:07:34","tenderTitle":"亲!剑鱼为您速报最新鲜的招标信息啦","weixinRpcServer":"127.0.0.1:82","weixin_bid":"\u003cdiv\u003e%s最新招标信息\u003c/div\u003e\u003cdiv\u003e%s\u003c/div\u003e","wxRpcRemark":"请到网站个人中心查看详细."}

+ 2 - 1
push/src/qfw/push/dopush/dopush.go

@@ -392,7 +392,8 @@ func SendWeixin(k *push.MemberInterest, TITLE, ShortTitle, str, stype string, no
 		wxDate = time.Now().Local().Add(time.Duration(-n2) * time.Second).Add(time.Duration(-n1*24) * time.Hour).Format(util.Date_Full_Layout)
 	}
 
-	wxstr := "\n点击下方“详情”查看详细信息。\n以上" + ShortTitle + "信息,是剑鱼根据关键字“" + strings.Join(k.Interest, ";") + "”奋力查找并推送,如不合您心意,请猛戳企明星菜单“剑鱼”进行修改。"
+	//wxstr := "\n点击下方“详情”查看详细信息。\n以上" + ShortTitle + "信息,是剑鱼根据关键字“" + strings.Join(k.Interest, ";") + "”奋力查找并推送,如不合您心意,请猛戳企明星菜单“剑鱼”进行修改。"
+	wxstr := "\n为了提供更好的服务,剑鱼招标订阅开通了独立的微信公众号,企明星公众号中的剑鱼很快将不再更新,点击“详情”可关注公众号“剑鱼招标订阅”。感谢您的支持!"
 	push.SendWinXin(&qrpc.NotifyMsg{
 		Openid:  k.Openid,
 		Title:   push.PushConfig[stype+"Title"].(string),