Browse Source

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

李广朋 9 năm trước cách đây
mục cha
commit
982dec1e92

+ 28 - 0
common/src/qfw/util/mongodbutil/mongodbutil.go

@@ -300,6 +300,34 @@ func SaveBulk(c, alias, db string, doc ...map[string]interface{}) bool {
 	return b
 }
 
+//统计
+func Count(c, alias, db string, query interface{}) int {
+	sess := GetMgoConn(alias)
+	var n int = 0
+	if sess != nil {
+		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)
+				}
+			}
+		}()
+		defer DestoryMongoConn(alias, sess)
+		coll := sess.DB(db).C(c)
+		var err error
+		n, err = coll.Find(ObjToM(query)).Count()
+		if nil != err {
+			log.Println("CountError", err)
+		}
+	}
+	return n
+}
+
 //对象转数组
 func ObjToArr(obj interface{}) []string {
 	if s, ok := obj.(string); ok {

+ 1 - 0
core/src/qfw/swordfish/swordfish.go

@@ -20,6 +20,7 @@ type SwordFish struct {
 	searchinfolist xweb.Mapper `xweb:"/member/swordfish/searchinfolist"` //剑鱼查询
 	wxsearch       xweb.Mapper `xweb:"/member/wxswordfish/search"`       //剑鱼微信查询
 	wxsearchlist   xweb.Mapper `xweb:"/member/wxswordfish/searchlist"`   //剑鱼微信查询结果展示
+	transfer       xweb.Mapper `xweb:"/member/wxswordfish/transfer"`     //剑鱼微信查询结果跳转到我的订阅
 
 }
 

+ 22 - 6
core/src/qfw/swordfish/swordfishmanage.go

@@ -3,6 +3,7 @@ package swordfish
 import (
 	"encoding/json"
 	_ "encoding/json"
+	"fmt"
 	"gopkg.in/mgo.v2/bson"
 	"net/rpc"
 	"qfw/coreconfig"
@@ -13,6 +14,23 @@ import (
 	"time"
 )
 
+//剑鱼查询结果也跳转到我的订阅
+func (s *SwordFish) Transfer() error {
+	s.DisableHttpCache()
+	var flog = "T"
+	if s.Is("GET") {
+		return s.Render("/_error.html")
+	} else {
+		searchname := s.GetString("searchname")
+		id := s.GetSession("userId")
+		fmt.Println("id:", id, "searchname:", searchname)
+		fmt.Println("flog:", flog)
+		s.Write(`{"flog":"` + flog + `"}`)
+	}
+
+	return nil
+}
+
 //跳转到用户中心剑鱼首页
 func (s *SwordFish) Swordfish() error {
 	if ret := redis.Get("other", "swordfish"); ret != nil {
@@ -73,12 +91,7 @@ func (s *SwordFish) Wxprotocol() error {
 
 //剑鱼微信查询页面
 func (s *SwordFish) Wxsearch() error {
-	s.T["keywords"] = ""
-	keywords := s.GetSession("sf_keywords")
-	if keywords != nil {
-		s.T["keywords"] = keywords
-	}
-	return s.Render("/swordfish/wxsearch.html", &s.T)
+	return s.Render("/swordfish/wxsearch.html")
 }
 
 //剑鱼微信查询结果页面
@@ -92,7 +105,10 @@ func (s *SwordFish) Wxsearchlist() error {
 		s_type = "bid"
 	}
 	s.T["keywords"] = keywords
+	s.DelSession("sf_keywords")
+	fmt.Println("keyi :::::", s.GetSession("sf_keywords"))
 	s.SetSession("sf_keywords", keywords)
+	fmt.Println("keyi :::::2222", s.GetSession("sf_keywords"))
 	s.T["s_name"] = s_name
 	s.T["success"] = false
 	s.T["s_type"] = s.GetString("s_type")

+ 28 - 23
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -233,9 +233,9 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 			yp.T["res"] = info
 			regNo, _ := info["RegNo"].(string)
 			entName, _ := info["EntName"].(string)
-			relation, ok := getRelation(regNo, entName).(map[string]interface{})
+			relation, relflag := getRelation(regNo, entName)
 			var nodes *[]map[string]interface{}
-			if ok {
+			if relflag {
 				if d, err := json.Marshal(relation["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
 					//相关企业
 					var regNos []string
@@ -283,7 +283,7 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 			//服务列表第一页数据
 			yp.T["service"] = findServiceByEntId(id, 1, yp.Session())
 			//关系网数据
-			yp.T["relation"] = relation
+			yp.T["relflag"] = relflag
 			//著作权
 			yp.T["copyright"] = FindOne("enterprise_copyright", `{"EntId":"`+id+`"}`)
 
@@ -303,7 +303,7 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 				}
 			}
 			//过滤企业名
-			if ok && nodes != nil && len(*nodes) > 0 {
+			if relflag && nodes != nil && len(*nodes) > 0 {
 				go func() {
 					util.Try(func() {
 						if filterEntName(nodes) > 0 {
@@ -439,36 +439,41 @@ func isContainInQueryCache(querykey string, cache *list.List) bool {
 }
 
 func (yp *Yellowpage) GetRelation() error {
-	if util.IntAll(yp.GetSession("identWay")) == 1 {
+	var relation map[string]interface{}
+	var flag bool
+	//判断登录状态
+	if yp.GetSession("userType") != nil && util.IntAll(yp.GetSession("userType")) > 0 && util.IntAll(yp.GetSession("identWay")) == 1 {
 		regNo := yp.GetString("regNo")
 		entName := yp.GetString("entName")
-		if regNo == "" || entName == "" {
-			return nil
-		}
-		relation := getRelation(regNo, entName)
-		yp.ServeJson(M{"flag": true, "relation": relation})
-		r := relation.(map[string]interface{})
-		var links *[]map[string]interface{}
-		if d, err := json.Marshal(r["links"]); err == nil && json.Unmarshal(d, &links) == nil && len(*links) > 0 {
-			if !credit.AIsHasDo(credit.A_CKGXW, util.IntAll(yp.GetSession("credit_a"))) {
+		if regNo != "" && entName != "" {
+			relation, flag = getRelation(regNo, entName)
+			if flag && !credit.AIsHasDo(credit.A_CKGXW, util.IntAll(yp.GetSession("credit_a"))) {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.A_CKGXW, "A", nil, yp.Action)
 			}
 		}
-	} else {
-		yp.ServeJson(M{"flag": false})
 	}
+	yp.ServeJson(M{"flag": flag, "relation": relation})
 	return nil
 }
-func getRelation(regNo, entName string) interface{} {
+func getRelation(regNo, entName string) (r map[string]interface{}, ok bool) {
 	if regNo == "" || entName == "" {
-		return nil
+		return
 	}
-	relation := redis.Get("enterprise", "relation-"+regNo)
-	if relation == nil {
-		relation = makeRelation(regNo, entName)
-		redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
+	rel := redis.Get("enterprise", "relation-"+regNo)
+	if rel == nil {
+		rel = makeRelation(regNo, entName)
+		redis.Put("enterprise", "relation-"+regNo, rel, 7*ONEDAY)
+	}
+	var flag bool
+	if r, flag = rel.(map[string]interface{}); flag {
+		var links *[]map[string]interface{}
+		if d, err := json.Marshal(r["links"]); err == nil && json.Unmarshal(d, &links) == nil && len(*links) > 0 {
+			ok = true
+		}
+	} else {
+		ok = false
 	}
-	return relation
+	return
 }
 
 //生成图用的结果

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

+ 5 - 3
core/src/web/staticres/css/entcommunity.css

@@ -656,7 +656,6 @@ a:focus, a:hover{
 	position: absolute;
 	z-index: 2;
 	right: 0px;
-	width: 91px;
 }
 .entrelation .entrelation-controlls-fullscreen{
 	top: 15px;
@@ -665,7 +664,6 @@ a:focus, a:hover{
 .entrelation .entrelation-controlls>div{
 	margin-bottom: 10px;
 	margin-left: 10px;
-	display: inline-block;
 	width: 35px;
 	height: 35px;
 	box-shadow: 0px 0px 5px #DADADA;
@@ -680,10 +678,11 @@ a:focus, a:hover{
 	cursor: pointer;
 	vertical-align: top;
 	border-radius: 3px;
+	color: #16a086;
 	
 }
 .entrelation .entrelation-controlls .entrelation-box.checked{
-	color: #16a086;
+	display: none;
 }
 :-moz-full-screen .entrelation,:-webkit-full-screen .entrelation,:-o-full-screen .entrelation,
 :-ms-full-screen .entrelation,:fullscreen .entrelation,:-ms-fullscreen .entrelation,:full-screen .entrelation{
@@ -1005,4 +1004,7 @@ a:focus, a:hover{
 	background-color: #16a086;
 	margin-left: 5px;
 	color: #ffffff;
+}
+.entinfo-page .badge.disabled{
+	background-color: #a0a0a0;
 }

+ 13 - 52
core/src/web/staticres/js/entcommunity.js

@@ -312,71 +312,32 @@ var relationFlag=false;
 
 //加载关系网
 function initRelation(){
-	if(isLogined){
-		/*if($("#entrelation-limit").hasClass("hide")){
-			$(".entrelation").height($(".ent-tab-content").height());
-		}*/
-		var relationNoData = function(){
-			$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-			relationEntity = "";
-			$("#entrelation-infovis").hide();
-			$("#entrelation-findnull").removeClass("hide");
-		}
-		if(identWayFlag){
-			if(relationFlag){
-				relationNoData();
+	$("#entrelation").height(500);
+	$.ajax({
+		url: "/member/getRelation",
+		method: "post",
+		data: {regNo:regNo,entName:entName},
+		success: function(r){
+			if(!r || !r.flag || !r.relation || !r.relation.links || r.relation.links.length == 0 || !r.relation.nodes || r.relation.nodes.length <= 1){
+				alert("没有关系数据!");
 			}else{
-				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				$(".entrelation").height($(".ent-tab-content").height());
 				loadJS(cdn+"/js/d3.v3.min.js",function(){
 					loadJS(cdn+"/js/geometry.js",function(){
 						loadJS(cdn+"/js/provinceData.min.js",function(){
 							loadJS(cdn+"/js/relation.js",function(){
-								relationEntity = new Relation(legcerNo,regNo,regCapCurName,relation);
+								relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
 								relationEntity.init();
 							});
 						});
 					});
 				});
 			}
-		}else{
-			$("#entrelation-nologin").addClass("hide");
-			$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
-			$("#entrelation-infovis").hide();
+		},
+		error: function(){
+			alert("没有关系数据!");
 		}
-		/*$.ajax({
-			url: "/member/getRelation",
-			method: "post",
-			data: {regNo:regNo,entName:entName},
-			success: function(r){
-				if(r.flag == false){
-					$("#entrelation-nologin").addClass("hide");
-					$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
-					$("#entrelation-infovis").hide();
-				}else if(r.flag == true && (r == null || typeof(r) == "undefined" || typeof(r.relation.links) == "undefined" || r.relation.links.length == 0 || typeof(r.relation.nodes) == "undefined" || r.relation.nodes.length <= 1)){
-					relationNoData();
-				}else if(r.flag == true){
-					$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-					$(".entrelation").height(500);
-					loadJS("/js/d3.v3.min.js",function(){
-						loadJS("/js/geometry.js",function(){
-							loadJS("/js/relation.js",function(){
-								relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
-								relationEntity.init();
-							});
-						});
-					});
-				}else{
-					relationNoData();
-				}
-			},
-			error: function(){
-				relationNoData();
-			}
-		});*/
-	}else{
-		$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
-	}
+	});
 }
 
 function synclist(){

+ 37 - 45
core/src/web/staticres/js/entportrait.js

@@ -5,8 +5,8 @@ var servicePaging = null;//服务列表
 var staffinfoEntity = null;//主要人员
 var dishonestyPaging = null;//失信
 var hasLoadPagingJs = false;//是否已经加载过js
-var relationFlag = false;//关系网标识
 var identWayFlag = false;//认证状态
+var relationFlag = false;
 var staffinfoFlag = false;
 /**************著作权**************/
 var copyrightFlag = false;
@@ -50,12 +50,20 @@ $(function(){
 			copyrightCount += patent.length;
 		}
 		$("#ent-tab-copyright").text(copyrightCount);
+	}else{
+		$("#ent-tab-copyright").addClass("disabled");
 	}
 	//显示失信数量
-	$("#ent-tab-dishonesty").text(dishonesty.count);
-	//显示失信数量
+	if(dishonesty.count > 0){
+		$("#ent-tab-dishonesty").text(dishonesty.count);
+	}else{
+		$("#ent-tab-dishonesty").addClass("disabled");
+	}
+	//显示变更数量
 	if(staffinfoFlag){
 		$("#ent-tab-staffinfo").text(staffinfo.length);
+	}else{
+		$("#ent-tab-staffinfo").addClass("disabled");
 	}
 	//联系地址
 	if($address){
@@ -104,7 +112,7 @@ $(function(){
 			}
 		}
 		if(index == 1){
-			b_afterLogin();
+			b_afterLogin(isLogined);
 		}else if($(this).index() == 2 && staffinfoEntity == null){
 			//加载服务列表
 			staffinfoEntity = new StaffinfoEntity();
@@ -148,8 +156,8 @@ 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);
+	//identWayFlag = true;//暂时把认证权限放开
+	relationFlag = flag && identWayFlag && !relFlag;
 	if(!$(".ent-tab>li:eq(1)").hasClass("ent-active") && relationFlag){
 		$(".ent-tab>li:eq(1)").addClass("disabled");
 	}
@@ -174,16 +182,30 @@ function initRelation(){
 				relationNoData();
 			}else{
 				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-				$(".entrelation").height($(".ent-tab-content").height());
-				loadJS(cdn+"/js/d3.v3.min.js",function(){
-					loadJS(cdn+"/js/geometry.js",function(){
-						loadJS(cdn+"/js/provinceData.min.js",function(){
-							loadJS(cdn+"/js/relation.js",function(){
-								relationEntity = new Relation(legcerNo,regNo,regCapCurName,relation);
-								relationEntity.init();
+				$.ajax({
+					url: "/member/getRelation",
+					method: "post",
+					data: {regNo:regNo,entName:entName},
+					success: function(r){
+						if(!r || !r.flag || !r.relation || !r.relation.links || r.relation.links.length == 0 || !r.relation.nodes || r.relation.nodes.length <= 1){
+							relationNoData();
+						}else{
+							$(".entrelation").height($(".ent-tab-content").height());
+							loadJS(cdn+"/js/d3.v3.min.js",function(){
+								loadJS(cdn+"/js/geometry.js",function(){
+									loadJS(cdn+"/js/provinceData.min.js",function(){
+										loadJS(cdn+"/js/relation.js",function(){
+											relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
+											relationEntity.init();
+										});
+									});
+								});
 							});
-						});
-					});
+						}
+					},
+					error: function(){
+						relationNoData();
+					}
 				});
 			}
 		}else{
@@ -191,36 +213,6 @@ function initRelation(){
 			$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
 			$("#entrelation-infovis").hide();
 		}
-		/*$.ajax({
-			url: "/member/getRelation",
-			method: "post",
-			data: {regNo:regNo,entName:entName},
-			success: function(r){
-				if(r.flag == false){
-					$("#entrelation-nologin").addClass("hide");
-					$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
-					$("#entrelation-infovis").hide();
-				}else if(r.flag == true && (r == null || typeof(r) == "undefined" || typeof(r.relation.links) == "undefined" || r.relation.links.length == 0 || typeof(r.relation.nodes) == "undefined" || r.relation.nodes.length <= 1)){
-					relationNoData();
-				}else if(r.flag == true){
-					$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-					$(".entrelation").height(500);
-					loadJS("/js/d3.v3.min.js",function(){
-						loadJS("/js/geometry.js",function(){
-							loadJS("/js/relation.js",function(){
-								relationEntity = new Relation(legcerNo,regNo,regCapCurName,r.relation);
-								relationEntity.init();
-							});
-						});
-					});
-				}else{
-					relationNoData();
-				}
-			},
-			error: function(){
-				relationNoData();
-			}
-		});*/
 	}else{
 		$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
 	}

+ 37 - 36
core/src/web/staticres/js/relation.js

@@ -4,6 +4,7 @@ function Relation(legcerNo,regNo,regCapCurName,data){
 	this.regCapCurName = regCapCurName;
 	this.data = data;
 	this.modleFlag = data.nodes.length>15;
+	this.defaultIsPattern = this.modleFlag;
 	this.zoomlevel = 1;
 	this.w = 0;
 	this.h = 0;
@@ -25,8 +26,10 @@ Relation.prototype.init = function(){
 	var thisClass = this;
 	thisClass.w = $("#entrelation").width();
 	thisClass.h = $("#entrelation").height();
+	thisClass.centerNodeX = thisClass.w / 2;
+	thisClass.centerNodeY = thisClass.h / 2 + 5;
 	$("#entrelation-infovis").width(thisClass.w).append(
-		'<div class="entrelation-controlls hidden-sm">'
+		'<div class="entrelation-controlls">'
 		+'<div id="entrelation-pattern" class="entrelation-box'+(thisClass.modleFlag?' checked':'')+'" title="一般模式"><span class="glyphicon yibanmoshi"></span></div>'
 		+'<div id="entrelation-verbosemode" class="entrelation-box'+(thisClass.modleFlag?'':' checked')+'" title="详细模式"><span class="glyphicon xiangximoshi"></span></div>'
 		+'<div id="entrelation-restore" class="entrelation-box checked" title="退出"><span class="glyphicon suofang"></span></div>'
@@ -35,20 +38,14 @@ Relation.prototype.init = function(){
 	);
 	//一般模式
 	$("#entrelation-pattern").click(function(){
-		if($(this).hasClass("checked")){
-			return;
-		}
-		$("#entrelation-verbosemode").removeClass("checked");
-		$(this).addClass("checked");
+		$(this).hide();
+		$("#entrelation-verbosemode").show();
 		thisClass.pattern();
 	});
 	//详细模式
 	$("#entrelation-verbosemode").click(function(){
-		if($(this).hasClass("checked")){
-			return;
-		}
-		$("#entrelation-pattern").removeClass("checked");
-		$(this).addClass("checked");
+		$(this).hide();
+		$("#entrelation-pattern").show();
 		thisClass.verbosemode();
 	});
 	//全屏
@@ -83,13 +80,13 @@ Relation.prototype.init = function(){
 			thisClass.cancelFullScreen();
 		}
     };
-	$(window).resize(function(){
+	/*$(window).resize(function(){
 		if(!thisClass.redrawflag){
 		    //1秒后重绘
 			thisClass.redrawflag=true;
 			setTimeout(thisClass.redraw,1000);
 		}
-	});
+	});*/
 	if(document.getElementById("entrelation-infovis")){
 		document.getElementById("entrelation-infovis").oncontextmenu=function(){return false;};
 	}
@@ -141,8 +138,14 @@ Relation.prototype.verbosemode = function(){
 	this.modleFlag = false;
 	this.makeTextBg();
 	this.makeTitle();
-	this.tick();
-	this.force.tick();
+	if(this.defaultIsPattern){
+		this.tickFlag = true;
+		this.force.linkDistance(Math.floor(Math.random()*60)+150).start();
+	}else{
+		this.tick();
+		this.force.tick();
+	}
+	this.defaultIsPattern = false;
 }
 Relation.prototype.dataProcess = function(){
 	var reg = new RegExp(/(有限公司|有限责任公司|股份有限公司|总公司|分公司|公司|事务所|合伙企业)$|\(.*\)|\(.*\)/g);
@@ -408,13 +411,14 @@ Relation.prototype.launchFullScreen = function(element) {
   	}
 }
 Relation.prototype.cancelFullScreen = function(){
-	this.h = $("#entrelation-infovis").height();  
-	//$("#entrelation-fullscreen").text("全屏").attr("title","进入全屏视图"+((!!window.ActiveXObject || "ActiveXObject" in window)?"":" (F11)"));	
-	//force.linkDistance(120).charge(-200).size([w,h]).resume();
+	this.centerNodeX = this.w / 2;
+	this.centerNodeY = this.h / 2 + 5;
 	$("#entrelation-infovis").css({width:this.w,height:this.h});
 	//设置svg标签的宽度与高度
 	d3.select("svg").attr("width", this.w).attr("height", this.h);
 	$(".entrelation-controlls").removeClass("entrelation-controlls-fullscreen");
+	this.tickFlag = true;
+	this.force.resume();
     if(document.exitFullscreen) {
       document.exitFullscreen();
     } else if (document.msExitFullscreen) {
@@ -445,15 +449,14 @@ Relation.prototype.initFullScreen = function(){
 				//重绘
 				var w=document.body.clientWidth;
 				var h=document.body.clientHeight;
-				//if(w>1200){
-					//w= 1200
-				//}
+				thisClass.centerNodeX = w / 2;
+				thisClass.centerNodeY = h / 2 + 5;
 				$("#entrelation-infovis").css({width:w,height:h});
 				d3.select("svg").attr("width", w).attr("height", h);
 				$(".entrelation-controlls").addClass("entrelation-controlls-fullscreen");
-				thisClass.force.linkDistance(h).charge(-700).size([w,h]).resume();
+				thisClass.tickFlag = true;
+				thisClass.force.start();
 			}
-			
 		},timeout);
 	}else{
 		this.cancelFullScreen();
@@ -611,8 +614,12 @@ Relation.prototype.makeRelation = function(){
 	    .nodes(this.data.nodes)
 	    .links(this.data.links)
 	    .size([this.w, this.h])
-	    .linkDistance(function(p){
-			return Math.floor(Math.random()*60)+90;
+	    .linkDistance(function(){
+			var distance = Math.floor(Math.random()*60)+100;
+			if(!this.defaultIsPattern){
+				distance += 50;
+			}
+			return distance;
 		})
 		.chargeDistance(600)
 	    .charge(this.chargeVal)
@@ -676,6 +683,7 @@ Relation.prototype.makeRelation = function(){
 		.attr("y", "0")
 		.append("textPath")
 		.attr("class", "textpath")
+		.attr("text-anchor", "middle")
 		.attr("id", function(d) { 
 			return 'text'+d.nodeId;
 		})
@@ -683,19 +691,16 @@ Relation.prototype.makeRelation = function(){
 			return '#'+d.nodeId;
 		})
 		.text(function(d) { 
-			var invacconam = new Number(d.invacconam);
+			var invacconam = parseInt(d.invacconam);
 			if(invacconam > 0){
-				var lenInvacconam = (invacconam + "").length;
-				if(lenInvacconam > 4 && (invacconam + "").indexOf(".") > -1 && (lenInvacconam - (invacconam + "").indexOf(".")) > 4){
-					invacconam = (new Number(invacconam)).toFixed(4);
-				}
-				return invacconam+"万元";
+				return invacconam;
 			}else{
 				return "";
 			}
 		})
+		.style("font-size", "12px")
 		.style("fill", "#4e5051")
-		.attr("startOffset", "20%")
+		.attr("startOffset", "24%")
 		.style("display", this.modleFlag?"none":"block");
 	
 	this.lines.each(function (d,i){
@@ -859,10 +864,6 @@ Relation.prototype.makeTextBg = function(){
         bounds.y2 += padding.top  + padding.bottom;
 		
 		var width = bounds.x2 - bounds.x1;
-		if(d.type == "ce"){
-			thisClass.centerNodeX = thisClass.w / 2;
-			thisClass.centerNodeY = thisClass.h / 2 + 5;
-		}
 		var height = bounds.y2 - bounds.y1;
         node.select('rect')
             .attr('x', bounds.x1)

+ 15 - 9
core/src/web/staticres/wxswordfish/style.css

@@ -2,6 +2,7 @@ body{
 	margin: 0px;
 	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
 	-webkit-tap-highlight-color: transparent;
+	color: #000;
 }
 ul{
 	list-style: none;
@@ -63,8 +64,8 @@ img{
 .operation>.parent-node{
 	background-color: #F8F8F8;
 	width: 100%;
-	height: 54px;
-	line-height: 54px;
+	height: 40px;
+	line-height: 40px;
 	border-bottom: 1px solid #CCCCCC;
 	position: relative;
 	font-size: 16px;
@@ -84,7 +85,7 @@ img{
 }
 .operation>.parent-node>span img{
 	position: absolute;
-	top: 50%;
+	top: 40%;
 	left: 50%;
 }
 .operation>.parent-node>span{
@@ -121,7 +122,7 @@ img{
 	display: none;
 }
 .operation .child-node li{
-	border-bottom: 1px solid #ddd;
+	border-bottom: 1px solid #ccc;
 	padding: 15px 0px;
 }
 
@@ -503,7 +504,7 @@ img{
 	left: 0px;
 	right: 0px;
 	bottom: 0px;
-	height: 50px;
+	height: 40px;
 	width: 100%;
 	border-top: 1px solid #CCCCCC;
 	background-color: #F8F8F8;
@@ -511,8 +512,8 @@ img{
 .bottom-toolbar>li{
 	display: table-cell;
 	width: 33%;
-	height: 50px;
-	line-height: 50px;
+	height: 40px;
+	line-height: 40px;
 	text-align: center;
 }
 .bottom-toolbar>li img{
@@ -621,7 +622,7 @@ img{
 .toolbar-popover{
 	position: absolute;
 	width: 90px;
-	height: 100px;
+	height: 120px;
 	border: 1px solid #CCCCCC;
 	background-color: #F8F8F8;
 	bottom: 65px;
@@ -631,7 +632,7 @@ img{
 	display: none;
 }
 .popover-ul li{
-	line-height: 30px;
+	line-height: 38px;
 }
 .toolbar-popover .popover-arrow{
 	bottom: -11px;
@@ -657,4 +658,9 @@ img{
 }
 .popover-ul li.active{
 	background-color: #EAEAEA;
+}
+.popover-ul >li:nth-child(2){
+	width: 85%;
+	border-top:1px solid #e5e6e9;
+	border-bottom:1px solid #e5e6e9;
 }

+ 0 - 1
core/src/web/templates/member/incmobile/detailindex.html

@@ -1,4 +1,3 @@
-<!DOCTYPE HTML>
 <html>
  <head>
   <title> 企业社区-列表</title>

+ 9 - 2
core/src/web/templates/swordfish/searchinfolist.html

@@ -18,7 +18,11 @@ $(function(){
 	
 	var flog = {{.T.success}};
 	if (!flog){
-		$("#conlist").html('<div class="text-center"><div ><img style="width:137px;margin-top:60px;" src="/images/findnull.png"></div><div style="margin-bottom:50px;">没有找到和该关键词匹配的信息</div></div>');
+		if (s_words.length >0 ){
+			$("#conlist").html('<div class="text-center"><div ><img style="width:137px;margin-top:60px;" src="/images/findnull.png"></div><div style="margin-bottom:50px;">没有找到和该关键词匹配的信息</div></div>');
+		}else{
+			$("#conlist").html('<div class="text-center" style="height:300px;"></div>');
+		}
 	}else{
 		$("#searchts").removeClass("hidden");
 		var str = ""
@@ -293,7 +297,10 @@ $(function(){
 		</div>
 		<!-- 关键词提示end -->
 		<!-- 列表start -->
-		<div class="row"><div  class="col-sm-12" id="conlist"></div></div>
+		<div class="row">
+		<div  class="col-sm-12" id="conlist">
+		</div>
+		</div>
 		<!-- 列表end -->
 		<div id="more" class="hidden">
 			<div class="row">

+ 12 - 5
core/src/web/templates/swordfish/wxsearch.html

@@ -19,6 +19,10 @@
 	});
 </script>
 <style type="text/css">
+body{
+	font-size:16px !important;
+	color: #000;
+}
 .searchname{
 	background-color:#FFFFFF; 
 	border:1px solid #e5e6e9;
@@ -96,7 +100,7 @@
 }
 .searchshow{
 	border-top:1px solid #e5e6e9;
-	padding:10px 20px;
+	padding:0px 20px 10px 20px;
 }
 .wx-xhx{
 	border-top:1px solid #e5e6e9; 
@@ -107,16 +111,19 @@
 	line-height:45px;
 	cursor:hand;
 }
+.parent-node img {
+	vertical-align: sub !important;
+}
 </style>
 </head>
 <body>
 
-<div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="" placeholder="输入关键词查询"/>
 <span class="xiaochu"><img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/></span>
 </div>
 <div class="searchshow">
 		<!--招标 start-->
-	<form action="/member/wxswordfish/searchlist" name="searchone" method="post">
+	<form action="/member/wxswordfish/searchlist" name="searchone" method="post" style="margin-bottom: auto;">
 		<div onClick="searchbiao(1)" class="searchbs" >
 		<div class="searchzhao1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhao2">查询招标公告:</div>
@@ -132,7 +139,7 @@
 		<!--招标 end-->
 		<div class="wx-xhx" ></div>
 		<!--中标 start-->
-	<form action="/member/wxswordfish/searchlist" name="searchtwo" method="post">
+	<form action="/member/wxswordfish/searchlist" name="searchtwo" method="post" style="margin-bottom: auto;">
 		<div onClick="searchbiao(2)"  class="searchbs" >
 		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhong2">查询中标公告:</div>
@@ -148,7 +155,7 @@
 		<!--中标 end-->
 		<div  class="wx-xhx"></div>
 		<!--企业情报 start-->
-	<form action="/member/wxswordfish/searchlist" name="searchthree" method="post">
+	<form action="/member/wxswordfish/searchlist" name="searchthree" method="post" style="margin-bottom: auto;">
 		<div onClick="searchbiao(3)"  class="searchbs" >
 		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhong2">查询企业情报:</div>

+ 75 - 12
core/src/web/templates/swordfish/wxsearchlist.html

@@ -137,6 +137,7 @@ $(function(){
 <style type="text/css">
 body{
 	background-color:#F0F0F0;
+	font-size:16px !important;
 }
 #ycwords>div:first-of-type{
 	display:none;
@@ -145,15 +146,17 @@ body{
 	background-color:#FFFFFF; 
 	border:1px solid #e5e6e9;
 	height:45px;
-	width:100%;
+	width:78%;
     border-radius: 10px;
 	padding:2px 10px 2px 60px;
 	font-size:16px;
-	position:relative;
+	position:absolute;
 }
 .wxhead{
     padding: 10px 15px;
 	background-color:#F0F0F0;
+	position: relative;
+    height: 65px;
 }
 .tubiao img{
     position: absolute;
@@ -170,7 +173,7 @@ body{
     position: absolute;
     z-index: 10;
     top: 20px;
-	right: 30px;
+	right: 22%;
 	height:25px;
 }
 .rsssetbtn{
@@ -224,7 +227,7 @@ body{
     position: fixed;
     left: 0px;
     right: 0px;
-    bottom: 0px;
+    bottom: 41px;
     height: 50px;
     width: 100%;
     background-color: #37c6da;
@@ -258,6 +261,9 @@ body{
 	background-color:#fff;
 	width:100%;
 }
+.nullcontent{
+	height: 100%;
+}
 .tslist{
 	height:80px;
 	border-bottom: 1px solid #ccc;
@@ -266,22 +272,54 @@ body{
 .keyword{
 	color: #FF5A5F;
 }
+.parent-node img {
+	vertical-align: sub !important;
+}
+.input-group-addon {
+	float:right;
+    border: 0px;
+    border-radius: 0px;
+    width: 60px;
+    color: #FFF;
+    background-color: rgb(22,160,134);
+}
+.chax{
+	margin: 2px 0px;
+	float:right;
+	width:13%;
+	height:41px;
+	border:1px solid #35C5DA;
+	background-color:#35C5DA;
+	border-radius: 5px;
+	color:#fff;
+    padding-top: 8px;
+    font-size: 20px;
+}
 </style>
 </head>
 <body>
 <div style="background-color:#fff;">
-<div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchname" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
-<span class="xiaochu"><img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/></span>
+<div class="wxhead">
+<span class="tubiao">
+<img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/>
+</span>
+<input class="form-control searchname" name="searchnameone" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<span class="xiaochu">
+<img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/>
+</span>
+<span class="chax text-center">
+<i class="glyphicon sousuo"></i>
+</span>
 </div>
 <div class="rescontent">
 	
 </div>
-<div style="height:40px;"></div>
+<div style="height:80px;"></div>
 
 </div>
 <div class="resbm" >
 <div class="rests">确认关键词的查询结果无误</div>
-<div class="resdy"  onClick="window.location.href='/swordfish/page';">
+<div class="resdy"  onClick="jpmy()">
 直接订阅
 </div>
 
@@ -294,11 +332,21 @@ body{
 </div>
 <div>没有找到和该关键词匹配的信息</div>
 </div>
-
-
+<div style="display:none;">
+<form action="/member/wxswordfish/searchlist" name="searchone" method="post">
+	<input name="searchname" id="searchname" value="" style="display:none;"/>
+	<input name="s_type" id="sea_type" value="{{.T.s_type}}" style="display:none;"/>
+	<input name="s_name" id="sea_name" value="" style="display:none;"/>
+</form>
+</div>
+{{include "/swordfish/wxtoolbar.html"}}
 <script type="text/javascript">
-	$(".searchname").click(function(){
-        window.location.href="/member/wxswordfish/search";
+	$(".chax").click(function(){
+		var searchname = $(".searchname").val();
+		document.getElementById("searchname").value = searchname;
+		searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+		document.getElementById("sea_name").value = searchname;
+		document.forms['searchone'].submit();
     });
 	$(".qcimg").click(function(){
 		$(".searchname").val("");
@@ -311,6 +359,21 @@ body{
 		}
 		window.open("/visit/redirect?url="+escape(link));
 	}
+	function jpmy(){
+		var searchname = $(".searchname").val().replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+		$.ajax({    
+	        type:'post',        
+	        url:'/member/wxswordfish/transfer',    
+	        data:{searchname:searchname},    
+	        cache:false,    
+	        dataType:'json', 
+	        success:function(data){
+				if (data.flog=="T"){
+					window.location.href='/swordfish/page';
+				}
+	        }    
+        }); 
+	}
 </script>
 </body>
 </html>

+ 2 - 2
core/src/web/templates/swordfish/wxtoolbar.html

@@ -1,7 +1,7 @@
 <ul class="bottom-toolbar">
 	<li class="parent-node">
 		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/sousuo.png">
-		搜索
+		信息查询
 	</li>
 	<li class="parent-node">
 		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/dingyue.png">
@@ -18,7 +18,7 @@
 			<div class="popover-arrow"></div>
 		</div>
 		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/liebiao.png">
-		列表
+		更多
 	</li>
 </ul>
 <div class="dialog share-dialog">

+ 4 - 4
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -122,7 +122,7 @@
 		<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.res.alterInfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>变更信息<front class="badge{{if .T.res.alterInfo}}{{if eq (len .T.res.alterInfo) 0}} disabled{{end}}{{else}} disabled{{end}}">{{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>
@@ -304,7 +304,7 @@
 			<div id="entrelation-limit" class="hide entrelation-limit">
 				<div id="entrelation-nologin" class="hide text-center">
 					<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
-					<h5>扫码登录认证后,即可查看企业股东信息,投资关系,公司关系脉络图等内容</h5>
+					<h5>扫码登录后,即可查看企业股东信息,投资关系,公司关系脉络图等内容</h5>
 					<button class="btn btn-primary" onclick="loginModalShow();">扫码登录</button>
 				</div>
 				<div id="entrelation-noauthe" class="hide text-center">
@@ -334,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="tabl<!--著作权-->e ent-table">
+				<table class="table ent-table">
 					<tr>
 						<td class="text-center" id="computerSoftCopyRightListPaging"></td>
 					</tr>
@@ -535,7 +535,7 @@ var gs = {{.T.res.gs}};
 var investor = {{.T.res.investor}};
 var OpScope = {{.T.res.OpScope}};
 var service = {{.T.service}};
-var relation = {{.T.relation}};
+var relFlag = {{.T.relflag}};
 var copyright = {{.T.copyright}};
 //联系地址
 //定义默认的郑州经纬度

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

@@ -75,7 +75,7 @@ func InitWeixinSdk() {
 	//执行其他一些初始化的动作
 	InitSSLClient()
 	util.StartSubscribeFilter(wf.SysConfig.SubscribeMonitorCyc, wf.SysConfig.SubscribeMonitorTimes)
-
+	InitRobotHttpClient()
 	//go changeMsg()
 }