wangshan vor 5 Jahren
Ursprung
Commit
56e1d2107e

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

@@ -2400,7 +2400,6 @@ func (f *Front) HasPushHistory() {
 		if user != nil {
 			o_jy, _ = (*user)["o_jy"].(map[string]interface{})
 		}
-
 		if o_jy != nil || len(o_jy) == 0 {
 			a_key, _ := o_jy["a_key"].([]interface{})
 			hasKeyFlag = len(a_key) > 0

+ 62 - 31
src/jfw/modules/app/src/app/front/swordfish.go

@@ -626,36 +626,67 @@ func (f *Front) HasPushHistory() {
 			selectTime = selectTime[0:10]
 			select_time, _ := strconv.ParseInt(selectTime, 10, 64)
 			//转化
-			formatTime = time.Unix(select_time, 0).Format("20060102")
+			formatTime = time.Unix(select_time, 0).Format("2006-01-02")
 		} else if lenStr < 10 {
-			formatTime = "1111111111"
+			formatTime = ""
 		}
 	}
 	userId, _ := f.GetSession("userId").(string)
 	if userId == "" {
 		return
 	}
-	user, firstPushTime := public.HistoryPush.UserInfo(userId)
-	var o_jy map[string]interface{}
-	if user != nil {
-		o_jy, _ = (*user)["o_jy"].(map[string]interface{})
-	}
-	keyArr := []string{}
-	if o_jy != nil || len(o_jy) == 0 {
-		a_key, _ := o_jy["a_key"].([]interface{})
-		for _, vi := range a_key {
-			v, _ := vi.(map[string]interface{})
-			keys_a := v["key"].([]interface{})
-			if thiskey := strings.TrimSpace(strings.Join(util.ObjArrToStringArr(keys_a), "+")); thiskey != "" {
-				keyArr = append(keyArr, thiskey)
-			}
+	user, _ := public.HistoryPush.UserInfo(userId)
+	hasKeyFlag := false
+	isVipFlag := false
+	isPassCount := false
+	isExpire := 0
+	tedayNum := time.Unix(time.Now().Unix(), 1).Format("20060102")
+	isOnTail := 0
+
+	if util.IntAll((*user)["i_vip_status"]) == 1 || util.IntAll((*user)["i_vip_status"]) == 2 {
+		//
+		var threeRemind = int64(3 * 24 * 60 * 60)
+		var twoRemind = int64(2 * 24 * 60 * 60)
+		var oneRemind = int64(1 * 24 * 60 * 60)
+		var o_vipjy map[string]interface{}
+		o_vipjy, _ = (*user)["o_vipjy"].(map[string]interface{})
+		if o_vipjy["a_items"] != nil {
+			a_itmes := util.ObjArrToMapArr(o_vipjy["a_items"].([]interface{}))
+			hasKeyFlag = len(a_itmes) > 0
+		}
+		isVipFlag = true
+		isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 2000
+		isOnTail = util.IntAll((*user)["i_vip_status"])
+		_endtime := (*user)["l_vip_endtime"]
+		//是否到期
+		if util.Int64All(_endtime)-time.Now().Unix() < threeRemind && util.Int64All(_endtime)-time.Now().Unix() >= twoRemind {
+			isExpire = 3 //即将到期
+		} else if util.Int64All(_endtime)-time.Now().Unix() < twoRemind && util.Int64All(_endtime)-time.Now().Unix() >= oneRemind {
+			isExpire = 2 //即将到期
+		} else if util.Int64All(_endtime)-time.Now().Unix() < oneRemind && util.Int64All(_endtime)-time.Now().Unix() >= 0 {
+			isExpire = 1 //即将到期
 		}
+	} else {
+		var o_jy map[string]interface{}
+		if user != nil {
+			o_jy, _ = (*user)["o_jy"].(map[string]interface{})
+		}
+		if o_jy != nil || len(o_jy) == 0 {
+			a_key, _ := o_jy["a_key"].([]interface{})
+			hasKeyFlag = len(a_key) > 0
+		}
+		isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+tedayNum+"_"+userId) > 50
+	}
+	pageNum, _ := f.GetInteger("pageNum")
+	if pageNum == 0 {
+		pageNum = 1
 	}
-	hasNextPage, list, err := public.HistoryPush.Datas(userId, 1, firstPushTime, formatTime)
+	area := f.GetString("area")
+	hasNextPage, list := public.HistoryPush.Datas_Mysql(userId, pageNum, formatTime, area)
 	if len(list) > 0 {
 		go updateUserApppushunread(userId)
 		//formatTime
-	} else if err == nil && len(keyArr) > 0 && formatTime == "" {
+	} else if hasKeyFlag && len(list) == 0 && formatTime == "" && !isVipFlag {
 		flag, data := public.HistoryPush.MakeHistoryDatas(userId, bidSearch_field)
 		if flag && data != nil {
 			list = data
@@ -663,11 +694,14 @@ func (f *Front) HasPushHistory() {
 	}
 	//
 	f.ServeJson(map[string]interface{}{
-		"haskey":      len(keyArr) > 0,
+		"haskey":      hasKeyFlag,
 		"data":        list,
 		"hasNextPage": hasNextPage,
 		"isInTSguide": isInTSguide(userId),
-		"keys":        keyArr,
+		"isVipSub":    isVipFlag,
+		"isPassCount": isPassCount,
+		"isExpire":    isExpire,
+		"isOnTail":    isOnTail,
 		"userId":      userId,
 	})
 }
@@ -686,15 +720,16 @@ func (f *Front) HistorypushPaging() error {
 		selectTime = selectTime[0:10]
 		select_time, _ := strconv.ParseInt(selectTime, 10, 64)
 		//转化
-		formatTime = time.Unix(select_time, 0).Format("20060102")
+		formatTime = time.Unix(select_time, 0).Format("2006-01-02")
 	}
+	area := f.GetString("area")
 	userId, _ := f.GetSession("userId").(string)
 	if userId != "" {
 		if pageNum == 1 {
 			go updateUserApppushunread(userId)
 		}
-		_, firstPushTime := public.HistoryPush.UserInfo(userId)
-		hasNextPage, list, _ := public.HistoryPush.Datas(userId, pageNum, firstPushTime, formatTime)
+		//		_, firstPushTime := public.HistoryPush.UserInfo(userId)
+		hasNextPage, list := public.HistoryPush.Datas_Mysql(userId, pageNum, formatTime, area)
 		f.ServeJson(map[string]interface{}{
 			"hasNextPage": hasNextPage,
 			"data":        list,
@@ -817,15 +852,11 @@ func saveBehaviorRecord(sess *httpsession.Session, data bson.M) bool {
 
 func (m *Front) WxpushAjaxReq() error {
 	defer util.Catch()
-	index, _ := m.GetInteger("index")
-	pdate, _ := m.GetInt("_id")
-	userid := util.ObjToString(m.GetSession("userId"))
-	vsid := m.GetString("vsid")
-	searchTime_ := m.GetString("searchTime_")
-	if searchTime_ != "" {
-		jy.HistoryPush.ClearPushCache(userid)
+	userId := util.ObjToString(m.GetSession("userId"))
+	if userId != "" {
+		vsid := m.GetString("vsid")
+		public.HistoryPush.Visit_Mysql(userId, vsid)
 	}
-	public.HistoryPush.Visit(userid, vsid, pdate, index)
 	return nil
 }
 func (m *Front) DelWxHistorySearch() {

+ 39 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/subscribe_list.css

@@ -163,6 +163,7 @@
   padding: 0 .3rem;
   background: #fff;
       border-bottom: 1px solid #E6E6E6;
+z-index:999;
 }
 
 /*.filter_tab:after {
@@ -521,4 +522,42 @@ text-decoration: none;
 }
 .nv_renew_toast > div {
   background-color: #FE737A;
+}
+
+/*2.8.5 new*/
+.city-name{
+    text-overflow: ellipsis;
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 1;
+    -webkit-box-orient: vertical;
+}
+.overClass{
+	overflow: hidden;
+	height:100vh;
+}
+.buyerclass {
+    border: 1px solid #CFAD89;
+    background: #CFAD89;
+    border-radius: 3px;
+    margin: 0px 5px;
+    padding: 1px 3px;
+    color: #fff;
+    font-size: 14px;
+}
+._header{
+	position: fixed;
+	top: 0;
+	width: 100%;
+	z-index: 999;
+	    margin-top: 65px;
+}
+.listcontent{
+	margin-top: 1rem;
+}
+.province_city p:last-child{
+	margin-bottom:1rem;
+}
+.province p:last-child{
+	margin-bottom:1rem;
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 337 - 708
src/jfw/modules/app/src/web/templates/weixin/historypush.html


+ 5 - 5
src/web/templates/weixin/historypush.html

@@ -37,6 +37,7 @@
 		var closeAdvert=false//是否关闭广告
 		//
 		var selectCity = "";
+		var selectArea = "";
 		initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avatar}});
 		$(function(){
 			var isinitpage = false;
@@ -206,7 +207,7 @@
 			            $.ajax({
 			                type: 'post',
 			                url: '/swordfish/historypush/paging',
-							data: {"pageNum": pageIndex, "selectTime":firstTime},
+							data: {"pageNum": pageIndex, "selectTime":firstTime, "area":selectArea},
 			                dataType: 'json',
 			                success: function(data){
 								//没有数据
@@ -246,7 +247,7 @@
 
 		function setSessionStorage(){
 			if(sessionStorage){
-		    sessionStorage.closeAdvert=closeAdvert;
+		    	sessionStorage.closeAdvert=closeAdvert;
 				sessionStorage.historypushScrollTop = scrollTop;
 				sessionStorage.historypushDataCache = JSON.stringify(dataCache);
 				sessionStorage.historypushPageIndexCache = pageIndex;
@@ -535,7 +536,6 @@
 			$("#list").css("visibility","hidden");
 			//dataCache = firstPage;
 			$("#list").html("");
-			$("#tablecontent").html("");
 			structureHtml(firstPage,true);
 			setTimeout(function(){
 				$(window).scrollTop(0);
@@ -887,8 +887,8 @@
       	</div>
       </div>
   	</div>
-  	<script src="/vipsubscribe/js/weui.min.js?v=1"></script>
-  	<script src="/dataExport/js/mapJSON.js?v=2113"></script>
+  	<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+  	<script src="{{Msg "seo" "cdn"}}/dataExport/js/mapJSON.js?v={{Msg "seo" "version"}}"></script>
   	<script type="text/javascript" charset="UTF-8">
   		mapData();
   		function mapData(){

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.