浏览代码

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

wangshan 9 年之前
父节点
当前提交
d2b37fd632
共有 30 个文件被更改,包括 759 次插入126 次删除
  1. 33 0
      core/src/qfw/front/webcentent.go
  2. 1 0
      core/src/qfw/search/search.go
  3. 49 1
      core/src/qfw/search/searchService.go
  4. 2 2
      core/src/qfw/swordfish/swordfishmanage.go
  5. 1 2
      core/src/qfw/yellowpage/yellowpage.go
  6. 41 4
      core/src/qfw/yellowpage/yellowpagemanager.go
  7. 14 0
      core/src/web/staticres/css/dev-qfw.css
  8. 255 25
      core/src/web/staticres/css/entcommunity.css
  9. 5 0
      core/src/web/staticres/css/swordfish.css
  10. 二进制
      core/src/web/staticres/images/entcommunity/entsearch-bg.png
  11. 二进制
      core/src/web/staticres/images/entcommunity/left.png
  12. 二进制
      core/src/web/staticres/images/entcommunity/mainperson1.png
  13. 二进制
      core/src/web/staticres/images/entcommunity/mainperson2.png
  14. 二进制
      core/src/web/staticres/images/entcommunity/mainperson3.png
  15. 二进制
      core/src/web/staticres/images/entcommunity/mainperson4.png
  16. 二进制
      core/src/web/staticres/images/entcommunity/relation.png
  17. 二进制
      core/src/web/staticres/images/entcommunity/shijian.png
  18. 二进制
      core/src/web/staticres/images/entcommunity/zhuceziben.png
  19. 2 0
      core/src/web/staticres/js/enterprise.js
  20. 93 8
      core/src/web/staticres/js/entportrait.js
  21. 1 1
      core/src/web/staticres/js/relation.js
  22. 35 2
      core/src/web/templates/common/enthead.html
  23. 31 0
      core/src/web/templates/common/swordfishhead.html
  24. 1 1
      core/src/web/templates/common/top.html
  25. 86 24
      core/src/web/templates/search/entcommunity.html
  26. 35 4
      core/src/web/templates/search/enterpriseList.html
  27. 3 2
      core/src/web/templates/swordfish/index.html
  28. 3 2
      core/src/web/templates/swordfish/protocol.html
  29. 3 2
      core/src/web/templates/swordfish/rssset.html
  30. 65 46
      core/src/web/templates/yellowpage/enterpriseinfo.html

+ 33 - 0
core/src/qfw/front/webcentent.go

@@ -44,6 +44,8 @@ type Newscont struct {
 	getJsonList xweb.Mapper `xweb:"POST /front/(\\w+)list/list"`
 	//微信端使用通用信息展示页
 	weixincontent xweb.Mapper `xweb:"GET /front/weixincontent/(\\w+)"`
+	//获取最新的新闻资讯
+	getLatestNews xweb.Mapper `xweb:"/front/webcontent/getLatestNews"`
 	//帮助中心 意见反馈 关于我们 联系我们
 	webHelp xweb.Mapper `xweb:"/front/web_(\\w+)_help.html"`
 	//帮助中心 意见反馈 关于我们 联系我们
@@ -770,3 +772,34 @@ func SubstrByByte(str string, length int) string {
 	}
 	return ""
 }
+func (e *Newscont) GetLatestNews() {
+	var res []interface{}
+	if ret := redis.Get("other", "latestNews"); ret != nil {
+		res = ret.([]interface{})
+	} else {
+		var query = `{"query": {
+	    "bool": {
+		  "must":[{"term":{"s_contenttype":"qykb"}}]
+	    }},"_source":["s_title","releasetime","_id"]
+		,"from":0,"size":6,"sort":[{"releasetime":{"order":"desc"}}]}`
+		//查询列表数据
+		client := elastic.GetEsConn()
+		defer elastic.DestoryEsConn(client)
+		if client == nil {
+			e.ServeJson(res)
+		}
+		searchResult, err := client.Search().Index("content").Type("content").Source(query).Do()
+		if err != nil {
+			e.ServeJson(res)
+		}
+		if searchResult.Hits != nil {
+			resNum := len(searchResult.Hits.Hits)
+			res = make([]interface{}, resNum)
+			for i, hit := range searchResult.Hits.Hits {
+				json.Unmarshal(*hit.Source, &res[i])
+			}
+		}
+		redis.Put("other", "latestNews", res, 30*60) //缓存半个小时
+	}
+	e.ServeJson(res)
+}

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

@@ -13,6 +13,7 @@ type Search struct {
 	sim                xweb.Mapper `xweb:"POST /search/sim"`                          //即时搜索
 	searchEntSer       xweb.Mapper `xweb:"/searchEntSer/(.*)"`                        //获取企业的服务列表
 	findServiceByEntId xweb.Mapper `xweb:"/front/findServiceByEntId"`                 //获取企业的服务列表
+	entCommunity       xweb.Mapper `xweb:"/front/entCommunity.html"`
 }
 
 func init() {

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

@@ -5,6 +5,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
 	"html/template"
 	"log"
 	"qfw/front"
@@ -20,6 +21,44 @@ import (
 	"strings"
 )
 
+//企业社区首页
+func (search *Search) EntCommunity() error {
+	//新认证企业
+	var newIndentEnts []interface{}
+	if ret := redis.Get("enterprise", "newIndentEnts"); ret != nil {
+		newIndentEnts = ret.([]interface{})
+	} else {
+		identEnts := Find("identification", `{"i_identificationstatus":1,"i_freeze":{"$ne":2},"i_identificationtype":{"$in":[1,5]}}`, []string{"-l_auditdate"}, `{"s_enterprisename":1,"s_enterpriseid":1}`, false, 0, 15)
+		if identEnts != nil && len(*identEnts) > 0 {
+			var enterpriseids []bson.ObjectId
+			for _, v := range *identEnts {
+				if v["s_enterpriseid"] != nil {
+					enterpriseids = append(enterpriseids, bson.ObjectIdHex(v["s_enterpriseid"].(string)))
+				}
+			}
+			if len(enterpriseids) > 0 {
+				ents := Find("enterprise", bson.M{"_id": enterpriseids}, nil, `{"s_avatar":1}`, false, -1, -1)
+				if ents != nil && len(*ents) > 0 {
+					for _, identEnt := range *identEnts {
+						for _, ent := range *ents {
+							if identEnt["s_enterpriseid"] == BsonIdToSId(ent["_id"]) {
+								identEnt["s_avatar"] = ent["s_avatar"]
+								break
+							}
+						}
+					}
+				}
+				for _, v := range *identEnts {
+					newIndentEnts = append(newIndentEnts, v)
+				}
+			}
+		}
+		redis.Put("enterprise", "newIndentEnts", newIndentEnts, 30*60) //缓存半个小时
+	}
+	search.T["newIndentEnts"] = newIndentEnts
+	return search.Render("/search/entcommunity.html", &search.T)
+}
+
 //获取某个企业服务列表数据
 func (search *Search) SearchEntSer(id string) error {
 	if search.Method() == "POST" {
@@ -147,6 +186,7 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 			"c_zb":        n.GetString("c_zb"),
 			"all":         n.GetString("all"),
 			"c_author":    n.GetString("c_author"),
+			"OpState":     n.GetString("OpState"),
 			"cityNo":      n.GetString("cityNo"), // 是否是第一次查询并且没有选择地市,自动根据IP来设
 		}
 		//查询生成列表数据
@@ -373,7 +413,14 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 			}
 			str += `{"term":{"EntType":"` + c_qfl + `"}}`
 		}
