Forráskód Böngészése

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

zhangjinkun@topnet.net.cn 9 éve
szülő
commit
9916ec08ed
34 módosított fájl, 4696 hozzáadás és 113 törlés
  1. 19 4
      common/src/qfw/util/encrypt_test.go
  2. 2 1
      core/src/message.json
  3. 14 1
      core/src/qfw/member/memberindex.go
  4. 2 2
      core/src/qfw/redpackage/redpackage_test.go
  5. 12 1
      core/src/qfw/search/searchService.go
  6. 18 0
      core/src/qfw/search/wxsearch.go
  7. 435 0
      core/src/qfw/search/wxsearchservice.go
  8. 2 0
      core/src/qfw/yellowpage/yellowpage.go
  9. 135 7
      core/src/qfw/yellowpage/yellowpagemanager.go
  10. 1 1
      core/src/web/staticres/css/dev-qfw.css
  11. 2 1
      core/src/web/staticres/css/entcommunity.css
  12. 5 3
      core/src/web/staticres/js/entportrait.js
  13. 6 2
      core/src/web/staticres/js/qfw.js
  14. 1 1
      core/src/web/staticres/js/relation.js
  15. 333 0
      core/src/web/staticres/wxent/qfw-enterprise.css
  16. 1636 0
      core/src/web/staticres/wxent/qfw-enterprise.js
  17. 1179 0
      core/src/web/staticres/wxent/qfw-frontenterprise.js
  18. 4 4
      core/src/web/templates/common/head.html
  19. 18 15
      core/src/web/templates/member/credit/mcreditindex.html
  20. 3 3
      core/src/web/templates/search/enterpriseList.html
  21. 12 13
      core/src/web/templates/search/wxentlist.html
  22. 14 12
      core/src/web/templates/service/detail.html
  23. 2 3
      core/src/web/templates/service/list.html
  24. 2 2
      core/src/web/templates/service/viewsingledemand.html
  25. 2 2
      core/src/web/templates/yellowpage/enterpriseinfo.html
  26. 407 0
      core/src/web/templates/yellowpage/ungxenterpriseinfo.html
  27. 402 0
      core/src/web/templates/yellowpage/unrzenterpriseinfo.html
  28. 7 8
      core/src/web/templates/yellowpage/wxentinfo.html
  29. 2 2
      credit/src/main.go
  30. 1 1
      credit/src/qfw/creditrpc/creditrpc.go
  31. 8 1
      push/src/qfw/push/dopush/dopush.go
  32. 1 1
      weixin/src/qfw/weixin/dao/userdao.go
  33. 5 5
      weixin/src/qfw/weixin/menu.go
  34. 4 17
      weixin/src/qfw/weixin/msgtxtchandler.go

+ 19 - 4
common/src/qfw/util/encrypt_test.go

@@ -20,11 +20,26 @@ func Test_sim(t *testing.T) {
 	//s := "obEpLuMMDUYUM-zlzCbQ0MbuQOzc,eqweqwewqeqwe,349483204"
 	//s2 := "GyUlIhEDDjcfWCAyIl4xBkgsERYiLAwZLCg9VkkbLj4zMRYDPRs5ATVZOxccPAkzFxw7CCpEFj41QlRAQFdFXlRMQVZcHRIbBgsWBxYcFQwEBwoa"
 
-	s3 := "RFYoal5bCFdXWQoQB0JuWwlXAQFZCUVfFj4JMFtT"
-	s4 := "3333_55a8597fa442ceca9e20bfc2_444"
-	se := SimpleEncrypt{Key: "qfw_hongbao"}
+	//s3 := "RFYoal5bCFdXWQoQB0JuWwlXAQFZCUVfFj4JMFtT"
+	s4 := "oJULtwzXo6EFV1Ah-XeyRBimXGM8,uid,123456,wxpushlist"
+	se := SimpleEncrypt{Key: "topnet"}
 	log.Println(se.EncodeString(s4))
-	log.Println(se.DecodeString(s3))
+	log.Println(se.DecodeString("GyUlIhEDDjcfWCAyIl4xBkgsERYiLAwZLCg9VkkSEkMWCEkHAwACCgMdBwcRDREdGwE=566666666666666"))
+	now := time.Now()
+	tom := time.Date(now.Year(), now.Month(), now.Day(), 18, 0, 0, 0, time.Local)
+	log.Println(now.Unix(), tom.Unix(), 1453686600-1453716000)
+
+	log.Println(GetSubDay(time.Now().AddDate(0, 1, 0).Unix()))
+
+	strs := []string{"1", "2"}
+	log.Println(func(tmps []string) []interface{} {
+		res := make([]interface{}, len(tmps))
+		for k, v := range tmps {
+			res[k] = v
+		}
+		log.Println("--------", res)
+		return res
+	}(strs[1:]))
 
 }
 

+ 2 - 1
core/src/message.json

@@ -2,9 +2,10 @@
 	"weixinrpc":"127.0.0.1:82",
 	"swordfishaction":"/swordfish/page",
 	"signature":"/member/credit/myCredit",
-	"entsearchaction":"/search/enterprise/ent.html",
+	"entsearchaction":"/wx/search/enterprise/ent.html",
 	"lawsearchaction":"/law/qfw/index",
 	"msiteaction":"/ent/wsite/edit",
