瀏覽代碼

IE8浏览器 登录框

wangshan 9 年之前
父節點
當前提交
5990a253a6

+ 2 - 1
.gitignore

@@ -4,4 +4,5 @@
 */staticres/upload
 */src/src
 *.data
-*/timetask.json
+*/timetask.json
+core/src/timetask.json

+ 2 - 0
core/src/qfw/front/wxpush.go

@@ -16,9 +16,11 @@ type Wxpush struct {
 
 //推送列表
 func (w *Wxpush) WxpushList(s_m_openid string, _id string, msgid string) error {
+	/**
 	go func() {
 		mongodb.Update("message", `{"_id":"`+msgid+`"}`, `{"$set":{"i_status":1}}`, false, false)
 	}()
+	**/
 	w.T["data"] = *mongodb.FindById("wxpush", _id, `{"s_content":1,"s_words":1,"a_visitedindex":1,"a_publishtime":1}`)
 	w.T["_id"] = _id
 	return w.Render("/wxpush/index.html", &w.T)

+ 8 - 0
core/src/qfw/member/message/swordfish.go

@@ -17,6 +17,14 @@ type swordfish struct {
 	*xweb.Action
 	swordfishlist xweb.Mapper `xweb:"/member/message/swordfishlist"` //剑鱼列表
 	setVisited    xweb.Mapper `xweb:"/member/message/setVisited"`    //已经访问过的列表
+	visitRedirect xweb.Mapper `xweb:"/visit/redirect"`               //剑鱼跳转访问请求,后续统计
+}
+
+func (s *swordfish) VisitRedirect() {
+	surl := s.GetString("url")
+	if surl != "" {
+		s.Redirect(surl)
+	}
 }
 
 func (s *swordfish) SetVisited() {

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":10,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-05 11:16:12"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-05 11:16:12"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":10,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-05 17:12:57"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-05 17:12:57"}},"marketisstart":true,"marketrate":300}

+ 2 - 2
core/src/web/templates/common/login.html