-
+		//存续/在营
+		OpState := querymap["OpState"]
+		if OpState != "" {
+			if len(str) > 0 {
+				str += ","
+			}
+			str += `{"term":{"OpState":"` + OpState + `"}}`
+		}
 		//认证
 		c_author := querymap["c_author"]
 		if c_author == "Y" {
@@ -485,6 +532,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 	if client == nil {
 		return nil, nil
 	}
+	log.Println(query)
 	searchResult, err := client.Search().Index("enterprise").Type("enterprise").Source(query).Do()
 	if err != nil {
 		return nil, nil

+ 2 - 2
core/src/qfw/swordfish/swordfishmanage.go

@@ -16,7 +16,7 @@ func (s *SwordFish) Swordfish() error {
 	} else {
 		now := time.Now()
 		unix := time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-2, now.Minute(), now.Second(), now.Nanosecond(), time.Local).Unix()
-		r := mongodb.Find("bidding", bson.M{"comeintime": bson.M{"$lte": unix}}, `{"comeintime":-1}`, `{"title":1,"href":1,"publishtime":1}`, false, 0, 5)
+		r := mongodb.Find("bidding", bson.M{"comeintime": bson.M{"$lte": unix}}, `{"comeintime":-1}`, `{"title":1,"href":1,"publishtime":1}`, false, 0, 30)
 		if r != nil {
 			s.T["data"] = r
 		}
@@ -157,7 +157,7 @@ func getNewest() (list []interface{}) {
 	} else {
 		now := time.Now()
 		unix := time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-2, now.Minute(), now.Second(), now.Nanosecond(), time.Local).Unix()
-		r := mongodb.Find("bidding", bson.M{"comeintime": bson.M{"$lte": unix}}, `{"comeintime":-1}`, `{"title":1,"href":1,"publishtime":1}`, false, 0, 5)
+		r := mongodb.Find("bidding", bson.M{"comeintime": bson.M{"$lte": unix}}, `{"comeintime":-1}`, `{"title":1,"href":1,"publishtime":1}`, false, 0, 30)
 		redis.Put("other", "swordfish_newest_list", *r, 30*60) //缓存半个小时
 		for _, v := range *r {
 			list = append(list, v)

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

@@ -17,8 +17,7 @@ type Yellowpage struct {
 	enterpriseInfo xweb.Mapper `xweb:"/enterprise/(\\w+).html"`
 	//根据企业注册号进入企业黄页
 	enterpriseInfoByRegNO xweb.Mapper `xweb:"/enterpriseInfoByRegNO/(\\w+).html"`
-	//获取关系网数据
-	getRelation xweb.Mapper `xweb:"/member/getRelation"`
+	getRelation           xweb.Mapper `xweb:"/member/getRelation"`
 }
 
 func (yp *Yellowpage) EnterpriseInfoByRegNO(regNO string) error {

+ 41 - 4
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -41,8 +41,8 @@ func FormatDate(src *interface{}) string {
 	return str
 }
 
-func GetEntInfo(id string) 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, "NB_email":1,"IndustryPhyName":1,"investor":1,"alterInfo":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,"s_email":1}`)
+func GetEntInfo(id string) map[string]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, "Nb_email":1,"IndustryPhyName":1,"investor":1,"alterInfo":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,"s_email":1,"staffinfo":1}`)
 	if res != nil && len(*res) > 0 {
 		id := (*res)["s_submitid"]
 		if id != nil {
@@ -259,6 +259,43 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 	} else {
 		if info := GetEntInfo(id); info != nil {
 			yp.T["res"] = info
+			regNo, _ := info["RegNo"].(string)
+			entName, _ := info["EntName"].(string)
+			relation := redis.Get("enterprise", "relation-"+regNo)
+			if relation == nil {
+				relation = makeRelation(regNo, entName)
+				redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
+			}
+			r := relation.(map[string]interface{})
+			var nodes *[]map[string]interface{}
+			var relevantEnts []map[string]interface{}
+			if d, err := json.Marshal(r["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
+				var regNos []string
+				for _, v := range *nodes {
+					if v["type"] == "e" {
+						regNos = append(regNos, v["name"].(string))
+						relevantEnts = append(relevantEnts, v)
+					}
+					if len(regNos) == 6 {
+						break
+					}
+				}
+				if len(regNos) > 0 {
+					ents := Find("enterprise", M{"RegNo": regNos}, nil, `{"s_avatar":1}`, false, -1, -1)
+					if ents != nil && len(*ents) > 0 {
+						for _, relevantEnt := range relevantEnts {
+							for _, ent := range *ents {
+								if ent["RegNo"] == relevantEnt["name"] {
+									ent["s_avatar"] = ent["s_avatar"]
+									ent["_id"] = util.BsonIdToSId(ent["_id"])
+									break
+								}
+							}
+						}
+					}
+				}
+			}
+			yp.T["relevantEnts"] = relevantEnts
 			contentuser, erruser := yp.Render4Cache("/yellowpage/enterpriseinfo.html", &yp.T)
 			if erruser == nil {
 				redis.PutBytes("enterprise", "enterpriseInfo_"+id, &contentuser, 7*ONEDAY)
@@ -396,10 +433,10 @@ func (yp *Yellowpage) GetRelation() error {
 		if regNo == "" || entName == "" {
 			return nil
 		}
-		relation := redis.Get("other", "relation-"+regNo)
+		relation := redis.Get("enterprise", "relation-"+regNo)
 		if relation == nil {
 			relation = makeRelation(regNo, entName)
-			redis.Put("other", "relation-"+regNo, relation, 7*ONEDAY)
+			redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
 		}
 		yp.ServeJson(M{"flag": true, "relation": relation})
 		r := relation.(map[string]interface{})

+ 14 - 0
core/src/web/staticres/css/dev-qfw.css

@@ -295,6 +295,9 @@ a{
 	margin-right: 30px !important;
 }
 /*padding*/
+.padding-b-0{
+	padding-bottom: 0px !important;
+}
 .padding-lr-10 {
 	padding-left: 10px !important;
 	padding-right: 10px !important;
@@ -2597,6 +2600,17 @@ style="color:#D03102;margin-right:5px;"
 .u-weightsmall{
 	font-weight:200;
 }
+.b-adver .b-adver-title{
+	background-color: #F7F8FA;
+	line-height: 40px;
+	font-size: 16px;
+	padding-left: 20px;
+	border-bottom: 1px solid #e5e6e9;
+	font-weight: bold;
+}
+.b-adver .b-adver-content{
+	padding: 5px;
+}
 /*积分签到(连续)*/
 #bookin .modal-dialog{
 	width:535px;

+ 255 - 25
core/src/web/staticres/css/entcommunity.css

@@ -92,6 +92,157 @@ a:focus, a:hover{
 	display: inline-block;
 	padding-left: 100px;
 }
+.entlist-page .b-right-content{
+	padding: 0px;
+}
+.entlist-page .entlist-hotsearchwords a{
+	display: inline-block;
+	margin: 10px;
+}
+.b-scroll-list .b-adver-content{
+	padding: 0px 10px 10px 10px;
+	max-height: 600px;
+	overflow-y: hidden;
+}
+.b-scroll-list img{
+	width: 50px;
+	height: 50px;
+	margin-right: 5px;
+}
+.b-scroll-list ul{
+	float: left;
+}
+.b-scroll-list li{
+	width: 100%;
+	margin-top: 10px;
+	border-top: 1px dashed #e5e6e9;
+	padding-top: 10px;
+}
+.b-scroll-list li>div>*{
+	display: inline-block;
+}
+.b-scroll-list li>div>a{
+	width: 165px;
+	vertical-align: middle;
+}
+/*********企业社区首页*****************/
+.ent-indexpage .b-left{
+	padding: 0px;
+	background-color: transparent;
+}
+.ent-indexpage .ent-index-search{
+	height: 380px;
+	background-image: url("/images/entcommunity/entsearch-bg.png");
+	background-repeat: no-repeat;
+	background-size: 100% 100%;
+	padding-left: 100px;
+	padding-top: 95px;
+}
+.ent-indexpage .ent-index-search>div{
+	margin-top: 10px;
+}
+.ent-indexpage .ent-index-search>.b-com-first{
+	font-size: 28px;
+	color: #ffffff;
+}
+.ent-indexpage .ent-index-search>.b-com-second{
+	font-size: 16px;
+	color: #a0a0a0;
+}
+.ent-indexpage .ent-index-search>.b-com-third{
+	font-size: 18px;
+	width: 70%;
+}
+.ent-indexpage .ent-index-search>.b-com-third>input{
+	font-size: inherit;
+	height: 45px;
+}
+.ent-indexpage .ent-index-search>.b-com-third>span{
+	height: 45px;
+	border-width: 0px;
+	background-color: #16A086;
+	color: #ffffff;
+	font-size: inherit;
+	border-radius: 0px;
+	padding-left: 20px;
+	padding-right: 20px;
+	cursor: pointer;
+}
+.ent-indexpage .ent-index-search .glyphicon{
+	margin-right: 5px;
+	font-size: 16px;
+}
+.ent-indexpage .ent-index-search>.b-com-fourth{
+	margin-top: 15px;
+	color: #ffffff;
+}
+.ent-indexpage .ent-index-search>.b-com-fourth>a{
+	margin-right: 5px;
+	color: #ffffff;
+}
+.ent-indexpage .ent-index-search>.b-com-fourth>a:hover{
+	color: #16A086;
+}
+.ent-indexpage .ent-index-recommend{
+	margin-top: 15px;
+	padding: 15px;
+	background-color: #ffffff;
+}
+.ent-indexpage .ent-index-recommend .b-com-title{
+	padding-bottom: 5px;
+	border-bottom: 1px solid #DFE0E2;
+	font-size: 18px;
+	padding-left: 5px;
+	margin-bottom: 15px;
+}
+.ent-indexpage .ent-index-recommend .b-com-title>span{
+	color: #16a086;
+	margin-right: 5px;
+}
+.ent-indexpage .ent-index-recommend .carousel-inner li{
+	width: 200px;
+	text-align: center;
+	margin-left: 20px;
+	margin-bottom: 20px;
+}
+.ent-indexpage .ent-index-recommend .carousel-inner img{
+	width: 90px;
+	height: 90px;
+}
+.ent-indexpage .ent-index-recommend .carousel-inner a{
+	display: block;
+	margin-top: 5px;
+}
+.ent-indexpage .carousel-indicators{
+	bottom: 0px;
+}
+.ent-indexpage .carousel-indicators li>img{
+	display: none;
+	width: 25px;
+	height: 25px;
+}
+.ent-indexpage .carousel-indicators li{
+	background-color: #585E64;
+	margin-left: 15px;
+	margin-right: 15px;
+}
+.ent-indexpage .carousel-indicators li.active{
+	background-color: transparent;
+	width: 25px;
+	height: 25px;
+	vertical-align: sub;
+}
+.ent-indexpage .carousel-indicators li.active>img{
+	background-color: transparent;
+	display: block;
+	margin-top: 2px;
+}
+.ent-indexpage .carousel{
+	padding-bottom: 50px;
+}
+.ent-indexpage .b-scroll-list .b-adver-content{
+	max-height: 750px;
+}
 /*********企业画像***************/
 .entinfo-page .b-com-head{
 	background-color: #FFFFFF;
@@ -296,7 +447,7 @@ a:focus, a:hover{
 	text-overflow: ellipsis;
 	overflow: hidden;
 	white-space: nowrap;
-	width: 350px;
+	width: 240px;
 	display: inline-block;
 }
 .entinfo-basicinfo .entinfo-round>a{
@@ -332,14 +483,14 @@ a:focus, a:hover{
 }
 /*注册资本*/
 .entinfo-basicinfo .entinfo-regcap{
-	right: 400px;
+	right: 410px;
 	top: 107px;
 	text-align: right;
 }
 .entinfo-basicinfo .entinfo-regcap>img{
-	width: 36px;
-	height: 36.5px;
-	right: -40px !important;
+	width: 52px;
+	height: 34px;
+	right: -55px !important;
 }
 .entinfo-basicinfo .entinfo-regcap-round{
 	top: 120px;
@@ -421,8 +572,8 @@ a:focus, a:hover{
 	top: -28px;
 }
 .entinfo-basicinfo .entinfo-operperiod>img{
-	width: 49.5px;
-	height: 49.5px;
+	width: 42px;
+	height: 44px;
 	left: -50px;
 }
 .entinfo-basicinfo .entinfo-operperiod-round{
@@ -504,35 +655,34 @@ a:focus, a:hover{
   height: 100%;
   background-color:#fff;
 }
-:-moz-full-screen {
-	background: #fff; 
+:-moz-full-screen{
+	background: #fff;
 }
-:-webkit-full-screen {
-	background: #fff; 
+:-webkit-full-screen{
+	background: #fff;
 }
 :-o-full-screen{
-	background: #fff; 
+	background: #fff;
 }
 :-ms-full-screen{
-	background: #fff; 
+	background: #fff;
 }
-:fullscreen {
-	background: #fff; 
+:fullscreen{
+	background: #fff;
 } 
-:-ms-fullscreen {
-	background: #fff; 
+:-ms-fullscreen{
+	background: #fff;
 } 
-:full-screen {
-	background: #fff; 
+:full-screen{
+	background: #fff;
 }
 .ent-findnull{
 	text-align: center;
 	padding: 50px 0px;
 }
 .entrelation-limit>div{
-	border-bottom: 1px solid #e5e6e9;
 	padding-top: 50px;
-	padding-bottom: 85px;
+	padding-bottom: 50px;
 }
 .entrelation-limit>img{
 	margin-top: 10px;
@@ -542,10 +692,7 @@ a:focus, a:hover{
 	width: 200px;
 }
 /*************产品服务******************/
-.ent-service{
-	padding: 0px 20px;
-}
-.ent-service td img{
+.ent-yellowpage td img{
 	width: 110px;
 	height: 101px;
 }
@@ -614,6 +761,89 @@ a:focus, a:hover{
 .ent-alterinfo li>div>div:last-of-type{
 	color: #A0A0A0;
 }
+/************主要人员****************/
+.ent-mainpersons{
+	padding-left: 25px;
+}
+.ent-mainpersons img{
+	width: 89px;
+	height: 90px;
+	display: inline-block;
+	vertical-align: top;
+}
+.ent-mainpersons span{
+	display: inline-block;
+	vertical-align: top;
+	margin-top: 25px;
+	text-align: center;
+}
+.ent-mainpersons>div>div{
+	display: inline-block;
+	border: 1px solid #e5e6e9;
+	border-radius: 5px;
+	padding: 10px 0px 10px 10px;
+}
+.ent-mainpersons font{
+	display: block;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+	width: 115px;
+}
+.ent-mainpersons .b-com-name{
+	font-weight: bold;
+	font-size: 16px;
+	margin-bottom: 5px;
+}
+.ent-mainpersons .ent-positionName{
+	color: #a0a0a0;
+}
+.ent-mainpersons .staffinfo-horizontal{
+	width: 25px;
+	height: 1px;
+	background-color: #e5e6e9;
+	display: inline-block;
+	vertical-align: top;
+	margin-top: 55px;
+}
+.ent-mainpersons .staffinfo-vertical{
+	width: 1px;
+	height: 20px;
+	background-color: #e5e6e9;
+	display: block;
+	margin-left: 105px;
+}
+/************左右布局****************/
+.entinfo-page .b-scroll-list .b-adver-content{
+	overflow-y: visible;
+	max-height: none;
+}
+.entinfo-page .b-right{
+	margin-top: 10px;
+	float: none;
+	margin-left: 5px;
+}
+.entinfo-page .b-right .newsInfo ul{
+	padding-left: 5px;
+}
+.entinfo-page .b-right .newsInfo li{
+	width: 100%;
+	border-left: 1px solid #F7F8FA;
+	padding: 10px 10px 0px 15px;
+}
+.entinfo-page .b-right .newsInfo img{
+	width: 10px;
+	height: 10px;
+	margin: 0px 10px 5px -20px;
+}
+.entinfo-page .b-right span{
+	margin-bottom: 5px;
+	color: #A0A0A0;
+}
+.entinfo-page .b-right .newsInfo{
+	padding-top: 0px;
+	padding-bottom: 10px;
+}
 /************公用****************/
 .ent-layout-up{
 	padding: 0px 20px;

+ 5 - 0
core/src/web/staticres/css/swordfish.css

@@ -64,6 +64,11 @@ a:focus, a:hover{
 }
 .b-right>div{
 	padding-left: 10px;
+	max-height: 800px;
+	overflow-y: hidden;
+}
+.swordfish-index .b-right>div{
+	max-height: 650px;
 }
 .swordfish-right-title{
 	background-color: #F7F8FA;

二进制
core/src/web/staticres/images/entcommunity/entsearch-bg.png


二进制
core/src/web/staticres/images/entcommunity/left.png


二进制
core/src/web/staticres/images/entcommunity/mainperson1.png


二进制
core/src/web/staticres/images/entcommunity/mainperson2.png


二进制
core/src/web/staticres/images/entcommunity/mainperson3.png


二进制
core/src/web/staticres/images/entcommunity/mainperson4.png


二进制
core/src/web/staticres/images/entcommunity/relation.png


二进制
core/src/web/staticres/images/entcommunity/shijian.png


二进制
core/src/web/staticres/images/entcommunity/zhuceziben.png


+ 2 - 0
core/src/web/staticres/js/enterprise.js

@@ -68,6 +68,8 @@ function reloadData(obj,name){
 	
 	
 	//搜索表单提交
+	$("#searchForm input[name=OpState]").val("");
+	$("#searchForm input[name=c_author]").val("");
 	$("#searchForm input[name="+name+"]").val(val);
 	
     document.forms['searchForm'].submit();

+ 93 - 8
core/src/web/staticres/js/entportrait.js

@@ -3,6 +3,89 @@ var relation = null;
 var serviceList = null;
 //解析服务列表
 $(function(){
+	//右侧最新消息
+	$.post("/front/webcontent/getLatestNews",null,function(r){
+		var html = '<ul>';
+		for(var i=0;i<r.length;i++){
+			html += '<li><span><img src="/images/swordfish/circle.png">'
+					+new Date(Number(r[i].releasetime+"000")).Format("yyyy-MM-dd hh:mm:ss")
+					+'</span><br><a href="/front/webcontent/'+r[i]._id+'.html">'+r[i].s_title+'</a></li>';
+		}
+		$(".newsInfo").html(html+'</ul><div class="clearfix"></div>');
+	});
+	//主要人员
+	if(typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0){
+		var staffinfos1 = [],staffinfos2 = [],staffinfos3 = [],staffinfos4 = [];
+		for(var i=0;i<staffinfo.length;i++){
+			switch(staffinfo[i].Position){
+				case "410A":
+				case "410B":
+				case "410C":
+				case "431A":
+				case "431B":
+					staffinfos1.push(staffinfo[i]);
+					break;
+				case "432A":
+				case "432K":
+					staffinfos2.push(staffinfo[i]);
+					break;
+				case "434Q":
+				case "434R":
+				case "436A":
+					staffinfos3.push(staffinfo[i]);
+					break;
+				default:
+					staffinfos4.push(staffinfo[i]);
+					break;
+			}
+		}
+		staffinfos1.sort(function(a,b){return a.Position-b.Position});
+		staffinfos2.sort(function(a,b){return a.Position-b.Position});
+		staffinfos3.sort(function(a,b){return a.Position-b.Position});
+		staffinfos4.sort(function(a,b){return a.Position-b.Position});
+		var hm = '<div class="ent-mainpersons">';
+		//计算出一行可以放几个
+		var maxCout = parseInt($(".ent-tab-content").width() / 241);
+		var verticalFlag = false;
+		var appendStaffinfo = function(obj,index){
+			var tmp = 0;
+			for(var i=0;i<obj.length;i++){
+				tmp++;
+				if(i==0){
+					hm+='<div class="staffinfo-level-'+index+'">';
+					if(verticalFlag){
+						hm+='<a class="staffinfo-vertical"></a>';
+					}
+				}
+				verticalFlag = true;
+				hm+='<div><img src="/images/entcommunity/mainperson'+index+'.png">'
+					+'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+obj[i].PositionName+'</font></span></div>';
+				//竖线
+				if(tmp == maxCout){
+					hm+='<a class="staffinfo-vertical"></a>';
+				}
+				//横线
+				if(i != obj.length-1){
+					if(tmp <= maxCout-1){
+						hm+='<a class="staffinfo-horizontal"></a>';
+					}else{
+						tmp = 0;
+					}
+				}
+				if(i==obj.length-1){
+					hm+='</div>';
+				}
+			}
+		}
+		appendStaffinfo(staffinfos1,1);
+		appendStaffinfo(staffinfos2,2);
+		appendStaffinfo(staffinfos3,3);
+		appendStaffinfo(staffinfos4,4);
+		hm+='</div>';
+		$(".ent-mainperson").html(hm);
+	}else{
+		$(".ent-mainperson .ent-findnull").removeClass("hide");
+	}
 	//联系地址
 	if($address){
 		loadJS("/js/jquery.cxselect.js",function(){
@@ -118,11 +201,12 @@ function initRelation(){
 function ServiceList(){
 	loadJS("/js/paging.js",function(){
 		paging = new Paging("serviceListPaging","/front/findServiceByEntId",{entId:entId},6,function(r){
-			if(r.length == 0){
-				$("#serviceList").next(".ent-findnull").removeClass("hide");
-				$("#serviceList").remove();
+			if((typeof(synopsis) == "undefined" || synopsis == null || synopsis == "") && r.length == 0){
+				$(".ent-yellowpage .ent-findnull").removeClass("hide");
+				$(".ent-yellowpage .ent-layout-down").remove();
 				return;
 			}
+			$(".serviceList-layout").removeClass("hide");
 			var html = '';
 			for(var i=0;i<r.length;i++){
 				var f_price = r[i].f_price;
@@ -161,12 +245,13 @@ function ServiceList(){
 			}
 			$("#serviceListPaging").parent().prevAll().remove();
 			$("#serviceListPaging").parent().before(html);
-			/*$(".ent-serviceintroduction").each(function(){
-				console.info($(this).height() +"------"+ $(this).children("div").height());
-				if($(this).height() < $(this).children("div").height()){
-					$(this).parent().append("......");
+			$(".ent-serviceintroduction").each(function(){
+				var text = $(this).text();
+				if(text.length > 200){
+					text = text.substring(0,150)+"...";
 				}
-			});*/
+				$(this).html(text);
+			});
 		});
 	});
 }

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

@@ -75,7 +75,7 @@ Relation.prototype.init = function(){
 	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 style='margin:10px 0px;' class='hidden-sm hidden-xs'><span class='text-muted'>提示:点击鼠标右键可以删除不想看的节点。</span></div>";
 	htmls= htmls+"</div>"
 	$("#entrelation").append(htmls);
 	try{	

+ 35 - 2
core/src/web/templates/common/enthead.html

@@ -4,7 +4,7 @@
 	<div class="b-nav index-new-nva">
 		<ul>
 			<li class="b-nav-logo"><a href="/"><img src="/images/logo.png" class="logo"></a></li>
-			<li class="b-nav-link b-nav-main"><a href="/search/enterprise/ent.html">企业社区</a></li>
+			<li class="b-nav-link b-nav-main"><a href="/front/entCommunity.html">企业社区</a></li>
 			<li class="b-h-search">
 				<div class="input-group">
 			        <div class="input-group-btn hide">
@@ -12,11 +12,13 @@
 			        </div> <!--/btn-group -->
 					<form method="post" id="searchForm" action="/search/enterprise/ent.html">
 						<span id="searchFormBtn"><i class="glyphicon sousuo"></i></span>
-				        <input type="text" name="words" class="form-control" id="header-searchInput" placeholder="找企业" value="{{if .T.querymap}}{{index .T.querymap "query"}}{{end}}">
+				        <input type="text" class="form-control" id="header-searchInput" placeholder="找企业" value="{{if .T.querymap}}{{index .T.querymap "query"}}{{end}}">
+						<input type="hidden" name="words" value="{{if .T.querymap}}{{index .T.querymap "query"}}{{end}}">
 						{{if .T.querymap}}
 						<input type="hidden" name="city" id="city" value="{{index .T.querymap "city"}}">
 						<input type="hidden" name="cityNo" id="cityNo" value="{{index .T.querymap "cityNo"}}">
 						<input type="hidden" name="c_author" id="hauthor" value="{{index .T.querymap "c_author"}}">
+						<input type="hidden" name="OpState" value="{{index .T.querymap "OpState"}}">
 						<input type="hidden" name="c_hfl" id="hfl" value="{{index .T.querymap "c_hfl"}}">
 						<input type="hidden" name="c_zb" id="zb" value="{{index .T.querymap "c_zb"}}">
 						{{end}}
@@ -63,4 +65,35 @@ $(function (){
 		}
 	});
 });
+function scrollUp(id){
+	if($("#"+id+" .b-adver-content ul").height() > $("#"+id+" .b-adver-content").height()){
+		var marginTop = 0;
+		var firstHeight = $("#"+id+"  .b-adver-content ul>li:first").height();
+		if($("#"+id+" .b-adver-content ul").height() - $("#"+id+" .b-adver-content").height() < firstHeight+20){
+			$("#"+id+" .b-adver-content").css("max-height","none"); 
+			return;
+		}
+		var recommendInterval = null;
+		var recommendScroll = function(){
+			recommendInterval = setInterval(function(){
+				marginTop++;
+				$("#"+id+" .b-adver-content ul").css("margin-top","-"+marginTop);
+				if(firstHeight+20 == marginTop){
+					marginTop = 0;
+					$("#"+id+" .b-adver-content ul>li:first").removeClass("border-t-0");
+					$("#"+id+" .b-adver-content ul").append($("#"+id+" .b-adver-content ul>li:first")).css("margin-top",0);
+					firstHeight = $("#"+id+" .b-adver-content ul>li:first").height();
+				}
+			},50);
+		}
+		recommendScroll();
+		$("#"+id+" .b-adver-content ul").hover(function(){
+			if(recommendInterval != null){
+				clearInterval(recommendInterval);
+			}
+		},function(){
+			recommendScroll();
+		});
+	}
+}
 </script>

+ 31 - 0
core/src/web/templates/common/swordfishhead.html

@@ -49,4 +49,35 @@ function swordfishLayoutInit(){
 		webSiteInit();
 	}
 }
+function scrollUp(){
+	if($(".b-right #list>div").height() > $(".b-right #list").height()){
+		var marginTop = 0;
+		var firstHeight = $(".b-right #list>div>div:first").height();
+		if($(".b-right #list>div").height() - $(".b-right #list").height() < firstHeight+20){
+			$(".b-right #list").css("max-height","none"); 
+			return;
+		}
+		var newsInterval = null;
+		var recommendScroll = function(){
+			newsInterval = setInterval(function(){
+				marginTop++;
+				$(".b-right #list>div").css("margin-top","-"+marginTop);
+				if(firstHeight+20 == marginTop){
+					marginTop = 0;
+					$(".b-right #list>div>div:first").removeClass("border-t-0");
+					$(".b-right #list>div").append($(".b-right #list>div>div:first")).css("margin-top",0);
+					firstHeight = $(".b-right #list>div>div:first").height();
+				}
+			},50);
+		}
+		recommendScroll();
+		$(".b-right #list").hover(function(){
+			if(newsInterval != null){
+				clearInterval(newsInterval);
+			}
+		},function(){
+			recommendScroll();
+		});
+	}
+}
 </script>

+ 1 - 1
core/src/web/templates/common/top.html

@@ -3,7 +3,7 @@
 		<ul class="pull-right">
 			<li><span class="img-circle b-com-first"><i class="glyphicon fuwushichang"></i></span><a href="/market/0/list.html">服务市场</a></li>
 			<li><span class="img-circle b-com-second"><i class="glyphicon jianyu"></i></span><a href="/front/swordfish">剑鱼</a></li>
-			<li><span class="img-circle b-com-third"><i class="glyphicon qiyeshequ"></i></span><a href="/search/enterprise/ent.html">企业社区</a></li>
+			<li><span class="img-circle b-com-third"><i class="glyphicon qiyeshequ"></i></span><a href="/front/entCommunity.html">企业社区</a></li>
 			<li><span class="img-circle b-com-four"><i class="glyphicon weiguanwang1"></i></span><a href="/front/wsite.html">微官网</a></li>
 			<li><span class="img-circle b-com-five"><i class="glyphicon zhengcefagui"></i></span><a href="/front/content_zcfg_list.html">政策法规</a></li>
 		</ul>

+ 86 - 24
core/src/web/templates/search/entcommunity.html

@@ -1,37 +1,99 @@
 <html>
 <head>
-<title>企业社区</title>
+<title>{{Msg "seo" "qfw.enterprise.title"}}</title>
+<meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
 {{include "/common/inc.html"}}
+<link href="/css/entcommunity.css" rel="stylesheet">
+<meta name="Keywords" content="{{Msg "seo" "qfw.enterprise.key"}}"/>
+<meta name="Description" content="{{Msg "seo" "qfw.enterprise.description"}}"/>
 </head>
-<body>
-{{include "/common/head.html"}}
-<div class="a-content text-center a-entcommunity">
-	<div class="a-com-title">企业社区</div>
-	<div class="a-com-content">
-		大海捞针可能很难<br>
-		但在百万企业中精准定位搜索却是如此简单<br>
-		了解一个人可能很难<br>
-		但是了解一个企业却很简单<br>
-		虚拟世界中,真实企业之间的对话<br>
-		找潜在客户, 寻合作伙伴, 觅新的商机,尽在企业社区
+<body class="ent-indexpage">
+{{include "/common/enthead.html"}}
+<div class="b-content container-fluid">
+	<div class="b-left">
+		<div class="ent-index-search">
+			<div class="b-com-first">一个企业社区,就够了</div>
+			<div class="b-com-second">查企业,查企业失信信息,查企业变更,查你所想,无所不能...</div>
+			<div class="b-com-third input-group">
+				<input type="text" name="entIndexSearch" class="form-control" aria-describedby="search-btn">
+				<span class="input-group-addon" id="search-btn"><span class="glyphicon sousuo"></span>查询</span>
+			</div>
+			<div class="b-com-fourth" id="hotsearchwords">
+				热搜词:{{$s:=(Ad "ent-hotsearchwords" 15)}}{{range $k,$v := $s}}<a>{{$v.s_remark}}</a>{{end}}
+			</div>
+		</div>
+		<div class="ent-index-recommend">
+			<div class="b-com-title">
+				<span class="glyphicon jianzhu"></span>推荐企业
+			</div>
+			<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
+				<div class="carousel-inner" role="listbox"></div>
+			</div>
+		</div>
+	</div>
+	<div class="b-right">
+		<div class="b-adver b-scroll-list" id="newIndentEnts">
+			<div class="b-adver-title">新认证企业</div>
+			<div class="b-adver-content">
+				<ul>
+				{{range $k,$v := .T.newIndentEnts}}
+					<li{{if eq $k 0}} class="border-t-0"{{end}}>
+						<div>
+							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<a href="/enterprise/{{$v.s_enterpriseid}}.html">{{$v.s_enterprisename}}</a>
+						</div>
+					</li>
+				{{end}}
+				</ul>
+				<div class="clearfix"></div>
+			</div>
+		</div>
 	</div>
-	{{if session "userId"}}
-	<a href="/member/authentication/index" class="btn btn-primary">认证</a><br>
-	<span class="text-muted">认证后可正常使用</span><br>
-	{{else}}
-	<a href="/front/register" class="btn btn-primary">注册</a><br>
-	<span class="text-muted">注册认证后可正常使用,已有账号<a class="a-com-login">立即登录</a></span><br>
-	{{end}}
-	<img src="/images/qysq-1.png">
 </div>
 {{include "/common/bottom.html"}}
 <script>
-loginBackType = -1;
 $(function(){
-	setNavbarActive(2);
-	$(".a-entcommunity .a-com-login").click(function(){
-		loginModalShow();
+	$("#search-btn").click(function(){
+		$("input[name='words']").val($("input[name='entIndexSearch']").val());
+		$("form#searchForm").submit();
+	});
+	$("#hotsearchwords a").click(function(){
+		$("input[name='words']").val($(this).text());
+		$("form#searchForm").submit();
 	});
+	scrollUp("newIndentEnts");
+	var ents = {{Ad "ent-recommend" 48}};
+	var tmp = 0;
+	var olCount = 0;
+	var html = '';
+	var olHtml = '<ol class="carousel-indicators">';
+	for(var i=0;i<ents.length;i++){
+		if(tmp == 0){
+			olHtml += '<li data-target="#carousel-example-generic" data-slide-to="'+olCount+'"';
+			if(olCount == 0){
+				olHtml += ' class="active"';
+			}
+			olHtml += '><img src="/images/entcommunity/left.png"></li>';
+			olCount++;
+		}
+		tmp++;
+		if(tmp == 1){
+			html += '<div class="item';
+			if(i == 0){
+				html += ' active';
+			}
+		    html += '"><ul>';
+		}
+		html += '<li>'
+					+'<img src="'+ents[i].s_pic+'" onerror="this.src=\'/images/ent-logo.png\'">'
+					+'<a href="/enterprise/'+ents[i].s_id+'.html">'+ents[i].s_remark+'</a>'
+				+'</li>';
+		if(tmp == 8 || i == ents.length-1){
+			tmp = 0;
+			html += '</ul><div class="clearfix"></div></div>';
+		}
+	}
+	$(".ent-index-recommend .carousel-inner").html(html).after(olHtml+'</ol>');
 });
 </script>
 </body>

+ 35 - 4
core/src/web/templates/search/enterpriseList.html

@@ -38,8 +38,9 @@
 		<!--查询条件结束-->
 		<!--注册资本、认证-->
 		<ul id="navs" class="nav nav-tabs  hidden-sm hidden-md hidden-xs">
-			<li {{if not .T.querymap.c_author}}class="active"{{end}} id="c_author" name="c_author" value=""><a href="#home" data-toggle="tab">全部</a></li>
+			<li {{if and (not .T.querymap.c_author) (not .T.querymap.OpState)}}class="active"{{end}} id="c_author" name="c_author" value=""><a href="#home" data-toggle="tab">全部</a></li>
 			<li {{if .T.querymap.c_author}}class="active"{{end}} name="c_author" id="c_author" value="Y"><a href="#home" data-toggle="tab">认证</a></li>
+			<li {{if .T.querymap.OpState}}class="active"{{end}} name="OpState" id="c_OpState" value="06"><a href="#home" data-toggle="tab">存续/在营</a></li>
         </ul>
 		<!--注册资本、认证结束-->
 		
@@ -173,8 +174,32 @@
 	
 	<!--右边显示区开始-->
 	<div class="b-right hidden-sm hidden-md hidden-xs b-right-content">
-		<div class="borderB text-muted fontb frontS">推荐企业</div>
-		<div id="tjqy "><img style="width:100%;" class="qfw-p-margintop" src="/images/right_ad.png"></div>
+		<div class="b-adver entlist-hotsearchwords">
+			<div class="b-adver-title">热搜词</div>
+			<div class="b-adver-content">
+				{{$s:=(Ad "ent-hotsearchwords" 15)}}
+				{{range $k,$v := $s}}
+					<a{{if $v.o_extend.fontsize}}{{if eq $v.o_extend.fontsize "large"}} style="font-size: 20px;"{{else if eq $v.o_extend.fontsize "larger"}} style="font-size: 20px;"{{end}}{{end}}>{{$v.s_remark}}</a>
+				{{end}}
+			</div>
+		</div>
+		<div class="b-adver margin-t-10 b-scroll-list" id="entlist-recommend">
+			<div class="b-adver-title">推荐企业</div>
+			<div class="b-adver-content">
+				{{$s:=(Ad "ent-recommend" 15)}}
+				<ul>
+				{{range $k,$v := $s}}
+					<li{{if eq $k 0}} class="border-t-0"{{end}}>
+						<div>
+							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<a href="/enterprise/{{$v.s_id}}.html">{{$v.s_remark}}</a>
+						</div>
+					</li>
+				{{end}}
+				</ul>
+				<div class="clearfix"></div>
+			</div>
+		</div>
 	</div>
 	<!--右边显示区结束-->
 </div>
@@ -188,8 +213,14 @@ var btempwords={{.T.words}}
 var chf1= {{index .T.querymap "c_hfl"}};
 var czb= '{{index .T.querymap "c_zb"}}';
 var $chiancity= true,$listent=true;
+$(function(){
+	$(".entlist-hotsearchwords a").click(function(){
+		$("input[name='words']").val($(this).text());
+		$("form#searchForm").submit();
+	});
+	scrollUp("entlist-recommend");
+});
 </script>
 <script src="/js/enterprise.js"></script>
-
 </body>
 </html>

+ 3 - 2
core/src/web/templates/swordfish/index.html

@@ -76,17 +76,18 @@ $(function(){
 	//
 	var data = {{.T.data}};
 	if(data && data != "" && data.length > 0){
-		var html = '';
+		var html = '<div>';
 		for(var i=0;i<data.length;i++){
 			html += '<div class="tslist"><div class="time"><img src="/images/swordfish/circle.png">'
 					+new Date(Number(data[i].publishtime+"000")).Format("yyyy-MM-dd hh:mm:ss")
 					+'</div><a class="bt" onclick="open_window(\''+data[i].href+'\')">'
 					+data[i].title+'</a></div>';
 		}
-		$("#list").html(html);
+		$("#list").html(html+'</div>');
 	}else{
 		$(".swordfish-index").find(".b-right").remove();
 	}
+	scrollUp();
 });
 </script>
 </body>

+ 3 - 2
core/src/web/templates/swordfish/protocol.html

@@ -26,17 +26,18 @@
 $(function(){
 	var data = {{.T.data}};
 	if(data && data != "" && data.length > 0){
-		var html = '';
+		var html = '<div>';
 		for(var i=0;i<data.length;i++){
 			html += '<div class="tslist"><div class="time"><img src="/images/swordfish/circle.png">'
 					+new Date(Number(data[i].publishtime+"000")).Format("yyyy-MM-dd hh:mm:ss")
 					+'</div><a class="bt" onclick="open_window(\''+data[i].href+'\')">'
 					+data[i].title+'</a></div>';
 		}
-		$("#list").html(html);
+		$("#list").html(html+'</div>');
 	}else{
 		$(".swordfish-index").find(".b-right").remove();
 	}
+	scrollUp();
 });
 </script>
 </body>

+ 3 - 2
core/src/web/templates/swordfish/rssset.html

@@ -626,15 +626,16 @@ $('#tishiModal').on('hidden.bs.modal', function () {
 $(function(){
 	var data = {{.T.list}};
 	if(data && data != "" && data.length > 0){
-		var html = '';
+		var html = '<div>';
 		for(var i=0;i<data.length;i++){
 			html += '<div class="tslist"><div class="time"><img src="/images/swordfish/circle.png">'
 					+new Date(Number(data[i].publishtime+"000")).Format("yyyy-MM-dd hh:mm:ss")
 					+'</div><a class="bt" onclick="open_window(\''+data[i].href+'\')">'
 					+data[i].title+'</a></div>';
 		}
-		$("#list").html(html);
+		$("#list").html(html+'</div>');
 	}
+	scrollUp();
 });
 </script>
 </body>

+ 65 - 46
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -70,10 +70,10 @@
 				<br>
 				{{if .T.res.s_email}}
 					<span class="glyphicon youjian2"></span>{{.T.res.s_email}}<span class="margin-r-15"></span>
-				{{else if .T.res.NB_email}}
-					<span class="glyphicon youjian2"></span>{{.T.res.NB_email}}<span class="margin-r-15"></span>
+				{{else if .T.res.Nb_email}}
+					<span class="glyphicon youjian2"></span>{{.T.res.Nb_email}}<span class="margin-r-15"></span>
 				{{end}}
-				{{if .T.res.s_enturl}}<span class="glyphicon wangzhi1"></span>{{.T.res.s_enturl}}{{end}}
+				{{if .T.res.s_enturl}}<span class="glyphicon wangzhi1"></span><a href="{{.T.res.s_enturl}}" target="_brank">{{.T.res.s_enturl}}</a>{{end}}
 				<br>
 				{{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address .T.res.Dom}}
 					<span class="glyphicon dizhi margin-0"></span>
@@ -110,21 +110,20 @@
 	</div>
 	<!--切换-->
 	<ul class="ent-tab">
-		<li class="ent-active">企业画像</li>
+		<li class="ent-active">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
 		<li>关系网</li>
-		<li>公司简介</li>
+		<li>主要人员</li>
 		<li>变更信息</li>
 		<li>失信信息</li>
-		<li>产品服务信息</li>
-		<li class="border-r-0">招聘</li>
+		<li class="border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
 	</ul>
-	<div class="ent-tab-content">
+	<div class="ent-tab-content b-left">
 		<div>
 			{{if .T.res.gs}}
 			<div class="entinfo-basicinfo ent-layout-up">
 				<div class="b-com-title">
 					<span class="glyphicon jianzhu"></span>基本信息
-					<font>(来源:<a href="http://gsxt.saic.gov.cn/" rel="nofollow" class="font-size-12">全国企业信用信息公示系统</a>)</font>
+					<font>(来源:<a href="http://gsxt.saic.gov.cn/" rel="nofollow" class="font-size-12" target="_bank">全国企业信用信息公示系统</a>)</font>
 				</div>
 				<div class="b-com-content">
 					<div class="entinfo-round">
@@ -149,7 +148,6 @@
 										if(entName.length > 15){
 											var firstLine = entName.substring(0,15);
 											var secondLine = entName.substring(15,entName.length);
-											console.info(secondLine);
 											if(secondLine.length > 15){
 												secondLine = secondLine.substring(0,12)+"...";
 											}
@@ -275,7 +273,15 @@
 				</div>
 			</div>
 			{{end}}
-			{{if and (not .T.res.gs) (not .T.res.investor)}}
+			{{if .T.res.OpScope}}
+			<div class="ent-layout-down">
+				<div class="b-com-title">
+					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>经营范围
+				</div>
+				<div class="b-com-content">{{.T.res.OpScope}}</div>
+			</div>
+			{{end}}
+			{{if and (not .T.res.gs) (not .T.res.investor) (not .T.res.OpScope)}}
 			<div class="ent-findnull">
 				<img src="/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
@@ -302,34 +308,11 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-		<div class="hide">
-		{{if or .T.res.OpScope .T.res.s_synopsis}}
-			<div class="ent-layout-up">
-				<div class="b-com-title">
-					<span class="glyphicon jianzhu"></span>公司简介
-				</div>
-				<div class="b-com-content margin-0"></div>
-			</div>
-			<div class="ent-layout-down">
-				{{if .T.res.OpScope}}
-				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>经营范围
-				</div>
-				<div class="b-com-content">{{.T.res.OpScope}}</div>
-				{{end}}
-				{{if .T.res.s_synopsis}}
-				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>公司介绍
-				</div>
-				<div class="b-com-content">{{.T.res.s_synopsis}}</div>
-				{{end}}
-			</div>
-			{{else}}
-			<div class="ent-findnull">
+		<div class="hide ent-mainperson">
+			<div class="ent-findnull hide">
 				<img src="/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
-			{{end}}
 		</div>
 		<div class="ent-alterinfo hide">
 		{{if gt (len .T.res.alterInfo) 0}}
@@ -386,23 +369,57 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-		<div class="hide ent-service">
-			<table class="table ent-table" id="serviceList">
-				<tr>
-					<td colspan="4" class="text-center ent-servicepaging" id="serviceListPaging"></td>
-				</tr>
-			</table>
+		<div class="hide ent-yellowpage">
+			{{if .T.res.s_synopsis}}
+			<div class="ent-layout-down">
+				<div class="b-com-title">
+					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>{{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}}介绍
+				</div>
+				<div class="b-com-content">{{.T.res.s_synopsis}}</div>
+			</div>
+			{{end}}
+			<div class="ent-layout-down serviceList-layout hide">
+				<div class="b-com-title">
+					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>产品服务信息
+				</div>
+				<div class="b-com-content padding-b-0">
+					<table class="table ent-table" id="serviceList">
+						<tr>
+							<td colspan="4" class="text-center ent-servicepaging" id="serviceListPaging"></td>
+						</tr>
+					</table>
+				</div>
+			</div>
 			<div class="ent-findnull hide">
 				<img src="/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-		<div class="hide">
-			<div class="ent-findnull">
-				<img src="/images/findnull.png" class="b-findnull">
-				<h4>抱歉,未找到相关数据!</h4>
+	</div>
+	<div class="b-right">
+		{{if gt (len .T.relevantEnts) 0}}
+		<div class="b-adver b-scroll-list">
+			<div class="b-adver-title">相关企业</div>
+			<div class="b-adver-content">
+				<ul>
+				{{range $k,$v := .T.relevantEnts}}
+					<li{{if eq $k 0}} class="margin-0 border-t-0"{{end}}>
+						<div>
+							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<a href="/enterprise/{{$v._id}}.html">{{$v.text}}</a>
+						</div>
+					</li>
+				{{end}}
+				</ul>
+				<div class="clearfix"></div>
 			</div>
 		</div>
+		{{end}}
+		<div class="{{if gt (len .T.relevantEnts) 0}}margin-t-10 {{end}}b-adver">
+			<div class="b-adver-title">新闻动态</div>
+			<div class="b-adver-content newsInfo"></div>
+		</div>
+		
 	</div>
 </div>
 <!--显示地图信息-->
@@ -416,6 +433,8 @@ var entId = {{.T.res._id}};
 var regNo = {{.T.res.RegNo}};
 var legcerNo = {{.T.res.LegCerNO}};
 var entName = {{.T.res.EntName}};
+var staffinfo = {{.T.res.staffinfo}};
+var synopsis = {{.T.res.s_synopsis}};
 //联系地址
 //定义默认的郑州经纬度
 var ptlat=113.69884285509,  ptlng=34.791342526551;