+	"wxpushlist":"/wxpush/bid/%s/%s/%s",
 	"indentify":{
 		"success":{
 			"result":"企业认证",

+ 14 - 1
core/src/qfw/member/memberindex.go

@@ -38,8 +38,10 @@ func init() {
 }
 
 func (m *MemberIndex) Sess(str string) error {
+
 	util.Try(func() {
-		str := strings.Split(sewx.DecodeString(str), ",")
+		strs := strings.Split(str, "/")
+		str := strings.Split(sewx.DecodeString(strs[0]), ",")
 		if len(str) == 4 {
 			openid := str[0]
 			//openid unionid time action
@@ -58,6 +60,17 @@ func (m *MemberIndex) Sess(str string) error {
 					UpdateCookieSession(m.Action, "s_nickname", false, person)
 					actionurl := util.ObjToString(coreconfig.MessageConfig[str[3]])
 					if actionurl != "" {
+						log.Println("len(strs)", len(strs))
+						if len(strs) > 1 {
+							actionurl = fmt.Sprintf(actionurl, func(tmps []string) []interface{} {
+								res := make([]interface{}, len(tmps))
+								for k, v := range tmps {
+									res[k] = v
+								}
+								log.Println("--------", res)
+								return res
+							}(strs[1:])...)
+						}
 						m.Redirect(actionurl)
 					} else {
 						m.Render("_error.html")

+ 2 - 2
core/src/qfw/redpackage/redpackage_test.go

@@ -93,8 +93,8 @@ func Test_reissue(t *testing.T) {
 		Remark:      "企明星幸运有奖",
 	}*/
 	bm := qrpc.BonusMsg{Mchbillno: fmt.Sprint(billno),
-		Sendname:    coreconfig.RedPackage.Weixin["sendname"].(string),
-		Reopenid:    "obEpLuCBTu_QlPJhLhJjuVXdwMzE",
+		Sendname: coreconfig.RedPackage.Weixin["sendname"].(string),
+		//Reopenid:    "",
 		Totalamount: amount,
 		Totalnum:    1,
 		Wishing:     "企明星新年大抽奖",

+ 12 - 1
core/src/qfw/search/searchService.go

@@ -502,13 +502,24 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 
 			EntName, _ := res[i]["EntName"].(string)
 			tmpNo := res[i]["EntType"]
+			res[i]["RegCapEntType"] = tmpNo
 			if tmpNo != nil {
 				switch tmpNo.(string) {
 				case "4500", "6800", "6810", "6820", "7100", "7110", "7120", "7130", "7190", "9200", "6840", "2100", "2110", "2120", "2121", "2122", "2123", "2130", "2140", "2150", "2151", "2152", "2190", "2200", "2210", "2211", "2212", "2213", "2219", "2220", "2221", "2222", "2223", "2229", "4000", "4300", "4310", "4320", "4330", "4340", "4550", "4551", "4552", "4553", "4560", "5800", "5810", "5820":
 					res[i]["EntType"] = "5810"
 				}
 			}
-
+			//处理分公司
+			if res[i]["RegCapEntType"] != nil && res[i]["RegCapEntType"].(string) != "" {
+				RegCapEntType := res[i]["RegCapEntType"].(string)
+				if RegCapEntType == "5810" || RegCapEntType == "6810" || RegCapEntType == "7310" || RegCapEntType == "3200" || RegCapEntType == "3100" {
+					res[i]["RegCapEntType"] = "5810"
+				} else if len(RegCapEntType) > 1 {
+					if RegCapEntType[:1] == "2" {
+						res[i]["RegCapEntType"] = "5810"
+					}
+				}
+			}
 			entlerp, _ := res[i]["LeRep"].(string)
 			tmpentno, _ := res[i]["RegNo"].(string)
 			if len(keyword) < 1 {

+ 18 - 0
core/src/qfw/search/wxsearch.go

@@ -0,0 +1,18 @@
+/**
+*企业查询模块,包含查询企业列表、即时下拉搜索和黄页中对应的服务列表
+**/
+package search
+
+import (
+	"github.com/go-xweb/xweb"
+)
+
+type Wxsearch struct {
+	*xweb.Action
+	wxgetEnterpriseList xweb.Mapper `xweb:"/wx/search/enterprise/([^.]*)ent([^.]*).html"` //查询企业列表
+	wxsearchEntSer      xweb.Mapper `xweb:"/wx/searchEntSer/(.*)"`                        //获取企业的服务列表
+}
+
+func init() {
+	xweb.AddAction(&Wxsearch{})
+}

+ 435 - 0
core/src/qfw/search/wxsearchservice.go

@@ -0,0 +1,435 @@
+package search
+
+import (
+	"encoding/base64"
+	"encoding/json"
+	"fmt"
+	"github.com/go-xweb/xweb"
+	"html/template"
+	"log"
+	"qfw/front"
+	. "qfw/member"
+	. "qfw/util"
+	"qfw/util/consts"
+	"qfw/util/elastic"
+	ip "qfw/util/ip17mon"
+	. "qfw/util/mongodb"
+	"qfw/util/redis"
+	"strconv"
+	"strings"
+	_ "strings"
+)
+
+//获取某个企业服务列表数据
+func (search *Wxsearch) WxsearchEntSer(id string) error {
+	if search.Method() == "POST" {
+		//分页
+		currentPage, _ := strconv.Atoi(search.GetString("currentPage"))
+		perPage, _ := strconv.Atoi(search.GetString("perPage"))
+		if perPage == 0 {
+			perPage = 10
+		}
+		mustnot := `{"term" : {"i_status" : 1 }}`
+		var fields, collection, query, tempstrquery string
+		collection = "service"
+		tempstrquery = `{"query_string":{"default_field": "s_enterpriseid","query":"` + id + `"}}`
+		servicequery := ""
+		if search.GetSession("entid") == nil || search.GetSession("entid").(string) != id {
+			servicequery = `,"must_not" : [` + mustnot + `]`
+		} else {
+
+		}
+		query = `{"query": {
+		    "bool": {
+			  "must":[` + tempstrquery + `]` + servicequery + `
+		    }
+		  }}`
+		//需要查到的字段信息
+		fields = `"_id","s_name","s_introduction","s_images","s_enterpriseid","s_isshow","i_status"`
+		res := map[string]interface{}{}
+		res["totalRows"] = elastic.Count("service", collection, query)
+		//查询服务列表数据
+		result := elastic.Get("service", collection, `{"query":{"bool": {"must":[`+tempstrquery+`]`+servicequery+`}},
+		_source:[`+fields+`],
+		sort:{"l_createdate":"desc"},
+		from:`+fmt.Sprintf("%v", ((currentPage-1)*perPage))+`,
+		size:`+fmt.Sprintf("%v", perPage)+`
+		}`)
+		//result := elastic.GetPage("service", collection, query, order_str, fields, (currentPage-1)*perPage, perPage)
+
+		for _, v := range *result {
+			b, _ := CheckAuth(v)
+			if b {
+				v["s_isEdit"] = "1"
+			} else {
+				v["s_isEdit"] = "0"
+			}
+			if IntAll(v["i_status"]) == 1 {
+				v["s_remove"] = 1
+			} else {
+				v["s_remove"] = 0
+			}
+		}
+
+		res["data"] = result
+		res["currentPage"] = currentPage
+		search.ServeJson(&res)
+	}
+	return nil
+}
+
+//企业列表
+func (n *Wxsearch) WxgetEnterpriseList(reqType, param /*参数*/ string) error {
+	//必须是登录之后的已认证用户才可以进入企业社区
+	//if ui, _ := (n.GetSession("userInfo")).(*map[string]interface{}); reqType == "m_" || (n.GetSession("userType") != nil && IntAll(n.GetSession("userType")) > 0) && ((n.GetSession("identWay") != nil && IntAll(n.GetSession("identWay")) == 1) || ((*ui)["s_pid"] != nil && (*ui)["s_pid"].(string) != "")) {
+	//n.T["uri"] = n.Uri()
+
+	if len(param) == 0 {
+		//请求是表单提交,走的查询
+		//拼装查询对象
+		querymap := map[string]string{ //"words": n.GetString("s_value"),
+			"perPage":     n.GetString("perPage"),
+			"currentPage": n.GetString("currentPage"),
+			"query":       n.GetString("words"),
+			"city":        n.GetString("city"),
+			"c_hfl":       n.GetString("c_hfl"),
+			"c_zb":        n.GetString("c_zb"),
+			"all":         n.GetString("all"),
+			"c_author":    n.GetString("c_author"),
+			"cityNo":      n.GetString("cityNo"), // 是否是第一次查询并且没有选择地市,自动根据IP来设
+		}
+		//查询生成列表数据
+		data, pagination := wxsearhWebContentent(querymap, n, reqType)
+		n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+	} else {
+		//反转生成map
+		paramstr := param[1:]
+		bs, _ := base64.StdEncoding.DecodeString(paramstr)
+		querymap := map[string]string{}
+
+		json.Unmarshal(bs, &querymap)
+		log.Println(querymap)
+		data, pagination := wxsearhWebContentent(querymap, n, reqType)
+		n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+	}
+	return nil
+	//} else {
+	//return n.Render("/search/entcommunity.html")
+	//}
+}
+
+//实际的查询企业社区业务逻辑
+func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType string) (*[]map[string]interface{}, *[]interface{}) {
+	perPage, _ := strconv.Atoi(querymap["perPage"])
+	currentPage, _ := strconv.Atoi(querymap["currentPage"])
+	//修复
+	if perPage == 0 {
+		perPage = 20
+	}
+	if currentPage < 1 {
+		currentPage = 1
+	}
+
+	queryStr := querymap["query"]
+	fmt.Println("检索条件:", queryStr)
+	str := ``
+	//查询词
+	keyword := queryStr
+	//排序
+
+	sort := ""
+
+	//地区
+	city := querymap["city"]
+	var tempQuery = ""
+	var query = ""
+	cityNo := querymap["cityNo"]
+	tempBisOne := false
+	ipcity := ""
+	var total int64 = 500
+	if cityNo == "" && len(queryStr) == 0 {
+		querymap["cityNo"] = "1"
+		tn, er := ip.Find(n.Protocol())
+		if nil == er {
+			switch tn.Region {
+			case "河南", "广西", "黑龙江", "青海", "西藏", "安徽", "山西":
+				ipcity = consts.Scode[tn.Region]
+				if len(ipcity) > 0 {
+					tmp_res := redis.Get("enterprise", "wx_"+ipcity+"_1")
+					tmp_pag := redis.Get("enterprise", "wx_"+ipcity+"_2")
+					if nil != tmp_res && nil != tmp_pag {
+						tmp_res1, oks1 := tmp_res.([]interface{})
+						tmp_pag1, oks2 := tmp_pag.([]interface{})
+						if tmp_res1 != nil && tmp_pag1 != nil && oks1 && oks2 {
+							tmp_resn := make([]map[string]interface{}, len(tmp_res1))
+							for k := 0; k < len(tmp_res1); k++ {
+								tmp_resn1, _ := tmp_res1[k].(map[string]interface{})
+								tmp_resn[k] = tmp_resn1
+							}
+							return &tmp_resn, &tmp_pag1
+						}
+					}
+
+					//str += `{"prefix":{"OpLocDistrict":"` + ipcity + `"}}`
+					tempBisOne = true
+					query = `{"query": {
+					"function_score": {
+						      "script_score": {
+						        "script": "if(doc['OpLocDistrict'].value&&doc['OpLocDistrict'].value.substring(0,2)=='` + ipcity + `') return 1 else return 0"
+						      }
+						    }
+						  }
+						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","OpStateName","s_servicenames","s_action","OpLocDistrict"]
+						,"from":0,
+						"size":` + fmt.Sprintf("%v", perPage) + `,
+						  "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
+						}`
+				}
+			}
+		}
+	}
+	if !tempBisOne {
+		if city != "" && city != "0" {
+			//fmt.Println("city:", city)
+			str += `{"prefix":{"OpLocDistrict":"` + city + `"}}`
+		}
+		//行业分类
+		c_hfl := querymap["c_hfl"]
+
+		if c_hfl != "" && c_hfl != "0" {
+			if len(str) > 0 {
+				str += ","
+			}
+			str += `{"term":{"IndustryPhy":"` + c_hfl + `"}}`
+		}
+
+		//资本
+		c_zb := querymap["c_zb"]
+		if c_zb != "" && c_zb != "0" {
+			cs := strings.Split(c_zb, "-")
+			if len(cs) == 1 {
+				if len(str) > 0 {
+					str += ","
+				}
+				str += `{"range":{"RegCap":{"gte":` + cs[0] + `}}}`
+			} else if len(cs) == 2 {
+				if len(str) > 0 {
+					str += ","
+				}
+				str += `{"range":{"RegCap":{"gte":` + cs[0] + `,"lt":` + cs[1] + `}}}`
+			}
+
+		}
+		//企业类型
+		c_qfl := ``
+		if c_qfl != "" && c_qfl != "0" {
+			if len(str) > 0 {
+				str += ","
+			}
+			str += `{"term":{"EntType":"` + c_qfl + `"}}`
+		}
+
+		//认证
+		c_author := querymap["c_author"]
+		if c_author == "Y" {
+			if len(str) > 0 {
+				str += ","
+			}
+			str += `{
+				"terms":{"enterprise.s_action":["01"]}
+			}`
+
+			/**
+					str += `{
+			          "match": {
+			            "enterprise.s_action": {
+			              "query":"` + "01" + `",
+			              "operator": "and"
+			            }
+			          }
+			        }`
+					**/
+		}
+		queryShould := ""
+
+		if len(keyword) > 0 {
+			if len(queryShould) > 0 {
+				queryShould += ","
+			}
+			queryShould = `{
+	          "match": {
+	            "enterprise.EntName": {
+	              "query":"` + keyword + `",
+	              "operator": "and",
+				  "boost":2
+	            }
+	          }
+	        },
+			{
+	          "match": {
+	            "enterprise.OpScope": {
+	              "query":"` + keyword + `",
+	              "operator": "and"
+	            }
+	          }
+	        },
+			{
+	          "match": {
+	            "enterprise.s_synopsis": {
+	              "query":"` + keyword + `",
+	              "operator": "and"
+	            }
+	          }
+	        },
+			{
+	          "match": {
+	            "enterprise.stock": {
+	              "query":"` + keyword + `",
+	              "operator": "and"
+	            }
+	          }
+	        },
+	        {
+	          "term": {
+	            "RegNo":"` + keyword + `"
+	          }
+	        },
+	        {
+	          "match_phrase": {
+	            "LeRep": "` + keyword + `"
+	          }
+	        }`
+		} else {
+			sort = `{"OpSint":"desc","RegCap":"desc"}`
+		}
+
+		tempQuery = `{"query": {
+	    "bool": {
+		  "must":[` + str + `],
+		  "must_not": { "terms" : {"SourceType" :["03","04"]}},
+	      "should": [` + queryShould + `],
+	      "minimum_should_match": 1
+	    }
+	  }}`
+		query = tempQuery[:len(tempQuery)-1] +
+			`,"highlight":{
+        "pre_tags":["<span class='highlight'>"],
+        "post_tags":["</span>"],
+        "fields":{
+            "EntName":{"force_source": true},
+			"LeRep":{"force_source": true},
+			"s_servicenames":{"force_source": true},
+			"RegNo":{"force_source": true},
+			"OpScope":{"force_source": true},
+			"s_synopsis":{"force_source": true},
+			"stock":{"force_source": true}
+        }
+    },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","OpStateName","s_servicenames","s_action","OpLocDistrict","s_submitid"]
+	,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
+	"size":` + fmt.Sprintf("%v", perPage) +
+			`,"sort":[` + sort + `] }`
+
+		total = elastic.Count("enterprise", "enterprise", tempQuery)
+	}
+	if total > 500 {
+		total = 500
+	}
+	//查询列表数据
+	client := elastic.GetEsConn()
+	defer elastic.DestoryEsConn(client)
+	if client == nil {
+		return nil, nil
+	}
+	searchResult, err := client.Search().Index("enterprise").Type("enterprise").Source(query).Do()
+	if err != nil {
+		return nil, nil
+	}
+	var res []map[string]interface{}
+	if searchResult.Hits != nil {
+		resNum := len(searchResult.Hits.Hits)
+		res = make([]map[string]interface{}, resNum)
+		for i, hit := range searchResult.Hits.Hits {
+			json.Unmarshal(*hit.Source, &res[i])
+			//查询结果数据加工处理
+			for k, v := range hit.Highlight {
+				res[i][k] = v[0]
+			}
+
+			EntName, _ := res[i]["EntName"].(string)
+			tmpNo := res[i]["EntType"]
+			if tmpNo != nil {
+				switch tmpNo.(string) {
+				case "4500", "6800", "6810", "6820", "7100", "7110", "7120", "7130", "7190", "9200", "6840", "2100", "2110", "2120", "2121", "2122", "2123", "2130", "2140", "2150", "2151", "2152", "2190", "2200", "2210", "2211", "2212", "2213", "2219", "2220", "2221", "2222", "2223", "2229", "4000", "4300", "4310", "4320", "4330", "4340", "4550", "4551", "4552", "4553", "4560", "5800", "5810", "5820":
+					res[i]["EntType"] = "5810"
+				}
+			}
+
+			entlerp, _ := res[i]["LeRep"].(string)
+			tmpentno, _ := res[i]["RegNo"].(string)
+			if len(keyword) < 1 {
+				tmpentno = strings.Replace(tmpentno, "highlight", "", -1)
+				EntName = strings.Replace(EntName, "highlight", "", -1)
+			}
+			res[i]["RegNo"] = template.HTML(tmpentno)
+			if tmpNo == "9600" && strings.Contains(EntName, tmpentno) {
+				res[i]["EntName"] = template.HTML(strings.Replace(EntName, tmpentno, entlerp, -1))
+			} else {
+				res[i]["EntName"] = template.HTML(EntName)
+			}
+			//当企业名称为空获取企业法人的名称
+			/**ename := template.HTML(EntName)
+			if res[i]["EntName"] == nil || len(ename) == 0 {
+				res[i]["EntName"] = res[i]["LeRep"]
+			}
+			**/
+			//
+
+			id := res[i]["s_submitid"]
+			if id != nil {
+				ud := FindById("user", id.(string), `{"i_comauthenttype":1}`)
+				res[i]["i_comauthenttype"] = (*ud)["i_comauthenttype"]
+			}
+			//
+
+			res[i]["tmpentno"] = template.HTML(tmpentno)
+			LeRep, _ := res[i]["LeRep"].(string)
+			res[i]["LeRep"] = template.HTML(LeRep)
+			s_servicenames, _ := res[i]["s_servicenames"].(string)
+			res[i]["s_servicenames"] = template.HTML(s_servicenames)
+
+			OpScope, _ := res[i]["OpScope"].(string)
+			if len(OpScope) > 0 {
+				res[i]["OpScope"] = template.HTML(OpScope)
+			}
+			s_synopsis, _ := res[i]["s_synopsis"].(string)
+			if len(s_synopsis) > 0 {
+				res[i]["s_synopsis"] = template.HTML(s_synopsis)
+			}
+			stock, _ := res[i]["stock"].(string)
+			if len(stock) > 0 {
+				res[i]["stock"] = template.HTML(stock)
+			}
+
+			//EntType, _ := res[i]["EntType"].(string)
+			tmpdate, _ := res[i]["EstDate"]
+
+			//res[i]["OperatorLabel"] = getDiffName(EntType)[0]
+			if tmpdate != nil {
+				res[i]["EstDate"] = FormatDateWithObj(&tmpdate, Date_Short_Layout)
+			} else {
+				res[i]["EstDate"] = ""
+			}
+
+		}
+	}
+	//log.Println(total)
+	//生成分页
+	pagination := front.MakePagination(perPage, currentPage, int(total), querymap, "/wx/search/enterprise/"+reqType+"ent_%s.html")
+
+	if tempBisOne && len(ipcity) > 0 {
+		redis.Put("enterprise", "wx_"+ipcity+"_1", res, 5*86400)
+		redis.Put("enterprise", "wx_"+ipcity+"_2", pagination, 5*86400)
+	}
+	return &res, &pagination
+
+}

+ 2 - 0
core/src/qfw/yellowpage/yellowpage.go

@@ -12,6 +12,8 @@ import (
 type Yellowpage struct {
 	*xweb.Action
 	//进入企业黄页
+	wxenterpriseInfo xweb.Mapper `xweb:"/wx/enterprise/(\\w+).html"`
+	//进入企业黄页
 	enterpriseInfo xweb.Mapper `xweb:"/enterprise/(\\w+).html"`
 	//根据企业注册号进入企业黄页
 	enterpriseInfoByRegNO xweb.Mapper `xweb:"/enterpriseInfoByRegNO/(\\w+).html"`

+ 135 - 7
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -83,14 +83,17 @@ func GetEntInfo(id string) interface{} {
 		if OpFrom != nil {
 			(*res)["EstDate"] = FormatDate(&EstDate)
 		}
-		EntType, _ := (*res)["EntType"].(string)
-		//处理分公司
-		if EntType != "" {
-			if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
-				(*res)["EntType"] = "5810"
-			} else if len(EntType) > 1 {
-				if EntType[:1] == "2" {
+		var EntType string
+		if (*res)["EntType"] != nil && (*res)["EntType"].(string) != "" {
+			EntType = (*res)["EntType"].(string)
+			//处理分公司
+			if EntType != "" {
+				if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
 					(*res)["EntType"] = "5810"
+				} else if len(EntType) > 1 {
+					if EntType[:1] == "2" {
+						(*res)["EntType"] = "5810"
+					}
 				}
 			}
 		}
@@ -122,6 +125,131 @@ func GetEntInfo(id string) interface{} {
 	}
 	return nil
 }
+func WxGetEntInfo(id string, flag bool) interface{} {
+	res := FindById("enterprise", id, `{"RegNo":1, "EntName":1, "EntType":1, "EntTypeName":1, "OpLocDistrict":1, "LeRep":1, "LegCerNO":1, "Tel":1, "Dom":1, "OpScope":1, "OpFrom":1, "OpTo":1, "RegCap":1, "EstDate":1, "CompForm":1, "CompFormName":1, "OpState":1, "OpStateName":1, "RegOrgName":1, "IssBLicDate":1, "Timestamp":1, "s_synopsis":1, "SourceType":1, "s_weixin":1, "s_enturl, "i_province":1, "i_city":1, "i_area":1,"s_action":1,"s_persion":1,"s_mobile":1,"s_address":1,"s_avatar":1,"s_microwebsite":1,"s_qq":1,"s_submitid":1}`)
+	if res != nil {
+		id := (*res)["s_submitid"]
+		if id != nil {
+			ud := FindById("user", id.(string), `{"i_comauthenttype":1}`)
+			(*res)["i_comauthenttype"] = (*ud)["i_comauthenttype"]
+		}
+		opl, _ := (*res)["OpLocDistrict"].(string)
+		if len(opl) >= 2 {
+			if v, ok := city_map[opl[:2]]; ok {
+				(*res)["OpLoc"] = v
+			}
+		}
+		syno, _ := (*res)["s_synopsis"].(string)
+		(*res)["s_synopsis"] = template.HTML(syno)
+		ty, _ := (*res)["SourceType"].(string)
+		if ty == "01" {
+			(*res)["gs"] = true
+		} else {
+			(*res)["gs"] = false
+		}
+		OpFrom := (*res)["OpFrom"]
+		if OpFrom != nil {
+			(*res)["OpFrom"] = FormatDate(&OpFrom)
+		}
+		OpTo := (*res)["OpTo"]
+		if OpFrom != nil {
+			(*res)["OpTo"] = FormatDate(&OpTo)
+		}
+		IssBLicDate := (*res)["IssBLicDate"]
+		s_action := (*res)["s_action"]
+		if s_action == nil || s_action == "" {
+			(*res)["s_action"] = "N"
+		}
+		if OpFrom != nil {
+			(*res)["IssBLicDate"] = FormatDate(&IssBLicDate)
+		}
+		EstDate := (*res)["EstDate"]
+		if OpFrom != nil {
+			(*res)["EstDate"] = FormatDate(&EstDate)
+		}
+		//查询企业关系
+		//relation := Find("entrelation", &map[string]interface{}{
+		//	"aid": ObjectIdHex(id),
+		//}, nil, nil, false, -1, -1)
+		EntType, _ := (*res)["EntType"].(string)
+		//处理分公司
+		if EntType != "" {
+			if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
+				(*res)["EntType"] = "5810"
+			} else if len(EntType) > 1 {
+				if EntType[:1] == "2" {
+					(*res)["EntType"] = "5810"
+				}
+			}
+		}
+		en, _ := (*res)["EntName"].(string)
+		if en == "" {
+			(*res)["EntName"] = (*res)["LeRep"]
+		}
+		//
+		(*res)["EntTypeLabel"] = (mobile.GetDiffName(EntType))[0]
+		if flag {
+			RegNo, _ := (*res)["RegNo"].(string)
+			relation := makeRelation(RegNo, en)
+			if relation != nil {
+				(*res)["relation"] = relation
+			}
+		}
+
+		(*res)["entid"] = id
+		return *res
+	}
+	return nil
+}
+
+//企业黄查询结果
+func (yp *Yellowpage) WxenterpriseInfo(id string) error {
+	//redisEnt := redis.Get("ent", "Key")
+	id = strings.Split(id, "#")[0]
+	//没有登录
+	key := "wx_enterpriseInfo_" + id
+	//登录并认证
+	keyuser := "wx_enterpriseInfo_user_" + id
+	//登录没有认证
+	keyunrzuser := "wx_enterpriseInfo_unrzuser_" + id
+	if yp.GetSession("userId") == nil {
+		//用户没有登录
+		if ret, err := redis.GetBytes("enterprise", key); err == nil {
+			return yp.SetBody(*ret)
+		} else {
+			yp.T["res"] = WxGetEntInfo(id, false)
+			content, err := yp.Render4Cache("/yellowpage/ungxenterpriseinfo.html", &yp.T)
+			if err == nil {
+				redis.PutBytes("enterprise", key, &content, ONEDAY)
+			}
+			return yp.SetBody(content)
+		}
+	} else if util.IntAll(yp.GetSession("identWay")) == 1 {
+		//已认证
+		if ret, err := redis.GetBytes("enterprise", keyuser); err == nil {
+			return yp.SetBody(*ret)
+		} else {
+			yp.T["res"] = WxGetEntInfo(id, true)
+			contentuser, erruser := yp.Render4Cache("/yellowpage/wxentinfo.html", &yp.T)
+			if erruser == nil {
+				redis.PutBytes("enterprise", keyuser, &contentuser, ONEDAY)
+			}
+			return yp.SetBody(contentuser)
+		}
+	} else {
+		//用户没有认证登录
+		if ret, err := redis.GetBytes("enterprise", keyunrzuser); err == nil {
+			return yp.SetBody(*ret)
+		} else {
+			yp.T["res"] = WxGetEntInfo(id, false)
+			contentuser, erruser := yp.Render4Cache("/yellowpage/unrzenterpriseinfo.html", &yp.T)
+			if erruser == nil {
+				redis.PutBytes("enterprise", keyunrzuser, &contentuser, ONEDAY)
+			}
+			return yp.SetBody(contentuser)
+		}
+	}
+}
 
 //企业黄查询结果
 func (yp *Yellowpage) EnterpriseInfo(id string) error {

+ 1 - 1
core/src/web/staticres/css/dev-qfw.css

@@ -2676,7 +2676,7 @@ style="color:#D03102;margin-right:5px;"
 	}
 	.a-header .a-h-search {
   		width: 100%;
-		padding-right: 50px;
+		padding-left: 15px;
 	}
 	.a-header .a-h-search .input-group{
 		height: auto;

+ 2 - 1
core/src/web/staticres/css/entcommunity.css

@@ -116,7 +116,8 @@ a:focus, a:hover{
 	color: #16a086;
 }
 .entinfo-page .b-com-head .b-com-title{
-	font-size: 18px;
+	font-size: 20px;
+	color: #405e51;
 	font-weight: bold;
 	margin-right: 5px;
 }

+ 5 - 3
core/src/web/staticres/js/entportrait.js

@@ -4,7 +4,7 @@ var serviceList = null;
 //解析服务列表
 $(function(){
 	//联系地址
-	if(address){
+	if($address){
 		loadJS("/js/jquery.cxselect.js",function(){
 			$('#city_china').cxSelect({
 				selects: ['province', 'city', 'area'],
@@ -72,22 +72,24 @@ function b_afterLogin(flag){
 //加载关系网
 function initRelation(){
 	if(isLogined){
+		$(".entrelation").height(500);
 		$.post("/member/getRelation",{regNo:regNo,entName:entName},function(r){
 			if(r.flag == false){
 				$("#entrelation-nologin").addClass("hide");
 				$("#entrelation-limit,#entrelation-noauthe").removeClass("hide");
 				$("#entrelation-infovis").hide();
+				$(".entrelation").css("height","auto");
 			}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)){
 				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				relation = "";
 				$("#entrelation-infovis").hide();
 				$("#entrelation-findnull").removeClass("hide");
+				$(".entrelation").css("height","auto");
 			}else{
+				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				loadJS("/js/d3.v3.min.js",function(){
 					loadJS("/js/geometry.js",function(){
 						loadJS("/js/relation.js",function(){
-							$("#entrelation-limit,#entrelation-nologin").addClass("hide");
-							$(".entrelation").height(500);
 							relation = new Relation(legcerNo,regNo,r.relation);
 							relation.init();
 						});

+ 6 - 2
core/src/web/staticres/js/qfw.js

@@ -86,7 +86,7 @@ function makeData(d,_this,b){
 			s=$("<div id='immediately' style='position:absolute;top:40px;display:none;z-index:9999;width:"+w+"px'/>")
 			s.appendTo(_this.parent())
 			_this.blur(function(event){
-				$("#immediately").animate({opacity:"toggle"},700);
+				//$("#immediately").animate({opacity:"toggle"},700);
 			})
 		}
 		s.html(res).show()
@@ -140,7 +140,11 @@ function makeImmediately(data,b){
 		for(var i=0;i<data.length;i++){
 			var ds=data[i].split("_")
 			//res+="<div onclick='iq(this)'>"+ds[0]+"</div>"
-			res+="<div onclick='window.open(\"/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
+			if($("#loginStatus").length == 1){
+				res+="<div onclick='window.open(\"/wx/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
+			}else{
+				res+="<div onclick='window.open(\"/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
+			}
 		}
 		if(b){
 			res+=delLog

+ 1 - 1
core/src/web/staticres/js/relation.js

@@ -110,7 +110,7 @@ Relation.prototype.dataProcess = function(){
 			if(text.length > 2){//小于两个字符不生效
 				nodeObj.shortText = text;
 			}
-			if(nodeObj.name == this.regno){//先找本企业位置
+			if(nodeObj.name == this.regNo){//先找本企业位置
 				this.index = i;
 				nodeObj["regcap"] = (typeof(d1) == "undefined")?0:d1;
 				nodeObj["legcerno"] = this.legcerNo;

+ 333 - 0
core/src/web/staticres/wxent/qfw-enterprise.css

@@ -0,0 +1,333 @@
+/*========================企业名片列表页样式========================*/
+.qfw-row { margin-left: 0px; margin-right: 0px;}
+#titleactionimgs  img{margin-left:15px;width:18px;height:18px;}
+#titleactionimgs  h3{font-family: "微软雅黑 Regular", "微软雅黑";font-weight: normal;}
+
+.qfw-p-margintoplist{margin-top:10px;background-color: #fff;}
+.qfw-p-margintop{margin-top:10px;background-color: #fff;filter: alpha(Opacity=95);-moz-opacity: 0.95;opacity: 0.95;}
+.qfw-row-marginbottom{margin-bottom:10px;}
+span.highlight {
+    text-decoration: inherit;
+}
+/******查询条件*******/
+.rowFl{
+	position:relative;
+	margin-top: 20px;
+	padding-bottom: 20px;
+}
+.rowFlTip{
+	padding-left: 25px;
+}
+.rowFltt{
+	border-bottom:1px solid #ddd;
+}
+.rowsolid-bottom{
+	border-bottom:1px solid #CCCCCC;	
+}
+.rowFltt .qfw-text-more{position:absolute;right:10px;top:7px;cursor:pointer;}
+.tt{
+	width:90px;
+	padding-left: 15px;
+}
+.city_china{
+	font-size:12px;
+}
+.city_china select{
+	border-bottom:1px dashed #CCCCCC;
+}
+.less{
+	height:20px;
+	overflow:hidden
+}
+.ttcon{
+	width:85%;
+	font-size:12px;
+	vertical-align:top
+}
+.ttcon ul{
+	display:inline-block;
+}
+.ttcon ul li{
+	display:inline-block;
+	margin-right:35px;
+	height:25px;
+	line-height:25px;
+	cursor:pointer;
+	margin-top:-2px;
+}
+.ttcon ul li:hover{
+	color:#DE5E4E
+}
+.sel{
+  width: 20%;
+  min-width:80px;
+  max-width:180px;
+  height: 25px;
+
+  font-size: 14px;
+  color: #555;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+
+/******注册资本、认证*******/
+#navs {position:relative}
+#navs .renzheng {position:absolute;right:10px;bottom:0px;}
+/******列表详细信息*******/
+.borderB .qfw-entcontent-padding{padding:10px 20px;line-height: 25px;}
+.qfw-entcontent-padding .lineb a{font-size:16px;}
+.borderB .qfw-entcontent-padding div span{padding-right: 0px;}
+
+.qfw-entcontent-padding div span{padding-right: 30px;}
+
+/*========================企业名片信息页样式========================*/
+@media (max-width: 768px) {
+	body{
+		font-size: 12px;
+	}
+	/****企业名片信息页样式****/
+	.qfw-entinfo-padding41 {
+	    padding: 0px 5px;
+	}
+}
+#entinfobg {
+	height:auto;
+	background: url("/images/qmx_ent_bgimg.png") ;
+	filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";  
+-moz-background-size:100% 100%;  
+    background-size:100% 100%; 
+	min-height:720px; 
+}
+#entinfobg .a-content {    
+ margin:0px auto;
+}
+#entinfobg div h3{color:#fff}
+/***标题微信图标***/
+h3 .icon_gray{color: #DA4816;font-size: 18px;}
+h4 .icon_gray {font-size:21px; color: #999;width: 25px;}
+h4 b {color: #999;}
+.qfw-entinfo-padding41{padding:10px 40px;}
+.qfw-entinfo-padding41 .tablediv{margin-top:10px;}
+.tablediv .rowcontent{line-height: 25px;}
+.tablediv .rowcontent .one .icon_gray {font-size:18px; color: #999;width: 32px;}
+.tablediv .rowcontent .two .span999 {color: #999}
+#our .tablediv .rowcontent .two{width:80px; }
+#our .tablediv .rowcontent .twoshort{width:81px; word-spacing: 14px;letter-spacing: 13px;}
+#our .tablediv .rowcontent .three{word-wrap: break-word; word-break: break-all;position: relative;}
+#our .tablediv .rowcontent .four {left:50%;;position:absolute;}
+#our .tablediv .rowcontent .four span{color:rgb(221, 72, 20); font-weight:normal;}
+.tablediv .rowcontent .three .span999 {color: #999;}
+.tablediv .rowcontent .three  { word-wrap: break-word; word-break: break-all;position: relative;}
+.tablediv .rowcontent .four span{color:rgb(221, 72, 20); font-weight:normal;}
+.tablediv .rowcontent .four {left:50%;;position:absolute;}
+.service_des .text-muted{word-wrap: break-word;word-break: break-all;text-overflow: ellipsis;height: 77px;overflow: hidden;}
+form{margin-bottom: 0px;}   
+/***********关系网*************/
+#gxw_bs{float:left;height:500px;}
+.legend-text-bg>div {
+    position: absolute;
+    display: inline-block;
+    border-radius: 5px;
+    width: 80px;
+	height: 25px;
+    line-height: 25px;
+    text-align: center;
+	margin-top: -3px;
+	z-index: -1;
+}
+.legend-text-bg>span{
+	position: relative;
+}
+/*全屏代码*/
+#infovis .controlls{
+	position: absolute;
+	margin-top: 10px;
+}
+#infovis .controlls .item{
+	border-radius: 2px;
+	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
+	cursor: pointer;
+	margin-bottom: 8px;
+	float:left;
+}
+#infovis .controlls .ico_box{
+	padding:10px;
+	float:left;
+}
+#infovis .controlls .ico_box div{
+	background: url(/images/view_icons.png) no-repeat;
+	width: 16px;
+	height: 16px;
+	opacity: 0.6;
+}
+:-moz-full-screen #infovis,:-webkit-full-screen #infovis,:-o-full-screen #infovis,
+:-ms-full-screen #infovis,:fullscreen #infovis,:-ms-fullscreen #infovis,:full-screen #infovis{
+  width: 100%;
+  height: 100%;
+  background-color:#fff;
+}
+:-moz-full-screen {
+	background: #fff; 
+}
+:-webkit-full-screen {
+	background: #fff; 
+}
+:-o-full-screen{
+	background: #fff; 
+}
+:-ms-full-screen{
+	background: #fff; 
+}
+:fullscreen {
+	background: #fff; 
+} 
+:-ms-fullscreen {
+	background: #fff; 
+} 
+:full-screen {
+	background: #fff; 
+}
+/***********企业服务信息加载更多*************/
+#loadMore{cursor:pointer;background-color:#999;height:30px;line-height:30px;color:white}
+
+/*========================后台企业名片信息展示页样式========================*/
+#editOur{float:right; text-decoration: none; font-size: 14px; font-weight: 700;}
+#addService{margin:15px; background-color: #DD4814;border-color: #DD4814;}
+.tpsc_btnsize{height:38px;}
+.msite-checkbox{padding-top: 30px; line-height:25px;}
+.black_overlay{ 
+    display: none; 
+    position: absolute; 
+    top: 0%; 
+    left: 0%; 
+    width: 100%; 
+    height: 200%; 
+    background-color: black; 
+    z-index:1001; 
+    -moz-opacity: 0.8; 
+    opacity:.80; 
+    filter: alpha(opacity=88); 
+} 
+.white_content { 
+    display: none; 
+    position: absolute; 
+    top: 25%; 
+    left: 25%; 
+    width: 55%; 
+    height: 55%; 
+    padding: 20px; 
+    border: 5px solid #dd4814; 
+    background-color: white; 
+    z-index:1002; 
+    overflow: auto; 
+} 
+.closeshowmap{
+ 	display: none; 
+    position: absolute; 
+    top: 25%; 
+    left: 79%; 
+    float:right;
+    margin:5px 5px 0px 0px; 
+    background-color: white; 
+    z-index:1003; 
+    overflow: auto; 	
+}
+
+.col-sm-8 .qmx-price{height:40px;padding: 8px 12px;font-size: 14px;    border-radius: 4px;    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;line-height: 1.42857143; color: #333; background-color: #fff;background-image: none;border: 1px solid #ccc;}	
+#service_list td{border-bottom: 1px solid #ddd;border-top: 0px solid #ddd;}
+#service_list .service_row{margin-left: 0px;margin-right: 0px;}
+#service_list .service_row .linebser{ padding-left: 40px;font-size: 14px;}
+ /**添加服务中上传图片上的删除按钮**/
+.delbtn {
+    background-image: url("/images/cancel-circle.png");
+    position: absolute;
+    margin: 1px 0px 0px -12px;
+    cursor: pointer;
+    width: 12px;
+    height: 12px;
+    background-size: 12px 12px;
+}
+.select-control {
+    height: 34px;
+	width: 126px;
+    padding: 6px 12px;
+    font-size: 14px;
+    line-height: 1.42857143;
+    color: #555;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
+    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+}
+
+
+/*========================后台企业名称编辑页========================*/
+#editent .tablediv{
+	margin-top:10px;
+	width:100%;
+}
+#editent .one{
+	width:32px;
+}
+#editent .two{
+	width:70px;
+}
+#editent .three .form-control{
+	display: inline;
+	width:40%;
+}
+
+/*========================后台添加编辑服务页=======================*/
+#service .tablediv{
+	margin-top:10px;
+	width:100%;
+}
+
+#service .two{
+	width:112px;
+	font-weight: bold;
+	text-align: right;
+}
+
+#service .three .form-control{
+	display: inline;
+	width:40%;
+}
+.identactionType{
+	color: #ffffff;
+}
+/*手机样式*/
+@media (max-width: 768px) {
+	#entinfobg{
+		background-image: none;
+		min-height: inherit;
+		margin-bottom: 20px;
+	}
+	#entinfobg div h3{
+		color: inherit;
+	}
+	.qfw-entinfo-padding41{
+		padding: 10px;
+	}
+	.qfw-entinfo-padding41 h4{
+		margin: 0px;
+		margin-left: -5px;
+	}
+	.qfw-entinfo-padding41 hr{
+		margin-top: 10px;
+		margin-bottom: 0px;
+	}
+	#entinfobg .microwebsite{
+		color: #999;
+		font-size: 14px;
+	}
+	.identactionType{
+		color: #dd4814 ;
+	}
+}

+ 1636 - 0
core/src/web/staticres/wxent/qfw-enterprise.js

@@ -0,0 +1,1636 @@
+
+var c_hfl=[["全部","0"],["农、林、牧、渔业","A"],["采矿业","B"],["制造业","C"],["住宿和餐饮业","H"],["信息传输、软件和信息技术服务业","I"],["金融业","J"],["房地产业","K"],["租赁和商务服务业","L"],["科学研究和技术服务业","M"],["水利、环境和公共设施管理业","N"],["居民服务、修理和其他服务业","O"],["教育","P"],["卫生和社会工作","Q"],["文化、体育和娱乐业","R"],["公共管理、社会保障和社会组织","S"],["电力、热力、燃气及水生产和供应业","D"],["建筑业","E"],["批发和零售业","F"],["交通运输、仓储和邮政业","G"]]
+var c_zb=[["全部","0"],["10W以下","0-10"],["10w-100w","10-100"],["100w-1000w","100-1000"],["1000万-1亿","1000-10000"],["1亿以上","10000"]]
+var c_qfl=[["全部","0"],["股份有限公司分公司(上市、外商投资企业投资)","2211"],["普通合伙企业","4531"],["农民专业合作经济组织","9100"],["个体工商户","9600"],["有限责任公司(自然人投资或控股)","1130"]]
+var template = "<tr><td><div class='contentbg borderB' ><div><a target='_blank' href='/enterprise/${_id}.html'>${EntName}</a>${s_action}</div>"+
+"<div><small>注册号:${RegNo}</small><small>${label}:${LeRep}</small><small>登记机关:${RegOrgName}</small><small>成立日期:${EstDate}</small></div>"+
+"${s_servicenames}</div></td></tr>";	
+var citySim=[{k:11,n:"北京市"},{k:12,n:"天津市"},{k:13,n:"河北省"},{k:14,n:"山西省"},{k:15,n:"内蒙古"},{k:21,n:"辽宁省"},{k:22,n:"吉林省"},{k:23,n:"黑龙江省"},{k:31,n:"上海市"},{k:32,n:"江苏省"},{k:33,n:"浙江省"},{k:34,n:"安徽省"},{k:35,n:"福建省"},{k:36,n:"江西省"},{k:37,n:"山东省"},{k:41,n:"河南省"},{k:42,n:"湖北省"},{k:43,n:"湖南省"},{k:44,n:"广东省"},{k:45,n:"广西"},{k:46,n:"海南省"},{k:50,n:"重庆市"},{k:51,n:"四川省"},{k:52,n:"贵州省"},{k:53,n:"云南省"},{k:54,n:"西藏"},{k:61,n:"陕西省"},{k:62,n:"甘肃省"},{k:63,n:"青海省"},{k:64,n:"宁夏"},{k:65,n:"新疆"},{k:71,n:"台湾省"},{k:81,n:"香港"},{k:82,n:"澳门"}];
+
+
+//点击关闭微信版企明星
+function colseWeixin(){document.getElementById('weixintu').style.visibility = 'hidden';}
+
+$(function(){
+	//点击回车执行搜索
+	$(document).keydown(function(event){
+	    if(event.keyCode == 13){
+	        $("#c_words").click()
+	    }
+	});
+});
+
+function getCityN(code){
+	if(code){
+		var n=code.substring(0,2)
+		for(var i=0;i<citySim.length;i++){
+			if (citySim[i].k==n) {
+				return citySim[i].n;
+			}
+		}
+	}
+	return "";	
+}
+
+
+function reloadData(obj,name){
+
+	name=name||obj.attr("name")
+	var val=(obj.attr("value")||obj.val());
+	
+	if (val==0) val=""
+	if(name=="city"&&!val){
+		var pids=obj.attr("id")
+		if(pids=="c_area"){
+			var v=obj.prev("select").val()
+			if(!v){
+				v=obj.prev("select").prev("select").val()
+			}
+			if(v){
+				val=v
+			}
+			
+		}else if(pids=="c_city"){
+			var v=obj.prev("select").val()
+			if(v){
+				val=v
+			}
+		}
+		
+	}else if(name=="c_author"){
+		if(!obj.prop("checked")){
+			val="";
+		}
+	}
+	//调整value 值
+	if(val==10){
+		val = "10-100"
+	}else if(val ==100){
+		val = "100-1000"
+	}else if(val ==1000){
+		val = "1000-10000"
+	}
+	
+	
+	//搜索表单提交
+	$("#searchForm input[name="+name+"]").val(val);
+	
+    document.forms['searchForm'].submit();
+}
+
+function setLocation(entsel,serviceloc){
+	//所在地处理
+	var le  =  entsel.length
+	var sel1 = "";
+	var sel2 = "";
+	var sel3 = "";
+	if (le == 2) {
+	 sel1 = entsel.substring(0,2);
+	 sel2 = 0;
+	 sel3 = 0;
+	}else if (le == 4){
+	 sel1 = entsel.substring(0,2);
+	 sel2 = entsel.substring(0,4);
+	 sel3 = 0;
+	}else{	
+	 sel1 = entsel.substring(0,2);
+	 sel2 = entsel.substring(0,4);
+	 sel3 = entsel.substring(0,6);
+	}
+	$.cxSelect.setVal(sel1,sel2,sel3);
+	if(serviceloc){	
+		//添加编辑服务中的省
+		$("#servicecity_china .province option").each(function(){
+			if(sel1 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+		//添加编辑服务中的市
+		$("#servicecity_china .city option").each(function(){
+			if(sel2 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+		//添加编辑服务中的县
+		$("#servicecity_china .area option").each(function(){
+			if(sel3 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+	}
+}	
+cityMouse="";
+$(function(){
+	
+	////推荐企业
+	loadImg(1);
+	//行业类别  注册资本 加载
+	makeFl();
+	//所在地信息加载
+	if($chiancity){
+		$('#city_china').cxSelect({
+			selects: ['province', 'city', 'area'],
+			required:0,
+			somep:true,
+			someps:[41,45]
+		});
+		setLocation(entsel)
+	}
+	
+	
+	//处理点击重新加载
+	$("div[id^=c_] li,li[id^=c_],input[id^=c_]").click(function(){
+		
+		if(this.id=="c_words"){
+			reloadData($("#header-searchInputs"))	
+		}else{
+			reloadData($(this))	
+		}	
+	})
+	
+	$("select[id^=c_]").click(function(){
+		cityMouse=this.id
+	}).change(function(){
+		if(this.id==cityMouse){
+			reloadData($(this),"city")			
+		}
+	})	
+
+	//处理选择样式
+	$("div[id^=c_] li").click(function(){
+		$("li",$(this).closest("div")).removeClass("text-primary");
+		$(this).addClass("text-primary");
+	})
+	//搜索关键字
+	var words=""
+	
+	if(btempwords){
+		words=btempwords
+		$("#header-searchInput").val(words);
+	}
+	
+	
+})
+function makeFl(){
+	//行业类别
+	$(["c_hfl"]).each(function(i,ad){
+		var str="<ul>";
+		var tmp=eval(ad)
+		for(var i=0;i<tmp.length;i++){
+		    var val = chf1;
+			if (val !=""){
+			if (val == tmp[i][1]){
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' class='text-primary'>"+tmp[i][0]+"</li>"
+			var j ="J"
+			if (val > j || val == "D" || val == "E" || val == "F" || val == "G"  ){
+			$("#c_hfl").next().find("small").text("收起<")
+			$("#c_hfl").removeClass("less")
+			
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"'>"+tmp[i][0]+"</li>"
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' "+(i==0?"class='text-primary'":"")+">"+tmp[i][0]+"</li>"
+			}
+			
+		}
+		str+="</ul>"
+		$("#"+ad).html(str)
+	})
+	//注册资本
+	$(["c_zb"]).each(function(i,ad){
+		var str="<ul>";
+		var tmp=eval(ad)
+		
+		for(var i=0;i<tmp.length;i++){
+		    var val = czb;
+			var livtemp= tmp[i][1]+"";
+			if (val !=""){
+			if (val == tmp[i][1]){
+			str+="<li name='"+ad+"' value='"+livtemp+"' class='text-primary'>"+tmp[i][0]+"</li>"
+			}else{
+			str+="<li name='"+ad+"' value='"+livtemp+"'>"+tmp[i][0]+"</li>"
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+livtemp+"' "+(i==0?"class='text-primary'":"")+">"+tmp[i][0]+"</li>"
+			}
+			
+		}
+		str+="</ul>"
+		$("#"+ad).html(str)
+	})
+}
+function less(obj){
+	pred=$(obj).prev()
+	obj=$(obj).find("small")
+	var text=obj.text()
+	if(text=="更多>"){
+		obj.text("收起<")
+		pred.removeClass("less")
+	}else{
+		obj.text("更多>")
+		pred.addClass("less")
+	}
+	
+}
+//推荐企业
+function loadImg(n){
+	var str=""
+	for(var i=0;i<n;i++){
+		str+="<img src='/images/right_ad.png'>"
+	}
+	$("#tjqy").html(str)
+}
+//当前位置
+function currPos(){
+	return [["企业社区","/search/enterprise/ent.html"]]
+}
+function GetDiffName(i)  {
+	ret=["法定代表人"]
+	//ret=["法定代表人","住所","成立日期"]
+	switch (i) {
+		case  "9600":
+		{
+			ret[0] = "经营者"
+			//ret[1] = "经营场所"
+			//ret[2] = "注册日期"
+			break;
+		}
+		case "4500":
+		case "6800":
+		case "6810":
+		case "6820":
+		case "7100":
+		case "7110":
+		case "7120":
+		case "7130":
+		case "7190":
+		case "9200":
+		case "6840":
+		case "2100":
+		case "2110":
+		case "2120":
+		case "2121":
+		case "2122":
+		case "2123":
+		case "2130":
+		case "2140":
+		case "2150":
+		case "2151":
+		case "2152":
+		case "2190":
+		case "2200":
+		case "2210":
+		case "2211":
+		case "2212":
+		case "2213":
+		case "2219":
+		case "2220":
+		case "2221":
+		case "2222":
+		case "2223":
+		case "2229":
+		case "4000":
+		case "4300":
+		case "4310":
+		case "4320":
+		case "4330":
+		case "4340":
+		case "4550":
+		case "4551":
+		case "4552":
+		case "4553":
+		case "4560":
+		case "5800":
+		case "5810":
+		case "5820":{
+			ret[0] = "负责人"
+			//ret[1] = "营业场所"
+			//ret[2] = "成立日期"
+			break;
+		}
+	}
+	return ret
+}
+
+
+
+
+/////////////////////企业名片详细信息页js代码///////////////////////
+//判断是否为企业名片列表页
+if(!$listent){
+	$(function(){	
+	//联系地址
+	if($chiancity){
+		setcxSelect();	
+		var pt=province?($("#provincesel option[value="+province+"]").text()+" "):"";
+		var ct=city?($("#citysel option[value="+city+"]").text()+" "):"";
+		var at=area?($("#areasel option[value="+area+"]").text()+" "):"";
+		//设置地图上显示的位置
+		$("#location").attr("value",as1);
+		$("#cityname").attr("value",pt.trim()+ct.trim()+at.trim());		
+		
+		//获取地图的经纬度
+		doOptions();
+		$("#city_china").text(pt+ct+at+as1);
+	}else{	
+		setcxSelect();
+	}
+	
+	//公式信息是否显示
+	if(!$gs){
+		$("#ags").parent().hide();
+		$("#gs").hide();
+	}
+		
+	//关系网的设置
+	if($relationlen>0&&typeof($("#gx").css("width")) != "undefined"){
+		var zoomlevel=1;
+		var w = parseInt($("#gx").css("width").replace("px","")) - 10;
+		$("#infovis").css("width",w+"px");
+		var h = $("#infovis").height();
+		$(".controlls").css({left:$("#infovis").offset().left+w-$(".controlls").width()-10});
+		//查找逻辑
+		var index=-1;
+		var reg = new RegExp(/(有限公司|有限责任公司|股份有限公司|总公司|分公司|公司|事务所|合伙企业)$|\(.*\)|\(.*\)/g);
+		var provinces = [];
+		$.ajax({
+			url: "/js/provinceData.min.json",
+			dataType: "json",
+			cache: true,
+			async: false,
+			success: function(json){
+				provinces = json;
+			}
+		});
+		var filterEntName = function(text){
+			this.allProvinces = "河南省、青海省、山西省、黑龙江省、安徽省、广西壮族自治区、西藏自治区";
+			this.commonReplace = function(t){
+				if(t.length > 1 && text.startWith(t)){
+					var textCopy = text.replace(new RegExp("^"+t),"");
+					if(textCopy.length > 2){
+						text = textCopy;
+					}
+					return true;
+				}
+				return false;
+			};
+			this.replaceStart = function(t,f){
+				var flag = false;
+				var minus = null;
+				if(this.commonReplace(t)){//替换省、市、县、区
+					return true;
+				}
+				if(f){//不替换
+					flag = false;
+				}else if(t.endWith("维吾尔自治区")){
+					flag = true;
+					minus = 6;
+				}else if(t.endWith("回族自治区") || t.endWith("壮族自治区") || t.endWith("特别行政区")){
+					flag = true;
+					minus = 5;
+				}else if(t.endWith("自治州") || t.endWith("自治县") || t.endWith("自治区")){
+					flag = true;
+					minus = 3;
+				}else if(t.endWith("地区")){
+					flag = true;
+					minus = 2;
+				}else if(t.endWith("省") || t.endWith("市") || t.endWith("区")){
+					flag = true;
+					minus = 1;
+				}
+				if(flag){
+					return this.commonReplace(t.substring(0,t.length-minus));
+				}
+				return false;
+			};
+			this.replaceCity = function(citys){
+				if(citys){
+					for(var c in citys){//市
+						var c_name = citys[c].n;
+						if(this.replaceStart(c_name)){
+							this.replaceAreas(citys[c].s);
+							return true;
+						}else if(this.replaceAreas(citys[c].s)){
+							return true;
+						}
+					}
+				}
+			};
+			this.replaceAreas = function(areas){
+				if(areas){
+					for(var a in areas){//县、区
+						var a_name = areas[a].n;
+						if(this.replaceStart(a_name,true)){
+							return true;
+						}
+					}
+				}
+			};
+			for(var p in provinces){//省
+				var p_name = provinces[p].n;
+				if(this.allProvinces.indexOf(p_name) == -1){
+					continue;
+				}
+				if(this.replaceStart(p_name)){
+					this.replaceCity(provinces[p].s);
+					break;
+				}else if(this.replaceCity(provinces[p].s)){
+					break;
+				}
+			}
+			return text;
+		}
+		for(var i=0;i<data.nodes.length;i++){
+			var nodeObj = data.nodes[i];
+			nodeObj.text = $.trim(nodeObj.text);
+			nodeObj.shortText = nodeObj.text;
+			if(nodeObj.type == "e" || nodeObj.type == "ce"){
+				var text = nodeObj.shortText;
+				if(text.length > 2){//先替换结尾
+					text = text.replace(reg,"");
+				}
+				if(text.length > 2){//再替换开头
+					text = filterEntName(text);
+				}
+				if(text.length > 2){//小于两个字符不生效
+					nodeObj.shortText = text;
+				}
+				if(nodeObj.name==regno){//先找本企业位置
+					index=i;
+					nodeObj["regcap"] = (typeof(d1) == "undefined")?0:d1;
+					nodeObj["legcerno"] = legcerno;
+				}
+			}
+		}
+		/*********************************连线处理***********************************/
+		var minLink=-1,maxLink=-1;
+		for(var i=0;i<data.links.length;i++){
+			var linkObj = data.links[i];
+			if(linkObj.target==index && data.nodes[linkObj.source].name==legcerno){
+				//data.nodes[linkObj.source].type="cp";
+				linkObj.type = "cp"
+				linkObj.isLegal = 1;
+			}
+			//
+			data.nodes[linkObj.target]["istarget"] = 1;
+			if(data.nodes[linkObj.source].name == data.nodes[linkObj.target].invlegcerno || data.nodes[linkObj.source].name ==	data.nodes[linkObj.target].legcerno){
+				linkObj.isLegal = 1;
+			}
+			if(typeof(linkObj.invacconam) == "undefined"){
+				continue;
+			}
+			var invacconam = new Number(linkObj.invacconam);
+			if(minLink == -1 && maxLink == -1){
+				minLink = invacconam;
+				maxLink = invacconam;
+			}else if(invacconam > maxLink){
+				maxLink = invacconam; 
+			}else if(invacconam < minLink){
+				minLink = invacconam;
+			}
+		}
+		var getLineSectionArray = function(){
+			var countSection = 6;
+			var section = (maxLink - minLink) / countSection;
+			var sectionArr = [];
+			for(var i=2;i<=countSection;i++){
+				var minVal = minLink;
+				if(sectionArr.length > 0){
+					minVal = sectionArr[sectionArr.length - 1].maxVal;
+				}
+				var maxVal = minLink+section*i;
+				if(i == countSection){
+					maxVal += section;
+				}
+				var sectionObj = {linkVal:i,minVal:minVal,maxVal:maxVal};
+				sectionArr.push(sectionObj);
+			}
+			return sectionArr;
+		}
+		/////////////
+		var linkSectionArray = getLineSectionArray();
+		for(var i=0;i<data.links.length;i++){
+			var linksObj = data.links[i];
+			linksObj["linkVal"] = 2;
+			if(typeof(linkObj.invacconam) == "undefined"){
+				continue;
+			}
+			var invacconam = new Number(linksObj.invacconam);
+			for(var s in linkSectionArray){
+				var sectionObj = linkSectionArray[s];
+				if(invacconam >= sectionObj.minVal && invacconam < sectionObj.maxVal){
+					linksObj["linkVal"] = sectionObj.linkVal;
+					continue;
+				}
+			}
+		}
+		/*********************************节点处理***********************************/
+		var minNode=-1,maxNode=-1;
+		for(var i=0;i<data.nodes.length;i++){
+			var nodeObj = data.nodes[i];
+			if(nodeObj.type == "e" || nodeObj.type == "ce"){
+				var regcap = 0;
+				if(nodeObj.istarget == 1){
+					regcap = new Number(nodeObj.regcap);
+				}else{
+					regcap = new Number(nodeObj.invregcap);
+				}
+				if(minNode == -1 && maxNode == -1){
+					minNode = regcap;
+					maxNode = regcap;
+				}else if(regcap > maxNode){
+					maxNode = regcap; 
+				}else if(regcap < minNode){
+					minNode = regcap;
+				}
+			}
+		}
+		var getNodeSectionArray = function(){
+			var countSection = 7;
+			var section = (maxNode - minNode) / countSection;
+			var sectionArr = [];
+			for(var i=1;i<=countSection;i++){
+				var minVal = minNode;
+				if(sectionArr.length > 0){
+					minVal = sectionArr[sectionArr.length - 1].maxVal;
+				}
+				var maxVal = minNode+section*i;
+				if(i == countSection){
+					maxVal += section;
+				}
+				var sectionObj = {nodeVal:6+i,minVal:minVal,maxVal:maxVal};
+				sectionArr.push(sectionObj);
+			}
+			return sectionArr;
+		}
+		var nodeSectionArray = getNodeSectionArray();
+		for(var i=0;i<data.nodes.length;i++){
+			var nodeObj = data.nodes[i];
+			nodeObj["nodeVal"] = 7;
+			if(nodeObj.type == "e" || nodeObj.type == "ce"){
+				var invacconam = new Number(nodeObj.invacconam);
+				var regcap = new Number(nodeObj.regcap);
+				for(var s in nodeSectionArray){
+					var sectionObj = nodeSectionArray[s];
+					if(regcap >= sectionObj.minVal && regcap < sectionObj.maxVal){
+						nodeObj["nodeVal"] = sectionObj.nodeVal;
+						continue;
+					}
+				}
+			}
+		}
+	//屏蔽鼠标右点击事件
+	document.getElementById("infovis").oncontextmenu=function(){return false;};
+	$("#op_fullscreen").attr("title","进入全屏视图"+((!!window.ActiveXObject || "ActiveXObject" in window)?"":" (F11)"));	
+	 //处理全屏
+	 function launchFullScreen(element) {
+	   if (element.requestFullscreen) {
+	      element.requestFullscreen();
+	    } else if (element.msRequestFullscreen) {
+	      element.msRequestFullscreen();
+	    } else if (element.mozRequestFullScreen) {
+	      element.mozRequestFullScreen();
+	    } else if (element.webkitRequestFullscreen) {
+	      element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
+	    }
+	}
+	function cancelFullScreen() {  
+		$("#op_fullscreen").attr("title","进入全屏视图"+((!!window.ActiveXObject || "ActiveXObject" in window)?"":" (F11)"));	
+		//force.linkDistance(120).charge(-200).size([w,h]).resume();
+		$("#infovis").css({width:w,height:h});
+		svg.attr("width",w).attr("height",h);
+		$(".controlls").css({left:$("#infovis").offset().left+w-$(".controlls").width()-10});
+	    if(document.exitFullscreen) {
+	      document.exitFullscreen();
+	    } else if (document.msExitFullscreen) {
+	      document.msExitFullscreen();
+	    } else if (document.mozCancelFullScreen) {
+	      document.mozCancelFullScreen();
+	    } else if (document.webkitExitFullscreen) {
+	      document.webkitExitFullscreen();
+	    }
+	} 
+	
+	$(document).on('webkitfullscreenchange mozfullscreenchange msfullscreenchange fullscreenchange', function(){
+	    if (!document.fullscreenElement &&    // alternative standard method
+	    !document.mozFullScreenElement && 
+	    !document.webkitFullscreenElement && 
+	    !document.msFullscreenElement ) {
+		//退出
+		cancelFullScreen();
+	 }});
+	 
+	   var infovisdiv = document.getElementById("infovis");
+		document.onkeydown=function(event){
+	        var e = event || window.event || arguments.callee.caller.arguments[0];
+	        if(e && e.keyCode==122){
+				event.preventDefault?event.preventDefault():window.event.returnValue = false;
+				if(!!window.ActiveXObject || "ActiveXObject" in window){//ie下F11不能用,屏蔽掉
+					if($(".exit").length == 0){
+						return;
+					}
+				}
+				initFullScreen();
+	        }else if(e && e.keyCode==27){
+				event.preventDefault?event.preventDefault():window.event.returnValue = false;
+				cancelFullScreen();
+			}
+	    };  
+	    $("#op_fullscreen").bind("click",initFullScreen);
+		function initFullScreen(){
+			var fullscreenElement =
+	        document.fullscreenElement ||
+	        document.mozFullScreenElement ||
+	        document.webkitFullscreenElement ||
+			document.msFullscreenElement;
+		    $(".ico_fullscreen").toggleClass("exit");
+			if(!fullscreenElement || fullscreenElement==null){
+				redrawflag = true;
+				$("#op_fullscreen").attr("title","退出全屏视图 (F11)");
+				launchFullScreen(infovisdiv);
+				var timeout = 100;
+				if(!!window.ActiveXObject || "ActiveXObject" in window){
+					timeout = 400;
+				}
+				setTimeout(function(){
+					//重绘
+					var w=document.body.clientWidth;
+					var h=document.body.clientHeight;
+					$("#infovis").css({width:w,height:h});
+					d3.select("svg").attr("width", w).attr("height", h);
+					$(".controlls").css({left:w-$(".controlls").width() - 10});
+					//force.linkDistance(h).charge(-700).size([w,h]).resume();
+				},timeout);
+			}else{
+				cancelFullScreen();
+			}
+		}
+	//计算点之间的距离
+	var chargeArray = [[0,10],[10,20],[20,30],[30,40],[40,50],[50,60],[60,70],[70,80],[80,90],[90,100],[100,110]];
+	var chargeVal = -1600;
+	var nodeCount = data.nodes.length;
+	for(var i in chargeArray){
+		if(nodeCount >= chargeArray[i][0] && nodeCount < chargeArray[i][1]){
+			chargeVal += i*100;
+			break;
+		}else if(i == chargeArray.length){
+			chargeVal += i*100;
+		}
+	}
+	var force = d3.layout.force()
+	    .nodes(data.nodes)
+	    .links(data.links)
+	    .size([w, h])
+	    .linkDistance(function(p){
+			return Math.floor(Math.random()*60)+90;
+		})
+		.chargeDistance(600)
+	    .charge(chargeVal)
+		.linkStrength(1)
+	    .on("tick", tick);
+		
+	var dragstatus = false,
+		mouseoverstatus = false;
+	var drag = force.drag()
+			.on("dragstart",function(d,i){
+				d.fixed = true;    //拖拽开始后设定被拖拽对象为固定
+				d3.event.sourceEvent.stopPropagation(); // Prevent panning
+			})
+			.on("drag",function(d,i){
+				dragstatus = true;
+				mouseoverstatus = true;
+			})
+			.on("dragend",function(d,i){
+				mouseoverstatus = false;
+				setTimeout(function(){
+					dragstatus = false;
+				},500)
+			});	
+		//处理缩放
+		var zoom = d3.behavior.zoom().scaleExtent([0.4, 10]).on("zoom", zoomed);
+		
+		function zoomed() {
+			svg.attr("transform", 
+				"translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")");
+		}
+		
+		var svg = d3.select("#infovis").append("svg:svg")
+		    .attr("width", w)
+		    .attr("height", h)
+			.call(zoom)
+			.append("g");
+			
+		var lines = svg.append("svg:g")
+		    .selectAll("path")
+		    .data(force.links())
+		    .enter().append("path")
+			.style("fill", function(p){
+		    	return (p.type=="cp" || p.isLegal)?"#5cb85c":"#b5b5b5";
+		    })
+			.style("stroke", function(p){
+		    	return (p.type=="cp" || p.isLegal)?"#5cb85c":"#b5b5b5";
+		    })
+			.attr("stroke-width",function (e,i){
+				return e.linkVal;
+			});
+			lines.each(function (d,i){
+				var invacconam = new Number(d.invacconam);
+				if(invacconam > 0){
+					var lenInvacconam = (invacconam + "").length;
+					if(lenInvacconam > 4 && (invacconam + "").indexOf(".") > -1 && (lenInvacconam - (invacconam + "").indexOf(".")) > 4){
+						invacconam = invacconam.toFixed(4)
+					}
+					d3.select(this).append("title").text("投资金额:"+invacconam+"万元");
+				}
+			});
+		
+		var nodes = svg.append("svg:g")
+		    .selectAll(".node")
+		    .data(force.nodes())
+		  	.enter()
+			.append("g")
+			.call(force.drag)
+			.attr('class', 'node')
+			.on('mouseover', function(d) {
+		        highlightObject(this,true);
+		    })
+		    .on('mouseout', function(d) {
+				highlightObject(this,false);
+		    })
+			.on("mousedown",function (e,i){
+				d3.event.preventDefault();
+				removeNode(this);
+			});
+			
+		nodes.append("rect")
+			.attr("rx", 5)
+		    .attr("ry", 5)
+			.attr('height', 20)
+			.attr("fill", function(p){
+		    	return p.type=="p"?"#7e388e":p.type=="ce"?"#da4e2b":"#0b93d1";
+		    })
+			.attr("stroke", function(p){
+		    	return p.type=="p"?"#7e388e":p.type=="ce"?"#da4e2b":"#0b93d1";
+		    })
+			.style("opacity","0.7");
+		
+		
+		nodes.each(function (d,i){
+			if(d.type == "ce" || d.type == "e"){
+				var title = "";
+				if(d.text != d.shortText){
+					title = d.text;
+				}
+				var regcap = 0;
+				if(d.istarget == 1){
+					regcap = new Number(d.regcap);
+				}else{
+					regcap = new Number(d.invregcap);
+				}
+				if(regcap > 0){
+					var lenRegcap = (regcap + "").length;
+					if(lenRegcap > 4 && (regcap + "").indexOf(".") > -1 && (lenRegcap - (regcap + "").indexOf(".")) > 4){
+						regcap = regcap.toFixed(4)
+					}
+					if(title != ""){
+						title += "\n";
+					}
+					title += "注册资本:"+regcap+"万元";
+				}
+				if(title != ""){
+					d3.select(this).append("title").text(title);
+				}
+			}
+		});
+		nodes.append('text')
+	    .text(function(d){
+			return d.shortText;
+		})
+		.style("cursor",function (d,i){
+			if(d.type == "e"){
+				return "pointer";
+			}else{
+				return "auto";
+			}
+		})
+		.on("click",function (d,i){
+			if(!dragstatus && d.type == "e"){
+				window.open("/enterpriseInfoByRegNO/"+d.name+".html");
+			}
+		});
+		setTimeout(function() {
+		    nodes.each(function(d) {
+		        var node   = d3.select(this),
+		            text   = node.selectAll('text'),
+		            bounds = {},
+		            first  = true;
+					
+				text.each(function() {
+		            var box = this.getBBox();
+		            if (first || box.x < bounds.x1) {
+		                bounds.x1 = box.x;
+		            }
+		            if (first || box.y < bounds.y1) {
+		                bounds.y1 = box.y;
+		            }
+		            if (first || box.x + box.width > bounds.x2) {
+		                bounds.x2 = box.x + box.width;
+		            }
+		            if (first || box.y + box.height > bounds.y2) {
+		                bounds.y2 = box.y + box.height;
+		            }
+		            first = false;
+		        }).attr('text-anchor', 'middle');
+					
+		        var padding  = {"left":3,"right":3,"top":2,"bottom":2},
+		            margin   = {"left":3,"right":3,"top":2,"bottom":2},
+		            oldWidth = bounds.x2 - bounds.x1;
+		
+		        bounds.x1 -= oldWidth / 2;
+		        bounds.x2 -= oldWidth / 2;
+		
+		        bounds.x1 -= padding.left;
+		        bounds.y1 -= padding.top;
+		        bounds.x2 += padding.left + padding.right;
+		        bounds.y2 += padding.top  + padding.bottom;
+				
+				var width = bounds.x2 - bounds.x1;
+				var height = bounds.y2 - bounds.y1;
+		        node.select('rect')
+		            .attr('x', bounds.x1)
+		            .attr('y', bounds.y1)
+					//.attr('height', height)
+		            .attr('width', width);
+		            
+		        d.edge = {
+		            left   : new geo.LineSegment(bounds.x1, bounds.y1, bounds.x1, bounds.y2),
+		            right  : new geo.LineSegment(bounds.x2, bounds.y1, bounds.x2, bounds.y2),
+		            top    : new geo.LineSegment(bounds.x1, bounds.y1, bounds.x2, bounds.y1),
+		            bottom : new geo.LineSegment(bounds.x1, bounds.y2, bounds.x2, bounds.y2)
+		        };
+		    });
+		    force.start();
+		});
+	
+		function highlightObject(obj,flag){
+			if(mouseoverstatus){
+				return;
+			}
+			if(!flag){
+				d3.selectAll(".node").each(function (){
+					d3.select(this).style("opacity","1");
+				});
+				d3.selectAll("path").each(function (){
+					d3.select(this).style("opacity","1");
+				});
+				return;
+			}
+			var name = obj.__data__.name;
+			d3.selectAll(".node").each(function (){
+				if(name != this.__data__.name){
+					d3.select(this).style("opacity","0.2");
+				}
+			});
+			d3.selectAll("path").each(function (){
+				var targetName = this.__data__.target.name;
+				var sourceName = this.__data__.source.name;
+				if(name != targetName && name != sourceName){
+					d3.select(this).style("opacity","0.2");
+				}else{
+					d3.selectAll(".node").each(function (){
+						if(targetName == this.__data__.name || sourceName == this.__data__.name){
+							d3.select(this).style("opacity","1");
+						}
+					});
+				}
+			});
+			
+		}
+		function removeNode(obj){
+			if(d3.event.which != 3){
+				return;
+			}
+			highlightObject(obj,false);
+			d3.select(obj).remove();
+			var name = obj.__data__.name;
+			var removeAloneNode = function(removeNodeName){
+				var isRemoveAloneNode = true;
+				d3.selectAll("path").each(function (i){
+					if(removeNodeName == this.__data__.source.name || removeNodeName == this.__data__.target.name){
+						isRemoveAloneNode = false;
+						return true;
+					}
+				});
+				if(isRemoveAloneNode){
+					d3.selectAll("rect").each(function (){
+						if(this.__data__.name == removeNodeName){
+							d3.select(this).remove();
+							return true;
+						}
+					});
+					d3.selectAll("text").each(function (){
+						if(this.__data__.name == removeNodeName){
+							d3.select(this).remove();
+							return true;
+						}
+					});
+				}
+			}
+			d3.selectAll("path").each(function (){
+				if(name == this.__data__.target.name){
+					var fromNodeName = this.__data__.source.name;
+					d3.select(this).remove();
+					removeAloneNode(fromNodeName);
+				}else if(name == this.__data__.source.name){
+					var toNodeName = this.__data__.target.name;
+					d3.select(this).remove();
+					removeAloneNode(toNodeName);
+				}
+			});
+			d3.selectAll("rect").each(function (){
+				if(name == this.__data__.name){
+					d3.select(this).remove();
+				}
+			});
+			d3.selectAll("text").each(function (){
+				if(name == this.__data__.name){
+					d3.select(this).remove();
+				}
+			});
+		}
+		var diagonal = d3.svg.diagonal()
+		.projection(function(d) { return [d.y, d.x]; });
+		
+		
+		//关系网
+		function tick(e) {
+			lines.attr("d", function(d) {
+					var sy   = d.source.y,
+						x    = d.target.x,
+			            y    = d.target.y;
+					if(sy > y){
+						sy -= 12;
+					}else{
+						sy += 5;
+					}
+					var line = new geo.LineSegment(d.source.x, sy, x, y);
+					for (var e in d.target.edge) {
+			            var ix = line.intersect(d.target.edge[e].offset(x, y));
+			            if (ix.in1 && ix.in2) {
+			                x = ix.x;
+			                y = ix.y;
+			                break;
+			            }
+			        }
+			        var dx = x - d.source.x,
+				        dy = y - sy,
+				        dr = Math.sqrt(dx * dx + dy * dy),
+				        theta = Math.atan2(dy, dx) + Math.PI / 7.85,
+				        d90 = Math.PI / 2,
+				        dtxs = x - Math.cos(theta),
+				        dtys = y - Math.sin(theta);
+				    return "M" + d.source.x + "," + sy + "A" + dr + "," + dr + " 0 0 1," + x + "," + y + "A" + dr + "," + dr + " 0 0 0," + d.source.x + "," + sy + "M" + dtxs + "," + dtys +  "l" + (3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (-3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "L" + (dtxs - 3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (dtys + 3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "z";
+			  });	
+			nodes.attr("transform", function(d) {
+				return "translate(" + d.x + "," + d.y + ")scale(" + zoomlevel+ ")";
+			});
+		}
+		
+		/////////////重绘画布///////////////////
+		var redrawflag=false;
+		//重绘
+		function redraw(){
+			var w = parseInt($("#gx").css("width").replace("px","")) - 10;
+			var h = parseInt($("#gx").css("height").replace("px",""))-10;
+			d3.select("svg").attr("width", w).attr("height", h);
+			force.size([w,h]).resume();
+			$("#infovis").css({width:w,height:h});
+			//
+			redrawflag=false;
+		}
+		$(window).resize(function(){
+			if(!redrawflag){
+			    //1秒后重绘
+				redrawflag=true;
+				setTimeout(redraw,1000);
+			}
+			firstresize=false;
+		});
+		///////////////////////关系网实例////////////////////////////
+		var htmls="<div style='position:absolute;' class='legend'>";
+		htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><img src='/images/qfw_gxmain.png'  style='width:10px;height:10px;margin:10px;' /><div style='background-color: #da4e2b;margin-top: 2px;'>&nbsp;</div><span style='margin-left: 10px;'>本企业</span></div>";
+		htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><img src='/images/qfw_gxmain2.png'  style='width:9px;height:9px;margin:10px;' /><div style='background-color: #0b93d1;margin-top: 2px;'>&nbsp;</div><span style='margin-left: 5px;'>其他企业</span></div>";
+		htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><img src='/images/qfw_gxmain1.png'  style='width:8px;height:8px;margin:10px;' /><div style='background-color: #7e388e;'>&nbsp;</div><span style='margin-left: 18px;'>个人</span></div>";
+		htmls= htmls+ "<div style='margin:0px 7px;'><span style='font-size: 20px;font-weight: bold;color: #b5b5b5;'>→</span><span style=''>投资关系(股东→企业)</span></div>";
+		htmls= htmls+ "<div style='margin:0px 7px;'><span style='font-size: 20px;font-weight: bold;color: #5cb85c;'>→</span><span style=''>法定代表人</span></div>";
+		htmls= htmls+ "<div style='margin:10px 7px;' class='hidden-sm hidden-xs'><span class='text-muted'>提示:点击鼠标右键可以删除不想看的节点。</span></div>";
+		htmls= htmls+"</div>"
+		$("#gxw_bs").html(htmls);
+	}else{
+		//当关系网不存在的时候设置隐藏
+		$("#agx").parent().hide();
+		$("#gx").hide();
+	}
+	
+	//微官网
+	$(".wgw").click(function(){
+	   window.location.href="/ent/wsite/preview/"+id;
+	})
+	
+});
+
+}
+
+//设置级联位置信息
+function setcxSelect(){
+	$('#city_china').cxSelect({
+		selects: ['province', 'city', 'area'],
+		required:0
+	});
+	$.cxSelect.setVal(province,city,area);	
+}
+//咨询客服
+function openChat() {
+	try {
+		var url = "/chat/client/"+id;
+		window.open(url, "TopChat", "toolbar=0,scrollbars=0,location=0,menubar=0,resizable=1,width=920,height=620");
+	} catch (e) {
+		
+	}
+}
+
+//加载服务与服务列表展示
+if(!$listent){
+	var perPage=5,currentPage=1
+//解析服务列表
+
+
+$(function(){	
+	//加载服务列表
+	initServiceList();
+});
+//点击服务标题展示服务信息
+function clickservicename(id,isshow){
+	if($("#"+id).length>0){
+		if(isshow.indexOf("3")>-1){
+			window.location.href="/market/detail/"+id+".html"
+		}else{
+			window.location.href="/market/showservice/"+id+".html"
+		}
+	}else{
+		window.location.href="/market/showservice/"+id+".html"
+	}
+}
+function initServiceList(){
+	$("#service_list").datatable({
+	   perPage: perPage
+	  ,showPagination:false
+	  ,checkbox:"" 
+	  ,checkboxHeader:false
+	  ,showHeader:false
+	  ,idField:"_id"
+	  ,classname:"table-hover"
+	  ,url: '/wx/searchEntSer/' + $entid
+	  ,rowCallback: analyList,
+	   ajaxSuccess:function(res,o){	
+		console.log(res);
+		if(!res || res === undefined || !res.data || res.data.length == 0) {
+			o.continueBody=false;
+			$("#loadMore").hide();
+		}
+		//判断加载更多是否显示
+		if(res.totalRows>5){
+			$("#loadMore").show();
+		}else{
+			$("#loadMore").hide();
+		}
+		
+	   }
+	});
+}
+
+
+
+/*//编辑企业名片事件
+function btnSaveForm(){
+	//联系人
+	if($("#s_persion").val().length==0){
+		alert("请输入正确的联系人");
+		return;
+	}
+	
+	if($("#s_persion").val().length>30){
+		alert("输入的联系人必须小于30个字");
+		return;
+	}
+	//联系电话
+	var tel = $("#Tel").val();
+	var telReg = !!tel.match(/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/);
+	if(telReg == false){
+		alert("请输入正确的手机号");
+		return;
+	}
+	
+	if($("#s_enturl").val().length>0&& $("#s_enturl").val().indexOf(".")==-1){
+		alert("请输入正确的企业网站域名");
+		return;
+	}	
+	if($("#s_weixin").val().length>0&&$("#s_weixin").val().length>20 ){
+		alert("请输入正确的微信号");
+		return;
+	}
+	
+	if($("#s_address").val().length>0&&$("#s_address").val().length>50 ){
+		alert("联系地址详细信息不能超过50个字");
+		return;
+	}
+	//序列化表格内容为字符串
+	var param = $("#entform").serialize();
+	
+	$.ajax({    
+     type:'post',        
+     url:'/member/yellowpage/dosave/enterprise',    
+     data:param,    
+     cache:false,    
+     dataType:'json', 
+     success:function(data){
+   		alert(data.info);		
+		window.location.href="/member/yellowpage/show/enterprise/"+ $entid;		
+     }    
+     });    
+	
+}
+*/
+
+function analyList(rowHtml, rowData) {
+	var t="";
+	if(rowData.i_status==1){
+		t=template_content.replace("<a class='text-primary' id='${_id}' value='${_id}' data-id='${s_isEdit}' onclick='removeservice(this)'>下架</a>","");
+	}else{
+		t=template_content.replace("已下架","");
+	}
+	return t.replace(/\$\{(.*?)\}/g,
+	function(a, b, c) {
+		var res = rowData[b]||"";
+		//去掉后台服务列表中的图片
+		var data = res.replace(/<img.*>.*<\/img>/ig,"");   //过滤如<img></img>形式的图片元素
+		
+		res = data.replace(/<img.*\/>/ig, "");   //过滤如<img />形式的元素
+		if (!res&&b=="s_images"){
+			res="/images/services/default.png"
+		}else{
+			res = res.replace(/\n/g,"");
+		}
+		return res;
+	});
+}
+//加载更多
+function loadMore(){
+	$.post('/wx/searchEntSer/'+$entid ,{currentPage:currentPage+1,perPage:perPage},function(data){
+		if(data){
+			var res=data["data"]
+			if(!res || res === undefined || res.length == 0) {
+				$("#loadMore").hide();
+				return;
+			}else if(data.totalRows<=(perPage*data.currentPage)){
+				$("#loadMore").hide();
+			}else{
+				$("#loadMore").show();
+			}
+			currentPage=data["currentPage"];
+			var str="";
+			
+			for(var i=0;i<res.length;i++){
+				var temp=res[i];
+				str+=analyList("",temp)
+			}
+			$("#service_list table tbody").append(str);
+		}
+	})
+}
+//上传二维码图片
+function uploadBarCode(){
+	
+	$("#upload").trigger("click");
+}
+
+//显示二维码图片
+function viewBarCode(bcpath){
+	if(bcpath){
+		$('#myModal').modal({
+      		keyboard: true
+   		})
+		$("#viewImgs").html("<img style='width:300px;height:300px;' src='"+bcpath+"'/>")
+	}
+}
+//图片上传
+function makeUpload(obj){
+	var option={
+		btnname:"图片上传",//按钮名
+		btnClass:"btn btn-primary tpsc_btnsize",
+		btnCss:{"width":"80px","height":"26px;"},
+	    name:"upload",
+		action:"/filemanage/upload?resize=250",
+		afterUpload:function(data){ //此处可以重写,上传后的处理	
+			
+			$("#mblocation .pic").css('display','block'); 
+			$("#mblocation .pic li").remove();
+			$("<li class='imgLi' style='background-color:#eee;width:200px;text-align: center; height:200px;border:1px dashed #000;'><img src='"+data.url+"' style='width:176px; height:176px;margin:0px 5px;'><div id=tips style='text-align:center;width:196px;position: absolute;cursor: pointer; border:1px solid #ddd;background-color:#808080;padding:8px;color:#fff;font-size:20px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
+			var urls=$("#mblocation input.imgs").val();
+			urls=urls||""
+			//urls +=data.url+",";
+			urls= data.url;
+			limouseover();
+			$("#mblocation input.imgs").attr("value",urls);
+			$("#mblocation img.imgs").attr("src",urls);
+			if($("#mblocation ul.pic li img").size()>=1){
+				$("#upload").attr("disabled",false)
+			}
+		}
+	};	
+	
+	obj.upload(option);
+}
+
+
+/*
+//添加服务
+function btnAddServices(obj){
+	//判断信息是否为空
+	var v1=$("#mblocation input[name=servicename]").val();
+	var v_price=$("#mblocation input[name=s_price]").val();
+	var isselectprice=$("#s_pricemy").is(':checked');
+	var v2=editor.html();
+	//手机号
+	var phone = $("#mblocation input[name=s_phone]").val();
+		
+	if(!v1){
+		alert("请填写产品服务名称")
+		return;
+	}
+	
+	if(v_price.length>12){
+		alert("请填写小于12位的价格")
+		return;
+	}
+	var telReg = !!phone.match(/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/);
+	if(telReg == false){
+		alert("请输入正确的手机号");
+		return;
+	}
+	
+	
+	$.post('/member/yellowpage/add/service/addservice?_new='+new Date().getTime(),$("#mblocation form").serialize(),function(data){
+		if(data.status=="y"){
+			alert(data.info);
+			cancelService();
+		}else{
+			alert("保存服务信息失败");
+		}
+	},'json');
+	
+	initServiceList()
+}
+*/
+//删除服务
+function delservice(obj){
+	console.log($(obj).attr("data-id"));
+	if($(obj).attr("data-id")==0){
+		alert("不能删除,请查看是否还有用户没评论或有预约未处理")
+		return false
+	}
+	var id = $(obj).attr("value");
+	var r = confirm("确定删除此服务吗?");
+    	if(r==true){
+		$.ajax({    
+        type:'post',        
+        url:'/member/service/delservice',    
+        data:{"id":id},    
+        cache:true,    
+        dataType:'json',    
+        success:function(data){
+            alert(data.msg)
+			$("#service_list table tbody").html("");
+			currentPage=0;						
+			loadMore();
+        }    
+    });
+	}	
+}
+
+//下架服务
+function removeservice(obj){
+	if($(obj).attr("data-id")==0){
+		alert("不能下架,请查看是否还有用户没评论或有预约未处理")
+		return false
+	}
+	var id = $(obj).attr("value");
+	var r = confirm("确定下架此服务吗?");
+    	if(r==true){
+		$.ajax({    
+        type:'post',        
+        url:'/member/service/removeservice',    
+        data:{"id":id},    
+        cache:true,    
+        dataType:'json',    
+        success:function(data){
+            alert(data.msg)
+			$("#service_list table tbody").html("");
+			currentPage=0;						
+			loadMore();
+        }    
+    });
+	}	
+}
+
+//清除服务弹出窗口的表单信息
+function formclane(){
+	//移除表单信息
+	$("#mblocation .sn").val("");
+	$("#mblocation .firstservicetype option").each(function(){
+		if("00" == $(this).val()){					
+			$(this).attr("selected","selected");
+		}
+	});
+	//加载二级栏目下的内容
+	$("#mblocation .secondservicetype option").each(function(){
+		if("11" == $(this).val()){					
+			$(this).attr("selected","selected");
+		}
+	});
+	
+	$("#mblocation .price").val("");
+	$("#mblocation .phone").val("");
+	$("#mblocation .sd").val("");
+	$("#mblocation .pic li").parent().css('display','none');
+	$("#mblocation [name='isshow']:first").removeAttr("checked");
+	$("#mblocation .isshow_checked ").removeAttr("checked");
+	$("#mblocation [name='isshow']:last").removeAttr("checked");
+	
+}
+//在列表中点击添加服务按钮事件
+function addService(){
+	window.location.href="/member/yellowpage/show/showService/" + id;
+}
+//取消添加服务按钮事件
+function cancelService(){
+	var entid = $("#entid").val();
+	window.location.href="/member/yellowpage/show/enterprise/" + entid;
+}
+
+//价格检测
+function checkprice(obj){
+	var obj = $(obj).val();
+	
+	if (obj.trim().length>0){
+		$("#s_pricemy").attr("disabled",true);
+	}else if (obj.trim().length==0){
+		$("#s_pricemy").attr("disabled",false);
+	}
+}
+
+//清除加载的图片
+function cleanpicImg(tname){
+	$("#mblocation .pic li").remove();
+	$("#imgmessage").css("display","block")
+	//var srcimg="/images/services/qfw_" + tname +".png";	
+	var srcimg="/images/services/default.png";	
+	$("<li class='imgLi' style='background-color:#eee;width:200px;text-align: center; height:200px;border:1px dashed #000;'><img src='"+srcimg+"' style='width:176px; height:176px;margin:0px 5px;'><div id=tips style='text-align:center;width:196px;position: absolute;cursor: pointer; border:1px solid #ddd;background-color:#808080;padding:8px;color:#fff;font-size:20px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
+	$("#mblocation input.imgs").attr("value",srcimg);
+	limouseover();
+}
+
+//鼠标放到li上悬浮时间
+function limouseover(){
+  // var lis=document.getElementsByTagName("li");
+  var lis=$("#mblocation ul li");
+  lis.each(function(index,element){	
+   tips.style.left=this.offsetLeft+2+"px";
+   tips.style.top=this.offsetTop+this.offsetHeight-45+"px";
+   //tips.style.top = 948+"px";
+   $(this).click(function(){
+	$("#upload").trigger("click");
+   });
+	
+  });
+
+   
+}
+
+$(function(){
+	//图片上传
+	makeUpload($("#mblocation .mupload"));
+	
+	//面议复选框点击事件
+	$("#s_pricemy").click(function(){
+		//是否选种面议
+		var isselect=$("#s_pricemy").is(':checked');
+		if(isselect){
+			$("#s_price").attr("readonly","readonly");
+			$("#s_price").attr("disabled",true);
+			$("#s_price").attr("value","");
+		}else{
+			$("#s_price").removeAttr("readonly");
+			$("#s_price").attr("disabled",false);
+		}
+	});
+	
+	//一级栏目内容修改
+	$("#firstservicetype").change(function(){
+		var tname = $(this).val();
+		cleanpicImg(tname);
+	});
+	
+	$("#mblocation .sid").val(serviceid);
+	$("#mblocation .sentid").val(serentinfoid);
+	if(dphone.length==0){
+		dphone= phone;
+	}
+	$("#mblocation .phone").val(dphone);
+	if(serviceid){
+		
+		$('#servicecity_china').cxSelect({
+			selects: ['province', 'city', 'area'],
+			required:0
+		});	
+		setLocation(entsel,1);
+		//产品服务类型
+		$("#mblocation .firstservicetype option").each(function(){
+			if(firstsertype == $(this).val()){						
+				$(this).attr("selected","selected");
+				cleanpicImg(firstsertype);
+			}
+		});
+		//加载二级栏目下的内容
+		initSecondServiceType(firstsertype);
+		//设置选择二级栏目的内容
+		$("#mblocation .secondservicetype option").each(function(){
+			if(secondsertype == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+		//面议复选框
+		if(serpricemy==1){
+			$("#s_pricemy").prop("checked",true);
+			$("#s_price").attr("readonly","readonly");
+			$("#s_price").attr("disabled",true);
+			$("#s_price").attr("value","");
+		}else{
+			$("#s_pricemy").attr("disabled",true);
+		}
+		
+		//给kindereditor赋值
+		editor.html(introduction);	
+		$("#mblocation .introduction").val(introduction);	
+		if(images){
+			$("#mblocation .pic").css('display','block'); 
+			var imgurls = images.split(",");
+			var in1=0;
+			$("#mblocation .pic li").remove();
+			for(var i=0;i<imgurls.length;i++){
+				if(imgurls[i]){
+					in1++;					
+					$("<li class='imgLi' style='background-color:#eee;width:200px;text-align: center; height:200px;border:1px dashed #000;'><img src='"+imgurls[i]+"' style='width:176px; height:176px;margin:0px 5px;'><div id=tips style='text-align:center;width:196px;position:absolute;cursor: pointer;border:1px solid #ddd;background-color:#808080;padding:8px;color:#fff;font-size:20px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
+				}
+			}
+			if(in1>=5){
+				$("#mblocation .mupload").closest(".row").hide()
+			}
+		}else{
+			//$("#mblocation .pic").css('display','none'); 
+		}
+		$("#mblocation .imgs").val(images);
+		//显示位置设置
+		if(strisshow!= undefined){
+			$("#isshow_checked1").prop("checked",(strisshow.indexOf("1")>-1));
+			$("#mblocation .isshow_checked ").prop("checked",(strisshow.indexOf("2")>-1));			
+			$("#isshow_checked3").prop("checked",(strisshow.indexOf("3")>-1));
+		}
+	
+	}
+});
+
+
+/**添加服务信息**/
+function closepanel(n,id){	
+
+	$('#servicecity_china').cxSelect({
+		selects: ['province', 'city', 'area'],
+		required:0
+	});	
+	setLocation(entsel,n);
+	if(n){
+		
+		//$("#mblocation").html($("#serviceForm").clone().html());
+		//图片上传
+		makeUpload($("#mblocation .mupload"));
+		$('#addModal').modal('show');
+		if(id){		
+		$("#edittitle").html("编辑产品服务信息");
+		$("#flagedit").attr("value","edit");
+		$.post('/member/service/findservice', {"id":id},  function(data){
+			var editentsel= data.data.s_opLocDistrict;
+			
+			if(editentsel!= undefined){
+				setLocation(editentsel,n);
+			}
+			
+			$("#mblocation .sid").val(id);
+			$("#mblocation .sn").val(data.data.s_name);
+			//产品服务类型
+			var firstsertype= data.data.s_pservicecode;
+			$("#mblocation .firstservicetype option").each(function(){
+				if(firstsertype == $(this).val()){					
+					$(this).attr("selected","selected");
+				}
+			});
+			//加载二级栏目下的内容
+			initSecondServiceType(firstsertype);
+			//设置选择二级栏目的内容
+			var secondsertype= data.data.s_servicecode
+			$("#mblocation .secondservicetype option").each(function(){
+				if(secondsertype == $(this).val()){					
+					$(this).attr("selected","selected");
+				}
+			});
+			
+			$("#mblocation .price").val(data.data.f_price);
+			var dphone = data.data.s_phone;
+			
+			if(dphone==undefined){
+				dphone= phone;
+			}
+			$("#mblocation .phone").val(dphone);
+			
+			//给kindereditor赋值
+			editor.html(data.data.s_introduction);
+			
+			$("#mblocation .imgs").val(data.data.s_images);
+			//显示位置设置	
+			var strisshow = data.data.s_isshow;	
+			if(strisshow!= undefined){
+				$("#isshow_checked1").prop("checked",(strisshow.indexOf("1")>-1));
+				$("#mblocation .isshow_checked ").prop("checked",(strisshow.indexOf("2")>-1));			
+				$("#isshow_checked3").prop("checked",(strisshow.indexOf("3")>-1));
+			}
+			
+			if(data.data.s_images){
+				$("#mblocation .pic").css('display','block'); 
+				var imgurls = data.data.s_images.split(",");
+				var in1=0;
+				$("#mblocation .pic li").remove();
+				for(var i=0;i<imgurls.length;i++){
+					if(imgurls[i]){
+						in1++;
+						$("<li class='imgLi' style='background-color:#eee;width:200px;text-align: center; height:200px;border:1px dashed #000;'><img src='"+imgurls[i]+"' style='width:176px; height:176px;margin:0px 5px;'><div id=tips style='text-align:center;width:196px;position:absolute;cursor: pointer;border:1px solid #ddd;background-color:#808080;padding:8px;color:#fff;font-size:20px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
+					}
+				}
+				if(in1>=5){
+					$("#mblocation .mupload").closest(".row").hide()
+				}
+			}else{
+				$("#mblocation .pic").css('display','none'); 
+			}
+		});
+		}else{
+			$("#mblocation .phone").val(phone);
+		}
+		
+	}else{
+		formclane();
+		$("#edittitle").html("添加产品服务信息");
+		$('#addModal').modal('hide');
+	}
+	
+	
+}
+
+
+//编辑服务信息
+function findservice( id ,me){	
+	//根据服务id 编辑服务信息
+	if($(me).attr("data-id")==0){
+		alert("不能编辑,请查看是否还有用户没评论或有预约未处理")
+		return false
+	}else{
+		window.location.href="/member/yellowpage/edit/showService/" + id;
+	}
+	
+}
+/**删除上传服务中的图片**/
+function delServiceUploadImg(obj,url){
+	$(obj).closest("li").remove();
+	var valImg=$("#mblocation input.imgs").val();
+	if (valImg){
+		$("#mblocation input.imgs").val(valImg.replace(url+",",""))
+	}
+	$("#mblocation .mupload").closest(".row").show()
+}
+
+
+}
+
+
+

+ 1179 - 0
core/src/web/staticres/wxent/qfw-frontenterprise.js

@@ -0,0 +1,1179 @@
+
+var c_hfl=[["全部","0"],["农、林、牧、渔业","A"],["采矿业","B"],["制造业","C"],["住宿和餐饮业","H"],["信息传输、软件和信息技术服务业","I"],["金融业","J"],["房地产业","K"],["租赁和商务服务业","L"],["科学研究和技术服务业","M"],["水利、环境和公共设施管理业","N"],["居民服务、修理和其他服务业","O"],["教育","P"],["卫生和社会工作","Q"],["文化、体育和娱乐业","R"],["公共管理、社会保障和社会组织","S"],["电力、热力、燃气及水生产和供应业","D"],["建筑业","E"],["批发和零售业","F"],["交通运输、仓储和邮政业","G"]]
+var c_zb=[["全部","0"],["10W以下","0-10"],["10w-100w","10-100"],["100w-1000w","100-1000"],["1000万-1亿","1000-10000"],["1亿以上","10000"]]
+var c_qfl=[["全部","0"],["股份有限公司分公司(上市、外商投资企业投资)","2211"],["普通合伙企业","4531"],["农民专业合作经济组织","9100"],["个体工商户","9600"],["有限责任公司(自然人投资或控股)","1130"]]
+	
+//点击关闭微信版企明星
+function colseWeixin(){document.getElementById('weixintu').style.visibility = 'hidden';}
+
+$(function(){
+	//点击回车执行搜索
+	$(document).keydown(function(event){
+	    if(event.keyCode == 13){
+	        $("#c_words").click()
+	    }
+	});
+});
+
+function getCityN(code){
+	if(code){
+		var n=code.substring(0,2)
+		for(var i=0;i<citySim.length;i++){
+			if (citySim[i].k==n) {
+				return citySim[i].n;
+			}
+		}
+	}
+	return "";	
+}
+
+
+function reloadData(obj,name){
+
+	name=name||obj.attr("name")
+	var val=(obj.attr("value")||obj.val());
+	
+	if (val==0) val=""
+	if(name=="city"&&!val){
+		var pids=obj.attr("id")
+		if(pids=="c_area"){
+			var v=obj.prev("select").val()
+			if(!v){
+				v=obj.prev("select").prev("select").val()
+			}
+			if(v){
+				val=v
+			}
+			
+		}else if(pids=="c_city"){
+			var v=obj.prev("select").val()
+			if(v){
+				val=v
+			}
+		}
+		
+	}else if(name=="c_author"){
+		if(!obj.prop("checked")){
+			val="";
+		}
+	}
+	//调整value 值
+	if(val==10){
+		val = "10-100"
+	}else if(val ==100){
+		val = "100-1000"
+	}else if(val ==1000){
+		val = "1000-10000"
+	}
+	//搜索表单提交
+	$("#searchForm input[name="+name+"]").val(val);
+    document.forms['searchForm'].submit();
+}
+
+function setLocation(entsel,serviceloc){
+	//所在地处理
+	var le  =  entsel.length
+	var sel1 = "";
+	var sel2 = "";
+	var sel3 = "";
+	if (le == 2) {
+	 sel1 = entsel.substring(0,2);
+	 sel2 = 0;
+	 sel3 = 0;
+	}else if (le == 4){
+	 sel1 = entsel.substring(0,2);
+	 sel2 = entsel.substring(0,4);
+	 sel3 = 0;
+	}else{	
+	 sel1 = entsel.substring(0,2);
+	 sel2 = entsel.substring(0,4);
+	 sel3 = entsel.substring(0,6);
+	}
+	$.cxSelect.setVal(sel1,sel2,sel3);
+	if(serviceloc){	
+		//添加编辑服务中的省
+		$("#servicecity_china .province option").each(function(){
+			if(sel1 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+		//添加编辑服务中的市
+		$("#servicecity_china .city option").each(function(){
+			if(sel2 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+		//添加编辑服务中的县
+		$("#servicecity_china .area option").each(function(){
+			if(sel3 == $(this).val()){					
+				$(this).attr("selected","selected");
+			}
+		});
+	}
+}	
+cityMouse="";
+$(function(){
+	
+	////推荐企业
+	loadImg(1);
+	//行业类别  注册资本 加载
+	makeFl();
+	//所在地信息加载
+	if($chiancity){
+		$('#city_china').cxSelect({
+			selects: ['province', 'city', 'area'],
+			required:0,
+			somep:true,
+			someps:[41,45]
+		});
+		setLocation(entsel)
+	}
+	
+	
+	//处理点击重新加载
+	$("div[id^=c_] li,li[id^=c_],input[id^=c_]").click(function(){
+		
+		if(this.id=="c_words"){
+			reloadData($("#header-searchInputs"))	
+		}else{
+			reloadData($(this))	
+		}	
+	})
+	
+	$("select[id^=c_]").click(function(){
+		cityMouse=this.id
+	}).change(function(){
+		if(this.id==cityMouse){
+			reloadData($(this),"city")			
+		}
+	})	
+
+	//处理选择样式
+	$("div[id^=c_] li").click(function(){
+		$("li",$(this).closest("div")).removeClass("text-primary");
+		$(this).addClass("text-primary");
+	})
+	//搜索关键字
+	var words=""
+	
+	if(btempwords){
+		words=btempwords
+		$("#header-searchInput").val(words);
+	}
+	
+	
+})
+function makeFl(){
+	//行业类别
+	$(["c_hfl"]).each(function(i,ad){
+		var str="<ul>";
+		var tmp=eval(ad)
+		for(var i=0;i<tmp.length;i++){
+		    var val = chf1;
+			if (val !=""){
+			if (val == tmp[i][1]){
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' class='text-primary'>"+tmp[i][0]+"</li>"
+			var j ="J"
+			if (val > j || val == "D" || val == "E" || val == "F" || val == "G"  ){
+			$("#c_hfl").next().find("small").text("收起<")
+			$("#c_hfl").removeClass("less")
+			
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"'>"+tmp[i][0]+"</li>"
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' "+(i==0?"class='text-primary'":"")+">"+tmp[i][0]+"</li>"
+			}
+			
+		}
+		str+="</ul>"
+		$("#"+ad).html(str)
+	})
+	//注册资本
+	$(["c_zb"]).each(function(i,ad){
+		var str="<ul>";
+		var tmp=eval(ad)
+		for(var i=0;i<tmp.length;i++){
+		    var val = czb;
+			if (val !=""){
+			if (val == tmp[i][1]){
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' class='text-primary'>"+tmp[i][0]+"</li>"
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"'>"+tmp[i][0]+"</li>"
+			}
+			}else{
+			str+="<li name='"+ad+"' value='"+tmp[i][1]+"' "+(i==0?"class='text-primary'":"")+">"+tmp[i][0]+"</li>"
+			}
+			
+		}
+		str+="</ul>"
+		$("#"+ad).html(str)
+	})
+}
+function less(obj){
+	pred=$(obj).prev()
+	obj=$(obj).find("small")
+	var text=obj.text()
+	if(text=="更多>"){
+		obj.text("收起<")
+		pred.removeClass("less")
+	}else{
+		obj.text("更多>")
+		pred.addClass("less")
+	}
+	
+}
+//推荐企业
+function loadImg(n){
+	var str=""
+	for(var i=0;i<n;i++){
+		str+="<img src='/images/right_ad.png'>"
+	}
+	$("#tjqy").html(str)
+}
+
+function GetDiffName(i)  {
+	ret=["法定代表人"]
+	//ret=["法定代表人","住所","成立日期"]
+	switch (i) {
+		case  "9600":
+		{
+			ret[0] = "经营者"
+			//ret[1] = "经营场所"
+			//ret[2] = "注册日期"
+			break;
+		}
+		case "4500":
+		case "6800":
+		case "6810":
+		case "6820":
+		case "7100":
+		case "7110":
+		case "7120":
+		case "7130":
+		case "7190":
+		case "9200":
+		case "6840":
+		case "2100":
+		case "2110":
+		case "2120":
+		case "2121":
+		case "2122":
+		case "2123":
+		case "2130":
+		case "2140":
+		case "2150":
+		case "2151":
+		case "2152":
+		case "2190":
+		case "2200":
+		case "2210":
+		case "2211":
+		case "2212":
+		case "2213":
+		case "2219":
+		case "2220":
+		case "2221":
+		case "2222":
+		case "2223":
+		case "2229":
+		case "4000":
+		case "4300":
+		case "4310":
+		case "4320":
+		case "4330":
+		case "4340":
+		case "4550":
+		case "4551":
+		case "4552":
+		case "4553":
+		case "4560":
+		case "5800":
+		case "5810":
+		case "5820":{
+			ret[0] = "负责人"
+			//ret[1] = "营业场所"
+			//ret[2] = "成立日期"
+			break;
+		}
+	}
+	return ret
+}
+//公式信息是否显示
+if(!$gs){
+	$("#ags").parent().hide();
+	$("#gs").hide();
+}
+
+//关系网的设置		
+if($relationlen>0 ){
+  //try{
+	var zoomlevel=1;
+	var w = parseInt($("#gx").css("width").replace("px","")) - 80;
+	$("#infovis").css("width",w+"px");
+	var h = $("#infovis").height();
+	if($(".controlls").length>0){
+		$(".controlls").css({left:$("#gx").width()-$(".controlls").width()-30});
+	}
+	
+	//查找逻辑
+	var index=-1;
+	var reg = new RegExp(/(有限公司|有限责任公司|股份有限公司|总公司|分公司|公司|事务所|合伙企业)$|\(.*\)|\(.*\)/g);
+	/*var provinces = [];
+	$.ajax({
+		url: "/js/provinceData.min.json",
+		dataType: "json",
+		cache: true,
+		async: false,
+		success: function(json){
+			provinces = json;
+		}
+	});*/
+	var filterEntName = function(text){
+		this.allProvinces = "河南省、青海省、山西省、黑龙江省、安徽省、广西壮族自治区、西藏自治区";
+		this.commonReplace = function(t){
+			if(t.length > 1 && text.startWith(t)){
+				var textCopy = text.replace(new RegExp("^"+t),"");
+				if(textCopy.length > 2){
+					text = textCopy;
+				}
+				return true;
+			}
+			return false;
+		};
+		this.replaceStart = function(t,f){
+			var flag = false;
+			var minus = null;
+			if(this.commonReplace(t)){//替换省、市、县、区
+				return true;
+			}
+			if(f){//不替换
+				flag = false;
+			}else if(t.endWith("维吾尔自治区")){
+				flag = true;
+				minus = 6;
+			}else if(t.endWith("回族自治区") || t.endWith("壮族自治区") || t.endWith("特别行政区")){
+				flag = true;
+				minus = 5;
+			}else if(t.endWith("自治州") || t.endWith("自治县") || t.endWith("自治区")){
+				flag = true;
+				minus = 3;
+			}else if(t.endWith("地区")){
+				flag = true;
+				minus = 2;
+			}else if(t.endWith("省") || t.endWith("市") || t.endWith("区")){
+				flag = true;
+				minus = 1;
+			}
+			if(flag){
+				return this.commonReplace(t.substring(0,t.length-minus));
+			}
+			return false;
+		};
+		this.replaceCity = function(citys){
+			if(citys){
+				for(var c in citys){//市
+					var c_name = citys[c].n;
+					if(this.replaceStart(c_name)){
+						this.replaceAreas(citys[c].s);
+						return true;
+					}else if(this.replaceAreas(citys[c].s)){
+						return true;
+					}
+				}
+			}
+		};
+		this.replaceAreas = function(areas){
+			if(areas){
+				for(var a in areas){//县、区
+					var a_name = areas[a].n;
+					if(this.replaceStart(a_name,true)){
+						return true;
+					}
+				}
+			}
+		};
+		for(var p in provinces){//省
+			var p_name = provinces[p].n;
+			if(this.allProvinces.indexOf(p_name) == -1){
+				continue;
+			}
+			if(this.replaceStart(p_name)){
+				this.replaceCity(provinces[p].s);
+				break;
+			}else if(this.replaceCity(provinces[p].s)){
+				break;
+			}
+		}
+		return text;
+	}
+	for(var i=0;i<data.nodes.length;i++){
+		var nodeObj = data.nodes[i];
+		nodeObj.text = $.trim(nodeObj.text);
+		nodeObj.shortText = nodeObj.text;
+		if(nodeObj.type == "e" || nodeObj.type == "ce"){
+			var text = nodeObj.shortText;
+			if(text.length > 2){//先替换结尾
+				text = text.replace(reg,"");
+			}
+			if(text.length > 2){//再替换开头
+				//text = filterEntName(text);
+			}
+			if(text.length > 2){//小于两个字符不生效
+				nodeObj.shortText = text;
+			}
+			if(nodeObj.name==regno){//先找本企业位置
+				index=i;
+				nodeObj["regcap"] = (typeof(d1) == "undefined")?0:d1;
+				nodeObj["legcerno"] = legcerno;
+			}
+		}
+	}
+	/*********************************连线处理***********************************/
+	var minLink=-1,maxLink=-1;
+	for(var i=0;i<data.links.length;i++){
+		var linkObj = data.links[i];
+		if(linkObj.target==index && data.nodes[linkObj.source].name==legcerno){
+			//data.nodes[linkObj.source].type="cp";
+			linkObj.type = "cp"
+			linkObj.isLegal = 1;
+		}
+		//
+		data.nodes[linkObj.target]["istarget"] = 1;
+		if(data.nodes[linkObj.source].name == data.nodes[linkObj.target].invlegcerno || data.nodes[linkObj.source].name ==	data.nodes[linkObj.target].legcerno){
+			linkObj.isLegal = 1;
+		}
+		if(typeof(linkObj.invacconam) == "undefined"){
+			continue;
+		}
+		var invacconam = new Number(linkObj.invacconam);
+		if(minLink == -1 && maxLink == -1){
+			minLink = invacconam;
+			maxLink = invacconam;
+		}else if(invacconam > maxLink){
+			maxLink = invacconam; 
+		}else if(invacconam < minLink){
+			minLink = invacconam;
+		}
+	}
+	var getLineSectionArray = function(){
+		var countSection = 6;
+		var section = (maxLink - minLink) / countSection;
+		var sectionArr = [];
+		for(var i=2;i<=countSection;i++){
+			var minVal = minLink;
+			if(sectionArr.length > 0){
+				minVal = sectionArr[sectionArr.length - 1].maxVal;
+			}
+			var maxVal = minLink+section*i;
+			if(i == countSection){
+				maxVal += section;
+			}
+			var sectionObj = {linkVal:i,minVal:minVal,maxVal:maxVal};
+			sectionArr.push(sectionObj);
+		}
+		return sectionArr;
+	}
+	/////////////
+	var linkSectionArray = getLineSectionArray();
+	for(var i=0;i<data.links.length;i++){
+		var linksObj = data.links[i];
+		linksObj["linkVal"] = 2;
+		if(typeof(linkObj.invacconam) == "undefined"){
+			continue;
+		}
+		var invacconam = new Number(linksObj.invacconam);
+		for(var s in linkSectionArray){
+			var sectionObj = linkSectionArray[s];
+			if(invacconam >= sectionObj.minVal && invacconam < sectionObj.maxVal){
+				linksObj["linkVal"] = sectionObj.linkVal;
+				continue;
+			}
+		}
+	}
+	/*********************************节点处理***********************************/
+	var minNode=-1,maxNode=-1;
+	for(var i=0;i<data.nodes.length;i++){
+		var nodeObj = data.nodes[i];
+		if(nodeObj.type == "e" || nodeObj.type == "ce"){
+			var regcap = nodeObj.regcap;
+			if(minNode == -1 && maxNode == -1){
+				minNode = regcap;
+				maxNode = regcap;
+			}else if(regcap > maxNode){
+				maxNode = regcap; 
+			}else if(regcap < minNode){
+				minNode = regcap;
+			}
+		}
+	}
+	var getNodeSectionArray = function(){
+		var countSection = 7;
+		var section = (maxNode - minNode) / countSection;
+		var sectionArr = [];
+		for(var i=1;i<=countSection;i++){
+			var minVal = minNode;
+			if(sectionArr.length > 0){
+				minVal = sectionArr[sectionArr.length - 1].maxVal;
+			}
+			var maxVal = minNode+section*i;
+			if(i == countSection){
+				maxVal += section;
+			}
+			var sectionObj = {nodeVal:6+i,minVal:minVal,maxVal:maxVal};
+			sectionArr.push(sectionObj);
+		}
+		return sectionArr;
+	}
+	var nodeSectionArray = getNodeSectionArray();
+	for(var i=0;i<data.nodes.length;i++){
+		var nodeObj = data.nodes[i];
+		nodeObj["nodeVal"] = 7;
+		if(nodeObj.type == "e" || nodeObj.type == "ce"){
+			var invacconam = new Number(nodeObj.invacconam);
+			var regcap = new Number(nodeObj.regcap);
+			for(var s in nodeSectionArray){
+				var sectionObj = nodeSectionArray[s];
+				if(regcap >= sectionObj.minVal && regcap < sectionObj.maxVal){
+					nodeObj["nodeVal"] = sectionObj.nodeVal;
+					continue;
+				}
+			}
+		}
+	}
+//屏蔽鼠标右点击事件
+if(document.getElementById("infovis")){
+	document.getElementById("infovis").oncontextmenu=function(){return false;};
+}
+
+$("#op_fullscreen").attr("title","进入全屏视图"+((!!window.ActiveXObject || "ActiveXObject" in window)?"":" (F11)"));	
+ //处理全屏
+ function launchFullScreen(element) {
+	
+  if(element){
+  	if (element.requestFullscreen) {
+      element.requestFullscreen();
+    } else if (element.msRequestFullscreen) {
+      element.msRequestFullscreen();
+    } else if (element.mozRequestFullScreen) {
+      element.mozRequestFullScreen();
+    } else if (element.webkitRequestFullscreen) {
+		// 对 Chrome 特殊处理,
+        // 参数 Element.ALLOW_KEYBOARD_INPUT 使全屏状态中可以键盘输入。
+        if ( window.navigator.userAgent.toUpperCase().indexOf( 'CHROME' ) >= 0 ) {
+              element.webkitRequestFullScreen( Element.ALLOW_KEYBOARD_INPUT );
+        }else {
+			// Safari 浏览器中,如果方法内有参数,则 Fullscreen 功能不可用。
+           element.webkitRequestFullScreen();
+        }
+    }
+  }
+   
+}
+function cancelFullScreen() {
+	h = $("#infovis").height();  
+	$("#op_fullscreen").attr("title","进入全屏视图"+((!!window.ActiveXObject || "ActiveXObject" in window)?"":" (F11)"));	
+	//force.linkDistance(120).charge(-200).size([w,h]).resume();
+	$("#infovis").css({width:w,height:h});
+	//设置svg标签的宽度与高度
+	d3.select("svg").attr("width", w).attr("height", h);
+	$(".controlls").css({left:$("#gx").width()-$(".controlls").width()-30});
+    if(document.exitFullscreen) {
+      document.exitFullscreen();
+    } else if (document.msExitFullscreen) {
+      document.msExitFullscreen();
+    } else if (document.mozCancelFullScreen) {
+      document.mozCancelFullScreen();
+    } else if (document.webkitExitFullscreen) {
+      document.webkitExitFullscreen();
+    }
+} 
+
+$(document).on('webkitfullscreenchange mozfullscreenchange msfullscreenchange fullscreenchange', function(){
+    if (!document.fullscreenElement &&    // alternative standard method
+    !document.mozFullScreenElement && 
+    !document.webkitFullscreenElement && 
+    !document.msFullscreenElement ) {
+	//退出
+	cancelFullScreen();
+ }});
+ 
+   var infovisdiv = document.getElementById("infovis");
+	document.onkeydown=function(event){
+        var e = event || window.event || arguments.callee.caller.arguments[0];
+        if(e && e.keyCode==122){
+			event.preventDefault?event.preventDefault():window.event.returnValue = false;
+			if(!!window.ActiveXObject || "ActiveXObject" in window){//ie下F11不能用,屏蔽掉
+				if($(".exit").length == 0){
+					return;
+				}
+			}
+			initFullScreen();
+        }else if(e && e.keyCode==27){
+			event.preventDefault?event.preventDefault():window.event.returnValue = false;
+			cancelFullScreen();
+		}
+    };  
+	try{
+		$("#op_fullscreen").bind("click",initFullScreen);
+	}catch(e){}
+    
+	
+	
+	function initFullScreen(){
+		var fullscreenElement =
+        document.fullscreenElement ||
+        document.mozFullScreenElement ||
+        document.webkitFullscreenElement ||
+		document.msFullscreenElement;
+	    $(".ico_fullscreen").toggleClass("exit");
+		if(!fullscreenElement || fullscreenElement==null){
+			redrawflag = true;
+			$("#op_fullscreen").attr("title","退出全屏视图 (F11)");
+			launchFullScreen(infovisdiv);
+			var timeout = 100;
+			if(!!window.ActiveXObject || "ActiveXObject" in window){
+				timeout = 200;
+			}
+			setTimeout(function(){
+				if(force!=undefined){
+					//重绘
+					var w=document.body.clientWidth;
+					var h=document.body.clientHeight;
+					//if(w>1200){
+						//w= 1200
+					//}
+					$("#infovis").css({width:w,height:h});
+					d3.select("svg").attr("width", w).attr("height", h);
+					$(".controlls").css({left:w-$(".controlls").width() - 70});
+					force.linkDistance(h).charge(-700).size([w,h]).resume();
+				}
+				
+			},timeout);
+		}else{
+			cancelFullScreen();
+		}
+	}
+//计算点之间的距离
+var chargeArray = [[0,10],[10,20],[20,30],[30,40],[40,50],[50,60],[60,70],[70,80],[80,90],[90,100],[100,110]];
+var chargeVal = -1600;
+var nodeCount = data.nodes.length;
+for(var i in chargeArray){
+	if(nodeCount >= chargeArray[i][0] && nodeCount < chargeArray[i][1]){
+		chargeVal += i*100;
+		break;
+	}else if(i == chargeArray.length){
+		chargeVal += i*100;
+	}
+}
+var tick=function (e) {
+		
+		lines.attr("d", function(d) {
+				var sy   = d.source.y,
+					x    = d.target.x,
+		            y    = d.target.y;
+				if(sy > y){
+					sy -= 12;
+				}else{
+					sy += 5;
+				}
+				var line = new geo.LineSegment(d.source.x, sy, x, y);
+				for (var e in d.target.edge) {
+		            var ix = line.intersect(d.target.edge[e].offset(x, y));
+		            if (ix.in1 && ix.in2) {
+		                x = ix.x;
+		                y = ix.y;
+		                break;
+		            }
+		        }
+		        var dx = x - d.source.x,
+			        dy = y - sy,
+			        dr = Math.sqrt(dx * dx + dy * dy),
+			        theta = Math.atan2(dy, dx) + Math.PI / 7.85,
+			        d90 = Math.PI / 2,
+			        dtxs = x - Math.cos(theta),
+			        dtys = y - Math.sin(theta);
+			    return "M" + d.source.x + "," + sy + "A" + dr + "," + dr + " 0 0 1," + x + "," + y + "A" + dr + "," + dr + " 0 0 0," + d.source.x + "," + sy + "M" + dtxs + "," + dtys +  "l" + (3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (-3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "L" + (dtxs - 3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (dtys + 3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "z";
+		  });	
+		nodes.attr("transform", function(d) {
+			return "translate(" + d.x + "," + d.y + ")scale(" + zoomlevel+ ")";
+		});
+	}
+var force = d3.layout.force()
+    .nodes(data.nodes)
+    .links(data.links)
+    .size([w, h])
+    .linkDistance(function(p){
+		return Math.floor(Math.random()*60)+90;
+	})
+	.chargeDistance(600)
+    .charge(chargeVal)
+	.linkStrength(1)
+	.on('tick',tick);
+  
+	
+var dragstatus = false,
+	mouseoverstatus = false;
+var drag = force.drag()
+		.on("dragstart",function(d,i){
+			d.fixed = true;    //拖拽开始后设定被拖拽对象为固定
+			d3.event.sourceEvent.stopPropagation(); // Prevent panning
+		})
+		.on("drag",function(d,i){
+			dragstatus = true;
+			mouseoverstatus = true;
+		})
+		.on("dragend",function(d,i){
+			mouseoverstatus = false;
+			setTimeout(function(){
+				dragstatus = false;
+			},500)
+		});	
+		function zoomed() {
+			svg.attr("transform", 
+				"translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")");
+		}
+	//处理缩放
+	var zoom = d3.behavior.zoom().scaleExtent([0.4, 10]).on("zoom", zoomed);
+	
+	
+	
+	var svg = d3.select("#infovis").append("svg:svg")
+	    .attr("width", w)
+	    .attr("height", h)
+		.call(zoom)
+		.append("g");
+		
+	var lines = svg.append("svg:g")
+	    .selectAll("path")
+	    .data(force.links())
+	    .enter().append("path")
+		.style("fill", function(p){
+	    	return (p.type=="cp" || p.isLegal)?"#cd93d7":"#cecece";
+	    })
+		.style("stroke", function(p){
+	    	return (p.type=="cp" || p.isLegal)?"#cd93d7":"#cecece";
+	    })
+		.attr("stroke-width",function (e,i){
+			return e.linkVal;
+		});
+		lines.each(function (d,i){
+			var invacconam = new Number(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);
+				}
+				d3.select(this).append("title").text("投资金额:"+invacconam+"万元");
+			}
+		});
+	
+	var nodes = svg.append("svg:g")
+	    .selectAll(".node")
+	    .data(force.nodes())
+	  	.enter()
+		.append("g")
+		.call(force.drag)
+		.attr('class', 'node')
+		.on('mouseover', function(d) {
+	        highlightObject(this,true);
+	    })
+	    .on('mouseout', function(d) {
+			highlightObject(this,false);
+	    })
+		.on("mousedown",function (e,i){
+			d3.event.preventDefault();
+			removeNode(this);
+		});
+		
+	nodes.append("rect")
+		.attr("rx", 5)
+	    .attr("ry", 5)
+		.attr('height', 20)
+		.attr("fill", function(p){
+			if(p.type == "e" && (p.opstate == "11" || p.opstate == "07")){
+				return "#cecece";
+			}
+	    	return p.type=="p"?"#2196f3":p.type=="ce"?"#ff9800":"#cddc39";
+	    })
+		.attr("stroke", function(p){
+			if(p.type == "e" && (p.opstate == "11" || p.opstate == "07")){
+				return "#cecece";
+			}
+	    	return p.type=="p"?"#2196f3":p.type=="ce"?"#ff9800":"#cddc39";
+	    }).style("opacity",function(p){
+			if(p.type=="e" && (p.opstate != "11" || p.opstate != "07")){
+				return "0.5";
+			}
+			return "1";
+		});
+	
+	
+	nodes.each(function (d,i){
+		if(d.type == "ce" || d.type == "e"){
+			var title = "";
+			if(d.text != d.shortText){
+				title = d.text;
+			}
+			var regcap = d.regcap;
+			if(regcap > 0){
+				var lenRegcap = (regcap + "").length;
+				if(lenRegcap > 4 && (regcap + "").indexOf(".") > -1 && (lenRegcap - (regcap + "").indexOf(".")) > 4){
+					regcap = (new Number(regcap)).toFixed(4);
+				}
+				if(title != ""){
+					title += "\n";
+				}
+				title += "注册资本:"+regcap+"万元";
+			}
+			if(title != ""){
+				d3.select(this).append("title").text(title);
+			}
+		}
+	});
+	nodes.append('text')
+    .text(function(d){
+		return d.shortText;
+	})
+	.style("cursor",function (d,i){
+		if(d.type == "e"){
+			return "pointer";
+		}else{
+			return "auto";
+		}
+	})
+	.on("click",function (d,i){
+		if(!dragstatus && d.type == "e"){
+			window.open("/enterpriseInfoByRegNO/"+d.name+".html");
+		}
+	});
+	setTimeout(function() {
+	    nodes.each(function(d) {
+	        var node   = d3.select(this),
+	            text   = node.selectAll('text'),
+	            bounds = {},
+	            first  = true;
+				
+			text.each(function() {
+	            var box = this.getBBox();
+	            if (first || box.x < bounds.x1) {
+	                bounds.x1 = box.x;
+	            }
+	            if (first || box.y < bounds.y1) {
+	                bounds.y1 = box.y;
+	            }
+	            if (first || box.x + box.width > bounds.x2) {
+	                bounds.x2 = box.x + box.width;
+	            }
+	            if (first || box.y + box.height > bounds.y2) {
+	                bounds.y2 = box.y + box.height;
+	            }
+	            first = false;
+	        }).attr('text-anchor', 'middle');
+				
+	        var padding  = {"left":3,"right":3,"top":2,"bottom":2},
+	            margin   = {"left":3,"right":3,"top":2,"bottom":2},
+	            oldWidth = bounds.x2 - bounds.x1;
+	
+	        bounds.x1 -= oldWidth / 2;
+	        bounds.x2 -= oldWidth / 2;
+	
+	        bounds.x1 -= padding.left;
+	        bounds.y1 -= padding.top;
+	        bounds.x2 += padding.left + padding.right;
+	        bounds.y2 += padding.top  + padding.bottom;
+			
+			var width = bounds.x2 - bounds.x1;
+			var height = bounds.y2 - bounds.y1;
+	        node.select('rect')
+	            .attr('x', bounds.x1)
+	            .attr('y', bounds.y1)
+				//.attr('height', height)
+	            .attr('width', width);
+	            
+	        d.edge = {
+	            left   : new geo.LineSegment(bounds.x1, bounds.y1, bounds.x1, bounds.y2),
+	            right  : new geo.LineSegment(bounds.x2, bounds.y1, bounds.x2, bounds.y2),
+	            top    : new geo.LineSegment(bounds.x1, bounds.y1, bounds.x2, bounds.y1),
+	            bottom : new geo.LineSegment(bounds.x1, bounds.y2, bounds.x2, bounds.y2)
+	        };
+	    });
+	    force.start();
+	},10);
+
+	function highlightObject(obj,flag){
+		if(mouseoverstatus){
+			return;
+		}
+		if(!flag){
+			d3.selectAll(".node").each(function (){
+				d3.select(this).style("opacity","1");
+			});
+			d3.selectAll("path").each(function (){
+				d3.select(this).style("opacity","1");
+			});
+			return;
+		}
+		var name = obj.__data__.name;
+		d3.selectAll(".node").each(function (){
+			if(name != this.__data__.name){
+				d3.select(this).style("opacity","0.2");
+			}
+		});
+		d3.selectAll("path").each(function (){
+			var targetName = this.__data__.target.name;
+			var sourceName = this.__data__.source.name;
+			if(name != targetName && name != sourceName){
+				d3.select(this).style("opacity","0.2");
+			}else{
+				d3.selectAll(".node").each(function (){
+					if(targetName == this.__data__.name || sourceName == this.__data__.name){
+						d3.select(this).style("opacity","1");
+					}
+				});
+			}
+		});
+		
+	}
+	function removeNode(obj){
+		if(d3.event.which != 3){
+			return;
+		}
+		highlightObject(obj,false);
+		d3.select(obj).remove();
+		var name = obj.__data__.name;
+		var removeAloneNode = function(removeNodeName){
+			var isRemoveAloneNode = true;
+			d3.selectAll("path").each(function (i){
+				if(removeNodeName == this.__data__.source.name || removeNodeName == this.__data__.target.name){
+					isRemoveAloneNode = false;
+					return true;
+				}
+			});
+			if(isRemoveAloneNode){
+				d3.selectAll("rect").each(function (){
+					if(this.__data__.name == removeNodeName){
+						d3.select(this).remove();
+						return true;
+					}
+				});
+				d3.selectAll("text").each(function (){
+					if(this.__data__.name == removeNodeName){
+						d3.select(this).remove();
+						return true;
+					}
+				});
+			}
+		}
+		d3.selectAll("path").each(function (){
+			if(name == this.__data__.target.name){
+				var fromNodeName = this.__data__.source.name;
+				d3.select(this).remove();
+				removeAloneNode(fromNodeName);
+			}else if(name == this.__data__.source.name){
+				var toNodeName = this.__data__.target.name;
+				d3.select(this).remove();
+				removeAloneNode(toNodeName);
+			}
+		});
+		d3.selectAll("rect").each(function (){
+			if(name == this.__data__.name){
+				d3.select(this).remove();
+			}
+		});
+		d3.selectAll("text").each(function (){
+			if(name == this.__data__.name){
+				d3.select(this).remove();
+			}
+		});
+	}
+	var diagonal = d3.svg.diagonal()
+	.projection(function(d) { return [d.y, d.x]; });
+	
+	
+	
+	
+	/////////////重绘画布///////////////////
+	var redrawflag=false;
+	//重绘
+	function redraw(){
+		if(force!=undefined){
+			var w = parseInt($("#gx").css("width").replace("px","")) - 80;
+			var h = parseInt($("#gx").css("height").replace("px",""))-10;
+			d3.select("svg").attr("width", w).attr("height", h);
+			force.size([w,h]).resume();
+			$("#infovis").css({width:w,height:h});
+			//
+			redrawflag=false;
+		}
+		
+	}
+	$(window).resize(function(){
+		if(!redrawflag){
+		    //1秒后重绘
+			redrawflag=true;
+			setTimeout(redraw,1000);
+		}
+		firstresize=false;
+	});
+	///////////////////////关系网实例////////////////////////////
+	var htmls="<div style='position:absolute;' class='legend'>";
+	htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><div style='background-color: #ff9800;'></div><span style='margin-left: 20px;'>本企业</span></div>";
+	htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><div style='background-color: #cddc39;opacity:0.5;'></div><span style='margin-left: 12px;'>其他企业</span></div>";
+	htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;'><div style='background-color: #2196f3;'></div><span style='margin-left: 25px;'>个人</span></div>";
+	htmls= htmls+ "<div class='legend-text-bg' style='margin-top: 10px;margin-bottom: 10px;'><div style='background-color: #cecece;'></div><span style='margin-left: 5px;'>注吊销企业</span></div>";
+	htmls= htmls+ "<div><span style='font-size: 20px;font-weight: bold;color: #cecece;'>→</span><span style=''>投资关系(股东→企业)</span></div>";
+	htmls= htmls+ "<div><span style='font-size: 20px;font-weight: bold;color: #cd93d7;'>→</span><span style=''>法定代表人</span></div>";
+	htmls= htmls+ "<div style='margin:10px 0px;' class='hidden-sm hidden-xs'><span class='text-muted'>提示:点击鼠标右键可以删除不想看的节点。</span></div>";
+	htmls= htmls+"</div>"
+	$("#gxw_bs").html(htmls);
+
+//}catch(e){alert(e)}
+}else{
+	//当关系网不存在的时候设置隐藏
+	$("#agx").parent().hide();
+	$("#gx").hide();
+}
+
+var perPage=5,currentPage=1
+//解析服务列表
+$(function(){	
+	//重绘关系网
+	try{		
+		redraw();	
+	}catch(e){}
+	try{
+		if(isLogined){
+			//initFullScreen();
+		}
+		
+	}catch(e){}
+
+	//联系地址
+	if($chiancity){
+		setcxSelect();	
+		var pt=province?($("#provincesel option[value="+province+"]").text()+" "):"";
+		var ct=city?($("#citysel option[value="+city+"]").text()+" "):"";
+		var at=area?($("#areasel option[value="+area+"]").text()+" "):"";
+		//设置地图上显示的位置
+		$("#location").attr("value",as1);
+		$("#cityname").attr("value",pt.trim()+ct.trim()+at.trim());		
+		
+		//获取地图的经纬度
+		doOptions();
+		$("#city_china").text(pt+ct+at+as1);
+	}else{	
+		setcxSelect();
+	}
+	//加载服务列表
+	initServiceList();
+});
+//点击服务标题展示服务信息
+function clickservicename(id,isshow){
+	if(isshow.indexOf("3")>-1){
+		window.location.href="/market/detail/"+id+".html"
+	}else{
+		window.location.href="/market/showservice/"+id+".html"
+	}
+}
+function initServiceList(){	
+	$("#service_list").datatable({
+	   perPage: perPage
+	  ,showPagination:false
+	  ,checkbox:"" 
+	  ,checkboxHeader:false
+	  ,showHeader:false
+	  ,idField:"_id"
+	  ,classname:"table-hover"
+	  ,url: '/wx/searchEntSer/' + $entid
+	  ,rowCallback: analyList,
+	   ajaxSuccess:function(res,o){	
+		if(!res || res === undefined || !res.data || res.data.length == 0) {
+			o.continueBody=false;
+			$("#loadMore").hide();
+			$("#service").hide();
+		}else{
+			$("#service").show();
+		}
+		//判断加载更多是否显示
+		if(res.totalRows>5){
+			$("#loadMore").show();
+		}else{
+			$("#loadMore").hide();
+		}
+	   }
+	});
+}
+
+
+//显示二维码图片
+function viewBarCode(bcpath){
+	if(bcpath){
+		$('#myModal').modal({
+      		keyboard: true
+   		})
+		$("#viewImgs").html("<img style='width:300px;height:300px;' src='"+bcpath+"'/>")
+	}
+}
+
+
+function analyList(rowHtml, rowData) {
+	var t="";
+	if(rowData.i_status==1){
+		t=template_content.replace("<a class='text-primary' value='${_id}' data-id='${s_isEdit}' onclick='removeservice(this)'>下架</a>","");
+	}else{
+		t=template_content.replace("已下架","");
+	}
+	return t.replace(/\$\{(.*?)\}/g,
+	function(a, b, c) {
+		var res = rowData[b]||"";
+		//去掉后台服务列表中的图片
+		var data = res.replace(/<img.*>.*<\/img>/ig,"");   //过滤如<img></img>形式的图片元素
+		res = data.replace(/<img.*\/>/ig, "");   //过滤如<img />形式的元素
+		if (!res&&b=="s_images"){
+			res="/images/services/default.png"
+		}else{
+			res = res.replace(/\n/g,"");
+		}
+		return res;
+	});
+}
+//加载更多
+function loadMore(){
+	$.post('/wx/searchEntSer/'+$entid ,{currentPage:currentPage+1,perPage:perPage},function(data){
+		if(data){
+			var res=data["data"]
+			if(!res || res === undefined || res.length == 0) {
+				$("#loadMore").hide();
+				return;
+			}else if(data.totalRows<=(perPage*data.currentPage)){
+				$("#loadMore").hide();
+			}else{
+				$("#loadMore").show();
+			}
+			currentPage=data["currentPage"];
+			var str="";
+			
+			for(var i=0;i<res.length;i++){
+				var temp=res[i];
+				str+=analyList("",temp)
+			}
+			$("#service_list table tbody").append(str);
+		}
+	})
+}
+
+//设置级联位置信息
+function setcxSelect(){
+	$('#city_china').cxSelect({
+		selects: ['province', 'city', 'area'],
+		required:0
+	});
+	$.cxSelect.setVal(province,city,area);	
+}
+
+
+
+
+

+ 4 - 4
core/src/web/templates/common/head.html

@@ -2,7 +2,7 @@
 <div class="a-header">
 	<table>
 		<tr>
-			<td class="a-h-logo">
+			<td class="a-h-logo hidden-xs">
 				<a href="/">
 					<img alt="" src="/images/logo.png" class="hidden-xs"/>
 					<img alt="" src="/images/login_logo.png" class="visible-xs"/>
@@ -12,7 +12,7 @@
 		       	<ul class="text-center" id="head-navbar-ul">
 			        <li><img src="/images/nav-fwsc.png" class="visible-xs-inline"><a href="/market/0/list.html">服务市场</a></li>
 					<li class="hidden-xs"><img src="/images/nav-jy.png" class="visible-xs-inline"><a href="/front/swordfish">剑鱼</a></li>
-		            <li><img src="/images/nav-qysq.png" class="visible-xs-inline"><a href="/search/enterprise/ent.html">企业社区</a></li>
+		            <li><img src="/images/nav-qysq.png" class="visible-xs-inline"><a href="/wx/search/enterprise/ent.html">企业社区</a></li>
 		            <li><img src="/images/nav-zcfg.png" class="visible-xs-inline"><a href="/front/content_zcfg_list.html">政策法规</a></li>
 		            <li><img src="/images/nav-xwzx.png" class="visible-xs-inline"><a href="/front/content_qykb_list.html">新闻资讯</a></li>
 					<li class="hidden-xs"><img src="/images/nav-wgw.png" class="visible-xs-inline"><a href="/front/wsite.html">微官网</a></li>
@@ -45,7 +45,7 @@
 							<input type="hidden" name="c_zb" id="zb" value="">
 						</form>
 		       		</div><!-- /input-group -->
-				<div class="a-h-nav-btn">
+				<div class="a-h-nav-btn hidden-xs">
 					<img src="/images/nav-btn.png" class="visible-xs-inline" id="nvaBtn">
 				</div>
 			</td>
@@ -279,7 +279,7 @@ function setNavbarActive(index,type){
 			{{end}}
 			searchBtnText = "企业社区";
 			//action = "{{.T.uri}}";
-			action = "/search/enterprise/ent.html";
+			action = "/wx/search/enterprise/ent.html";
 			//设置即时下拉
 			$("#header-searchInput,#words").attr("autocomplete","off").keyup(function(){
 				imFind(this)

+ 18 - 15
core/src/web/templates/member/credit/mcreditindex.html

@@ -89,6 +89,8 @@
 			position: absolute;
 			width: 100%;
 			background: #FFF;
+		}
+		.creditrules{
 			top: 60px;
 		}
 		.creditrules div.content{
@@ -110,7 +112,7 @@
 			text-align:center;
 		}
 		.bookinfo{
-			top:226px;
+			bottom:0px;
 		}
 		.bookinfo div.content{
 			padding:20px 0;
@@ -132,6 +134,7 @@
 		}
 		.bookinfo div.content img{
 			width:57px;
+			bottom:0px;
 		}
 	</style>
 </head>
@@ -319,7 +322,7 @@
 				}
 			})
 		}
-		function bookinfo(){
+		function bookinfo(isInCredit){
 			$.ajax({
 				url:"/member/credit/bookinfo",
 				method:"POST",
@@ -345,6 +348,16 @@
 						$(".days").text("0");
 						$(".days").attr("data",0);
 					}
+					if (isInCredit){
+						var g=parseInt($(".gold").text());
+						var days=parseInt($(".days").attr("data"))
+						if (days==0){
+							days=1
+						}
+						var d=parseInt(days*10)
+						var g=g+d;
+						$(".gold").text(g);
+					}
 				}
 			});
 		}
@@ -368,22 +381,12 @@
 			return false;
 		}
 		function qd(){
-			$.post("/member/credit/inCreditAjx",{"param":"qd"},function(r){
-				bookinfo();
+			$.post("/member/credit/inCreditAjx",{"param":"qd"},function(r){				
 				if (r.result=="y"){
-					var g=parseInt($(".gold").text());
-					var days=parseInt($(".days").attr("data"))
-					if (days==0){
-						days=1
-					}
-					var d=parseInt(days*10)
-					var g=g+d;
-					console.log(g);
-					$(".gold").text(g);
+					bookinfo(1);
 					$("#indexbookinbtn").attr("class","btn  btn-default bookin");
 					$("#bookinbtn").attr("class","btn   bookin");
-					$("#bookinbtn").attr("disabled","disabled");
-					
+					$("#bookinbtn").attr("disabled","disabled"); 
 				}
 				changeStatus();
 			});

+ 3 - 3
core/src/web/templates/search/enterpriseList.html

@@ -114,8 +114,8 @@
 											{{end}}
 										{{end}}
 										{{if index $v "RegCap"}}
-											{{if and (ne $v.EntType "9600") (ne $v.EntType "5810")}}
-												<span class="margin-l-15"><font class="b-disabled">注册资本:</font><font  class="lineb " ><script>var d1={{$v.EntType}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script>万元</font></span>
+											{{if and (ne $v.RegCapEntType "9600") (ne $v.RegCapEntType "5810")}}
+												<span class="margin-l-15"><font class="b-disabled">注册资本:</font><font  class="lineb " ><script>var d1={{$v.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script>万元</font></span>
 											{{end}}
 										{{end}}
 										<br>
@@ -192,4 +192,4 @@ var $chiancity= true,$listent=true;
 <script src="/js/enterprise.js"></script>
 
 </body>
-</html>
+</html>

+ 12 - 13
core/src/web/templates/search/enterpriseList_copy.html → core/src/web/templates/search/wxentlist.html

@@ -4,7 +4,7 @@
 <meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
 {{include "/common/inc.html"}}
 <script src="/js/jquery.cxselect.js"></script>
-<link href="/css/enterprise.css" rel="stylesheet">
+<link href="/wxent/qfw-enterprise.css" rel="stylesheet">
 <meta name="Keywords" content="{{Msg "seo" "qfw.enterprise.key"}}"/>
 <meta name="Description" content="{{Msg "seo" "qfw.enterprise.description"}}"/>
 </head>
@@ -14,7 +14,7 @@
 	<!--中间内容开始-->
 	<div class="row qfw-row">
 		<!--左边显示区开始-->
-		<div class="col-lg-9">
+		<div class="col-lg-9" style="padding-right: 0px;">
 		<div class="borderB text-primary fontb frontS hidden-sm hidden-xs">所有分类</div>
 			<!--查询条件-->
 			<div class="border container-fluid hidden-sm hidden-xs qfw-p-margintoplist" >
@@ -52,7 +52,7 @@
 						<div class="borderB">
 							<div class="qfw-entcontent-padding">
 								<div class="lineb " >
-									<a target="_blank" href="/enterprise/{{index $v "_id"}}.html">
+									<a target="_blank" href="/wx/enterprise/{{index $v "_id"}}.html">
 										{{$lens:=len (index $v "EntName")}}									 
 										{{if eq $lens 0}}
 											{{index $v "LeRep"}}
@@ -63,22 +63,22 @@
 									
 									{{ if index $v "s_action"}}
 										{{ if eq (index $v "s_action") "01"}}
-											<span class="glyphicon qyrz   margin-l-10 jhtb"></span><span class="lineb " ><small> 已认证企业 </small></span>
+											<span class="glyphicon qyrz   margin-l-10 jhtb"></span><span class=" " ><small>已认证企业</small></span>
 											{{ if $v.i_comauthenttype }}
 													{{ if eq $v.i_comauthenttype 2}}
-														<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-right:5px;">名片认证</small></span>					
+														<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-right:5px;">名片认证</small></span>					
 													{{else if eq $v.i_comauthenttype 1}}
-														<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+														<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
 													{{else if eq $v.i_comauthenttype 3}}
-														<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-right:5px;">年报邮箱认证</small></span>
+														<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-right:5px;">年报邮箱认证</small></span>
 													{{end}}
 											{{else}}
-													<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+													<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
 											{{end}}
 										{{else if eq (index $v "s_action") "02"}}
-											<span class="glyphicon grrz   margin-l-10 jhtb"></span><span class="lineb " ><small> 已认证个人</small></span>
+											<span class="glyphicon grrz   margin-l-10 jhtb"></span><span class=" " ><small> 已认证个人</small></span>
 										{{else if eq (index $v "s_action") "03"}}
-											<span class="glyphicon jgrz   margin-l-10 jhtb"></span><span class="lineb " ><small> 已认证机构</small></span>
+											<span class="glyphicon jgrz   margin-l-10 jhtb"></span><span class=" " ><small> 已认证机构</small></span>
 										{{end}}
 									{{end}}
 								</div>
@@ -155,7 +155,6 @@
 	</div>
 	<!--中间内容结束-->
 </div>
-{{include "/common/bottom.html"}}
 
 
 <script>
@@ -167,7 +166,7 @@ var czb= '{{index .T.querymap "c_zb"}}';
 var $chiancity= true,$listent=true;
 setNavbarActive(2);
 </script>
-<script src="/js/enterprise.js"></script>
+<script src="/wxent/qfw-enterprise.js"></script>
 
 </body>
-</html>
+</html>

+ 14 - 12
core/src/web/templates/service/detail.html

@@ -129,22 +129,12 @@
 								{{ if $v.i_identType }}
 									{{ if eq $v.i_identType 1}}
 										<span class="glyphicon qyrz   margin-l-10 jhtb"></span><span class="lineb " ><small style="margin-left:5px;margin-right:5px;">已认证企业 </small></span>
-										{{ if $v.i_comauthenttype }}
-												{{ if eq $v.i_comauthenttype 2}}
-													<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-right:-7px;">名片认证</small></span>					
-												{{else if eq $v.i_comauthenttype 1}}
-													<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-left:3px;margin-right:-7px;">营业执照认证</small></span>
-												{{else if eq $v.i_comauthenttype 3}}
-													<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-right:-7px;">年报邮箱认证</small></span>
-												{{end}}
-										{{else}}
-												<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-left:3px;margin-right:-7px;">营业执照认证</small></span>
-										{{end}}
 									{{else if eq $v.i_identType 2}}
 										<span class="glyphicon grrz   margin-l-10 jhtb"></span><span class="lineb " ><small style="margin-left:-5px;margin-right:5px;"> 已认证个人</small></span>
 									{{else if eq $v.i_identType 3}}
 										<span class="glyphicon jgrz   margin-l-10 jhtb"></span><span class="lineb " ><small style="margin-left:5px;margin-right:5px;">已认证机构</small></span>
 									{{end}}
+									<span  id="sjrz"></span><span class="lineb " id="sjrzlinb" ><small style="margin-left:3px;margin-right:5px;" ></small></span>
 								{{end}}
 						</span>
 						</div>
@@ -652,7 +642,6 @@ function comment(){
 					var s_servicename = r[i].s_servicename;
 					var l_createdate = r[i].l_createdate;
 					var src="/images/u885.png";
-					console.log(r[i]);
 					if (r[i]["s_pic"] && r[i]["s_pic"]!=""){
 						src=r[i]["s_pic"];
 					}
@@ -747,6 +736,19 @@ function comment(){
 			$("#releaseService").css("color","#FF5A5F");
 			$("#releaseService").css("font-weight","600");
 			$(".img-circle.b-com-first").css("background-color","#FF5A5F");
+			var sjrz="{{$v.i_comauthenttype}}";
+			var sjrzclass="";
+			var sjrzname="";
+			if (sjrz=="1"){
+				$("#sjrz").attr("class","glyphicon yyzzrz   margin-r-10 jhtbtype");
+				$("#sjrzlinb small").text("营业执照认证");
+			}else if (sjrz=="2"){
+				$("#sjrz").attr("class","glyphicon mprz   margin-r-10 jhtbtype");
+				$("#sjrzlinb small").text("名片认证");
+			}else if (sjrz=="3"){
+				$("#sjrz").attr("class","glyphicon yjrz   margin-r-10 jhtbtype");
+				$("#sjrzlinb small").text("年报邮箱认证");
+			}
 		});
 </script>
 </body>

+ 2 - 3
core/src/web/templates/service/list.html

@@ -1,4 +1,4 @@
-<html>
+<html>
 <head>
 <title>{{Msg "seo" "qfw.market.title"}}</title>
 {{include "/common/inc.html"}}
@@ -259,10 +259,10 @@
 			{{if gt (len .T.data) 0}}
 			<!--分页-->
 			<div>
+				<div>&nbsp;</div>
 				<div class="text-center" style="margin-top: -20px;">
 					<!--页码信息-->
 					<!--页码信息-->
-					<div class="text-center">
 						<ul class="pagination pagination-md ">
 						{{range $k,$v:=.T.pagination}}
 							<li {{if index $v "iscurrent"}} class="disabled active"{{end}}>
@@ -270,7 +270,6 @@
 							</li>
 						{{end}}
 						</ul>
-					</div>
 				</div>
 			</div>
 			<!--页码信息结束-->

+ 2 - 2
core/src/web/templates/service/viewsingledemand.html

@@ -1,4 +1,4 @@
-<html>
+<html>
   <head>
     <title>{{.T.demandInfo.s_name}}_{{Msg "seo" "qfw.market.title"}}</title>
     <meta charset="utf-8" />
@@ -108,7 +108,7 @@
 											{{if .T.demandInfo.i_identtype}}
 												{{if eq 1 .T.demandInfo.i_identtype}}
 													<span class="glyphicon qyrz   margin-l-10 jhtb"></span>
-													<small style="color:#000;margin-left:5px;">已认证企业</small>
+													<small style="color:#4e5051;margin-left:5px;">已认证企业</small>
 													{{ if .T.demandInfo.i_comauthenttype }}
 															{{ if eq .T.demandInfo.i_comauthenttype 2}}
 																<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="margin-right:5px;color:#4e5051;">名片认证</small></span>					

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

@@ -407,9 +407,9 @@ var province = {{.T.res.i_province}};
 var city = {{.T.res.i_city}};
 var area = {{.T.res.i_area}};
 var as1="{{.T.res.s_address}}";
-var address=false,$listent=false;
+var $address=false,$listent=false;
 {{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address}}
-	address = true;
+	$address = true;
 {{else if .T.res.Dom}}
 	initMap();
 {{end}}

+ 407 - 0
core/src/web/templates/yellowpage/ungxenterpriseinfo.html

@@ -0,0 +1,407 @@
+<html>
+<head>
+<title>{{.T.res.EntName}}_企业信息_企明星</title>
+<meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
+{{include "/common/inc.html"}}
+<meta name="Keywords" content="{{.T.res.EntName}},{{.T.res.EntName}}地址,{{.T.res.EntName}}怎么样"/>
+<meta name="Description" content="{{.T.res.OpScope}}"/>
+<link href="/wxent/qfw-enterprise.css" rel="stylesheet">
+<script src="/js/geocoder.js"></script>
+<script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217"></script>  
+<script src="/js/jquery.cxselect.js"></script>
+<script src="/js/qfwtable.js"></script>
+
+</head>
+<body>
+<div class="hidden-xs">{{include "/common/head.html"}}</div>
+<div id="entinfobg">	
+<div class="a-content">
+	<!--标题-->
+	<div id="titleactionimgs" class="row qfw-row">
+		<div>
+		<h3>
+		{{if .T.res.EntName }}
+			{{.T.res.EntName}}
+			{{if .T.res.s_qq}}
+				<script type="text/javascript">
+				    var online = new Array();
+				</script>
+				<script type= "text/javascript" src="http://webpresence.qq.com/getonline?Type=1&{{.T.res.s_qq}}:"></script>
+				<script type="text/javascript">
+					var imgSrc = "";
+			        if(online[0] == 1) {
+						imgSrc = "/images/qq_online.gif";
+			        }else{
+						imgSrc = "/images/qq_offline.gif";
+					}
+					document.write('<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={{.T.res.s_qq}}&site=qq&menu=yes"><img src="'+imgSrc+'" alt="点击这里给我发消息" title="点击这里给我发消息" border="0" /></a>');
+				</script>
+			{{end}}
+			{{if .T.res.s_microwebsite}}<span class="microwebsite visible-xs-inline"><i class="glyphicon weiguanwang"></i><a onclick="var _id = {{.T.res._id}};window.location.href='/ent/wsite/preview/'+_id">微官网</a></span>{{end}}
+		{{end}}
+		</h3>		
+		<!--企业认证图标--> 
+		{{if .T.res.EntName }}
+			{{if .T.res.s_action}}
+				{{$identaction:=.T.res.s_action}}		
+				{{if eq $identaction "01"}}
+					<span class="glyphicon qyrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证企业 </span> 
+						{{ if .T.res.i_comauthenttype }}
+								{{ if eq .T.res.i_comauthenttype 2}}
+									<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">名片认证</small></span>					
+								{{else if eq .T.res.i_comauthenttype 1}}
+									<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+								{{else if eq .T.res.i_comauthenttype 3}}
+									<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">年报邮箱认证</small></span>
+								{{end}}
+						{{else}}
+								<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+						{{end}}
+				{{else if eq $identaction "02"}}
+					<span class="glyphicon grrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证个人</span>
+				{{else if eq $identaction "03"}}
+					<span class="glyphicon jgrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证机构</span>
+				{{end}}
+			{{end}}
+		{{end}}
+		</div>
+	</div>
+	
+	<!--企业名片-->
+	{{if .T.res.s_persion}}	
+	<div class="row qfw-row qfw-p-margintop">
+		<div class="col-lg-12 border" id="our">
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon lianxiwomen icon_gray icon_large"></span>
+				<b>{{if .T.res.s_action}}  {{if eq .T.res.s_action "02"}}商家名片{{else if eq .T.res.s_action "01"}}企业名片{{else if eq .T.res.s_action "03"}}机构名片{{end}}{{end}}</b></h4>
+				<hr>
+				<!--企业名片详细信息-->				
+				{{if .T.res.s_persion }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxiren icon_gray"></span></div> 
+						<div class="two" style="letter-spacing: 5px;">联系人:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_persion}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_mobile }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxidianhua icon_gray"></span></div> 
+						<div class="two">联系电话:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_mobile}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_enturl }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon wangzhi icon_gray"></span></div> 
+						<div class="two">
+						{{if .T.res.s_action}}
+							{{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}}
+						{{else}}
+						企业网站:
+						{{end}}
+						</div> 
+						<div class="three"><span class="span999">{{.T.res.s_enturl}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_qq }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon qq icon_gray"></span></div> 
+						<div class="two">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Q&nbsp;Q:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_qq}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_weixin }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon weixinhao icon_gray"></span></div> 
+						<div class="two" style="letter-spacing: 5px;">微信号:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_weixin}}</span>
+						{{if .T.res.s_weixinbarcode}}
+						&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary " onClick="viewBarCode({{.T.res.s_weixinbarcode}});">扫一扫</a>
+						{{end}}
+						</div>
+					</div> 
+				</div>
+				{{end}}
+				{{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address  }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxidizhi icon_gray"></span></div> 
+						<div class="two">联系地址:</div> 
+						<div class="three">
+							<span class="span999" id="city_china">
+								<select  class="province cxselect select" id="provincesel" name="province" data-first-title="全国"></select>								
+								<select class="city cxselect select" id="citysel" name="city" data-first-title="选择市"></select>
+								<select class="area cxselect select" id="areasel" name="area" data-first-title="选择县"></select>
+							</span>
+							
+							<input id="location"  type="hidden">
+							<input id="cityname"  type="hidden">
+							{{if .T.res.s_address}}
+							<span class="glyphicon biaojidizhi icon_default text-primary" ></span> 	
+							<a href = "javascript:void(0)" onclick = "document.getElementById('mapshowdiv').style.display='block';document.getElementById('closeshowmap').style.display='block';document.getElementById('fade').style.display='block';">查看详细地图</a>
+							{{end}}
+						</div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_synopsis}}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one" style="vertical-align: top;"><span class="glyphicon falvshengming icon_gray"></span> </div> 
+						<div class="two" style="vertical-align: top;">
+						{{if .T.res.s_action}}
+							{{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}}
+						{{else}}
+						企业介绍:
+						{{end}}
+						</div> 
+						<div class="three">{{.T.res.s_synopsis}}</div>
+					</div> 
+				</div>
+				{{end}}
+				
+				
+			</div>
+		</div>
+	</div>	
+	<!--显示地图信息-->
+	<div id="mapshowdiv" class="white_content"></div>
+	<a href = "javascript:void(0)" onclick = "document.getElementById('mapshowdiv').style.display='none';document.getElementById('closeshowmap').style.display='none';document.getElementById('fade').style.display='none';"><div id="closeshowmap" class="closeshowmap">X</div></a>
+	<div id="fade" class="black_overlay"></div> 	
+	{{end}}	
+	
+	<!--产品服务-->	
+	<div class="row qfw-row qfw-p-margintop " style="display:none;" id="service">
+		<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon fuwu icon_gray icon_large"></span>
+				<b>产品服务</b></h4>
+				<hr>
+				<div class="service_list" id="service_list">
+					<table style="width:100%;" class="text-muted mt"><tbody></tbody></table>
+					<div class="text-muted mt">该公司暂未发布服务信息</div>
+				</div>
+				<div class="op1 text-center" id="loadMore" onClick="loadMore()" >加载更多</div>
+			</div>
+		</div>
+	</div>
+	<!--公示信息-->
+	<div class="row qfw-row qfw-p-margintop" id="gs">
+		<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon gongshixinxi icon_gray icon_large"></span>
+				<b>公示信息</b>&nbsp{{if .T.res.gs }}<font id="qggs" style="font-size:12px;"><small>(来源:<a href="http://gsxt.saic.gov.cn/" rel="nofollow" style="text-decoration: underline;color: #0099FF;">全国企业信用信息公示系统</a>)</small></font>{{end}}</h4>
+				<hr>
+				{{if .T.res.gs }}
+				{{if .T.res.RegNo }}
+				    <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zhucehao icon_gray"></span></div> 
+							<div class="two">注册号:<span class="span999">{{.T.res.RegNo}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.EntTypeName }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon qiyeleixing icon_gray"></span></div> 
+							<div class="two">类型: <span class="span999">{{.T.res.EntTypeName}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.LeRep }}
+				    <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon faren icon_gray"></span></div> 
+							<div class="two">{{.T.res.EntTypeLabel}}:<span class="span999">{{.T.res.LeRep}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.RegCap }}
+					{{if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810")}}
+					 <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zican icon_gray"></span></div> 
+							<div class="two">注册资本:<span class="span999"><script>var d1={{.T.res.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script> 万元</span></div> 
+						</div> 
+					</div>
+				    {{end}}
+				{{end}}
+				{{if .T.res.EstDate }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+							<div class="two">成立日期:<span class="span999">{{.T.res.EstDate}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.Dom }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zhusuo icon_gray"></span></div> 
+							<div class="two">住所: <span class="span999">{{.T.res.Dom}} </span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.OpStateName }}
+				 	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon dengjizhuangtai icon_gray"></span></div> 
+							<div class="two">登记状态:<span class="span999">{{.T.res.OpStateName}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.OpFrom }}
+					<div class="tablediv"> 
+					    <div class="rowcontent"> 
+					        <div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+					        <div class="two">营业期限:<span class="span999">自{{.T.res.OpFrom}}
+							{{if .T.res.OpTo }}至{{.T.res.OpTo }}{{end}}</span></div> 
+					    </div> 
+			       </div>
+				{{end}}
+				{{if .T.res.OpScope }}
+				   <div class="tablediv"> 
+					    <div class="rowcontent"> 
+					        <div class="one"><span class="glyphicon jingyingfanwei icon_gray"></span></div> 
+					        <div class="two">经营范围:<span class="span999">{{.T.res.OpScope}}</span></div> 
+					    </div> 
+			       </div>
+				{{end}}
+				{{if .T.res.RegOrgName }}
+					<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon dengjijiguan icon_gray"></span></div> 
+							<div class="two">登记机关:<span class="span999">{{.T.res.RegOrgName}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.IssBLicDate }}
+					<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+							<div class="two">核准日期:<span class="span999">{{.T.res.IssBLicDate}} </span> </div> 
+						</div> 
+					</div>
+			 	{{end}}				
+				{{end}}
+			</div>
+		</div>
+	</div>	
+	<!--关系网-->
+	<div class="row qfw-row qfw-p-margintop">
+			<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon guanxiwang icon_gray icon_large"></span>
+				<b>关系网</b></h4>
+				<hr>
+				<div class="text-primary text-center" id="gxlogin">
+					<span class="text-muted">扫码登录认证后,即可查看企业股东信息,投资关系,公司关系脉络图等内容<br><a  href="javascript:void(0)" class="btn btn-primary login a-com-login margin-t-10">扫码登录</a></span><br>
+				</div>
+			</div>
+		</div>
+	
+	</div>
+</div>
+</div>
+
+
+
+<!--弹出窗口显示上传的图片-->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+   <div class="modal-dialog mimg">
+        <div class="modal-content" style="width:400px;">
+         <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" style="margin-top: -10px;"
+               aria-hidden="true">×
+            </button>
+         </div>
+         <div class="modal-body" id="viewImgs" onclick="hideImgs()" style="cursor:pointer;text-align: center;" >
+            
+         </div>
+      </div><!-- /.modal-content -->
+   </div><!-- /.modal-dialog -->
+</div><!-- /.modal -->
+
+<!--右侧导航菜单-->
+{{include "/common/rightnavbtn.html"}}
+<!--右侧导航菜单-->
+</body>
+<script type="text/javascript">
+$(function(){
+	$("#gxlogin .a-com-login").click(function(){
+		loginModalShow();
+	});
+	setNavbarActive(2);
+});
+
+
+var entsel="",btempwords,chf1,czb;
+
+//企业信息ID
+ var id = {{.T.res._id}}
+//公式信息的变量
+var $gs = {{.T.res.gs}};
+var $relationlen=0
+//服务模板
+var template_content = "<tr><td><div class='row service_row'> "
++"<div class='col-sm-1'><div style='width:120px; height:120px; background-color:#eee;'><img class='hidden-xs' src='${s_images}' style='width:120px;height:120px'></div></div>"
++" <div class='col-sm-9'>"
++"<div class='linebser service_des'><div class='servicename text-primary'><a class='text-primary' target='_blank' onclick='clickservicename(\"${_id}\",\"${s_isshow}\")'>${s_name}</a></div><div class='text-muted'>${s_introduction}</div></div>"
++"</div></td><tr>"
+
+//注册号
+var regno="{{.T.res.RegNo}}";
+
+var legcerno = "{{.T.res.LegCerNO}}";
+var lerep="{{.T.res.LeRep}}";
+//联系地址
+var province = {{.T.res.i_province}};
+var city = {{.T.res.i_city}};
+var area = {{.T.res.i_area}};
+var as1="{{.T.res.s_address}}";
+var $chiancity= false,$listent=false;
+{{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address  }}
+	$chiancity= true;
+{{end}}
+
+var $resdata = {{.T.res.data}};
+var $entid = {{.T.res._id}};
+//定义默认的郑州经纬度
+var ptlat=113.69884285509,  ptlng=34.791342526551;
+
+//调用回调函数重新加载页面
+function publicCallBack(){
+	//location.reload();
+	window.location.href="/wx/enterprise/"+$entid+".html"
+}
+</script>
+<script src="/wxent/qfw-frontenterprise.js"></script>
+
+</html>

+ 402 - 0
core/src/web/templates/yellowpage/unrzenterpriseinfo.html

@@ -0,0 +1,402 @@
+<html>
+<head>
+<title>{{.T.res.EntName}}_企业信息_企明星</title>
+<meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
+{{include "/common/inc.html"}}
+<meta name="Keywords" content="{{.T.res.EntName}},{{.T.res.EntName}}地址,{{.T.res.EntName}}怎么样"/>
+<meta name="Description" content="{{.T.res.OpScope}}"/>
+<link href="/wxent/qfw-enterprise.css" rel="stylesheet">
+<script src="/js/geocoder.js"></script>
+<script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217"></script>  
+<script src="/js/jquery.cxselect.js"></script>
+<script src="/js/qfwtable.js"></script>
+
+</head>
+<body>
+<div class="hidden-xs">{{include "/common/head.html"}}</div>
+<div id="entinfobg">	
+<div class="a-content">
+	<!--标题-->
+	<div id="titleactionimgs" class="row qfw-row">
+		<div>
+		<h3>
+		{{if .T.res.EntName }}
+			{{.T.res.EntName}}
+			{{if .T.res.s_qq}}
+				<script type="text/javascript">
+				    var online = new Array();
+				</script>
+				<script type= "text/javascript" src="http://webpresence.qq.com/getonline?Type=1&{{.T.res.s_qq}}:"></script>
+				<script type="text/javascript">
+					var imgSrc = "";
+			        if(online[0] == 1) {
+						imgSrc = "/images/qq_online.gif";
+			        }else{
+						imgSrc = "/images/qq_offline.gif";
+					}
+					document.write('<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={{.T.res.s_qq}}&site=qq&menu=yes"><img src="'+imgSrc+'" alt="点击这里给我发消息" title="点击这里给我发消息" border="0" /></a>');
+				</script>
+			{{end}}			
+			{{if .T.res.s_microwebsite}}<span class="microwebsite visible-xs-inline"><i class="glyphicon weiguanwang"></i><a onclick="var _id = {{.T.res._id}};window.location.href='/ent/wsite/preview/'+_id">微官网</a></span>{{end}}
+		{{end}}
+		</h3>		
+		<!--企业认证图标--> 
+		{{if .T.res.EntName }}
+			{{if .T.res.s_action}}
+				{{$identaction:=.T.res.s_action}}		
+				{{if eq $identaction "01"}}
+					<span class="glyphicon qyrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证企业</span>
+						{{ if .T.res.i_comauthenttype }}
+								{{ if eq .T.res.i_comauthenttype 2}}
+									<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">名片认证</small></span>					
+								{{else if eq .T.res.i_comauthenttype 1}}
+									<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+								{{else if eq .T.res.i_comauthenttype 3}}
+									<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">年报邮箱认证</small></span>
+								{{end}}
+						{{else}}
+								<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+						{{end}}
+				{{else if eq $identaction "02"}}
+					<span class="glyphicon grrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证个人</span>
+				{{else if eq $identaction "03"}}
+					<span class="glyphicon jgrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证机构</span>
+				{{end}}
+			{{end}}
+		{{end}}
+		</div>
+	</div>
+	
+	<!--企业名片-->
+	{{if .T.res.s_persion}}	
+	<div class="row qfw-row qfw-p-margintop">
+		<div class="col-lg-12 border" id="our">
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon lianxiwomen icon_gray icon_large"></span>
+				<b>{{if .T.res.s_action}}  {{if eq .T.res.s_action "02"}}商家名片{{else if eq .T.res.s_action "01"}}企业名片{{else if eq .T.res.s_action "03"}}机构名片{{end}}{{end}}</b></h4>
+				<hr>
+				<!--企业名片详细信息-->				
+				{{if .T.res.s_persion }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxiren icon_gray"></span></div> 
+						<div class="two" style="letter-spacing: 5px;">联系人:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_persion}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_mobile }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxidianhua icon_gray"></span></div> 
+						<div class="two">联系电话:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_mobile}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_enturl }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon wangzhi icon_gray"></span></div> 
+						<div class="two">
+						{{if .T.res.s_action}}
+							{{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}}
+						{{else}}
+						企业网站:
+						{{end}}
+						</div> 
+						<div class="three"><span class="span999">{{.T.res.s_enturl}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_qq }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon qq icon_gray"></span></div> 
+						<div class="two">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Q&nbsp;Q:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_qq}}</span></div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_weixin }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon weixinhao icon_gray"></span></div> 
+						<div class="two" style="letter-spacing: 5px;">微信号:</div> 
+						<div class="three"><span class="span999">{{.T.res.s_weixin}}</span>
+						{{if .T.res.s_weixinbarcode}}
+						&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary " onClick="viewBarCode({{.T.res.s_weixinbarcode}});">扫一扫</a>
+						{{end}}
+						</div>
+					</div> 
+				</div>
+				{{end}}
+				{{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address  }}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one"><span class="glyphicon lianxidizhi icon_gray"></span></div> 
+						<div class="two">联系地址:</div> 
+						<div class="three">
+							<span class="span999" id="city_china">
+								<select  class="province cxselect select" id="provincesel" name="province" data-first-title="全国"></select>								
+								<select class="city cxselect select" id="citysel" name="city" data-first-title="选择市"></select>
+								<select class="area cxselect select" id="areasel" name="area" data-first-title="选择县"></select>
+							</span>
+							
+							<input id="location"  type="hidden">
+							<input id="cityname"  type="hidden">
+							{{if .T.res.s_address}}
+							<span class="glyphicon biaojidizhi icon_default text-primary" ></span> 	
+							<a href = "javascript:void(0)" onclick = "document.getElementById('mapshowdiv').style.display='block';document.getElementById('closeshowmap').style.display='block';document.getElementById('fade').style.display='block';">查看详细地图</a>
+							{{end}}
+						</div>
+					</div> 
+				</div>
+				{{end}}
+				{{if .T.res.s_synopsis}}
+				<div class="tablediv"> 
+					<div class="rowcontent"> 
+						<div class="one" style="vertical-align: top;"><span class="glyphicon falvshengming icon_gray"></span> </div> 
+						<div class="two" style="vertical-align: top;">
+						{{if .T.res.s_action}}
+							{{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}}
+						{{else}}
+						企业介绍:
+						{{end}}
+						</div> 
+						<div class="three">{{.T.res.s_synopsis}}</div>
+					</div> 
+				</div>
+				{{end}}
+				
+				
+			</div>
+		</div>
+	</div>	
+	<!--显示地图信息-->
+	<div id="mapshowdiv" class="white_content"></div>
+	<a href = "javascript:void(0)" onclick = "document.getElementById('mapshowdiv').style.display='none';document.getElementById('closeshowmap').style.display='none';document.getElementById('fade').style.display='none';"><div id="closeshowmap" class="closeshowmap">X</div></a>
+	<div id="fade" class="black_overlay"></div> 	
+	{{end}}	
+	
+	<!--产品服务-->	
+	<div class="row qfw-row qfw-p-margintop " style="display:none;" id="service">
+		<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon fuwu icon_gray icon_large"></span>
+				<b>产品服务</b></h4>
+				<hr>
+				<div class="service_list" id="service_list">
+					<table style="width:100%;" class="text-muted mt"><tbody></tbody></table>
+					<div class="text-muted mt">该公司暂未发布服务信息</div>
+				</div>
+				<div class="op1 text-center" id="loadMore" onClick="loadMore()" >加载更多</div>
+			</div>
+		</div>
+	</div>
+	<!--公示信息-->
+	<div class="row qfw-row qfw-p-margintop" id="gs">
+		<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon gongshixinxi icon_gray icon_large"></span>
+				<b>公示信息</b>&nbsp{{if .T.res.gs }}<font id="qggs" style="font-size:12px;"><small>(来源:<a href="http://gsxt.saic.gov.cn/"  rel="nofollow" style="text-decoration: underline;color: #0099FF;">全国企业信用信息公示系统</a>)</small></font>{{end}}</h4>
+				<hr>
+				{{if .T.res.gs }}
+				{{if .T.res.RegNo }}
+				    <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zhucehao icon_gray"></span></div> 
+							<div class="two">注册号:<span class="span999">{{.T.res.RegNo}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.EntTypeName }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon qiyeleixing icon_gray"></span></div> 
+							<div class="two">类型: <span class="span999">{{.T.res.EntTypeName}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.LeRep }}
+				    <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon faren icon_gray"></span></div> 
+							<div class="two">{{.T.res.EntTypeLabel}}:<span class="span999">{{.T.res.LeRep}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.RegCap }}
+					{{if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810")}}
+					 <div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zican icon_gray"></span></div> 
+							<div class="two">注册资本:<span class="span999"><script>var d1={{.T.res.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script> 万元</span></div> 
+						</div> 
+					</div>
+				    {{end}}
+				{{end}}
+				{{if .T.res.EstDate }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+							<div class="two">成立日期:<span class="span999">{{.T.res.EstDate}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.Dom }}
+				  	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon zhusuo icon_gray"></span></div> 
+							<div class="two">住所: <span class="span999">{{.T.res.Dom}} </span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.OpStateName }}
+				 	<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon dengjizhuangtai icon_gray"></span></div> 
+							<div class="two">登记状态:<span class="span999">{{.T.res.OpStateName}}</span></div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.OpFrom }}
+					<div class="tablediv"> 
+					    <div class="rowcontent"> 
+					        <div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+					        <div class="two">营业期限:<span class="span999">自{{.T.res.OpFrom}}
+							{{if .T.res.OpTo }}至{{.T.res.OpTo }}{{end}}</span></div> 
+					    </div> 
+			       </div>
+				{{end}}
+				{{if .T.res.OpScope }}
+				   <div class="tablediv"> 
+					    <div class="rowcontent"> 
+					        <div class="one"><span class="glyphicon jingyingfanwei icon_gray"></span></div> 
+					        <div class="two">经营范围:<span class="span999">{{.T.res.OpScope}}</span></div> 
+					    </div> 
+			       </div>
+				{{end}}
+				{{if .T.res.RegOrgName }}
+					<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon dengjijiguan icon_gray"></span></div> 
+							<div class="two">登记机关:<span class="span999">{{.T.res.RegOrgName}}</span> </div> 
+						</div> 
+					</div>
+				{{end}}
+				{{if .T.res.IssBLicDate }}
+					<div class="tablediv"> 
+						<div class="rowcontent"> 
+							<div class="one"><span class="glyphicon riqi icon_gray"></span></div> 
+							<div class="two">核准日期:<span class="span999">{{.T.res.IssBLicDate}} </span> </div> 
+						</div> 
+					</div>
+			 	{{end}}				
+				{{end}}
+			</div>
+		</div>
+	</div>	
+	<!--关系网-->
+	<div class="row qfw-row qfw-p-margintop">
+			<div class="col-lg-12 border" >
+			<div class="qfw-entinfo-padding41">
+				<h4><span class="glyphicon guanxiwang icon_gray icon_large"></span>
+				<b>关系网</b></h4>
+				<hr>
+				<div class="text-primary text-center" id="gxlogin">
+					<span class="text-muted">认证后即可查看企业股东信息,投资关系,公司关系脉络图等内容<br><a  href="javascript:void(0)" class="btn btn-primary login a-com-login margin-t-10">认证</a></span>
+				</div>
+			</div>
+		</div>
+	
+	</div>
+</div>
+</div>
+
+
+
+<!--弹出窗口显示上传的图片-->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+   <div class="modal-dialog mimg">
+        <div class="modal-content" style="width:400px;">
+         <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" style="margin-top: -10px;"
+               aria-hidden="true">×
+            </button>
+         </div>
+         <div class="modal-body" id="viewImgs" onclick="hideImgs()" style="cursor:pointer;text-align: center;" >
+            
+         </div>
+      </div><!-- /.modal-content -->
+   </div><!-- /.modal-dialog -->
+</div><!-- /.modal -->
+
+<!--右侧导航菜单-->
+{{include "/common/rightnavbtn.html"}}
+<!--右侧导航菜单-->
+
+</body>
+<script type="text/javascript">
+$(function(){
+	$("#gxlogin .a-com-login").click(function(){
+		window.location.href="/member/accountset/index";
+	});
+	setNavbarActive(2);
+});
+
+
+var entsel="",btempwords,chf1,czb;
+
+//企业信息ID
+ var id = {{.T.res._id}}
+//公式信息的变量
+var $gs = {{.T.res.gs}};
+var $relationlen=0
+//服务模板
+var template_content = "<tr><td><div class='row service_row'> "
++"<div class='col-sm-1'><div style='width:120px; height:120px; background-color:#eee;'><img class='hidden-xs' src='${s_images}' style='width:120px;height:120px'></div></div>"
++" <div class='col-sm-9'>"
++"<div class='linebser service_des'><div class='servicename text-primary'><a class='text-primary' target='_blank' onclick='clickservicename(\"${_id}\",\"${s_isshow}\")'>${s_name}</a></div><div class='text-muted'>${s_introduction}</div></div>"
++"</div></td><tr>"
+
+//注册号
+var regno="{{.T.res.RegNo}}";
+
+var legcerno = "{{.T.res.LegCerNO}}";
+var lerep="{{.T.res.LeRep}}";
+//联系地址
+var province = {{.T.res.i_province}};
+var city = {{.T.res.i_city}};
+var area = {{.T.res.i_area}};
+var as1="{{.T.res.s_address}}";
+var $chiancity= false,$listent=false;
+{{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address  }}
+	$chiancity= true;
+{{end}}
+
+var $resdata = {{.T.res.data}};
+var $entid = {{.T.res._id}};
+//定义默认的郑州经纬度
+var ptlat=113.69884285509,  ptlng=34.791342526551;
+</script>
+<script src="/wxent/qfw-frontenterprise.js"></script>
+
+</html>

+ 7 - 8
core/src/web/templates/yellowpage/e.html → core/src/web/templates/yellowpage/wxentinfo.html

@@ -5,7 +5,7 @@
 {{include "/common/inc.html"}}
 <meta name="Keywords" content="{{.T.res.EntName}},{{.T.res.EntName}}地址,{{.T.res.EntName}}怎么样"/>
 <meta name="Description" content="{{.T.res.OpScope}}"/>
-<link href="/css/enterprise.css" rel="stylesheet">
+<link href="/wxent/qfw-enterprise.css" rel="stylesheet">
 <script src="/js/geocoder.js"></script>
 <script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217"></script>  
 <script src="/js/jquery.cxselect.js"></script>
@@ -43,7 +43,7 @@ var entType="企业"
 					document.write('<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={{.T.res.s_qq}}&site=qq&menu=yes"><img src="'+imgSrc+'" alt="点击这里给我发消息" title="点击这里给我发消息" border="0" /></a>');
 				</script>
 			{{end}}
-			{{if .T.res.s_microwebsite}}<span class="microwebsite visible-xs-inline"><i class="glyphicon weiguanwang"></i><a href="/ent/wsite/preview/{{.T.res.entid}}">微官网</a></span>{{end}}
+			{{if .T.res.s_microwebsite}}<span class="microwebsite visible-xs-inline"><i class="glyphicon weiguanwang"></i><a onclick="var _id = {{.T.res._id}};window.location.href='/ent/wsite/preview/'+_id">微官网</a></span>{{end}}
 		{{end}}
 		</h3>
 		<!--企业认证图标--> 
@@ -56,14 +56,14 @@ var entType="企业"
 					<span class="glyphicon qyrz   margin-l-10 jhtb"></span> <span class="identactionType">已认证企业 </span> 
 						{{ if .T.res.i_comauthenttype }}
 								{{ if eq .T.res.i_comauthenttype 2}}
-									<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="color:#fff;margin-right:5px;">名片认证</small></span>					
+									<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">名片认证</small></span>					
 								{{else if eq .T.res.i_comauthenttype 1}}
-									<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="color:#fff;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+									<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
 								{{else if eq .T.res.i_comauthenttype 3}}
-									<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="color:#fff;margin-right:5px;">年报邮箱认证</small></span>
+									<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-right:5px;">年报邮箱认证</small></span>
 								{{end}}
 						{{else}}
-								<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class="lineb " ><small style="color:#fff;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
+								<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="color:#dd4814;margin-left:3px;margin-right:5px;">营业执照认证</small></span>
 						{{end}}
 				{{else if eq $identaction "02"}}
 				<script>entType="商家"</script>
@@ -343,7 +343,6 @@ var entType="企业"
 <!--右侧导航菜单-->
 {{include "/common/rightnavbtn.html"}}
 <!--右侧导航菜单-->
-{{include "/common/bottom.html"}}
 </body>
 <script type="text/javascript">
 
@@ -387,6 +386,6 @@ var $entid = {{.T.res._id}};
 var ptlat=113.69884285509,  ptlng=34.791342526551;
 var $res = {{.T.res}};
 </script>
-<script src="/js/frontenterprise.js"></script>
+<script src="/wxent/qfw-frontenterprise.js"></script>
 
 </html>

+ 2 - 2
credit/src/main.go

@@ -258,13 +258,13 @@ func doSubCreditByUser(userId, umid, typeName, code string, next *time.Time, use
 			bsub = true
 		}
 		if bsub { //扣分操作
-			newDate := next.AddDate(0, 1, 0)
+			newDate := time.Now().AddDate(0, 1, 0)
 			creditDoc := map[string]interface{}{
 				"s_uid":     userId,
 				"s_umid":    umid,
 				"s_code":    code,
 				"i_type":    0, //是扣
-				"l_date":    next.Unix(),
+				"l_date":    time.Now().Unix(),
 				"l_enddate": newDate.Unix(),
 				"i_score":   codeNum,
 				"s_type":    typeName,

+ 1 - 1
credit/src/qfw/creditrpc/creditrpc.go

@@ -272,7 +272,7 @@ func (c *CreditRpc) OutCreadit(param *qrpc.CreditData, replay *int) error {
 		var newDate time.Time
 		switch first {
 		case "A":
-			newDate = GetTimeByNow(now, Hour).AddDate(0, 1, 0)
+			newDate = time.Now().AddDate(0, 1, 0)
 			creditDoc["l_enddate"] = newDate.Unix()
 			creditDoc["i_valid"] = 1
 			if param.OtherParam != nil {

+ 8 - 1
push/src/qfw/push/dopush/dopush.go

@@ -16,6 +16,12 @@ import (
 	"time"
 )
 
+var se util.SimpleEncrypt
+
+func init() {
+	se = util.SimpleEncrypt{Key: "topnet"}
+}
+
 type Pjob struct {
 	Dfa         *dfa.DFA
 	Cache       *map[string]*[]*push.MemberInterest
@@ -221,6 +227,7 @@ func SendWeixin(k *push.MemberInterest, TITLE, ShortTitle, str, stype string, no
 		Detail:  WXTitle,
 		Date:    wxDate,
 		Service: "剑鱼君",
-		Url:     push.PushConfig["bidViewDomain"].(string) + "/wxpush/bid/" + k.Openid + "/" + wid + "/aa"})
+		//Url:     push.PushConfig["bidViewDomain"].(string) + "/wxpush/bid/" + k.Openid + "/" + wid + "/aa"})
+		Url: push.PushConfig["bidViewDomain"].(string) + "/mobile/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "/" + k.Openid + "/" + wid + "/aa"})
 
 }

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

@@ -211,7 +211,7 @@ func SaveTopEmployeeBind(openid, name string) bool {
 	if *ret == nil {
 		return false
 	}
-	Update("top_employee", `{"s_name": "`+name+`"}`, `{"$set":{"s_openid":`+openid+`}}`, false, false)
+	Update("top_employee", `{"s_name": "`+name+`"}`, `{"$set":{"s_openid":"`+openid+`"}}`, false, false)
 	return true
 }
 

+ 5 - 5
weixin/src/qfw/weixin/menu.go

@@ -12,7 +12,7 @@ import (
 func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 
 	urlstr := "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + wf.SysConfig.Appid + "&redirect_uri=http://" + wf.SysConfig.Domain + "/weixinoauth/action/%s&response_type=code&scope=snsapi_base&state=1#wechat_redirect"
-	log.Println("menu", urlstr)
+	//log.Println("menu", urlstr)
 	menu := &Menu{make([]MenuButton, 3)}
 
 	menu.Buttons[0].Name = "剑鱼"
@@ -38,10 +38,10 @@ func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 	menu.Buttons[2].SubButtons[0].Key = "msite" //"http://" + wf.SysConfig.Domain + "/weixin/site/edit" //微官网编辑
 
 	menu.Buttons[2].SubButtons[1].Name = "企业查询"
-	//menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeUrl ///search/enterprise/m_ent.html
-	//menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "entsearchaction")
-	menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeKey
-	menu.Buttons[2].SubButtons[1].Key = "entsearch"
+	menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeUrl ///search/enterprise/m_ent.html
+	menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "entsearchaction")
+	//menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeKey
+	//menu.Buttons[2].SubButtons[1].Key = "entsearch"
 
 	menu.Buttons[2].SubButtons[2].Name = "法规查询"
 	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl

+ 4 - 17
weixin/src/qfw/weixin/msgtxtchandler.go

@@ -64,24 +64,11 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 		w.ReplyText("嗨,小星来陪你解闷。有什么开心的,不开心的说说来,大伙乐呵乐呵。\n输入q或Q离开。")
 		return
 	} else if r.Content == "抽奖" { //进入抽奖环节
-		/*
-			//TODO 改为查我的抽奖卷
-			if dao.GetMyCouponAmount(r.FromUserName) <= 0 {
-				w.ReplyText("对不起,你的奖劵不足。您可以查看<a href='http://www.qimingxing.info/p/'>企明星的最新活动</a>赚取积分。")
-			} else if dao.GetMyTodayDrawTimes() > 0 { //检查今日抽奖次数
-				w.ReplyText("对不起,你今天的抽奖次数已经用完,请您明天再来。")
-			}
-		*/
-		//查改用户是否已经抽过奖
-		if dao.FindWinningRecord(r.FromUserName, wf.SysConfig.Activity["activitycode"]) {
-			w.ReplyText("小主莫贪心,每人只有一次抽奖机会呦")
-		} else {
-			targeturl := fmt.Sprintf("http://%s/activity/%s/%s", wf.SysConfig.Domain, wf.SysConfig.Activity["activitycode"], se.EncodeString(r.FromUserName))
-			log.Println("choujiang url:", targeturl)
-			w.ReplyNews([]Article{Article{PicUrl: wf.SysConfig.Activity["picurl"], Title: wf.SysConfig.Activity["title"], Url: targeturl}})
-		}
+		targeturl := fmt.Sprintf("http://%s/activity/%s/%s", wf.SysConfig.Domain, wf.SysConfig.Activity["activitycode"], se.EncodeString(r.FromUserName))
+		w.ReplyNews([]Article{Article{PicUrl: wf.SysConfig.Activity["picurl"], Title: wf.SysConfig.Activity["title"], Url: targeturl}})
 	} else if strings.HasPrefix(r.Content, "内部报名") { //绑定拓普员工姓名
-		tmp := strings.Split(r.Content, " | |+")
+		tmp := strings.Fields(r.Content)
+		log.Println(tmp, len(tmp))
 		if len(tmp) != 2 {
 			w.ReplyText("请按以下格式输入:内部报名 姓名")
 		} else {