@@ -315,7 +315,7 @@ function afterLoginSkip(){
 						<div class="u-tipsok">
 								<h3>
 									<div class="f-username" style="float:left;"></div>
-									<div style="float:left;">恭喜你注册成功!<div>
+									<div style="float:left;">恭喜你注册成功!</div>
 								</h3>
 							</div>
 						</div>
@@ -339,7 +339,7 @@ function afterLoginSkip(){
 							<div class="u-tipsok">
 								<h3 style="line-height: 40px;margin: -25px 0 0 50px	;">
 									<div class="f-username"><span></span><img style="margin-left:15px;" src="/images/ent_authe_a.png" height="22"></div>
-									<div style="float:left;margin: -10px 0 30px 0; color:#000;">恭喜你注册成功!<div>
+									<div style="float:left;margin: -10px 0 30px 0; color:#000;">恭喜你注册成功!</div>
 								</h3>
 							</div>
 						</div>

+ 2 - 1
core/src/web/templates/member/accountset/bindmail.html

@@ -159,7 +159,8 @@ function ocheckMail(){
 				}
 			}
 			
-		}});
+		}
+	});
 }
 function currPos(){
    return [["用户中心","/member/show/memberindex"]]

+ 2 - 5
core/src/web/templates/wxpush/index.html

@@ -97,11 +97,8 @@ function redirect(link){
 	if(!/^http/.test(link)){
 		link="http://"+link
 	}
-    var arg ='\u003cscript\u003etop.location.replace("'+link+'")\u003c/script\u003e';
-    var iframe = document.createElement('iframe');
-    iframe.src='javascript:window.name;';
-    iframe.name=arg;
-    document.body.appendChild(iframe);
+	window.location.href="/visit/redirect?url="+escape(link)
+
 }
 function setVisitedIndex(obj){
 	if(obj.hasClass("visited")){

+ 14 - 9
push/src/qfw/push/bid/bidpushjob.go

@@ -130,16 +130,13 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 	for ks := v.Front(); ks != nil; ks = ks.Next() {
 		k2 := *(ks.Value.(*map[string]interface{}))
 		i++
-		if firstTitle == "" {
+		if i == 1 {
 			firstTitle = strings.Replace(k2["title"].(string), "\n", "", -1)
+			lastInfoDate = k2["publishtime"].(int64)
 		}
 		str += "<div class='tslist'><span class='xh'>" + fmt.Sprintf("%d", i) + ".</span><a class='bt' target='_blank' href='" + k2["href"].(string) + "'>" + strings.Replace(k2["title"].(string), "\n", "", -1) + "</a></div>"
 		publishTimes[strconv.Itoa(i)] = k2["publishtime"]
 
-		date1 := k2["publishtime"].(int64)
-		if date1-lastInfoDate > 0 {
-			lastInfoDate = date1
-		}
 		if i >= MaxPushSize {
 			//限制最大信息条数
 			break
@@ -148,11 +145,19 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 	}
 	TITLE := TITLEA + fmt.Sprintf("%d条,关键词(%s)", i, strings.Join(k.Interest, ","))
 	WXTitle := fmt.Sprintf("%s《%s》%s", func() string {
-		minute := (now.Unix() - lastInfoDate) / 60
-		if minute > 120 || minute < 1 {
-			return ""
+		minute := now.Unix() - lastInfoDate
+		if minute > -1 && minute < 61 {
+			return fmt.Sprintf("%d秒前发布的", minute)
 		} else {
-			return fmt.Sprintf("%d分钟前发布的", minute)
+			minute = minute / 60
+			if minute > 121 {
+				return ""
+			} else {
+				if minute < 0 {
+					minute = 1
+				}
+				return fmt.Sprintf("%d分钟前发布的", minute)
+			}
 		}
 	}(), firstTitle, func() string {
 		if i == 1 {

+ 15 - 10
push/src/qfw/push/tender/tenderpushjob.go

@@ -128,16 +128,12 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 	for ks := v.Front(); ks != nil; ks = ks.Next() {
 		k2 := *(ks.Value.(*map[string]interface{}))
 		i++
-		if firstTitle == "" {
+		if i == 1 {
 			firstTitle = strings.Replace(k2["title"].(string), "\n", "", -1)
+			lastInfoDate = k2["publishtime"].(int64)
 		}
 		str += "<div class='tslist'><span class='xh'>" + fmt.Sprintf("%d", i) + ".</span><a class='bt' target='_blank' href='" + k2["href"].(string) + "'>" + strings.Replace(k2["title"].(string), "\n", "", -1) + "</a></div>"
 		publishTimes[strconv.Itoa(i)] = k2["publishtime"]
-
-		date1 := k2["publishtime"].(int64)
-		if date1-lastInfoDate > 0 {
-			lastInfoDate = date1
-		}
 		if i >= MaxPushSize {
 			//限制最大信息条数
 			break
@@ -146,12 +142,21 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 	}
 	TITLE := TITLEA + fmt.Sprintf("%d条,关键词(%s)", i, strings.Join(k.Interest, " "))
 	WXTitle := fmt.Sprintf("%s《%s》%s", func() string {
-		minute := (now.Unix() - lastInfoDate) / 60
-		if minute > 120 || minute < 1 {
-			return ""
+		minute := now.Unix() - lastInfoDate
+		if minute > -1 && minute < 61 {
+			return fmt.Sprintf("%d秒前发布的", minute)
 		} else {
-			return fmt.Sprintf("%d分钟前发布的", minute)
+			minute = minute / 60
+			if minute > 121 {
+				return ""
+			} else {
+				if minute < 0 {
+					minute = 1
+				}
+				return fmt.Sprintf("%d分钟前发布的", minute)
+			}
 		}
+
 	}(), firstTitle, func() string {
 		if i == 1 {
 			return ""