Pārlūkot izejas kodu

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

李广朋 9 gadi atpakaļ
vecāks
revīzija
deaea20a1d

+ 1 - 0
common/src/github.com/go-xweb/xweb/app.go

@@ -593,6 +593,7 @@ func (a *App) run(req *http.Request, w http.ResponseWriter, route Route, args []
 	}
 
 	w.Header().Set("Content-Length", strconv.Itoa(len(content)))
+
 	_, err = w.Write(content)
 	if err != nil {
 		a.Error("Error during write: %v", err)

+ 4 - 3
common/src/qfw/util/mongodb/mongodbutil.go

@@ -3,13 +3,14 @@ package mongodb
 import (
 	"encoding/json"
 	"fmt"
-	mgo "gopkg.in/mgo.v2"
-	. "gopkg.in/mgo.v2/bson"
 	"log"
 	. "qfw/util"
 	"runtime"
 	"strings"
 	"time"
+
+	mgo "gopkg.in/mgo.v2"
+	. "gopkg.in/mgo.v2/bson"
 )
 
 //连接池
@@ -74,7 +75,7 @@ func GetMgoConn() (session *mgo.Session) {
 			}
 			return nil
 		}
-	case <-time.After(time.Second * 2):
+	case <-time.After(time.Second * 5):
 		//超时
 		return nil
 	}

+ 2 - 2
core/src/config.json

@@ -32,6 +32,6 @@
     "pushRpc": "127.0.0.1:8766",
     "domainName": "http://www.qimingxing.info",
     "ocr_uid": "120.25.216.197",
-    "ocr_servicekey": "91e77f8a-cb28-4fc2-96d7-5b08e7dfb6c5",
-    "ocr_servicecode": "cf22e3bb-d41c-47e0-aa44-a92984f5829d"
+    "ocr_servicekey": "c1608f6b-b507-46d4-98de-12e98f613715",
+    "ocr_servicecode": "91f6a58d-e418-4e58-8ec2-61b583c55ba2"
 }

+ 2 - 2
core/src/main.go

