ソースを参照

Merge branch 'dev2.5.6' of http://192.168.3.207:10080/qmx/jy into dev2.5.6

zhangxinlei1996 6 年 前
コミット
31277cacc1

+ 3 - 3
src/jfw/front/dataExport.go

@@ -39,6 +39,8 @@ type DataExport struct {
 	fontSet xweb.Mapper `xweb:"/front/dataExport/fontSet/(.*)"`
 }
 
+var order_pageSize = 10
+
 func init() {
 	xweb.AddAction(&DataExport{})
 }
@@ -158,8 +160,6 @@ func (d *DataExport) ToMyOrder() error {
 	return nil
 }
 
-var order_pageSize = 6
-
 func (d *DataExport) QueryOrder() error {
 	typ := d.GetString("type") //0-全部 1-待支付 2-已支付
 	query := map[string]interface{}{}
@@ -487,7 +487,7 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 	} else {
 		mail_phone := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
 			"user_openid": openid,
-		}, "user_mail,user_phone", "")
+		}, "user_mail,user_phone", "create_time desc")
 		if mail_phone != nil {
 			email = (*mail_phone)["user_mail"]
 			resPhone = (*mail_phone)["user_phone"]

+ 0 - 7
src/jfw/modules/app/src/app/front/swordfish.go

@@ -843,13 +843,6 @@ func getHistorypush(lasttime, infotime int64, openid string, res []map[string]in
 	date := util.Int64All(lasttime)
 	//	log.Println("date", date)
 	if date > 0 {
-		//		go ca.SaveCache("jy_pushvisit", map[string]interface{}{
-		//			"openid": openid,
-		//			"pdate":  date,
-		//			"vsid":   "-1", //打开列表页,无sid默认为-1
-		//			"date":   time.Now(),
-		//			"isopen": true,
-		//		})
 		//获取已浏览记录
 		visited := ca.Search("select vsid from jy_pushvisit where openid=? and pdate<? limit 100", openid, date)
 		vsidList := []string{}

+ 104 - 63
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -37,6 +37,39 @@ function afterJyObjInit(){
 	redSpotOnMenu({{session "s_m_openid"}});
 }
 function initpage(){
+	$.ajax({
+		type: 'post',
+		url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
+		data: {},
+		async: false,
+		dataType: 'json',
+		success: function(data){
+			success = data.success;
+			lasttime = data.thistime;
+			firstPage = data.data;
+			if(data.data.length>0){
+				a_visitedindex = data.data[0].a_visitedindex;
+			}
+			if(!success && !data.haskey){
+				if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
+					sessionStorage.removeItem("keysetindexToHistory");
+				}else{
+					history.pushState({},"","");
+					if(data.isInTSguide){
+						if(localStorage){
+							localStorage.removeItem("tsGuide_status");
+						}
+						window.location.href='/jyapp/tenderSubscribe/guide';
+					}else{
+						window.location.href='/jyapp/wxkeyset/keyset/index';
+					}
+				}
+			}
+		},
+		error: function(xhr, type){
+			hasNoData();
+		}
+	});
 	new FastClick(document.body);
 	$("#gotosetpage").click(function(){
 		setSessionStorage();
@@ -86,7 +119,7 @@ function initpage(){
 			noMoreData(wxflag,1);
 		}
 		$(window).scrollTop(scrollTop);
-		sessionStorage.removeItem("historypushDataCache");
+		// sessionStorage.removeItem("historypushDataCache");
 		sessionStorage.removeItem("historypushListCache");
 		sessionStorage.removeItem("historypushTableCache");
 		sessionStorage.removeItem("historypushLasttimeCache");
@@ -95,39 +128,39 @@ function initpage(){
 		sessionStorage.removeItem("historypushCount");
 		localStorage.removeItem("listortable"+{{.T._id}},"T");
 	}else{
-		$.ajax({
-			type: 'post',
-			url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
-			data: {},
-			async: false,
-			dataType: 'json',
-			success: function(data){
-				success = data.success;
-				lasttime = data.thistime;
-				firstPage = data.data;
-				if(data.data.length>0){
-					a_visitedindex = data.data[0].a_visitedindex;
-				}
-				if(!success && !data.haskey){
-					if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
-						sessionStorage.removeItem("keysetindexToHistory");
-					}else{
-						history.pushState({},"","");
-						if(data.isInTSguide){
-							if(localStorage){
-								localStorage.removeItem("tsGuide_status");
-							}
-							window.location.href='/jyapp/tenderSubscribe/guide';
-						}else{
-							window.location.href='/jyapp/wxkeyset/keyset/index';
-						}
-					}
-				}
-			},
-			error: function(xhr, type){
-				hasNoData();
-			}
-		});
+		// $.ajax({
+		// 	type: 'post',
+		// 	url: '/jyapp/front/hasPushHistory?t='+new Date().getTime(),
+		// 	data: {},
+		// 	async: false,
+		// 	dataType: 'json',
+		// 	success: function(data){
+		// 		success = data.success;
+		// 		lasttime = data.thistime;
+		// 		firstPage = data.data;
+		// 		if(data.data.length>0){
+		// 			a_visitedindex = data.data[0].a_visitedindex;
+		// 		}
+		// 		if(!success && !data.haskey){
+		// 			if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
+		// 				sessionStorage.removeItem("keysetindexToHistory");
+		// 			}else{
+		// 				history.pushState({},"","");
+		// 				if(data.isInTSguide){
+		// 					if(localStorage){
+		// 						localStorage.removeItem("tsGuide_status");
+		// 					}
+		// 					window.location.href='/jyapp/tenderSubscribe/guide';
+		// 				}else{
+		// 					window.location.href='/jyapp/wxkeyset/keyset/index';
+		// 				}
+		// 			}
+		// 		}
+		// 	},
+		// 	error: function(xhr, type){
+		// 		hasNoData();
+		// 	}
+		// });
 		if(!success){
 			hasNoData();
 			return;
@@ -338,9 +371,33 @@ function structureHtml(object){
 			return '<div class="restime time-diff">'+area+datatype+industryname+tdf+'</div>';
 		});
 		$(this).append('<div style="clear:both;"></div>');
+
+		var tableVisit = "";
+		// 已读未读
+		var $list = $(this).find(".bt").attr("eid");
+		if (typeof (a_visitedindex) != "undefined") {
+			var xh = $(this).find(".xh").text().replace(".", "");
+			// console.log(xh);
+			for (var i = 0; i < a_visitedindex.length; i++) {
+				if (xh == a_visitedindex[i]) {
+					tableVisit="visited";
+					$(this).find("a.bt").addClass("visited");
+					$(this).find(".xh").addClass("visited");
+				}
+			}
+		}
+		if (typeof (a_visitedindex) != "undefined") {
+			for (var i = 0; i < a_visitedindex.length; i++) {
+				if ($list == a_visitedindex[i]) {
+					tableVisit="visited";
+					$(this).find("a.bt").addClass("visited");
+					$(this).find(".xh").addClass("visited");
+				}
+			}
+		}
 		//
-		tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\',\''+words.join("_")+'\')">'+
-					'<td>'+count+'</td>'
+		tablehtml +='<tr onClick="tablejump(\''+$(this).find("a.bt").attr("eid")+'\',\''+$(this).find("a.bt").attr("s")+'\',\''+words.join("_")+'\',$(this))" class="'+tableVisit+'">'+
+				'<td>'+count+'</td>'
 		if(typeof(info.projectname) != "undefined"&&info.projectname != ""){
 			var pn = info.projectname;
 			for(var n=0;n<words.length;n++){
@@ -416,28 +473,6 @@ function structureHtml(object){
 		var tabletime = formatDate(info.publishtime);
 		tablehtml +='<td>'+tabletime+'</td></tr>'
 
-		// 已读未读
-		// console.log(a_visitedindex);
-		var $list = $(this).find(".bt").attr("eid");
-		if (typeof (a_visitedindex) != "undefined") {
-			var xh = $(this).find(".xh").text().replace(".", "");
-			// console.log(xh);
-			for (var i = 0; i < a_visitedindex.length; i++) {
-				if (xh == a_visitedindex[i]) {
-					$(this).find("a.bt").addClass("visited");
-					$(this).find(".xh").addClass("visited");
-				}
-			}
-		}
-		if (typeof (a_visitedindex) != "undefined") {
-
-			for (var i = 0; i < a_visitedindex.length; i++) {
-				if ($list == a_visitedindex[i]) {
-					$(this).find("a.bt").addClass("visited");
-					$(this).find(".xh").addClass("visited");
-				}
-			}
-		}
 	});
 	listCache += content.prop("outerHTML");
 	tableCache += tablehtml;
@@ -473,7 +508,7 @@ function formatDate(date,sl)   {
 //
 function appendList(content,tablehtml){
 	content.children(".tslist").on("click", function(event){
-		setVisitedIndex($(this));
+		setVisitedIndex($(this),"");
 		var sds = $(this).attr("words");
 		var h = $(this).find("a.bt").attr("s");
 		var eid = $(this).find("a.bt").attr("eid");
@@ -485,10 +520,11 @@ function appendList(content,tablehtml){
 	$(".findnull").hide();
 	$(".listcontent").show();
 }
-function tablejump(eid,h,sds){
+function tablejump(eid,h,sds,t){
 	if(localStorage){
 		localStorage.setItem("listortable"+{{.T._id}},"T");
 	}
+	setVisitedIndex(t,eid);
 	beforeJump(eid,h,sds);
 }
 function beforeJump(eid,h,sds){
@@ -497,7 +533,7 @@ function beforeJump(eid,h,sds){
 		if(dataCache[i].a_visitedindex.length>0){
 			visitedArr = dataCache[i].a_visitedindex;
 			if(JSON.stringify(visitedArr).indexOf(eid)<0){
-				dataCache[i].a_visitedindex = visitedArr.push(eid)
+				dataCache[i].a_visitedindex = visitedArr.push(eid);
 			}
 		}
 	}
@@ -516,8 +552,9 @@ function setSessionStorage(){
 	}
 }
 
-function setVisitedIndex(obj){
-	if(obj.find("a.bt").hasClass("visit")){
+function setVisitedIndex(obj,eid){
+	// console.log(obj.hasClass("visited")+"--------");
+	if(obj.find("a.bt").hasClass("visit")||obj.hasClass("visited")){
 		return;
 	}
 	obj.find("a.bt").addClass("visited");
@@ -528,6 +565,10 @@ function setVisitedIndex(obj){
 		index = index.substring(0,index.length-1)
 	}
 	var vsid=obj.find("a.bt").attr("eid");
+	if (eid != ""){
+		obj.addClass("visited");
+		vsid = eid;
+	}
 	$.post("/jyapp/wxpush/bid/ajaxReq",{_id:_id,vsid:vsid,index:index});
 }
 </script>

+ 4 - 1
src/web/staticres/dataExport/js/conditions_order.js

@@ -371,12 +371,15 @@ function addDelInputB(t,type) {
 var excludeArr = []
 var appendArr = []
 function addOtherInput(t,f) {
+	if($("#keyInput").val()==""){
+		return false;
+	}
   var temp = f ? '请输入附加词' : '请输入排除词'
   var input = document.createElement('input')
   input.className = 'sm'
   input.placeholder = temp
   input.maxLength = 20;
-  //console.log('--$(input)--', $(input))
+//  console.log('--$(input)--', $(input))
   if(f){
     var l = appendArr.length
     $(input).on('input',function () {

+ 3 - 4
src/web/templates/weixin/historypush.html

@@ -332,7 +332,6 @@ function structureHtml(object){
 		var $list = $(this).find(".bt").attr("eid");
 		if (typeof (a_visitedindex) != "undefined") {
 			var xh = $(this).find(".xh").text().replace(".", "");
-			// console.log(xh);
 			for (var i = 0; i < a_visitedindex.length; i++) {
 				if (xh == a_visitedindex[i]) {
 					tableVisit="visited";
@@ -479,7 +478,7 @@ function tablejump(eid,h,sds,t){
 	if(localStorage){
 		localStorage.setItem("listortable"+{{.T._id}},"T");
 	}
-	setVisitedIndex(t,eid)
+	setVisitedIndex(t,eid);
 	beforeJump(eid,h,sds);
 }
 function beforeJump(eid,h,sds){
@@ -488,7 +487,7 @@ function beforeJump(eid,h,sds){
 		if(dataCache[i].a_visitedindex.length>0){
 			visitedArr = dataCache[i].a_visitedindex;
 			if(JSON.stringify(visitedArr).indexOf(eid)<0){
-				dataCache[i].a_visitedindex = visitedArr.push(eid)
+				dataCache[i].a_visitedindex = visitedArr.push(eid);
 			}
 		}
 	}
@@ -508,7 +507,7 @@ function setSessionStorage(){
 }
 
 function setVisitedIndex(obj,eid){
-	console.log(obj.hasClass("visited")+"--------")
+	// console.log(obj.hasClass("visited")+"--------");
 	if(obj.find("a.bt").hasClass("visit")||obj.hasClass("visited")){
 		return;
 	}