Browse Source

Merge branch 'develop' of 192.168.3.17:zhanghongbo/qfw into develop

李广朋 9 years ago
parent
commit
ccebaa09d9

+ 2 - 2
common/src/qfw/util/encrypt_test.go

@@ -22,10 +22,10 @@ func Test_sim(t *testing.T) {
 	//s2 := "GyUlIhEDDjcfWCAyIl4xBkgsERYiLAwZLCg9VkkbLj4zMRYDPRs5ATVZOxccPAkzFxw7CCpEFj41QlRAQFdFXlRMQVZcHRIbBgsWBxYcFQwEBwoa"
 
 	//s3 := "RFYoal5bCFdXWQoQB0JuWwlXAQFZCUVfFj4JMFtT"
-	s4 := "oJULtwzXo6EFV//////??????----oJULtwzXsLVHoDeXBEWOXCkME9p4,oZQC_s_DfLpFKIKIP2TpiR-16Glg,1453788982,swordfishaction--1Ah-Xey,_R_B/i?mXGM8,uid,123456,swordfishaction"
+	s4 := "oJULtwzXo6EFV1Ah-XeyRBimXGM8,uid,123456,swordfishaction"
 	se := SimpleEncrypt{Key: "topnet"}
 	log.Println("=====", se.EncodeString(s4))
-	log.Println("---", se.DecodeString("GyUlIhEDDjcDIjM8GysVNicxIyAoLQ45MVYAWkkbLj4zMRYrMAk8HiM/PSQ5PlcgBAYiQ1RCMwMXQlRAQVxHVl1NTF1cHRIbBgsWBxYcFQwEBwoa"))
+	log.Println("---", se.DecodeString("GyUlIhEDDjcfWCAyIl4xBkgsERYiLAwZLCg9VkkBHQtcX1FBR1hJWldCREMHFhUBBwccBxYA"))
 	now := time.Now()
 	tom := time.Date(now.Year(), now.Month(), now.Day(), 18, 0, 0, 0, time.Local)
 	log.Println(now.Unix(), tom.Unix(), 1453686600-1453716000)

+ 1 - 1
core/src/message.json

@@ -5,7 +5,7 @@
 	"entsearchaction":"/wx/search/enterprise/ent.html",
 	"lawsearchaction":"/law/qfw/index",
 	"msiteaction":"/ent/wsite/edit",
-	"wxpushlist":"/wxpush/bid/%s/%s/%s",
+	"wxpushlist":"/wxpush/bidinfo/%s",
 	"indentify":{
 		"success":{
 			"result":"企业认证",

+ 1 - 1
core/src/qfw/front/index.go

@@ -77,7 +77,7 @@ func (i *Index) LoadIndex() error {
 			}
 		}
 		//认证企业
-		entquery := `{"i_identificationstatus":1,"i_freeze":{"$ne":2}}`
+		entquery := `{"i_identificationstatus":1,"i_freeze":{"$ne":2},"i_identificationtype":{"$in":[1,5]}}`
 		entdata := *Find("identification", entquery, []string{"-l_auditdate"}, `{"s_enterprisename":1,"l_auditdate":1,"s_enterpriseid":1}`, false, 0, 8)
 		if entdata != nil {
 			for _, v := range entdata {

+ 1 - 2
core/src/qfw/member/memberindex.go

@@ -38,9 +38,8 @@ func init() {
 }
 
 func (m *MemberIndex) Sess(str string) error {
-
 	util.Try(func() {
-		strs := strings.Split(str, "##")
+		strs := strings.Split(str, "__")
 		str := strings.Split(sewx.DecodeString(strs[0]), ",")
 		if len(str) == 4 {
 			openid := str[0]

+ 1 - 1
core/src/qfw/member/membermanager.go

@@ -1081,7 +1081,7 @@ func returnFront(m *Member, key string) error {
 
 //更新cookie sessoin
 func UpdateCookieSession(action *xweb.Action, loginType string, flag bool, r map[string]interface{}) {
-	log.Println(r)
+	//log.Println(r)
 	freeze := IntAll(r["i_freeze"])
 	action.Session().Set("i_freeze", freeze)
 	if r["s_nickname"] == nil || r["s_nickname"].(string) == "" {

+ 16 - 15
core/src/qfw/mobile/mobile.go

@@ -6,21 +6,22 @@ import (
 
 type Mobile struct {
 	*xweb.Action
-	index         xweb.Mapper `xweb:"/ent/(.*)/index"`
-	search        xweb.Mapper `xweb:"/ent/(.*)/search"`
-	detail        xweb.Mapper `xweb:"/ent/(.*)/detail/(.*)/(.*)"`
-	pageerror     xweb.Mapper `xweb:"/ent/(.*)/505"`
-	guide         xweb.Mapper `xweb:"/swordfish/guide"`
-	share         xweb.Mapper `xweb:"/swordfish/share/([^.]*)"`
-	wxrssset      xweb.Mapper `xweb:"/swordfish/page"`
-	getMyCredit   xweb.Mapper `xweb:"/member/credit/getcredit"`
-	swordfishPay  xweb.Mapper `xweb:"/member/credit/swordfishpay"`
-	msgSet        xweb.Mapper `xweb:"/swordfish/msgpushsetting/msgset"`
-	ajaxReq       xweb.Mapper `xweb:"/member/swordfish/ajaxReq"`
-	advise        xweb.Mapper `xweb:"/mobile/advise"`
-	adviseSave    xweb.Mapper `xweb:"/mobile/advisesave"`
-	wxpushList    xweb.Mapper `xweb:"/wxpush/bid/(.*)/(.*)/(.*)"` //推送列表
-	wxpushAjaxReq xweb.Mapper `xweb:"/wxpush/bid/ajaxReq"`
+	index          xweb.Mapper `xweb:"/ent/(.*)/index"`
+	search         xweb.Mapper `xweb:"/ent/(.*)/search"`
+	detail         xweb.Mapper `xweb:"/ent/(.*)/detail/(.*)/(.*)"`
+	pageerror      xweb.Mapper `xweb:"/ent/(.*)/505"`
+	guide          xweb.Mapper `xweb:"/swordfish/guide"`
+	share          xweb.Mapper `xweb:"/swordfish/share/([^.]*)"`
+	wxrssset       xweb.Mapper `xweb:"/swordfish/page"`
+	getMyCredit    xweb.Mapper `xweb:"/member/credit/getcredit"`
+	swordfishPay   xweb.Mapper `xweb:"/member/credit/swordfishpay"`
+	msgSet         xweb.Mapper `xweb:"/swordfish/msgpushsetting/msgset"`
+	ajaxReq        xweb.Mapper `xweb:"/member/swordfish/ajaxReq"`
+	advise         xweb.Mapper `xweb:"/mobile/advise"`
+	adviseSave     xweb.Mapper `xweb:"/mobile/advisesave"`
+	wxpushList     xweb.Mapper `xweb:"/wxpush/bid/(.*)/(.*)/(.*)"` //推送列表
+	wxpushListInfo xweb.Mapper `xweb:"/wxpush/bidinfo/(.*)"`       //推送列表
+	wxpushAjaxReq  xweb.Mapper `xweb:"/wxpush/bid/ajaxReq"`
 }
 
 func init() {

+ 8 - 0
core/src/qfw/mobile/wxmenu.go

@@ -324,6 +324,14 @@ func (m *Mobile) AjaxReq() error {
 
 //推送列表
 func (m *Mobile) WxpushList(s_m_openid string, _id string, msgid string) error {
+	m.T["data"] = *mongodb.FindById("wxpush", _id, `{"s_content":1,"s_words":1,"a_visitedindex":1,"a_publishtime":1,"s_type":1}`)
+	m.T["_id"] = _id
+	m.T["signature"] = GetSignature(m.Url())
+	return m.Render("/swordfish/wxpush.html", &m.T)
+}
+
+//推送列表
+func (m *Mobile) WxpushListInfo(_id string) error {
 	/**
 	go func() {
 		mongodb.Update("message", `{"_id":"`+msgid+`"}`, `{"$set":{"i_status":1}}`, false, false)

+ 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-01-26 10:41:42"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-26 10:41:42"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-27 09:22:51"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-27 09:22:51"}},"marketisstart":true,"marketrate":300}

BIN
core/src/web/staticres/images/activeimages/lotteryBg.jpg


BIN
core/src/web/staticres/images/choujiang.png


+ 14 - 2
core/src/web/templates/active/luckdraw.html

@@ -19,9 +19,12 @@
 <style>
 *{padding:0; margin:0;}
 .lotteryMain{ width:100%;}
-.lotteryBg{ width:100%; height:100%; margin:0 auto; background:url(/images/activeimages/lotteryBg.jpg) no-repeat center center; position:relative; overflow:hidden;background-size: 375px 603px;}
+.lotteryBg{ width:100%; height:608px; margin:0 auto; background:url(/images/activeimages/lotteryBg.jpg) no-repeat top center; position:relative; overflow:hidden;background-size: 375px 508px;}
 #run{ width:145px; height:145px; position:absolute; left:50%; top:50%;  margin-left:-73px; margin-top:-53px; z-index:1; transform:rotate(0deg); -ms-transform:rotate(0deg); }
 #btn_run{ width:80px; height:80px; background:url(/images/activeimages/btn_start.png) no-repeat; border:none; outline:none; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-22px; z-index:2;cursor:pointer;background-position:0px 0px;background-size: 100% 100%;}
+.col-xs-12 p{
+	margin:0px 0px 5px;
+}
 </style>
 </head>
 
@@ -58,7 +61,16 @@
     	<img id="run" src="/images/activeimages/start.png" />
         <input id="btn_run" type="button" value="" />
     </div>
-</section>  
+</section> 
+<div class="col-xs-12" style="color:#fff; margin-top:-135px;font-weight:600;">
+<h3 style="font-weight:600;">活动规则</h3>
+<p>1、企明星所有粉丝用户均可以参与幸运抽奖;</p>
+<p>2、每位用户每天有一次抽奖机会;</p>
+<p>3、活动页面转发分享后获得第二天的抽奖资格;</p>
+<p>4、中奖用户请通过企明星微信与客服联系,告知联系方式;</p>
+<p>5、活动时间截止到2016年2月15日;</p>
+<p>6、iPadmini、书籍和U盘会在活动截止后统一邮寄发出。请注意查收。</p>
+</div> 
 <script>
 
 $(function(){ 

+ 2 - 2
core/src/web/templates/swordfish/rssset.html

@@ -37,7 +37,7 @@
 					{{if .T.msgset.tender}}
 						{{if .T.msgset.tender.day}}
 							{{if gt 6 .T.msgset.tender.day}}
-							本栏目推送服务期还剩{{.T.msgset.tender.day}}天。想要服务不间断,请确保积分充足。 <a href="/member/credit/myCredit">去做任务赚积分</a>
+							本栏目推送服务期还剩<span style="color:red"> {{.T.msgset.tender.day}} </span>天。想要服务不间断,请确保积分充足。 <a href="/member/credit/myCredit">去做任务赚积分</a>
 							{{end}}
 						{{end}}
 					{{end}}
@@ -73,7 +73,7 @@
 					{{if .T.msgset.bid}}
 						{{if .T.msgset.bid.day}}
 							{{if gt 6 .T.msgset.bid.day}}
-							本栏目推送服务期还剩{{.T.msgset.bid.day}}天。想要服务不间断,请确保积分充足。 <a href="/member/credit/myCredit">去做任务赚积分</a>
+							本栏目推送服务期还剩<span style="color:red"> {{.T.msgset.bid.day}} </span>天。想要服务不间断,请确保积分充足。 <a href="/member/credit/myCredit">去做任务赚积分</a>
 							{{end}}
 						{{end}}
 					{{end}}

BIN
etl/server/src/trsserver/trsserver


+ 3 - 1
etl/server/src/trsserver/trsserver.go

@@ -9,6 +9,7 @@ import (
 	"qfw/util"
 	"qfw/util/mongodb"
 	"sync"
+	"time"
 )
 
 var SysConfig map[string]interface{}
@@ -68,7 +69,8 @@ func TrsZtbSave(filename string, tmp []interface{}) {
 			if n == 0 {
 				if _, ok := v["publishtime"].(int64); !ok {
 					v["publishtime"] = int64(v["publishtime"].(float64))
-					v["comeintime"] = int64(v["comeintime"].(float64))
+					//v["comeintime"] = int64(v["comeintime"].(float64))
+					v["comeintime"] = time.Now().Unix()
 				}
 				err := session.DB(mongodbName).C(collection).Insert(v)
 				if err != nil {

+ 9 - 4
push/src/qfw/push/dopush/dopush.go

@@ -66,6 +66,7 @@ func EachAllBidInfo(stype, TITLEA, ShortTitle string, lastTime int64, MaxPushSiz
 	query := session.DB("qfw").C("bidding").Find(mongodb.ObjToOth(q)).Sort("-publishtime").Iter()
 	userMap := &map[*push.MemberInterest]*list.List{}
 	var returnLastTime interface{}
+	var returnLastTimeLong int64 = 0
 L1:
 	for tmp := new(map[string]interface{}); query.Next(tmp); {
 		title := util.ObjToString((*tmp)["title"])
@@ -96,14 +97,18 @@ L1:
 					}
 				}
 			}
-			if returnLastTime == nil {
-				returnLastTime = (*tmp)["comeintime"]
+			if (*tmp)["comeintime"] != nil {
+				ttmp := (*tmp)["comeintime"].(int64)
+				if ttmp > returnLastTimeLong {
+					returnLastTimeLong = ttmp
+				}
 			}
 		}
 		tmp = new(map[string]interface{})
 	}
 	now := time.Now()
-	if pushType == 1 && returnLastTime != nil {
+	if pushType == 1 && returnLastTimeLong > 0 {
+		returnLastTime = returnLastTimeLong
 		push.PushConfig[stype+"StartTime"] = util.FormatDateWithObj(&returnLastTime, util.Date_Full_Layout)
 	}
 	for k, v := range *(userMap) {
@@ -228,6 +233,6 @@ func SendWeixin(k *push.MemberInterest, TITLE, ShortTitle, str, stype string, no
 		Date:    wxDate,
 		Service: "剑鱼君",
 		//Url:     push.PushConfig["bidViewDomain"].(string) + "/wxpush/bid/" + k.Openid + "/" + wid + "/aa"})
-		Url: push.PushConfig["bidViewDomain"].(string) + "/mobile/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "##" + k.Openid + "##" + wid + "##aa"})
+		Url: push.PushConfig["bidViewDomain"].(string) + "/mobile/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "__" + wid})
 
 }