@@ -3,7 +3,6 @@ package main
 
 import (
 	"flag"
-	"github.com/go-xweb/xweb"
 	_ "qfw/active"
 	_ "qfw/chat"
 	. "qfw/coreconfig"
@@ -35,6 +34,8 @@ import (
 	_ "qfw/yellowpage"
 	"runtime"
 	"time"
+
+	"github.com/go-xweb/xweb"
 )
 
 //初始化
@@ -75,7 +76,6 @@ func init() {
 	xweb.RootApp().AddTmplVar("Msg", tag.Msg)
 	xweb.RootApp().AddTmplVar("Ad", tag.Ad)
 	xweb.RootApp().AppConfig.CacheTemplates = SysConfig.TemplateCache
-
 	xweb.RootApp().Logger.SetOutputLevel(0) //输出日志,改为4则不输出任何日志
 	//敏感词
 	fsw.ReadFswDict()

+ 1 - 1
core/src/message.json

@@ -2,7 +2,7 @@
 	"weixinrpc":"127.0.0.1:82",
 	"swordfishaction":"/swordfish/page",
 	"signature":"/member/credit/myCredit",
-	"entsearchaction":"/front/entCommunity.html",
+	"entsearchaction":"/wx/search/enterprise/index.html",
 	"lawsearchaction":"/law/qfw/index",
 	"msiteaction":"/ent/wsite/edit",
 	"wxpushlist":"/wxpush/bidinfo/%s",

+ 3 - 2
core/src/qfw/coreutil/imagemsghandler.go

@@ -9,10 +9,11 @@ import (
 	"net/http"
 	"os"
 	cf "qfw/coreconfig"
+	"qfw/util"
 )
 
 //名片识别
-func CardRecognition(picpath string) []interface{} {
+func CardRecognition(picpath string) (string, []interface{}) {
 	comps := []interface{}{}
 	//识别
 	fi, _ := os.Open(picpath)
@@ -38,5 +39,5 @@ func CardRecognition(picpath string) []interface{} {
 	if v, ok := ocr_ret["comp"]; ok {
 		comps, _ = v.([]interface{})
 	}
-	return comps
+	return util.ObjToString(ocr_ret["code"]), comps
 }

+ 2 - 2
core/src/qfw/front/webcentent.go

@@ -200,6 +200,7 @@ func (n *Newscont) viewContent4Front(_id string, temp string) error {
 	if ret := redis.Get("other", n.Url()); ret != nil {
 		return n.SetBody([]byte(ret.(string)))
 	} else {
+		contenttype := "qykb"
 		r := elastic.GetByIdField("content", "content", _id, `"_id","s_title","l_createdate","s_pic","s_author","s_editorname","s_contenttype","praise","releasetime","s_subcontent","s_url","s_content","s_source","s_keywords","s_description","s_contenttype"`)
 		//r := mongodb.FindById("content", _id, `{"_id":1,"s_title":1,"l_createdate":1,"s_editorname":1,"s_contenttype":1,"s_content":1,"s_source":1}`)
 		if nil != r {
@@ -207,7 +208,6 @@ func (n *Newscont) viewContent4Front(_id string, temp string) error {
 			time := (*r)["releasetime"]
 			if time != nil && time != "" {
 				time = time.(float64)
-				contenttype := "qykb"
 				if (*r)["s_contenttype"] == "zhsk" {
 					contenttype = "zhsk"
 				}
@@ -241,7 +241,7 @@ func (n *Newscont) viewContent4Front(_id string, temp string) error {
 			if len(author) < 1 {
 				(*r)["s_author"] = ""
 			}
-			hotnews := elastic.GetPage("content", "content", `{"s_contenttype": "qykb"}`, `{"praise":-1}`, `{"_id":1,"s_title":1,"praise":1}`, 0, 10)
+			hotnews := elastic.GetPage("content", "content", `{"s_contenttype": "`+contenttype+`"}`, `{"praise":-1}`, `{"_id":1,"s_title":1,"praise":1}`, 0, 10)
 			(*r)["hotnews"] = hotnews
 			n.T = *r
 			(*r)["s_content"] = template.HTML((*r)["s_content"].(string))

+ 17 - 14
core/src/qfw/search/wxsearchservice.go

@@ -516,34 +516,37 @@ func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType str
 
 //获取名片名称
 func (n *Wxsearch) WxMingpian() error {
-	res := make(map[string]string)
-	res["name"] = ""
-	res["on"] = "y"
+	res := make(map[string]interface{})
+	names := []string{}
+	res["on"] = "y" //y正常,n调用频繁或超出调用次数
 	if n.GetSession("s_m_openid") != nil {
 		serverId := n.GetString("serverId")
 		ret := coreutil.WxDownloadImg(serverId)
 		if len(ret) > 1 {
 			res["on"] = ret[0]
-			names := coreutil.CardRecognition(ret[1])
-			for _, v := range names {
+			code, tmps := coreutil.CardRecognition(ret[1])
+			if code == "434" {
+				res["on"] = "n"
+			}
+			tmps2 := []string{}
+			for _, v := range tmps {
 				name := fmt.Sprint(v)
 				if mpian_reg.MatchString(name) {
-					res["name"] = name
-					break
+					names = append(names, name)
+				} else {
+					tmps2 = append(tmps2, name)
 				}
 			}
-			var name = ""
-			if res["name"] == "" {
-				for _, v := range names {
-					tmp := fmt.Sprint(v)
-					if len(name) < len(tmp) {
-						name = tmp
+			if len(names) < 5 {
+				for _, v := range tmps2 {
+					if len(v) > 5 && len(names) < 6 {
+						names = append(names, v)
 					}
 				}
-				res["name"] = name
 			}
 		}
 	}
+	res["names"] = names
 	n.ServeJson(&res)
 	return nil
 }

+ 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-03-23 15:15:05"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-23 15:15:05"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-24 11:22:15"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-24 11:22:15"}},"marketisstart":true,"marketrate":300}

+ 16 - 6
core/src/web/staticres/css/entcommunity.css

@@ -359,13 +359,12 @@ a:focus, a:hover{
 }
 .ent-tab li{
 	padding: 0px 20px;
-	border-top-width: 3px;
 	height: 50px;
 	line-height: 50px;
-	border-top: 3px solid #F6F8FA;
 	cursor: pointer;
 	border-right: 1px solid #FFFFFF;
 	font-weight: bold;
+	position: relative;
 }
 .ent-tab li.disabled{
 	cursor: auto;
@@ -373,10 +372,21 @@ a:focus, a:hover{
 	opacity: 0.5;
 }
 .ent-tab .ent-active{
-	border-top-color: #16a086;
 	background-color: #FFFFFF;
 	color: #16a086;
 }
+.ent-tab li>.b-com-border-top{
+	display: none;
+}
+.ent-tab .ent-active>.b-com-border-top{
+	position: absolute;
+	background-color: #16a086;
+	height: 3px;
+	left: 0px;
+	right: 0px;
+	top: 0px;
+	display: block;
+}
 .ent-tab-content{
 	margin-top: 10px;
 	min-height: 500px;
@@ -646,7 +656,7 @@ a:focus, a:hover{
 	position: absolute;
 	z-index: 2;
 	right: 0px;
-	width: 95px;
+	width: 91px;
 }
 .entrelation .entrelation-controlls-fullscreen{
 	top: 15px;
@@ -991,8 +1001,8 @@ a:focus, a:hover{
 .ent-copyright table{
 	margin-top: 15px;
 }
-.ent-copyright .badge{
+.entinfo-page .badge{
 	background-color: #16a086;
-	margin-left: 10px;
+	margin-left: 5px;
 	color: #ffffff;
 }

+ 141 - 100
core/src/web/staticres/js/entportrait.js

@@ -1,100 +1,61 @@
 var entType = "企业";
-var relationEntity = null;
-var copyrightEntity = null;
-//var servicePaging = null;
-//var dishonestyPaging = null;
-var hasLoadPagingJs = false;
-var relationFlag = false;
-var identWayFlag = false;
+var relationEntity = null;//关系网
+var copyrightEntity = null;//著作权
+var servicePaging = null;//服务列表
+var staffinfoEntity = null;//主要人员
+var dishonestyPaging = null;//失信
+var hasLoadPagingJs = false;//是否已经加载过js
+var relationFlag = false;//关系网标识
+var identWayFlag = false;//认证状态
+var staffinfoFlag = false;
+/**************著作权**************/
+var copyrightFlag = false;
+//作品
+var workCopyRight = null;
+var workCopyRightFlag = false;
+//软件
+var computerSoftCopyRight = null;
+var computerSoftCopyRightFlag = false;
+//专利
+var patent = null;
+var patentFlag = false;
 //解析服务列表
 $(function(){
+	staffinfoFlag = typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0;
+	copyrightFlag = typeof(copyright) != "undefined" && copyright != null;
+	if(copyrightFlag){
+		//作品
+		workCopyRight = copyright.WorkCopyRight;
+		workCopyRightFlag = typeof(workCopyRight) != "undefined" && workCopyRight != null;
+		//软件
+		computerSoftCopyRight = copyright.ComputerSoftCopyRight;
+		computerSoftCopyRightFlag = typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null;
+		//专利
+		patent = copyright.Patent;
+		patentFlag = typeof(patent) != "undefined" && patent != null;
+	}
 	if($(".b-right").height() >= 500){
 		$(".ent-tab-content.b-left").css("min-height",$(".b-right").height());
 	}
-	//失信信息如果没有数据,选项卡不可点
-	if(dishonesty.count > 0){
-		DishonestyPaging();
-	}
-	//企业黄页如果没有数据,选项卡不可点
-	if(service.count > 0){
-		ServicePaging();
-	}
-	//主要人员
-	if(typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0){
-		var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
-		for(var i=0;i<staffinfo.length;i++){
-			switch(staffinfo[i].Position){
-				case "410A":
-				case "410B":
-				case "410C":
-				case "431A":
-				case "431B":
-					staffinfos1.push(staffinfo[i]);
-					break;
-				case "432A":
-				case "432K":
-					staffinfos2.push(staffinfo[i]);
-					break;
-				case "434Q":
-				case "434R":
-				case "436A":
-					staffinfos3.push(staffinfo[i]);
-					break;
-				default:
-					staffinfos4.push(staffinfo[i]);
-					break;
-			}
+	//显示著作权数量
+	if(copyrightFlag){
+		var copyrightCount = 0;
+		if(workCopyRightFlag){
+			copyrightCount += workCopyRight.length;
 		}
-		staffinfos1.sort(function(a,b){return a.Position-b.Position});
-		staffinfos2.sort(function(a,b){return a.Position-b.Position});
-		staffinfos3.sort(function(a,b){return a.Position-b.Position});
-		staffinfos4.sort(function(a,b){return a.Position-b.Position});
-		var hm = '<div class="ent-mainpersons">';
-		//计算出一行可以放几个
-		var maxCout = parseInt($(".ent-tab-content").width() / (207+20));
-		var verticalFlag = false;
-		var appendStaffinfo = function(obj,index){
-			var tmp = 0;
-			for(var i=0;i<obj.length;i++){
-				var positionName = obj[i].PositionName;
-				if(typeof(positionName) == "undefined" || positionName == null || positionName == ""){
-					positionName = "监事";
-				}
-				tmp++;
-				if(i==0){
-					hm+='<div class="staffinfo-level-'+index+'">';
-					if(verticalFlag){
-						hm+='<a class="staffinfo-vertical"></a>';
-					}
-				}
-				verticalFlag = true;
-				hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
-					+'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
-				//竖线
-				if(tmp == maxCout && i != obj.length-1){
-					hm+='<a class="staffinfo-vertical"></a>';
-				}
-				//横线
-				if(i != obj.length-1){
-					if(tmp <= maxCout-1){
-						hm+='<a class="staffinfo-horizontal"></a>';
-					}else{
-						tmp = 0;
-					}
-				}
-				if(i==obj.length-1){
-					hm+='</div>';
-				}
-			}
+		if(computerSoftCopyRightFlag){
+			copyrightCount += computerSoftCopyRight.length;
 		}
-		appendStaffinfo(staffinfos1,1);
-		appendStaffinfo(staffinfos2,2);
-		appendStaffinfo(staffinfos3,3);
-		appendStaffinfo(staffinfos4,4);
-		hm+='</div>';
-		$(".ent-mainperson").html(hm);
-	}else{
-		$(".ent-mainperson .ent-findnull").removeClass("hide");
+		if(patentFlag){
+			copyrightCount += patent.length;
+		}
+		$("#ent-tab-copyright").text(copyrightCount);
+	}
+	//显示失信数量
+	$("#ent-tab-dishonesty").text(dishonesty.count);
+	//显示失信数量
+	if(staffinfoFlag){
+		$("#ent-tab-staffinfo").text(staffinfo.length);
 	}
 	//联系地址
 	if($address){
@@ -144,16 +105,19 @@ $(function(){
 		}
 		if(index == 1){
 			b_afterLogin();
+		}else if($(this).index() == 2 && staffinfoEntity == null){
+			//加载服务列表
+			staffinfoEntity = new StaffinfoEntity();
 		}else if($(this).index() == 3 && copyrightEntity == null){
 			//加载服务列表
 			copyrightEntity = new CopyrightEntity();
-		}/*else if($(this).index() == 4 && dishonestyPaging == null){
-			//加载服务列表
+		}else if($(this).index() == 5 && dishonestyPaging == null){
+			//加载失信列表
 			dishonestyPaging = new DishonestyPaging();
-		}else if($(this).index() == 5 && servicePaging == null){
+		}else if($(this).index() == 6 && servicePaging == null){
 			//加载服务列表
 			servicePaging = new ServicePaging();
-		}*/
+		}
 	});
 	pcShare();
 });
@@ -184,6 +148,7 @@ function b_afterLogin(flag,result){
 	if(typeof(result) != "undefined"){
 		identWayFlag = result.identWay == 1;
 	}
+	identWayFlag = true;//暂时把认证权限放开
 	relationFlag = flag && identWayFlag && (relation == null || typeof(relation) == "undefined" || typeof(relation.links) == "undefined" || relation.links == null || relation.links.length == 0 || typeof(relation.nodes) == "undefined" || relation.nodes == null || relation.nodes.length <= 1);
 	if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){
 		$(".ent-tab>li:eq(1)").addClass("disabled");
@@ -260,12 +225,90 @@ function initRelation(){
 		$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
 	}
 }
+function StaffinfoEntity(){
+	//主要人员
+	if(staffinfoFlag){
+		var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
+		for(var i=0;i<staffinfo.length;i++){
+			switch(staffinfo[i].Position){
+				case "410A":
+				case "410B":
+				case "410C":
+				case "431A":
+				case "431B":
+					staffinfos1.push(staffinfo[i]);
+					break;
+				case "432A":
+				case "432K":
+					staffinfos2.push(staffinfo[i]);
+					break;
+				case "434Q":
+				case "434R":
+				case "436A":
+					staffinfos3.push(staffinfo[i]);
+					break;
+				default:
+					staffinfos4.push(staffinfo[i]);
+					break;
+			}
+		}
+		staffinfos1.sort(function(a,b){return a.Position-b.Position});
+		staffinfos2.sort(function(a,b){return a.Position-b.Position});
+		staffinfos3.sort(function(a,b){return a.Position-b.Position});
+		staffinfos4.sort(function(a,b){return a.Position-b.Position});
+		var hm = '<div class="ent-mainpersons">';
+		//计算出一行可以放几个
+		var maxCout = parseInt($(".ent-tab-content").width() / (207+20));
+		var verticalFlag = false;
+		var appendStaffinfo = function(obj,index){
+			var tmp = 0;
+			for(var i=0;i<obj.length;i++){
+				var positionName = obj[i].PositionName;
+				if(typeof(positionName) == "undefined" || positionName == null || positionName == ""){
+					positionName = "监事";
+				}
+				tmp++;
+				if(i==0){
+					hm+='<div class="staffinfo-level-'+index+'">';
+					if(verticalFlag){
+						hm+='<a class="staffinfo-vertical"></a>';
+					}
+				}
+				verticalFlag = true;
+				hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
+					+'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
+				//竖线
+				if(tmp == maxCout && i != obj.length-1){
+					hm+='<a class="staffinfo-vertical"></a>';
+				}
+				//横线
+				if(i != obj.length-1){
+					if(tmp <= maxCout-1){
+						hm+='<a class="staffinfo-horizontal"></a>';
+					}else{
+						tmp = 0;
+					}
+				}
+				if(i==obj.length-1){
+					hm+='</div>';
+				}
+			}
+		}
+		appendStaffinfo(staffinfos1,1);
+		appendStaffinfo(staffinfos2,2);
+		appendStaffinfo(staffinfos3,3);
+		appendStaffinfo(staffinfos4,4);
+		hm+='</div>';
+		$(".ent-mainperson").html(hm);
+	}else{
+		$(".ent-mainperson .ent-findnull").removeClass("hide");
+	}
+}
 function CopyrightEntity(){
 	//著作权
-	if(typeof(copyright) != "undefined" && copyright != null){
+	if(copyrightFlag){
 		loadJS(cdn+"/js/frontpaging.js",function(){
-			var workCopyRight = copyright.WorkCopyRight;
-			if(typeof(workCopyRight) != "undefined" && workCopyRight != null){
+			if(workCopyRightFlag){
 				$("#workCopyRightList .badge").text(workCopyRight.length);
 				workCopyRight.sort(function(a,b){
 					if(a.FirstPublishDate<b.FirstPublishDate){
@@ -291,8 +334,7 @@ function CopyrightEntity(){
 					$("#workCopyRightListPaging").parent().before(hm);
 				});
 			}
-			var computerSoftCopyRight = copyright.ComputerSoftCopyRight;
-			if(typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null){
+			if(computerSoftCopyRightFlag){
 				$("#computerSoftCopyRightList .badge").text(computerSoftCopyRight.length);
 				computerSoftCopyRight.sort(function(a,b){
 					if(a.FirstPublishDate<b.FirstPublishDate){
@@ -319,8 +361,7 @@ function CopyrightEntity(){
 					$("#computerSoftCopyRightListPaging").parent().before(hm);
 				});
 			}
-			var patent = copyright.Patent;
-			if(typeof(patent) != "undefined" && patent != null){
+			if(patentFlag){
 				$("#patentList .badge").text(patent.length);
 				patent.sort(function(a,b){
 					if(a.PublicDate<b.PublicDate){

+ 13 - 8
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -118,15 +118,16 @@
 	</div>
 	<!--切换-->
 	<ul class="ent-tab">
-		<li class="ent-active">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
-		<li>关系网</li>
-		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}>主要人员</li>
-		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}>著作权</li>
-		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}>变更信息</li>
-		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}>失信信息</li>
-		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
+		<li class="ent-active"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
+		<li><div class="b-com-border-top"></div>关系网</li>
+		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>主要人员<front class="badge" id="ent-tab-staffinfo">0</front></li>
+		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}><div class="b-com-border-top"></div>著作权<front class="badge" id="ent-tab-copyright">0</front></li>
+		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>变更信息<front class="badge">{{if .T.res.alterInfo}}{{len .T.res.alterInfo}}{{else}}0{{end}}</front></li>
+		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}><div class="b-com-border-top"></div>失信信息<front class="badge" id="ent-tab-dishonesty">0</front></li>
+		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
 	</ul>
 	<div class="ent-tab-content b-left{{if and (not .T.relevantNews) (not .T.relevantEnts)}} b-right-none{{end}}">
+		<!--企业概况-->
 		<div>
 			{{if .T.res.gs}}
 			<div class="entinfo-basicinfo ent-layout-up">
@@ -297,6 +298,7 @@
 			</div>
 			{{end}}
 		</div>
+		<!--关系网-->
 		<div class="entrelation hide" id="entrelation">
 			<div id="entrelation-infovis"></div>
 			<div id="entrelation-limit" class="hide entrelation-limit">
@@ -324,6 +326,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--著作权-->
 		<div class="ent-copyright hide">
 			<!--计算机软件著作权信息-->
 			{{if .T.copyright.ComputerSoftCopyRight}}
@@ -331,7 +334,7 @@
 				<div class="b-com-title">
 					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>计算机软件著作权信息<front class="badge">0</front>
 				</div>
-				<table class="table ent-table">
+				<table class="tabl<!--著作权-->e ent-table">
 					<tr>
 						<td class="text-center" id="computerSoftCopyRightListPaging"></td>
 					</tr>
@@ -369,6 +372,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--变更信息-->
 		<div class="ent-alterinfo hide">
 		{{if gt (len .T.res.alterInfo) 0}}
 			<div class="ent-layout-up">
@@ -436,6 +440,7 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
+		<!--企业黄页-->
 		<div class="hide ent-yellowpage">
 			{{if .T.res.s_synopsis}}
 			<div class="ent-layout-down">

+ 4 - 3
push/src/main.go

@@ -44,9 +44,10 @@ func runJob() {
 		bJobs = false
 		for _, job := range jobs {
 			//单个job内部实现多并发,job间不再支持并发,网络压力太大了
-			job.Execute()
-			util.WriteSysConfig(push.PushConfig)
-
+			util.Try(func() {
+				job.Execute()
+				util.WriteSysConfig(push.PushConfig)
+			}, func(e interface{}) {})
 		}
 		bJobs = true
 	}

+ 16 - 1
push/src/qfw/push/cache.go

@@ -6,11 +6,13 @@ package push
 
 import (
 	"fmt"
-	"gopkg.in/mgo.v2/bson"
 	"log"
 	"qfw/util"
 	"qfw/util/mongodb"
+	"runtime"
 	"strings"
+
+	"gopkg.in/mgo.v2/bson"
 )
 
 type MemberInterest struct {
@@ -24,6 +26,19 @@ type MemberInterest struct {
 
 //初始化缓存,在每次执行任务时调用,
 func InitCache(flag, m_openid string) map[string]*[]*MemberInterest {
+	defer func() {
+		if r := recover(); r != nil {
+			log.Println("[E]", r)
+			for skip := 1; ; skip++ {
+				_, file, line, ok := runtime.Caller(skip)
+				if !ok {
+					break
+				}
+				go log.Printf("%v,%v\n", file, line)
+			}
+		}
+	}()
+
 	cache := make(map[string]*[]*MemberInterest)
 	q := map[string]interface{}{}
 	if m_openid != "" {

+ 1 - 2
weixin/src/qfw/weixin/msgtxtchandler.go

@@ -42,8 +42,7 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 		}
 	} else if r.Content == "微信管理" && mids[openid] {
 		UserSession[r.FromUserName] = NewUserSession("wxadmin")
-		w.ReplyText(`您已进入微信管理,请输入指令操作:\n1.查看抽奖模式(指令:f0)\n2.切换抽奖模式(指令:c*,*为数字。如c0(自动模式),c1(手动模式1),c2(手动模式2),c3(手动模式3))\n3.统计抽奖结果(tjr*,tjr120(最近两分钟),tjr120-1200(最近两分钟至最近20分钟之间的))\n4.统计新用户数(tju*)\n5.服务器情况监测(ser0)\n6服务管理(man*,man1重启主程序(man11关闭),man3重启积分(man33关闭),man4重启微信认证(man44关闭))。\n输入q或Q离开。` +
-			`\n7.名片识别(指令:mp*,mp1查看识别状态,mp2关闭识别,mp3开启识别,mp60(数字大于10小于7200)查询最近60秒的识别次数)`)
+		w.ReplyText("您已进入微信管理,请输入指令操作:\n1.查看抽奖模式(指令:f0)\n2.切换抽奖模式(指令:c*,*为数字。如c0(自动模式),c1(手动模式1),c2(手动模式2),c3(手动模式3))\n3.统计抽奖结果(tjr*,tjr120(最近两分钟),tjr120-1200(最近两分钟至最近20分钟之间的))\n4.统计新用户数(tju*)\n5.服务器情况监测(ser0)\n6.服务管理(man*,man1重启主程序(man11关闭),man3重启积分(man33关闭),man4重启微信认证(man44关闭))。\n7.名片识别(指令:mp*,mp1查看识别状态,mp2关闭识别,mp3开启识别,mp60(数字大于10小于7200)查询最近60秒的识别次数)\n输入q或Q离开。")
 		return
 	} else if cj_reg.MatchString(r.Content) { //进入抽奖环节
 		if time.Now().Unix() > 1455552000 { //活动过期 ,过期后,这段代码要删除

+ 1 - 1
weixin/src/qfw/weixin/wxadmin.go

@@ -52,7 +52,7 @@ func processWxAdmin(openid, content string, w ResponseWriter, r *Request) {
 						}
 					} else {
 						num, _ := wutil.GetValFromList(int(var1))
-						resStr = fmt.Sprintf("最近%s秒,识别次数:%d", var1, num)
+						resStr = fmt.Sprintf("最近%d秒,识别次数:%d", var1, num)
 					}
 				case "tjr":
 					//数据库抽奖查看