瀏覽代碼

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

zhangxinlei1996 5 年之前
父節點
當前提交
c45d211f93

+ 19 - 18
src/jfw/front/supsearch.go

@@ -162,26 +162,27 @@ func (p *Pcsearch) Getstatus() error {
 func (p *Pcsearch) GetNewBids() error {
 	pagenum, _ := p.GetInteger("pageNumber")
 	pageType := p.GetString("pageType")
-	//仅前第一页条展示表格多字段
-	list := util.ObjArrToMapArr(Newbids(pageType)[pagenum-1].([]interface{}))
 
-	for k, v := range list {
-		if pagenum == 1 && k < 20 {
-			continue
+	list := util.ObjArrToMapArr(Newbids(pageType)[pagenum-1].([]interface{}))
+	if pageType == "" { //最新招标信息仅第一页条展示表格多字段
+		for k, v := range list {
+			if pagenum == 1 && k < 20 {
+				continue
+			}
+			delete(v, "areaadd")
+			delete(v, "bidopentime")
+			delete(v, "buyer")
+			delete(v, "indadd")
+			delete(v, "k")
+			delete(v, "projectcode")
+			delete(v, "projectname")
+			delete(v, "stypeadd")
+			delete(v, "winner")
+			delete(v, "timetemp")
+			delete(v, "budget")
+			delete(v, "s_subscopeclass")
+			delete(v, "toptype")
 		}
-		delete(v, "areaadd")
-		delete(v, "bidopentime")
-		delete(v, "buyer")
-		delete(v, "indadd")
-		delete(v, "k")
-		delete(v, "projectcode")
-		delete(v, "projectname")
-		delete(v, "stypeadd")
-		delete(v, "winner")
-		delete(v, "timetemp")
-		delete(v, "budget")
-		delete(v, "s_subscopeclass")
-		delete(v, "toptype")
 	}
 
 	p.ServeJson(map[string]interface{}{

+ 6 - 5
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -477,6 +477,7 @@
 				localStorage.price = "";
 			}
 			//区域
+            localStorage.area = "";
 			if(filter["area"]!=null&&filter["area"]!=""){
 				localStorage.province = filter["area"];
 				localStorage.areaHtml = filter["area"].join(',').replace(/,/g,"、")
@@ -485,15 +486,15 @@
 			}
 			if(filter["city"]!=null&&filter["city"]!=""){
 				localStorage.city = filter["city"].join(',');
-				localStorage.area = filter["city"].join(',').replace(/,/g," ");
+				// localStorage.area = filter["city"].join(',').replace(/,/g," ");
 			}else{
 				localStorage.city = "";
-				localStorage.area = "";
+				// localStorage.area = "";
 			}
 			if(filter["region"]!=null&&filter["region"]!=""){
 				localStorage.areaHtml = filter["region"];
 			}else{
-				localStorage.areaHtml = localStorage.area;
+				localStorage.areaHtml =  filter["area"].join(',').replace(/,/g,"、");
 			}
 	        //行业
 			if(filter["industry"]!=null&&filter["industry"]!=""){
@@ -514,9 +515,9 @@
 			}
 	        //信息类型
 			if(filter["subtype"]!=null&&filter["subtype"]!=""){
-				localStorage.subType = filter["subtype"].replace(/,/g," ");
+				localStorage.subTypes = filter["subtype"].replace(/,/g," ");
 			}else{
-				localStorage.subType = "";
+				localStorage.subTypes = "";
 			}
 			//采购单位
 	        if(filter["buyer"]!=null&&filter["buyer"].length>0){

+ 17 - 2
src/jfw/modules/app/src/web/templates/dataExport/dataExport_area.html

@@ -790,8 +790,23 @@
 					 }
 					 getResult();
 				 }else{
-					 $(".other").prop("checked", true);
-					 $(".reset-btn").hide();
+					 if(localStorage.areaHtml!==""&&localStorage.areaHtml!==undefined){
+						 let area = localStorage.areaHtml.split("、");
+						 for(var i in area){
+							 $(".tab").each(function(){
+								 let province = $(this).children(".province").text().replace(/\s/g,"")
+								 if(province === area[i]){
+									 $(this).next().children(".city").addClass("active");
+									 if($(this).prop("class") !== "tab municipality"){
+										 $(this).next().slideDown();
+									 }
+								 }
+							 })
+						 }
+					 }else{
+						 $(".other").prop("checked", true);
+						 $(".reset-btn").hide();
+					 }
 					 getResult();
 				 }
 				 //

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

@@ -1286,4 +1286,4 @@ function AdClick(e,isExternal,link,title){
   }
 }
 </script>
-</html>
+</html>

+ 0 - 1
src/jfw/modules/pushsubscribe/src/push/config.json

@@ -36,7 +36,6 @@
 	"testids": ["5d6e142a25ef871f08a72662"],
 	"weixinRpcServer": "127.0.0.1:8083",
 	"wxColor": "#2cb7ca",
-	"wxContent": "剑鱼标讯推送",
 	"wxGroup": "招标信息",
 	"wxTitle": "根据你订阅的关键词“%s”,剑鱼标讯为你推送以下信息。如果不想继续收到此类信息,可进入招标订阅的设置页面取消订阅。",
 	"wxDetailColor":"#686868",

+ 13 - 7
src/jfw/modules/pushsubscribe/src/push/config/config.go

@@ -4,6 +4,7 @@ import (
 	"qfw/util"
 	"qfw/util/mail"
 	"regexp"
+	"strings"
 )
 
 type sysConfig struct {
@@ -24,7 +25,6 @@ type sysConfig struct {
 	WeixinRpcServer         string      `json:"weixinRpcServer"`
 	WxColor                 string      `json:"wxColor"`
 	WxGroup                 string      `json:"wxGroup"`
-	WxContent               string      `json:"wxContent"`
 	WxTitle                 string      `json:"wxTitle"`
 	WxDetailColor           string      `json:"wxDetailColor"`
 	AppPushServiceRpc       string      `json:"appPushServiceRpc"`
@@ -66,17 +66,23 @@ type cassandra struct {
 }
 
 var (
-	Gmails       []*mail.GmailAuth
-	Se           = util.SimpleEncrypt{Key: "topnet"}
-	Re           = regexp.MustCompile("<[^>]+>([^<]+)?<[^>]+>")
-	SysConfig    *sysConfig
-	WxContentLen int
+	Gmails         []*mail.GmailAuth
+	Se             = util.SimpleEncrypt{Key: "topnet"}
+	Re             = regexp.MustCompile("<[^>]+>([^<]+)?<[^>]+>")
+	SysConfig      *sysConfig
+	WxGroupLen     int
+	FastigiumStart int
+	FastigiumEnd   int
 )
 
 func init() {
 	util.ReadConfig("./config.json", &SysConfig)
 	//
-	WxContentLen = len([]rune(SysConfig.WxContent))
+	if fastigiumTimes := strings.Split(SysConfig.FastigiumTime, "-"); len(fastigiumTimes) == 2 {
+		FastigiumStart = util.IntAll(fastigiumTimes[0])
+		FastigiumEnd = util.IntAll(fastigiumTimes[1])
+	}
+	WxGroupLen = len([]rune(SysConfig.WxGroup))
 	Gmails = make([]*mail.GmailAuth, len(SysConfig.Mails))
 	for k, v := range SysConfig.Mails {
 		Gmails[k] = &mail.GmailAuth{

+ 22 - 31
src/jfw/modules/pushsubscribe/src/push/job/dopush.go

@@ -18,8 +18,12 @@ import (
 )
 
 func init() {
-	putil.LimitMaxOneMinutePush(&DoPush.minutePushPool, SysConfig.MinutePushSize)
-	putil.LimitMaxOneMinutePush(&DoPush.fastigiumMinutePushPool, SysConfig.FastigiumMinutePushSize)
+	if SysConfig.MinutePushSize > 0 {
+		putil.LimitMaxOneMinutePush(&DoPush.minutePushPool, SysConfig.MinutePushSize)
+	}
+	if SysConfig.FastigiumMinutePushSize > 0 {
+		putil.LimitMaxOneMinutePush(&DoPush.fastigiumMinutePushPool, SysConfig.FastigiumMinutePushSize)
+	}
 }
 
 type doPush struct {
@@ -28,22 +32,17 @@ type doPush struct {
 }
 
 func (d *doPush) Execute(taskType int, wxPush, appPush, mailPush int, u *UserInfo, list, tempList SortList) (isSaveSuccess bool, wxStatus, appStatus, mailStatus int) {
-	isSaveSuccess = true
-	//开通订阅推送或邮箱推送的用户,由实时推送修改成九点推送,app推送用list字段,微信和邮箱推送用templist字段
 	if wxPush == 1 || appPush == 1 || mailPush == 1 || u.PchelperPush == 1 {
 		if list != nil && tempList != nil {
 			isSaveSuccess, _, appStatus, _ = d.Do(taskType, true, 0, appPush, 0, u, &list)
-			if !isSaveSuccess {
-				return
+			if isSaveSuccess {
+				_, wxStatus, _, mailStatus = d.Do(taskType, false, wxPush, 0, mailPush, u, &tempList)
 			}
-			_, wxStatus, _, mailStatus = d.Do(taskType, false, wxPush, 0, mailPush, u, &tempList)
 		} else if list != nil {
 			isSaveSuccess, wxStatus, appStatus, mailStatus = d.Do(taskType, true, wxPush, appPush, mailPush, u, &list)
-			if !isSaveSuccess {
-				return
-			}
 		} else if tempList != nil {
 			_, wxStatus, appStatus, mailStatus = d.Do(taskType, false, wxPush, 0, mailPush, u, &tempList)
+			isSaveSuccess = true
 		}
 	}
 	return isSaveSuccess, wxStatus, appStatus, mailStatus
@@ -161,16 +160,26 @@ func (d *doPush) Do(taskType int, isSave bool, wxPush, appPush, mailPush int, k
 		logger.Info("推送任务", taskType, "没有要推送的数据!", k.Id)
 		return
 	}
+	//限制一分钟最大的推送数量
+	if d.fastigiumMinutePushPool != nil {
+		if hour := time.Now().Hour(); hour >= FastigiumStart && hour <= FastigiumEnd {
+			<-d.fastigiumMinutePushPool //高峰期
+		}
+	} else if d.minutePushPool != nil {
+		<-d.minutePushPool //正常期
+	}
 	if taskType != 0 && isSave {
 		//推送记录id
 		pushId := putil.SaveSendInfo(k, pushIds, infos)
 		if pushId == "" {
 			logger.Info("推送任务", taskType, "保存到cassandra出错", k.Id)
 			return
-		} else {
-			logger.Info("推送任务", taskType, "成功保存到cassandra", pushId, k.Id)
 		}
+		logger.Info("推送任务", taskType, "成功保存到cassandra", pushId, k.Id)
 		isSaveSuccess = true
+	}
+	logger.Info("推送任务", taskType, "开始进行终端推送", k.Id)
+	if isSaveSuccess {
 		//pc端助手推送
 		if k.S_m_openid != "" {
 			logger.Info("推送任务", taskType, "开始助手推送", k.Id, "s_m_openid", k.S_m_openid)
@@ -183,20 +192,6 @@ func (d *doPush) Do(taskType int, isSave bool, wxPush, appPush, mailPush int, k
 			logger.Info("推送任务", taskType, "助手推送结束", isPushOk, k.Id, "phone", k.Phone)
 		}
 	}
-	logger.Info("推送任务", taskType, "开始进行终端推送", k.Id)
-	//限制一分钟最大的推送数量
-	hour := time.Now().Hour()
-	fastigiumStart, fastigiumEnd := 0, 0
-	fastigiumTimes := strings.Split(SysConfig.FastigiumTime, "-")
-	if len(fastigiumTimes) == 2 {
-		fastigiumStart = util.IntAll(fastigiumTimes[0])
-		fastigiumEnd = util.IntAll(fastigiumTimes[1])
-	}
-	if hour >= fastigiumStart && hour <= fastigiumEnd {
-		<-d.fastigiumMinutePushPool //高峰期
-	} else {
-		<-d.minutePushPool //正常期
-	}
 	if wxPush == 1 {
 		logger.Info("推送任务", taskType, "开始微信推送", k.ApplyStatus, k.Id)
 		isPushOk := true
@@ -226,11 +221,7 @@ func (d *doPush) Do(taskType int, isSave bool, wxPush, appPush, mailPush int, k
 			}
 			wxtitle := fmt.Sprintf(SysConfig.WxTitle, wxTitleKeys)
 			TitleLen := len([]rune(wxtitle))
-			GroupLen := len([]rune(k.ModifyDate))
-			reLen := 200 - TitleLen - GroupLen - WxContentLen - len([]rune(Tip1))
-			//if infoType == 2 {
-			//	reLen = reLen - 4
-			//}
+			reLen := 200 - TitleLen - 10 - WxGroupLen - len([]rune(Tip1))
 			WXTitle := ""
 			bshow := false
 			for n := 1; n < len(TitleArray)+1; n++ {

+ 4 - 4
src/jfw/modules/pushsubscribe/src/push/job/pushjob.go

@@ -343,7 +343,7 @@ func (p *pushJob) Push() {
 					MergeOrder:    v["mergeorder"],
 					FirstPushTime: util.Int64All(v["firstpushtime"]),
 				}
-				logger.Info("推送任务", p.taskType, "开始推送用户,userid", u.Id, "s_m_openid", u.S_m_openid, "a_m_openid", u.A_m_openid, "phone", u.Phone, "subscribe", u.Subscribe, "applystatus", u.ApplyStatus, "jpushid", u.Jpushid, "opushid", u.Opushid, "phoneType", u.AppPhoneType, "rateMode", u.RateMode, "email", u.Email)
+				logger.Info("推送任务", p.taskType, "开始推送用户", "userType", u.UserType, "userId", u.Id, "s_m_openid", u.S_m_openid, "a_m_openid", u.A_m_openid, "phone", u.Phone, "subscribe", u.Subscribe, "applystatus", u.ApplyStatus, "jpushid", u.Jpushid, "opushid", u.Opushid, "phoneType", u.AppPhoneType, "rateMode", u.RateMode, "email", u.Email)
 				wxPush, appPush, mailPush := 0, 0, 0
 				if p.taskType == 1 {
 					if u.WxPush == 1 {
@@ -394,11 +394,11 @@ func (p *pushJob) Push() {
 						mailPush = 0
 					}
 				}
-				logger.Info("推送任务", p.taskType, "用户接收方式,userid", u.Id, "wxPush", wxPush, "appPush", appPush, "mailPush", mailPush, "pchelperPush", u.PchelperPush, "t_wxPush", t_wxPush, "t_mailPush", t_mailPush)
+				logger.Info("推送任务", p.taskType, "用户接收方式", "userId", u.Id, "wxPush", wxPush, "appPush", appPush, "mailPush", mailPush, "pchelperPush", u.PchelperPush, "t_wxPush", t_wxPush, "t_mailPush", t_mailPush)
 				if wxPush != 1 && appPush != 1 && mailPush != 1 {
 					return
 				}
-				//再对取消关注以及app没有登录的用户进行过滤
+				//再对取消关注以及app没有登录的用户进行过滤,但是依然可以进行助手推送
 				if u.Subscribe == 0 {
 					wxPush = 0
 				}
@@ -451,7 +451,7 @@ func (p *pushJob) Push() {
 				} else {
 					err := sess.DB(DbName).C("pushspace").RemoveId(v["_id"])
 					if err != nil {
-						logger.Error("推送任务", p.taskType, "update error", err)
+						logger.Error("推送任务", p.taskType, "remove error", err)
 					}
 				}
 				if wxStatus == -1 || appStatus == -1 || mailStatus == -1 {

+ 0 - 1
src/web/staticres/css/dev2/superSearch.css

@@ -89,7 +89,6 @@
 .shade_table{
 	width: 1199px;
 	position: absolute;
-	z-index: 999; 
 	margin-top: -110px; 
 	height: 150px;
 	background: linear-gradient(to bottom, rgba(255,255,255,0),rgba(255,255,255,0.8),rgba(255,255,255,1));

二進制
src/web/staticres/images/subscribe/iner-left-tuisong.png


+ 2 - 2
src/web/templates/pc/biddingsearch_enterprise.html

@@ -1437,12 +1437,12 @@
   			$(".formTable").html(tableHtml);
       }
       $(".shade_table").show();
-      $(".tabContainer").css({"margin-bottom":"60px"});
+      $(".lucene-table").css({"margin-bottom":"60px"});
 		}else{
 			$(".lucene-table").addClass("entlist");
 			$(".formTable").html(formItem);
       $(".shade_table").hide();
-      $(".tabContainer").css({"margin-bottom":"30px"});
+      //$(".tabContainer").css({"margin-bottom":"30px"});
 		}
     }
 

+ 6 - 5
src/web/templates/weixin/dataExport/dataExport.html

@@ -431,6 +431,7 @@
 				localStorage.price = "";
 			}
 			//区域
+            localStorage.area = "";
 			if(filter["area"]!=null&&filter["area"]!=""){
 				localStorage.province = filter["area"];
 			}else{
@@ -438,15 +439,15 @@
 			}
 			if(filter["city"]!=null&&filter["city"]!=""){
 				localStorage.city = filter["city"].join(',');
-				localStorage.area = filter["city"].join(',').replace(/,/g," ");
+				// localStorage.area = filter["city"].join(',').replace(/,/g," ");
 			}else{
 				localStorage.city = "";
-				localStorage.area = "";
+				// localStorage.area = "";
 			}
 			if(filter["region"]!=null&&filter["region"]!=""){
 				localStorage.areaHtml = filter["region"];
 			}else{
-				localStorage.areaHtml = localStorage.area;
+				localStorage.areaHtml = filter["area"].join(',').replace(/,/g,"、");
 			}
 	        //行业
 			if(filter["industry"]!=null&&filter["industry"]!=""){
@@ -467,9 +468,9 @@
 			}
 	        //信息类型
 			if(filter["subtype"]!=null&&filter["subtype"]!=""){
-				localStorage.subType = filter["subtype"].replace(/,/g," ");
+				localStorage.subTypes = filter["subtype"].replace(/,/g," ");
 			}else{
-				localStorage.subType = "";
+				localStorage.subTypes = "";
 			}
 			//采购单位
 	        if(filter["buyer"]!=null&&filter["buyer"].length>0){

+ 17 - 3
src/web/templates/weixin/dataExport/dataExport_area.html

@@ -627,7 +627,6 @@
 					 $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500);
 					 // $(this).parent().siblings().children('.tab_content').slideUp(500)
 					 $(this).parent().siblings().children('.tab').removeClass('selected');
-					 console.log(document.body.scrollTop)
 				 });
 				 //
 				 $('.province .checkbox:not(.other)').on('change',function(){
@@ -755,8 +754,23 @@
 					 }
 					 getResult();
 				 }else{
-					 $(".other").prop("checked", true);
-					$(".reset-btn").hide();
+					 if(localStorage.areaHtml!==""&&localStorage.areaHtml!==undefined){
+						 let area = localStorage.areaHtml.split("、");
+						 for(var i in area){
+							 $(".tab").each(function(){
+								 let province = $(this).children(".province").text().replace(/\s/g,"")
+								 if(province === area[i]){
+									 $(this).next().children(".city").addClass("active");
+									 if($(this).prop("class") !== "tab municipality"){
+										 $(this).next().slideDown();
+									 }
+								 }
+							 })
+						 }
+					 }else{
+						 $(".other").prop("checked", true);
+						 $(".reset-btn").hide();
+					 }
 					 getResult();
 				 }
 				 //

+ 1 - 1
src/web/templates/weixin/jylab/lab-close.html

@@ -64,7 +64,7 @@
       <article class="main">
         <span>剑鱼标讯实验室已关闭</span>
       </article>
-      <div class="toDeatil" onclick="window.location.href='https://mp.weixin.qq.com/s/IQYYpek_FSwNqwU2iXsusg'">
+      <div class="toDeatil" onclick="window.location.href='https://mp.weixin.qq.com/s/c8QImDnwnJKIBfA2oNTTpw'">
         查看详情
       </div>
     </section>