ソースを参照

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

Conflicts:
	core/src/qfw/search/searchService.go
	core/src/qfw/search/wxsearchservice.go
李广朋 9 年 前
コミット
8b9fb6b4fd
42 ファイル変更1018 行追加385 行削除
  1. 9 0
      common/src/qfw/util/common.go
  2. 3 0
      common/src/qfw/util/encrypt_test.go
  3. 0 0
      core/src/province.json
  4. 2 2
      core/src/qfw/coreutil/weixinrpc.go
  5. 7 0
      core/src/qfw/front/webcentent.go
  6. 1 0
      core/src/qfw/manage/article.go
  7. 5 2
      core/src/qfw/search/searchService.go
  8. 3 4
      core/src/qfw/search/wxsearch.go
  9. 79 152
      core/src/qfw/search/wxsearchservice.go
  10. 3 9
      core/src/qfw/swordfish/swordfishmanage.go
  11. 159 23
      core/src/qfw/yellowpage/yellowpagemanager.go
  12. 1 1
      core/src/timetask.json
  13. 27 0
      core/src/web/staticres/css/entcommunity.css
  14. 103 10
      core/src/web/staticres/js/entportrait.js
  15. 168 0
      core/src/web/staticres/js/frontpaging.js
  16. 27 0
      core/src/web/staticres/js/paging.js
  17. 1 1
      core/src/web/staticres/js/qfw.js
  18. 18 13
      core/src/web/staticres/js/relation.js
  19. BIN
      core/src/web/staticres/wxswordfish/images/dingyue.png
  20. BIN
      core/src/web/staticres/wxswordfish/images/liebiao.png
  21. BIN
      core/src/web/staticres/wxswordfish/images/sousuo.png
  22. 45 1
      core/src/web/staticres/wxswordfish/style.css
  23. 2 2
      core/src/web/templates/common/enthead.html
  24. 25 15
      core/src/web/templates/index.html
  25. 125 0
      core/src/web/templates/manage/webmobindex.html
  26. 11 4
      core/src/web/templates/member/incmobile/index.html
  27. 0 4
      core/src/web/templates/member/message/msgindex.html
  28. 0 4
      core/src/web/templates/member/myappointment.html
  29. 0 4
      core/src/web/templates/member/mydemand.html
  30. 0 4
      core/src/web/templates/member/ordermanage.html
  31. 5 6
      core/src/web/templates/search/entcommunity.html
  32. 2 11
      core/src/web/templates/search/enterpriseList.html
  33. 0 16
      core/src/web/templates/swordfish/index.html
  34. 2 2
      core/src/web/templates/swordfish/searchinfolist.html
  35. 60 11
      core/src/web/templates/swordfish/wxsearch.html
  36. 4 4
      core/src/web/templates/swordfish/wxsearchlist.html
  37. 45 17
      core/src/web/templates/swordfish/wxtoolbar.html
  38. 45 44
      core/src/web/templates/yellowpage/enterpriseinfo.html
  39. 8 8
      credit/src/config.json
  40. 3 3
      credit/src/main.go
  41. 1 1
      credit/src/qfw/creditrpc/creditrpc.go
  42. 19 7
      weixin/src/qfw/weixin/rpc/downimg.go

+ 9 - 0
common/src/qfw/util/common.go

@@ -11,6 +11,7 @@ import (
 	"io"
 	"log"
 	mathRand "math/rand"
+	"regexp"
 	"runtime"
 	"strconv"
 	"strings"
@@ -398,3 +399,11 @@ func GetSubDay(t1 int64) int {
 	nt2 := time.Date(tt2.Year(), tt2.Month(), tt2.Day(), 0, 0, 0, 0, time.Local)
 	return int((nt1.Unix() - nt2.Unix()) / 86400)
 }
+func StartWith(value, str string) bool {
+	ok, _ := regexp.MatchString("^"+str, value)
+	return ok
+}
+func EndWith(value, str string) bool {
+	ok, _ := regexp.MatchString(str+"$", value)
+	return ok
+}

ファイルの差分が大きいため隠しています
+ 3 - 0
common/src/qfw/util/encrypt_test.go


ファイルの差分が大きいため隠しています
+ 0 - 0
core/src/province.json


+ 2 - 2
core/src/qfw/coreutil/weixinrpc.go

@@ -112,8 +112,8 @@ func GetShareQR(url uint32) string {
 }
 
 //根据mediaid下载图片
-func WxDownloadImg(mediaid string) string {
-	var ret string
+func WxDownloadImg(mediaid string) []string {
+	var ret []string
 	util.Try(func() {
 		client, err := rpc.DialHTTP("tcp", rpcserver)
 		defer client.Close()

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

@@ -50,6 +50,13 @@ type Newscont struct {
 	webHelp xweb.Mapper `xweb:"/front/web_(\\w+)_help.html"`
 	//帮助中心 意见反馈 关于我们 联系我们
 	webMobileHelp xweb.Mapper `xweb:"/front/web_(\\w+)_mobilehelp.html"`
+	//前台手机首页内容
+	webindexcontent xweb.Mapper `xweb:"GET /front/webindexcontent/(\\w+).html"`
+}
+
+//手机首页内容
+func (n *Newscont) Webindexcontent(_id string) error {
+	return n.viewContent4Front(_id, "/manage/webmobindex.html")
 }
 
 //帮助中心 意见反馈 关于我们 联系我们电脑端

+ 1 - 0
core/src/qfw/manage/article.go

@@ -140,6 +140,7 @@ func (a *Article) Updatearticle() error {
 			elastic.UpdateNewDoc("content", "content", FindById("content", _id, ""))
 			redis.Del("other", "/front/webcontent/"+_id+".html")
 			redis.Del("other", "/front/webhelpcontent/"+_id+".html")
+			redis.Del("other", "/front/webindexcontent/"+_id+".html")
 			redis.Del("other", "/front/weixincontent/"+_id)
 			redis.Del("other", "/")
 			redis.Del("other", "latestNews") //最新消息

+ 5 - 2
core/src/qfw/search/searchService.go

@@ -9,6 +9,7 @@ import (
 	"html/template"
 	"qfw/front"
 	. "qfw/member"
+	"qfw/mobile"
 	. "qfw/util"
 	"qfw/util/consts"
 	"qfw/util/credit"
@@ -33,10 +34,12 @@ type EntInfo struct {
 
 //企业社区首页
 func (search *Search) EntCommunity() error {
+
 	regex, _ := regexp.Compile("(Android|Mobile)")
 	ismobile := regex.FindAllString(search.Header("User-Agent"), -1)
-	if len(ismobile) > 0 {
-		search.Render("/member/incmobile/index.html")
+	if ismobile > 0 {
+		search.T["signature"] = mobile.GetSignature(search.Url())
+		search.Render("/member/incmobile/index.html", &search.T)
 		return nil
 	}
 	//新认证企业

+ 3 - 4
core/src/qfw/search/wxsearch.go

@@ -10,10 +10,9 @@ import (
 
 type Wxsearch struct {
 	*xweb.Action
-	wxEnterprise        xweb.Mapper `xweb:"/wx/search/enterprise/index.html"`             //查询首页
-	wxMingpian          xweb.Mapper `xweb:"/wx/search/enterprise/mingpian"`               //获取名片
-	wxgetEnterpriseList xweb.Mapper `xweb:"/wx/search/enterprise/([^.]*)ent([^.]*).html"` //查询企业列表
-	wxsearchEntSer      xweb.Mapper `xweb:"/wx/searchEntSer/(.*)"`                        //获取企业的服务列表
+	wxIndex             xweb.Mapper `xweb:"/wx/search/enterprise/index.html"` //查询企业列表
+	wxMingpian          xweb.Mapper `xweb:"/wx/search/enterprise/mingpian"`   //获取名片
+	wxgetEnterpriseList xweb.Mapper `xweb:"/wx/search/enterprise/list.html"`  //查询企业列表
 }
 
 var mpian_reg *regexp.Regexp //名片

+ 79 - 152
core/src/qfw/search/wxsearchservice.go

@@ -7,11 +7,8 @@ import (
 	"github.com/go-xweb/xweb"
 	"github.com/p/mahonia"
 	"html/template"
-	"log"
 	"qfw/coreutil"
-	"qfw/front"
-	. "qfw/member"
-	"qfw/mobile"
+	//	"qfw/mobile"
 	. "qfw/util"
 	"qfw/util/consts"
 	"qfw/util/elastic"
@@ -22,99 +19,15 @@ import (
 	"strings"
 )
 
-//微信企业查询首页
-func (s *Wxsearch) WxEnterprise() error {
-	s.T["signature"] = mobile.GetSignature(s.Url())
-	return s.Render("/member/incombile/index.html", &s.T)
-}
-
-//获取名片名称
-func (s *Wxsearch) WxMingpian() error {
-	res := make(map[string]string)
-	if s.GetSession("s_m_openid") != nil {
-		serverId := s.GetString("serverId")
-		picpath := coreutil.WxDownloadImg(serverId)
-		log.Println("picpath", picpath)
-		names := coreutil.CardRecognition(picpath)
-		for k, v := range names {
-			name := fmt.Sprint(v)
-			if mpian_reg.MatchString(name) {
-				res["name"] = name
-				break
-			}
-			if k == len(names)-1 {
-				res["name"] = name
-			}
-		}
-	}
-	s.ServeJson(&res)
-	return nil
-}
-
-//获取某个企业服务列表数据
-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)
-	}
+//企业社区首页
+func (n *Wxsearch) WxIndex() error {
+	//n.T["signature"] = mobile.GetSignature(n.Url())
+	n.Render("/member/incmobile/index.html", &n.T)
 	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()
-	log.Println(n.Header("User-Agent"))
 	i_mingpian := n.GetString("i_mingpian") //是否走名片查询
 	if len(param) == 0 {
 		//请求是表单提交,走的查询
@@ -130,29 +43,29 @@ func (n *Wxsearch) WxgetEnterpriseList(reqType, param /*参数*/ string) error {
 			"c_author":    n.GetString("c_author"),
 			"cityNo":      n.GetString("cityNo"), //是否是第一次查询并且没有选择地市,自动根据IP来设
 		}
+
 		//查询生成列表数据
 		var data *[]map[string]interface{}
 		var has bool
 		if i_mingpian != "" {
-			data, _, has = wxsearhWebContententMp(querymap, n, reqType, false)
+			data, has = wxsearhWebContententMp(querymap, n, reqType, false)
 			if !has {
-				data, _ = wxsearhWebContentent(querymap, n, reqType)
+				data = wxsearhWebContentent(querymap, n, reqType)
 			}
 		} else {
-			data, _ = wxsearhWebContentent(querymap, n, reqType)
+			data = wxsearhWebContentent(querymap, n, reqType)
 		}
 		rs := FormatData(data)
-		log.Println("阿斯顿发送到发送到发的", string(rs))
-		n.Render("/member/incmobile/list.html", &xweb.T{"data": rs})
+		n.Render("/member/incmobile/list.html", &xweb.T{"data": rs, "querymap": querymap})
 	} else {
 		//反转生成map
 		paramstr := param[1:]
 		bs, _ := base64.StdEncoding.DecodeString(paramstr)
 		querymap := map[string]string{}
 		json.Unmarshal(bs, &querymap)
-		data, _ := wxsearhWebContentent(querymap, n, reqType)
+		data := wxsearhWebContentent(querymap, n, reqType)
 		rs := FormatData(data)
-		n.Render("/member/incmobile/list.html", &xweb.T{"data": rs})
+		n.Render("/member/incmobile/list.html", &xweb.T{"data": rs, "querymap": querymap})
 	}
 	return nil
 }
@@ -178,7 +91,7 @@ func FormatData(data *[]map[string]interface{}) string {
 }
 
 //实际的查询企业社区业务逻辑
-func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType string) (*[]map[string]interface{}, *[]interface{}) {
+func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType string) *[]map[string]interface{} {
 	perPage, _ := strconv.Atoi(querymap["perPage"])
 	currentPage, _ := strconv.Atoi(querymap["currentPage"])
 	//修复
@@ -188,16 +101,16 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 	if currentPage < 1 {
 		currentPage = 1
 	}
-
+	if currentPage > 20 {
+		currentPage = 20
+	}
 	queryStr := querymap["query"]
 	fmt.Println("检索条件:", queryStr)
 	str := ``
 	//查询词
 	keyword := queryStr
 	//排序
-
 	sort := ""
-
 	//地区
 	city := querymap["city"]
 	var tempQuery = ""
@@ -205,7 +118,6 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 	cityNo := querymap["cityNo"]
 	tempBisOne := false
 	ipcity := ""
-	var total int64 = 500
 	if cityNo == "" && len(queryStr) == 0 {
 		querymap["cityNo"] = "1"
 		tn, er := ip.Find(n.Protocol())
@@ -214,18 +126,17 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			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_res := redis.Get("enterprise", "wx_ipcity_"+ipcity+"_1")
+					if nil != tmp_res {
 						tmp_res1, oks1 := tmp_res.([]interface{})
-						tmp_pag1, oks2 := tmp_pag.([]interface{})
-						if tmp_res1 != nil && tmp_pag1 != nil && oks1 && oks2 {
+
+						if tmp_res1 != nil && oks1 {
 							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
+							return &tmp_resn
 						}
 					}
 
@@ -238,7 +149,7 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 						      }
 						    }
 						  }
-						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","OpStateName","s_servicenames","s_action","OpLocDistrict"]
+						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","RegCapCurName","s_avatar"]
 						,"from":0,
 						"size":` + fmt.Sprintf("%v", perPage) + `,
 						  "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
@@ -287,7 +198,14 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			}
 			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" {
@@ -297,17 +215,6 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			str += `{
 				"terms":{"enterprise.s_action":["01"]}
 			}`
-
-			/**
-					str += `{
-			          "match": {
-			            "enterprise.s_action": {
-			              "query":"` + "01" + `",
-			              "operator": "and"
-			            }
-			          }
-			        }`
-					**/
 		}
 		queryShould := ""
 
@@ -383,25 +290,21 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			"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"]
+    },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid","RegCapCurName","s_avatar"]
 	,"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
+		return nil
 	}
 	searchResult, err := client.Search().Index("enterprise").Type("enterprise").Source(query).Do()
 	if err != nil {
-		return nil, nil
+		return nil
 	}
 	var res []map[string]interface{}
 	if searchResult.Hits != nil {
@@ -416,13 +319,24 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 
 			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 {
@@ -435,13 +349,6 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			} 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 {
@@ -481,20 +388,15 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 
 		}
 	}
-	//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)
+		redis.Put("enterprise", "wx_ipcity_"+ipcity+"_1", res, 5*86400)
 	}
-	return &res, &pagination
-
+	return &res
 }
 
 //通过企业名片查询
-func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType string, has bool) (*[]map[string]interface{}, *[]interface{}, bool) {
+func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType string, has bool) (*[]map[string]interface{}, bool) {
 	queryStr := querymap["query"]
 	fmt.Println("检索条件:", queryStr)
 	keyword := queryStr
@@ -532,11 +434,11 @@ func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType str
 	client := elastic.GetEsConn()
 	defer elastic.DestoryEsConn(client)
 	if client == nil {
-		return nil, nil, false
+		return nil, false
 	}
 	searchResult, err := client.Search().Index("enterprise").Type("enterprise").Source(query).Do()
 	if err != nil {
-		return nil, nil, false
+		return nil, false
 	}
 	var res []map[string]interface{}
 	if searchResult.Hits != nil {
@@ -608,7 +510,32 @@ func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType str
 			}
 		}
 	}
-	//生成分页
-	pagination := front.MakePagination(1, 1, 1, querymap, "/wx/search/enterprise/"+reqType+"ent_%s.html")
-	return &res, &pagination, has
+	return &res, has
+}
+
+//获取名片名称
+func (n *Wxsearch) WxMingpian() error {
+	res := make(map[string]string)
+	res["name"] = ""
+	res["on"] = "y"
+	if n.GetSession("s_m_openid") != nil {
+		serverId := n.GetString("serverId")
+		ret := coreutil.WxDownloadImg(serverId)
+		if len(ret) > 1 {
+			res["on"] = ret[0]
+			names := coreutil.CardRecognition(ret[1])
+			for k, v := range names {
+				name := fmt.Sprint(v)
+				if mpian_reg.MatchString(name) {
+					res["name"] = name
+					break
+				}
+				if k == len(names)-1 {
+					res["name"] = name
+				}
+			}
+		}
+	}
+	n.ServeJson(&res)
+	return nil
 }

+ 3 - 9
core/src/qfw/swordfish/swordfishmanage.go

@@ -4,8 +4,8 @@ import (
 	"encoding/json"
 	_ "encoding/json"
 	"gopkg.in/mgo.v2/bson"
-	"log"
 	"net/rpc"
+	"qfw/coreconfig"
 	"qfw/util"
 	"qfw/util/mongodb"
 	"qfw/util/redis"
@@ -96,9 +96,8 @@ func (s *SwordFish) Wxsearchlist() error {
 	s.T["s_name"] = s_name
 	s.T["success"] = false
 	s.T["s_type"] = s.GetString("s_type")
-	log.Println("s_type:", s_type, "s_name:", s_name, "keywords:", keywords)
 	if len(s_name) > 0 {
-		clent, errs := rpc.DialHTTP("tcp", "127.0.0.1:8766")
+		clent, errs := rpc.DialHTTP("tcp", coreconfig.SysConfig.PushRpc)
 		defer clent.Close()
 		rpcData := qrpc.PushData{
 			//Mopenid: "oJULtwzXo6EFV1Ah-XeyRBimXGM8",
@@ -117,7 +116,6 @@ func (s *SwordFish) Wxsearchlist() error {
 			if bmatch == true {
 				s.T["success"] = true
 			}
-			log.Println(s.T["msglist"])
 		}
 	}
 	return s.Render("/swordfish/wxsearchlist.html", &s.T)
@@ -125,12 +123,9 @@ func (s *SwordFish) Wxsearchlist() error {
 
 //跳转到用户中心查询剑鱼信息列表
 func (s *SwordFish) Searchinfolist() error {
-	//moborpc := s.GetString("moborpc")
 	s_type := s.GetString("s_type")
 	s_name := s.GetString("s_name")
 	keywords := s.GetString("searchname")
-	//	if moborpc == "pc" {
-	//	}
 	if s_type == "1" {
 		s_type = "tender"
 	} else if s_type == "2" {
@@ -142,7 +137,7 @@ func (s *SwordFish) Searchinfolist() error {
 	s.T["success"] = false
 	s.T["s_type"] = s.GetString("s_type")
 	if len(s_name) > 0 {
-		clent, errs := rpc.DialHTTP("tcp", "127.0.0.1:8766")
+		clent, errs := rpc.DialHTTP("tcp", coreconfig.SysConfig.PushRpc)
 		defer clent.Close()
 		rpcData := qrpc.PushData{
 			//Mopenid: "oJULtwzXo6EFV1Ah-XeyRBimXGM8",
@@ -161,7 +156,6 @@ func (s *SwordFish) Searchinfolist() error {
 			if bmatch == true {
 				s.T["success"] = true
 			}
-			log.Println(s.T["msglist"])
 		}
 	}
 	return s.Render("/swordfish/searchinfolist.html", &s.T)

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

@@ -18,6 +18,7 @@ import (
 	elastic "qfw/util/elastic"
 	. "qfw/util/mongodb"
 	"qfw/util/redis"
+	"regexp"
 	"strconv"
 	"strings"
 	"time"
@@ -27,6 +28,8 @@ const ESINDEX string = "enterprise"
 const ESTYPE string = "enterprise"
 const ONEDAY int = 24 * 60 * 60
 
+var provinces []map[string]interface{}
+
 //常量代码表
 var city_map map[string]interface{} = map[string]interface{}{"11": "北京市", "12": "天津市", "13": "河北省", "14": "山西省", "15": "内蒙古",
 	"21": "辽宁省", "22": "吉林省", "23": "黑龙江省", "31": "上海市", "32": "江苏省", "33": "浙江省", "34": "安徽省",
@@ -130,9 +133,9 @@ func GetEntInfo(id string) map[string]interface{} {
 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}`)
+		submitid := (*res)["s_submitid"]
+		if submitid != nil {
+			ud := FindById("user", submitid.(string), `{"i_comauthenttype":1}`)
 			(*res)["i_comauthenttype"] = (*ud)["i_comauthenttype"]
 		}
 		opl, _ := (*res)["OpLocDistrict"].(string)
@@ -263,11 +266,11 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 			yp.T["res"] = info
 			regNo, _ := info["RegNo"].(string)
 			entName, _ := info["EntName"].(string)
-			//相关企业
-			relation := getRelation(regNo, entName)
-			if relation != nil {
-				var nodes *[]map[string]interface{}
-				if d, err := json.Marshal(relation.(map[string]interface{})["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
+			relation, ok := getRelation(regNo, entName).(map[string]interface{})
+			var nodes *[]map[string]interface{}
+			if ok {
+				if d, err := json.Marshal(relation["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
+					//相关企业
 					var regNos []string
 					for _, v := range *nodes {
 						if v["type"] == "e" {
@@ -302,9 +305,7 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 					}
 				}
 				if len(ids) > 0 {
-					log.Println(ids)
 					news := Find("trs_news", M{"_id": M{"$in": ids}}, `{"l_comeintime":-1}`, `{"s_link":1,"s_title":1,"l_comeintime":1}`, false, 0, 8)
-					log.Println(news)
 					if news != nil && len(*news) > 0 {
 						yp.T["relevantNews"] = news
 					}
@@ -316,10 +317,26 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 			yp.T["service"] = findServiceByEntId(id, 1, yp.Session())
 			//关系网数据
 			yp.T["relation"] = relation
+			//著作权
+			yp.T["copyright"] = FindOne("enterprise_copyright", `{"EntId":"`+id+`"}`)
 			contentuser, erruser := yp.Render4Cache("/yellowpage/enterpriseinfo.html", &yp.T)
 			if erruser == nil {
 				redis.PutBytes("enterprise", "enterpriseInfo_"+id, &contentuser, 7*ONEDAY)
 			}
+			//过滤企业名
+			if ok && nodes != nil && len(*nodes) > 0 {
+				go func() {
+					util.Try(func() {
+						if filterEntName(nodes) > 0 {
+							relation["nodes"] = nodes
+							redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
+							redis.Del("enterprise", "enterpriseInfo_"+id)
+						}
+					}, func(e interface{}) {
+						log.Println("过滤企业名出错:", e)
+					})
+				}()
+			}
 			return yp.SetBody(contentuser)
 		} else {
 			return yp.Render("/_error.html")
@@ -415,19 +432,11 @@ func storeNode(data *map[string]interface{}, ls *list.List, dir /*方向反转*/
 	regcap, _ := (*data)["regcap"].(float64)
 	invregcap, _ := (*data)["invregcap"].(float64)
 	legcerno, _ := (*data)["legcerno"].(string)
-	opstate := ""
-	if (*data)["opstate"] != nil {
-		opstate = (*data)["opstate"].(string)
-	}
-	invopstate := ""
-	if (*data)["invopstate"] != nil {
-		invopstate = (*data)["invopstate"].(string)
-	}
-	regcapcurname := ""
-	if (*data)["regcapcurname"] != nil {
-		regcapcurname = (*data)["regcapcurname"].(string)
-	}
-	ls.PushBack([]string{invtype, invcerno, invname, entregno, entname, strconv.Itoa(level), fmt.Sprint(invweight), invacconam, fmt.Sprint(regcap), fmt.Sprint(invregcap), legcerno, opstate, invopstate, regcapcurname})
+	opstate, _ := (*data)["opstate"].(string)
+	invopstate, _ := (*data)["invopstate"].(string)
+	regcapcurname, _ := (*data)["regcapcurname"].(string)
+	shortname, _ := (*data)["shortname"].(string)
+	ls.PushBack([]string{invtype, invcerno, invname, entregno, entname, strconv.Itoa(level), fmt.Sprint(invweight), invacconam, fmt.Sprint(regcap), fmt.Sprint(invregcap), legcerno, opstate, invopstate, regcapcurname, util.BsonIdToSId((*data)["_id"]), shortname})
 }
 
 func findIndex(code string, arr []interface{}) (index int, mtType string) {
@@ -526,6 +535,8 @@ func makeRelation(mnregno, mnname string) interface{} {
 				"legcerno":      v[10],
 				"opstate":       v[12],
 				"regcapcurname": v[13],
+				"_id":           v[14],
+				"shorttext":     v[15],
 			}
 		}
 		//加企业
@@ -539,6 +550,8 @@ func makeRelation(mnregno, mnname string) interface{} {
 				"legcerno":      v[10],
 				"opstate":       v[11],
 				"regcapcurname": v[13],
+				"_id":           v[14],
+				"shorttext":     v[15],
 			}
 		}
 	}
@@ -656,6 +669,7 @@ func findServiceByEntId(id string, currentPage int, session *httpsession.Session
 	}
 	return res
 }
+
 func checkAuth(obj map[string]interface{}) (b bool, err string) {
 	if len(obj) > 0 {
 		//判断有没有预约的情况
@@ -679,3 +693,125 @@ func checkAuth(obj map[string]interface{}) (b bool, err string) {
 	}
 	return true, ""
 }
+func filterEntName(nodes *[]map[string]interface{}) int {
+	if len(provinces) == 0 {
+		util.ReadConfig("./province.json", &provinces)
+	}
+	var count int
+	for _, v := range *nodes {
+		if v["text"] == nil {
+			continue
+		}
+		text, ok := v["text"].(string)
+		text = strings.Trim(text, " ")
+		if !ok || text == "" {
+			continue
+		}
+		shortText := text
+		if v["type"] == "e" || v["type"] == "ce" {
+			if v["shorttext"] == nil || v["shorttext"] == "" {
+				if len([]rune(shortText)) > 2 { //先替换结尾
+					r := regexp.MustCompile("(有限公司|有限责任公司|股份有限公司|总公司|分公司|公司|事务所|合伙企业)$|\\([^\\)]*\\)|([^)]*)")
+					shortTextTemp := r.ReplaceAllString(shortText, "")
+					if len([]rune(shortTextTemp)) > 2 {
+						shortText = shortTextTemp
+					}
+					if len([]rune(shortTextTemp)) > 4 { //再替换开头地区
+						shortTextTemp = filterRegion(shortText)
+						if len([]rune(shortTextTemp)) > 2 {
+							shortText = shortTextTemp
+						}
+					}
+				}
+				v["shorttext"] = shortText
+				count++
+				if v["type"] == "e" {
+					Update("entrelation", `{"_id":"`+v["_id"].(string)+`"}`, `{"$set":{"shortname":"`+shortText+`"}}`, false, false)
+				}
+			}
+		}
+	}
+	log.Println("过滤", count, "个企业的名字!")
+	return count
+}
+func filterRegion(text string) string {
+	var commonReplace = func(t string) bool {
+		if len(t) > 1 && util.StartWith(text, t) {
+			r := regexp.MustCompile("^" + t)
+			var textCopy = r.ReplaceAllString(text, "")
+			if len(textCopy) > 2 {
+				text = textCopy
+			}
+			return true
+		}
+		return false
+	}
+	var replaceStart = func(t string, f bool) bool {
+		if t == "" {
+			return false
+		}
+		var flag bool
+		var minus int
+		if commonReplace(t) { //替换省、市、县、区
+			return true
+		}
+		if f { //不替换
+			flag = false
+		} else if util.EndWith(t, "维吾尔自治区") {
+			flag = true
+			minus = 6
+		} else if util.EndWith(t, "回族自治区") || util.EndWith(t, "壮族自治区") || util.EndWith(t, "特别行政区") {
+			flag = true
+			minus = 5
+		} else if util.EndWith(t, "自治州") || util.EndWith(t, "自治县") || util.EndWith(t, "自治区") {
+			flag = true
+			minus = 3
+		} else if util.EndWith(t, "地区") {
+			flag = true
+			minus = 2
+		} else if util.EndWith(t, "省") || util.EndWith(t, "市") || util.EndWith(t, "区") {
+			flag = true
+			minus = 1
+		}
+		if flag {
+			return commonReplace(util.SubString(t, 0, len([]rune(t))-minus))
+		}
+		return false
+	}
+	/*var replaceAreas = func(areas []interface{}) bool {
+		if len(areas) > 0 {
+			for _, _a := range areas { //县、区
+				a, a_ok := _a.(map[string]interface{})
+				if a_ok && replaceStart(util.ObjToString(a["n"]), true) {
+					return true
+				}
+			}
+		}
+		return false
+	}*/
+	var replaceCity = func(citys []interface{}) bool {
+		if len(citys) > 0 {
+			for _, _c := range citys { //市
+				c, c_ok := _c.(map[string]interface{})
+				if c_ok && replaceStart(util.ObjToString(c["n"]), false) {
+					/*if c["s"] != nil {
+						replaceAreas(c["s"].([]interface{}))
+					}*/
+					return true
+				} /*else if c["s"] != nil && replaceAreas(c["s"].([]interface{})) {
+					return true
+				}*/
+			}
+		}
+		return false
+	}
+	for _, p := range provinces { //省
+		if replaceStart(util.ObjToString(p["n"]), false) {
+			replaceCity(p["s"].([]interface{}))
+			break
+		} else if replaceCity(p["s"].([]interface{})) {
+			break
+		}
+	}
+	return text
+}

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-21 16:42:20"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-21 16:42:20"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-22 11:15:00"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-22 11:15:00"}},"marketisstart":true,"marketrate":300}

+ 27 - 0
core/src/web/staticres/css/entcommunity.css

@@ -140,6 +140,7 @@ a:focus, a:hover{
 	background-size: 100% 100%;
 	padding-left: 100px;
 	padding-top: 95px;
+	padding-right: 10px;
 }
 .ent-indexpage .ent-index-search>div{
 	margin-top: 10px;
@@ -945,4 +946,30 @@ a:focus, a:hover{
 .dashed{
 	height: 1px;
 	background: url("/images/entcommunity/dashed.png");
+}
+.ent-copyright .ent-table td{
+	padding: 5px 0px !important;
+	border-bottom: 1px solid #e5e6e9 !important;
+}
+.ent-copyright .ent-table tr:last-child td{
+	border-bottom-width: 0px !important;
+}
+.ent-copyright .ent-table td span{
+	margin-right: 30px;
+}
+.ent-copyright .ent-table div{
+	margin-bottom: 5px;
+}
+.ent-copyright .ent-table .b-com-first{
+	font-weight: bold;
+	font-size: 16px;
+}
+.ent-copyright .ent-table .b-com-second{
+	color: #A0A0A0;
+}
+.ent-copyright{
+	padding: 10px;
+}
+.ent-copyright table{
+	margin-top: 15px;
 }

+ 103 - 10
core/src/web/staticres/js/entportrait.js

@@ -1,5 +1,6 @@
 var entType = "企业";
 var relationEntity = null;
+var copyrightEntity = null;
 //var servicePaging = null;
 //var dishonestyPaging = null;
 var hasLoadPagingJs = false;
@@ -65,7 +66,7 @@ $(function(){
 					}
 				}
 				verticalFlag = true;
-				hm+='<div><img src="/images/entcommunity/mainperson'+index+'.png">'
+				hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
 					+'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
 				//竖线
 				if(tmp == maxCout && i != obj.length-1){
@@ -95,7 +96,7 @@ $(function(){
 	}
 	//联系地址
 	if($address){
-		loadJS("/js/jquery.cxselect.js",function(){
+		loadJS(cdn+"/js/jquery.cxselect.js",function(){
 			$('#city_china').cxSelect({
 				selects: ['province', 'city', 'area'],
 				required:0
@@ -141,6 +142,9 @@ $(function(){
 		}
 		if(index == 1){
 			b_afterLogin();
+		}else if($(this).index() == 3 && copyrightEntity == null){
+			//加载服务列表
+			copyrightEntity = new CopyrightEntity();
 		}/*else if($(this).index() == 4 && dishonestyPaging == null){
 			//加载服务列表
 			dishonestyPaging = new DishonestyPaging();
@@ -154,7 +158,7 @@ $(function(){
 function initMap(){
 	//获取地图的经纬度
 	loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){
-		loadJS("/js/geocoder.js",function(){
+		loadJS(cdn+"/js/geocoder.js",function(){
 			doOptions();
 		});
 	});
@@ -204,10 +208,10 @@ function initRelation(){
 			}else{
 				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				$(".entrelation").height($(".ent-tab-content").height());
-				loadJS("/js/d3.v3.min.js",function(){
-					loadJS("/js/geometry.js",function(){
-						loadJS("/js/provinceData.min.js",function(){
-							loadJS("/js/relation.js",function(){
+				loadJS(cdn+"/js/d3.v3.min.js",function(){
+					loadJS(cdn+"/js/geometry.js",function(){
+						loadJS(cdn+"/js/provinceData.min.js",function(){
+							loadJS(cdn+"/js/relation.js",function(){
 								relationEntity = new Relation(legcerNo,regNo,regCapCurName,relation);
 								relationEntity.init();
 							});
@@ -254,6 +258,95 @@ function initRelation(){
 		$("#entrelation-limit,#entrelation-nologin").removeClass("hide");
 	}
 }
+function CopyrightEntity(){
+	//著作权
+	if(typeof(copyright) != "undefined" && copyright != null){
+		loadJS(cdn+"/js/frontpaging.js",function(){
+			var workCopyRight = copyright.WorkCopyRight;
+			if(typeof(workCopyRight) != "undefined" && workCopyRight != null){
+				workCopyRight.sort(function(a,b){
+					if(a.FirstPublishDate<b.FirstPublishDate){
+						return 1;
+					}else if(a.FirstPublishDate==b.FirstPublishDate){
+						return 0;
+					}
+					return -1;
+				});
+				var frontPaging = new FrontPaging("workCopyRightListPaging",workCopyRight,5,function(r){
+					var hm = '';
+					for(var i=0;i<r.length;i++){
+						hm += '<tr><td><div class="b-com-first">'+(r[i].WorkName?r[i].WorkName:"")+'</div>'
+							+'<div class="b-com-second"><div>'
+							+'<span>登记号:'+(r[i].RegNo?r[i].RegNo:"")+'</span>'
+							+'<span>登记日期:'+(r[i].RegDate?r[i].RegDate:"")+'</span>'
+							+'</div><span>作品类别:'+(r[i].WorkType?r[i].WorkType:"")+'</span>'
+							+'<span>创作完成日期:'+(r[i].FinishedDate?r[i].FinishedDate:"")+'</span>'
+							+'<span>首次发表日期:'+(r[i].FirstPublishDate?r[i].FirstPublishDate:"")+'</span>'
+							+'</div></td></tr>';
+					}
+					$("#workCopyRightListPaging").parent().prevAll().remove();
+					$("#workCopyRightListPaging").parent().before(hm);
+				});
+			}
+			var computerSoftCopyRight = copyright.ComputerSoftCopyRight;
+			if(typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null){
+				computerSoftCopyRight.sort(function(a,b){
+					if(a.FirstPublishDate<b.FirstPublishDate){
+						return 1;
+					}else if(a.FirstPublishDate==b.FirstPublishDate){
+						return 0;
+					}
+					return -1;
+				});
+				var frontPaging = new FrontPaging("computerSoftCopyRightListPaging",computerSoftCopyRight,5,function(r){
+					var hm = '';
+					for(var i=0;i<r.length;i++){
+						hm += '<tr><td><div class="b-com-first">'+(r[i].SoftFullName?r[i].SoftFullName:"")+'</div>'
+							+'<div class="b-com-second"><div>'
+							+'<span>登记号:'+(r[i].RegNo?r[i].RegNo:"")+'</span>'
+							+'<span>分类号:'+(r[i].SortNo?r[i].SortNo:"")+'</span>'
+							+'<span>简称:'+(r[i].SoftSimpleName?r[i].SoftSimpleName:"")+'</span>'
+							+'</div><span>版本号:'+(r[i].Version?r[i].Version:"")+'</span>'
+							+'<span>登记日期:'+(r[i].RegDate?r[i].RegDate:"")+'</span>'
+							+'<span>首次发表日期:'+(r[i].FirstPublishDate?r[i].FirstPublishDate:"")+'</span>'
+							+'</div></td></tr>';
+					}
+					$("#computerSoftCopyRightListPaging").parent().prevAll().remove();
+					$("#computerSoftCopyRightListPaging").parent().before(hm);
+				});
+			}
+			var patent = copyright.Patent;
+			if(typeof(patent) != "undefined" && patent != null){
+				patent.sort(function(a,b){
+					if(a.PublicDate<b.PublicDate){
+						return 1;
+					}else if(a.PublicDate==b.PublicDate){
+						return 0;
+					}
+					return -1;
+				});
+				var frontPaging = new FrontPaging("patentListPaging",patent,5,function(r){
+					var hm = '';
+					for(var i=0;i<r.length;i++){
+						hm += '<tr><td><div class="b-com-first">'+(r[i].PatentName?r[i].PatentName:"")+'</div>'
+							+'<div class="b-com-second"><div>'
+							+'<span>申请人:'+(r[i].ApplyPerson?r[i].ApplyPerson:"")+'</span>'
+							+'<span>申请号:'+(r[i].ApplyNo?r[i].ApplyNo:"")+'</span>'
+							+'<span>申请日期:'+(r[i].ApplyDate?r[i].ApplyDate.replace(/\./g,"-"):"")+'</span>'
+							+'</div><span>分类号:'+(r[i].IpcTypeNo?r[i].IpcTypeNo:"")+'</span>'
+							+'<span>公开号:'+(r[i].PublicNo?r[i].PublicNo:"")+'</span>'
+							+'<span>公开日期:'+(r[i].PublicDate?r[i].PublicDate.replace(/\./g,"-"):"")+'</span>'
+							+'</div></td></tr>';
+					}
+					$("#patentListPaging").parent().prevAll().remove();
+					$("#patentListPaging").parent().before(hm);
+				});
+			}
+		});
+	}else{
+		$("#copyright .ent-findnull").removeClass("hide");
+	}
+}
 //服务列表
 function ServicePaging(){
 	this.initServiceList = function(){
@@ -280,7 +373,7 @@ function ServicePaging(){
 				}
 				var flag = typeof(r[i].s_isshow) != "undefined" && r[i].s_isshow != null && r[i].s_isshow.indexOf("3")>-1;
 				html += '<tr>'
-						+'<td rowspan="2" width="130"><img src="'+(r[i].s_images==""?"null":r[i].s_images)+'" onerror="this.src=\'/images/services/default.png\'"></td>'
+						+'<td rowspan="2" width="130"><img src="'+(r[i].s_images==""?"null":(cdn+r[i].s_images))+'" onerror="this.src=\''+cdn+'/images/services/default.png\'"></td>'
 						+'<td class="b-com-name">';
 				if(flag){
 					html += '<a href="/market/detail/'+r[i]._id+'.html">';
@@ -316,7 +409,7 @@ function ServicePaging(){
 		this.initServiceList();
 	}else{
 		var thisClass = this;
-		loadJS("/js/paging.js",function(){
+		loadJS(cdn+"/js/paging.js",function(){
 			hasLoadPagingJs = true;
 			thisClass.initServiceList();
 		});
@@ -352,7 +445,7 @@ function DishonestyPaging(){
 		this.initDishonesty();
 	}else{
 		var thisClass = this;
-		loadJS("/js/paging.js",function(){
+		loadJS(cdn+"/js/paging.js",function(){
 			hasLoadPagingJs = true;
 			thisClass.initDishonesty();
 		});

+ 168 - 0
core/src/web/staticres/js/frontpaging.js

@@ -0,0 +1,168 @@
+var FrontPaging = function(nodeid,datas,pageSize,callBack){
+	this.currentPage = 1;
+	this.totalPages = 0;
+	this.count = 0;
+	//初始化
+	this.init = function(){
+		this.totalPages = parseInt((this.count + pageSize - 1) / pageSize);
+		if(this.totalPages > 1){
+			var html = '<nav>'
+						+'<ul class="pagination"><li';
+			if(!this.hasPrevPage()){
+				html += ' class="disabled"';
+			}
+			html += ' id="firstPage"><a>&laquo;</a></li><li';
+			if(!this.hasPrevPage()){
+				html += ' class="disabled"';
+			}
+			html += ' id="prevPage">'
+				      	+'<a>&lsaquo;</a>'
+				    +'</li>';
+			for(var i=0;i<this.totalPages;i++){
+				html += '<li id="pageNum-'+(i+1)+'"';
+				if(i == 0){
+					html += ' class="disabled"';
+				}else if(i >= 10){
+					html += ' class="hide"';
+				}
+				html += '><a>'+(i+1)+'</a></li>';
+			}
+			html += '<li';
+			if(!this.hasNextPage()){
+				html += ' class="disabled"';
+			}
+			html += ' id="nextPage"><a>&rsaquo;</a></li><li';
+			if(!this.hasNextPage()){
+				html += ' class="disabled"';
+			}
+			html += ' id="lastPage"><a>&raquo;</a></li></ul></nav>';
+			$("#"+nodeid).html(html);
+			var thisClass = this;
+			var getThisClass = function(){
+				return thisClass;
+			}
+			$("#"+nodeid+" #firstPage").click(function(){
+				if($(this).hasClass("disabled")){
+					return;
+				}
+				thisClass.currentPage = 1;
+				$(this).addClass("disabled");
+				$("#"+nodeid+" #prevPage").addClass("disabled");
+				$("#"+nodeid+" #nextPage,#"+nodeid+" #lastPage").removeClass("disabled");
+				thisClass.commonMethod();
+			});
+			$("#"+nodeid+" #prevPage").click(function(){
+				if($(this).hasClass("disabled")){
+					return;
+				}
+				$("#"+nodeid+" #pageNum-"+(--thisClass.currentPage)).addClass("disabled");
+				if(thisClass.hasPrevPage()){
+					$(this).removeClass("disabled");
+					$("#"+nodeid+" #firstPage").removeClass("disabled");
+				}else{
+					$(this).addClass("disabled");
+					$("#"+nodeid+" #firstPage").addClass("disabled");
+				}
+				$("#"+nodeid+" #nextPage,#"+nodeid+" #lastPage").removeClass("disabled");
+				thisClass.commonMethod();
+			});
+			$("#"+nodeid+" #nextPage").click(function(){
+				if($(this).hasClass("disabled")){
+					return;
+				}
+				$("#"+nodeid+" #pageNum-"+(++thisClass.currentPage)).addClass("disabled");
+				if(thisClass.hasNextPage()){
+					$(this).removeClass("disabled");
+					$("#"+nodeid+" #lastPage").removeClass("disabled");
+				}else{
+					$(this).addClass("disabled");
+					$("#"+nodeid+" #lastPage").addClass("disabled");
+				}
+				$("#"+nodeid+" #firstPage,#prevPage").removeClass("disabled");
+				thisClass.commonMethod();
+			});
+			$("#"+nodeid+" #lastPage").click(function(){
+				if($(this).hasClass("disabled")){
+					return;
+				}
+				thisClass.currentPage = thisClass.totalPages;
+				$("#"+nodeid+" #firstPage,#"+nodeid+" #prevPage").removeClass("disabled");
+				$("#"+nodeid+" #nextPage,#"+nodeid+" #lastPage").addClass("disabled");
+				thisClass.commonMethod();
+			});
+			$("#"+nodeid+" [id^='pageNum-']").click(function(){
+				if($(this).hasClass("disabled")){
+					return;
+				}
+				thisClass.currentPage = parseInt(this.id.split("-")[1]);
+				if(thisClass.hasPrevPage()){
+					$("#"+nodeid+" #firstPage,#"+nodeid+" #prevPage").removeClass("disabled");
+				}else{
+					$("#"+nodeid+" #firstPage,#"+nodeid+" #prevPage").addClass("disabled");
+				}
+				if(thisClass.hasNextPage()){
+					$("#"+nodeid+" #nextPage,#"+nodeid+" #lastPage").removeClass("disabled");
+				}else{
+					$("#"+nodeid+" #nextPage,#"+nodeid+" #lastPage").addClass("disabled");
+				}
+				thisClass.commonMethod();
+			});
+		}
+	}
+	this.commonMethod = function(){
+		$("#"+nodeid+" [id^='pageNum-']").removeClass("disabled");
+		$("#"+nodeid+" #pageNum-"+this.currentPage).addClass("disabled");
+		if(this.currentPage == 1){
+			$("#"+nodeid+" [id^='pageNum-']").addClass("hide");
+			for(var i=1;i<=10;i++){
+				if(i > this.totalPages){
+					break;
+				}
+				$("#"+nodeid+" #pageNum-"+i).removeClass("hide");
+			}
+		}else if(this.currentPage >= 5){
+			var start = this.currentPage-5;
+			var end = this.currentPage+5;
+			if(this.currentPage > this.totalPages - 5){
+				start = this.totalPages - 10;
+				end = this.totalPages;
+			}
+			for(var i=1;i<=start;i++){
+				$("#"+nodeid+" #pageNum-"+i).addClass("hide");
+			}
+			for(var i=start+1;i<=end;i++){
+				$("#"+nodeid+" #pageNum-"+i).removeClass("hide");
+			}
+			for(var i=end+1;i<=this.totalPages;i++){
+				$("#"+nodeid+" #pageNum-"+i).addClass("hide");
+			}
+		}
+		this.getDatas();
+	}
+	//从服务端获取数据
+	this.getDatas = function(){
+		if(this.totalPages == 0){
+			this.count = datas.length;
+			this.init();
+		}
+		var start = (this.currentPage - 1) * pageSize;
+		var end = start + pageSize;
+		callBack(datas.slice(start,end));
+	}
+	//是否有上一页
+	this.hasPrevPage = function(){
+		if(this.currentPage > 1){
+			return true;
+		}
+		return false;
+	}
+	//是否有下一页
+	this.hasNextPage = function(){
+		if(this.currentPage < this.totalPages){
+			return true;
+		}
+		return false;
+	}
+	//第一次获取数据和总数
+	this.getDatas();
+}

+ 27 - 0
core/src/web/staticres/js/paging.js

@@ -23,6 +23,8 @@ var Paging = function(nodeid,url,datas,pageSize,callBack,firstPageDatas){
 				html += '<li id="pageNum-'+(i+1)+'"';
 				if(i == 0){
 					html += ' class="disabled"';
+				}else if(i >= 10){
+					html += ' class="hide"';
 				}
 				html += '><a>'+(i+1)+'</a></li>';
 			}
@@ -111,6 +113,31 @@ var Paging = function(nodeid,url,datas,pageSize,callBack,firstPageDatas){
 	this.commonMethod = function(){
 		$("#"+nodeid+" [id^='pageNum-']").removeClass("disabled");
 		$("#"+nodeid+" #pageNum-"+this.currentPage).addClass("disabled");
+		if(this.currentPage == 1){
+			$("#"+nodeid+" [id^='pageNum-']").addClass("hide");
+			for(var i=1;i<=10;i++){
+				if(i > this.totalPages){
+					break;
+				}
+				$("#"+nodeid+" #pageNum-"+i).removeClass("hide");
+			}
+		}else if(this.currentPage >= 5){
+			var start = this.currentPage-5;
+			var end = this.currentPage+5;
+			if(this.currentPage > this.totalPages - 5){
+				start = this.totalPages - 10;
+				end = this.totalPages;
+			}
+			for(var i=1;i<=start;i++){
+				$("#"+nodeid+" #pageNum-"+i).addClass("hide");
+			}
+			for(var i=start+1;i<=end;i++){
+				$("#"+nodeid+" #pageNum-"+i).removeClass("hide");
+			}
+			for(var i=end+1;i<=this.totalPages;i++){
+				$("#"+nodeid+" #pageNum-"+i).addClass("hide");
+			}
+		}
 		this.getDatas();
 	}
 	//从服务端获取数据

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

@@ -204,7 +204,7 @@ $(function(){
 
 function makeData(d,_this,b){
 	var nodeId = "immediately";
-	if(_this.attr("name") == "entIndexSearch"){
+	if(_this.attr("id") == "entIndexSearch"){
 		nodeId += "_main";
 	}
 	var s=$("#"+nodeId);

+ 18 - 13
core/src/web/staticres/js/relation.js

@@ -104,7 +104,7 @@ Relation.prototype.pattern = function(){
 	var thisClass = this;
 	d3.selectAll("text").each(function (p){
 		if(p.type == "ce" || p.type == "e"){
-			$(this).text(p.shortText);
+			$(this).text(p.shorttext);
 		}
 	});
 	this.modleFlag = true;
@@ -144,19 +144,24 @@ Relation.prototype.dataProcess = function(){
 	for(var i=0;i<this.data.nodes.length;i++){
 		var nodeObj = this.data.nodes[i];
 		nodeObj.text = $.trim(nodeObj.text);
-		nodeObj.shortText = nodeObj.text;
+		var 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 = this.filterEntName(text);
-			}
-			if(text.length > 2){//小于两个字符不生效
-				nodeObj.shortText = text;
+			if(typeof(nodeObj.shorttext) == "undefined" || nodeObj.shorttext == ""){
+				if(shortText.length > 2){//先替换结尾
+					var shortTextTemp = shortText.replace(reg,"");
+					if(shortTextTemp.length > 2){
+						shortText = shortTextTemp;
+					}
+					if(shortTextTemp.length > 4){//再替换开头地区
+						shortTextTemp = this.filterEntName(shortTextTemp);
+						if(shortTextTemp.length > 2){
+							shortText = shortTextTemp;
+						}
+					}
+				}
+				nodeObj.shorttext = shortText;
 			}
-			if(nodeObj.name == this.regNo){//先找本企业位置
+			if(nodeObj.type == "ce"){//先找本企业位置
 				this.index = i;
 				nodeObj["regcap"] = (typeof(d1) == "undefined")?0:d1;
 				nodeObj["legcerno"] = this.legcerNo;
@@ -729,7 +734,7 @@ Relation.prototype.makeRelation = function(){
 	this.nodes.append('text')
     .text(function(d){
 		if(thisClass.modleFlag){
-			return d.shortText;
+			return d.shorttext;
 		}else{
 			return d.text;
 		}

BIN
core/src/web/staticres/wxswordfish/images/dingyue.png


BIN
core/src/web/staticres/wxswordfish/images/liebiao.png


BIN
core/src/web/staticres/wxswordfish/images/sousuo.png


+ 45 - 1
core/src/web/staticres/wxswordfish/style.css

@@ -131,11 +131,12 @@ img{
 	float: right;
 }
 .operation .child-node li>div:first-child{
-	color: #999;
+	
 }
 .operation .child-node .com-last{
 	font-size: 14px;
 	padding-top: 10px;
+	color: #999;
 }
 /*弹出框*/
 .dialog{
@@ -613,4 +614,47 @@ img{
 .no-result{
 	text-align:center;
 	color:#999;
+}
+.toolbar-list{
+	position: relative;
+}
+.toolbar-popover{
+	position: absolute;
+	width: 90px;
+	height: 100px;
+	border: 1px solid #CCCCCC;
+	background-color: #F8F8F8;
+	bottom: 65px;
+	left: 50%;
+	margin-left: -45px;
+	z-index: 1;
+	display: none;
+}
+.popover-ul li{
+	line-height: 30px;
+}
+.toolbar-popover .popover-arrow{
+	bottom: -11px;
+	left: 50%;
+	margin-left: -11px;
+	border-width: 11px;
+	border-bottom-width: 0;
+	position: absolute;
+	border-color: transparent;
+	border-style: solid;
+	border-top-color: #CCCCCC;
+}
+.toolbar-popover .popover-arrow:after{
+	position: absolute;
+	bottom: -9px;
+	margin-left: -10px;
+	content: " ";
+	border-color: transparent;
+	border-top-color: #F8F8F8;
+	border-bottom-width: 0;
+	border-width: 10px;
+	border-style: solid;
+}
+.popover-ul li.active{
+	background-color: #EAEAEA;
 }

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

@@ -48,7 +48,7 @@ $(function (){
 	$("form#searchForm").submit(function(){
 		var input_val = $(this).children("[type='text']").val().replace(/^\s+|\s+$/g,"");
 		if (keyCode==13){
-	 		$("input[name='words']").val(input_val);
+	 		$(this).find("input[name='words']").val(input_val);
 			keyCode=0;
 			return true;
 		}
@@ -98,7 +98,7 @@ function scrollUp(id){
 function immediatelyInitCallBack(obj){
 	if(obj.attr("id") == "header-searchInput"){
 		$("#immediately").css({width:$("#immediately").width()-30,"left":"15px","top":"38px"});
-	}else if(obj.attr("name") == "entIndexSearch"){
+	}else if(obj.attr("id") == "entIndexSearch"){
 		$("#immediately_main").css("top","45");
 	}
 }

+ 25 - 15
core/src/web/templates/index.html

@@ -13,25 +13,35 @@
 
 <!---->
 <div class="index-new-head b-head visible-xs">
-	<div style="height:25px;width:100%;background-color:#000;"></div>
-	<div class="b-nav index-new-nva">
-		<ul style="margin-left:15px;">
-			<li class="b-nav-logo index-new-nva-l"><a href="/"><img src="/images/logo.png" class="logo"></a></li>
-			
-		</ul>
+	
+	<div class="b-nav index-new-nva text-center" style="height:69px;">
+		<a href="/"><img src="/images/logo.png" class="logo"></a>
 	</div>
 </div>
-<div class="text-center visible-xs" style="margin:40px 20px 20px 20px">
-	<div>
-	 	<p>企明星为了用户有更好的使用体验,</p>
-		<p>已成功把各项功能移植到</p>
-		<p>关注企明星公众号:</p>
-		<p>qmx-cn</p>
-		<p>或扫描二维码</p>
+{{$s:=(Ad "index-center-mob" 1)}}
+	{{range $k,$v := $s}}
+<div class="text-center visible-xs" style="margin-top:10px;">
+	<div style="background-color:#fff;padding:20px;">
+	<div style="height:35px; border-bottom:1px solid #e5e6e9;padding-bottom:15px;">
+	<div style="height:20px;width:10px;background-color:#FF5A5F;float:left;"></div>
+	<div style="color:#FF5A5F;float:left;margin-left:15px;">网站介绍</div>
+	<div style="clear:both;"></div>
+	</div>
+	<div style="margin-top:20px;">
+	{{if $v.s_remark}}{{$v.s_remark}} {{end}}
+	</div>
+	</div>
+	<div  style="background-color:#fff; margin-top:10px;padding:20px;">
+	<div style="height:35px; border-bottom:1px solid #e5e6e9;padding-bottom:15px;">
+	<div style="height:20px;width:10px;background-color:#FF5A5F;float:left;"></div>
+	<div style="color:#FF5A5F;float:left;margin-left:15px;">手机体验</div>
+	<div style="clear:both;"></div>
+	</div>
+	<div style="margin-top:20px;"><img src="{{if $v.s_pic}} {{$v.s_pic}} {{else}}/images/u109.png{{end}}"></div>
+	<div style="width:100%;margin-top: 20px;" class="text-center">微信关注企明星公众号qmx-cn,体验企明星的强大功能。</div>	
 	</div>
-	<div><img src="/images/u109.png"></div>
 </div>
-
+	{{end}}
 {{include "/common/indexhead.html"}}
 <div class="a-content a-index hidden-xs">	
 	<div class="a-index-head index-new-head">

+ 125 - 0
core/src/web/templates/manage/webmobindex.html

@@ -0,0 +1,125 @@
+<html>
+<head>
+<title>企明星_移动端首页</title>
+{{include "/common/inc.html"}}
+<script src="{{Msg "seo" "cdn"}}/js/validform-min.js"></script>
+<style type="text/css">
+body{
+	background-color:#f0f0f0;
+	}
+.b-nav {
+    border-top-color: rgb(255, 90, 95);
+}
+#content { 
+	margin-left:0px;
+	}
+.widget-box {
+	border:0px;
+	}
+.widget-content {
+	border-bottom:0px;
+	}
+.index-new-nva{
+	height:69px;
+}
+#contentindex{
+	 background: none repeat scroll 0 0 #fff;
+	 margin-right: 0; 
+     position: relative; 
+     width: auto; 
+    border-radius: 4px;
+}
+</style>
+</head>
+<body>
+<div class="index-new-head b-head">
+	<div class="b-nav index-new-nva text-center">
+		<a href="/"><img src="{{Msg "seo" "cdn"}}/images/logo.png" class="logo"></a>
+	</div>
+</div>
+<!-- 中间 -->
+<div class="row" style="padding:10px 0px; margin:0 auto;">
+		<div id="contentindex">
+			
+			<div class="container-fluid">
+				<div style="margin-top:0px;" class="row-fluid">
+					<div class="span12">		
+							<div class="widget-content nopadding">
+								
+								<div style="width:98%; margin:auto; margin-bottom:10px;">
+									
+	<div style="margin-top: 40px;height:35px; border-bottom:1px solid #e5e6e9;">
+	<div style="height:20px;width:10px;background-color:#FF5A5F;float:left;"></div>
+	<div style="color:#FF5A5F;float:left;margin-left:15px;">网站介绍</div>
+	<div style="clear:both;"></div>
+	</div>
+	<div  style="margin-top: 20px;">{{.T.s_content}}</div>							
+		                        </div>
+							</div>
+						
+					</div>
+				</div>
+
+			</div>
+	
+	</div>
+
+
+</div>
+<div class="row" style="padding:0px; margin-left:auto; margin-right:auto;margin-bottom:20px;">
+		<div id="contentindex">
+			<div class="container-fluid">
+				<div style="margin-top:0px;" class="row-fluid">
+					<div class="span12">		
+							<div class="widget-content nopadding">
+								
+								<div style="width:98%; margin:auto; margin-bottom:10px;">
+	
+	<div style="margin-top: 40px;height:35px; border-bottom:1px solid #e5e6e9;">
+	<div style="height:20px;width:10px;background-color:#FF5A5F;float:left;"></div>
+	<div style="color:#FF5A5F;float:left;margin-left:15px;">手机体验</div>
+	<div style="clear:both;"></div>
+	</div>
+	<div style="width:100%;    margin-top: 20px;" class="text-center"><img src="{{if .T.s_pic }}{{.T.s_pic}}{{else}}{{Msg "seo" "cdn"}}/images/u109.png{{end}}"/></div>	
+	<div style="width:100%;margin-top: 20px;" class="text-center">微信关注企明星公众号qmx-cn,体验企明星的强大功能。</div>						
+		                        </div>
+							</div>
+					</div>
+				</div>
+
+			</div>
+	
+	</div>
+
+
+</div>
+{{include "/common/bottom.html"}}
+<script type="text/javascript">
+function currPos(){
+   return [["帮助中心","/front/web_helpcenterlist.html"]]
+}
+$(function (){
+	$(".backTop").click(function (){
+		$(window).scrollTop(0);
+	});
+	$('#loginModal').on('shown.bs.modal', function () {
+		$("#username").focus();
+	});
+	var obj = $(".navbar-nav li a.qfw-navbar-active");
+	$(".navbar-nav li a").mouseover(function (){
+		obj.removeClass("qfw-navbar-active");
+		$(this).addClass("qfw-navbar-active");
+	}).mouseout(function (){
+		$(this).removeClass("qfw-navbar-active");
+		obj.addClass("qfw-navbar-active");
+	});
+	$(".registerform").Validform({
+		tiptype:function(msg,o,cssctl){
+			cssctl($(o.obj).prev(),o.type);
+			$(o.obj).prev().text(msg).show();
+		}
+	});
+});
+</script>
+</body>
+</html>

+ 11 - 4
core/src/web/templates/member/incmobile/index.html

@@ -154,7 +154,6 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 <script src="/js/qfw.js"></script>
 <script>
 $(".input-group-addon").click(function(){
-alert();
 	wx.chooseImage({
 	    count: 1, // 默认9
 	    sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
@@ -184,9 +183,17 @@ function getmpname(serverId){
         cache: false, 
         error: function(){return false;}, 
         success:function(obj){
-			 $("#query").val(obj["name"]);
-			 $("#i_mingpian").val("1");
-			 $("#search").submit();
+			if(obj["on"]=="y"){
+				if(obj["name"]==""){
+					alert("未匹配的对应的名称");
+				}else{
+					$("#query").val(obj["name"]);
+				 	$("#i_mingpian").val("1");
+				 	$("#search").submit();	
+				}
+			}else{
+				alert("功能调用太频繁,请稍后再试!");
+			}
         } 
     }); 
 }

+ 0 - 4
core/src/web/templates/member/message/msgindex.html

@@ -2,16 +2,12 @@
 <head>
 <title>网站消息</title>
 {{include "/common/inc.html"}}
-<<<<<<< HEAD
-<script src="/js/qfwtable.js"></script>
 <style type="text/css">
 	a#msgCenter{
 		color:#FF5A5F !important;
 	}
 </style>
-=======
 <script src="{{Msg "seo" "cdn"}}/js/qfwtable.js"></script>
->>>>>>> release
 </head>
 <body>
 {{$identType := session "identType"}}

+ 0 - 4
core/src/web/templates/member/myappointment.html

@@ -2,16 +2,12 @@
 <head>
 <title>我预约的服务</title>
 {{include "/common/inc.html"}}
-<<<<<<< HEAD
-<script charset="utf-8" src="/js/paging.js"></script>
 <style type="text/css">
 .myappointment{
 	color:#FF5A5F !important;
 }
 </style>
-=======
 <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/paging.js"></script>
->>>>>>> release
 </head>
 <body>
 {{include "/common/centerhead.html"}}

+ 0 - 4
core/src/web/templates/member/mydemand.html

@@ -2,16 +2,12 @@
 <head>
 <title>我发布的需求</title>
 {{include "/common/inc.html"}}
-<<<<<<< HEAD
-<script charset="utf-8" src="/js/paging.js"></script>
 <style type="text/css">
 .mydemand{
 	color:#FF5A5F !important;
 }
 </style>
-=======
 <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/paging.js"></script>
->>>>>>> release
 </head>
 <body>
 {{include "/common/centerhead.html"}}

+ 0 - 4
core/src/web/templates/member/ordermanage.html

@@ -2,16 +2,12 @@
 <head>
 <title>订单管理</title>
 {{include "/common/inc.html"}}
-<<<<<<< HEAD
-<script charset="utf-8" src="/js/paging.js"></script>
 <style type="text/css">
 .ordermanage{
 	color:#FF5A5F !important;
 }
 </style>
-=======
 <script charset="utf-8" src="{{Msg "seo" "cdn"}}/js/paging.js"></script>
->>>>>>> release
 </head>
 <body>
 {{include "/common/centerhead.html"}}

+ 5 - 6
core/src/web/templates/search/entcommunity.html

@@ -11,17 +11,17 @@
 {{include "/common/enthead.html"}}
 <div class="b-content container-fluid">
 	<div class="b-left">
-		<div class="ent-index-search">
+		<form class="ent-index-search" id="entIndexSearchForm" method="post" action="/search/enterprise/ent.html">
 			<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">
+				<input type="text" name="words" id="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 href="/enterprise/{{$v.s_id}}.html">{{$v.s_remark}}</a>{{end}}
 			</div>
-		</div>
+		</form>
 		<div class="ent-index-recommend">
 			<div class="b-com-title">
 				<span class="glyphicon jianzhu"></span>推荐企业
@@ -54,7 +54,7 @@
 <script>
 $(function(){
 	//设置即时下拉
-	$("input[name='entIndexSearch']").attr("autocomplete","off").keyup(function(){
+	$("input[id='entIndexSearch']").attr("autocomplete","off").keyup(function(){
 		imFind(this)
 	}).focus(function(){
 		imFind(this)
@@ -64,8 +64,7 @@ $(function(){
 		},500);
 	});
 	$("#search-btn").click(function(){
-		$("input[name='words']").val($("input[name='entIndexSearch']").val());
-		$("form#searchForm").submit();
+		$("form#entIndexSearchForm").submit();
 	});
 	var ents = {{Ad "ent-recommend" 48}};
 	if(typeof(ents) != "undefined" && ents != null && ents.length > 0){

+ 2 - 11
core/src/web/templates/search/enterpriseList.html

@@ -50,11 +50,7 @@
 				{{range $k,$v:=.T.data}}
 					<div class="borderB">
 						<div class="qfw-entcontent-padding">
-<<<<<<< HEAD
-							<img src="{{if index $v "s_avatar"}}{{index $v "s_avatar"}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
-=======
-							<img src="{{Msg "seo" "cdn"}}/images/ent-logo.png">
->>>>>>> release
+							<img src="{{if index $v "s_avatar"}}{{Msg "seo" "cdn"}}{{index $v "s_avatar"}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
 							<div>
 								<div class="lineb " >
 									<a target="_blank" href="/enterprise/{{index $v "_id"}}.html"><b>
@@ -178,7 +174,6 @@
 	
 	<!--右边显示区开始-->
 	<div class="b-right hidden-sm hidden-md hidden-xs b-right-content">
-<<<<<<< HEAD
 		<div class="b-adver entlist-hotsearchwords">
 			<div class="b-adver-title">热搜词</div>
 			<div class="b-adver-content">
@@ -196,7 +191,7 @@
 				{{range $k,$v := $s}}
 					<li class="cursor-pointer{{if eq $k 0}} border-t-0{{end}}" onclick="window.location.href='/enterprise/{{$v.s_id}}.html'">
 						<div>
-							<img src="{{if $v.s_pic}}{{$v.s_pic}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<img src="{{if $v.s_pic}}{{Msg "seo" "cdn"}}{{$v.s_pic}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
 							<a href="/enterprise/{{$v.s_id}}.html">{{$v.s_remark}}</a>
 						</div>
 					</li>
@@ -205,10 +200,6 @@
 				<div class="clearfix"></div>
 			</div>
 		</div>
-=======
-		<div class="borderB text-muted fontb frontS">推荐企业</div>
-		<div id="tjqy "><img style="width:100%;" class="qfw-p-margintop" src="{{Msg "seo" "cdn"}}/images/right_ad.png"></div>
->>>>>>> release
 	</div>
 	<!--右边显示区结束-->
 </div>

+ 0 - 16
core/src/web/templates/swordfish/index.html

@@ -23,21 +23,6 @@
 			<!-- Wrapper for slides -->
 		  	<div class="carousel-inner" role="listbox">
 			    <div class="item active">
-<<<<<<< HEAD
-			      	<img src="/images/swordfish/guide-1.png">
-			    </div>
-			    <div class="item">
-			      	<img src="/images/swordfish/guide-2.png">
-			    </div>
-				<div class="item">
-			      	<img src="/images/swordfish/guide-3.png">
-			    </div>
-			    <div class="item">
-			      	<img src="/images/swordfish/guide-4.png">
-			    </div>
-				<div class="item">
-			      	<img src="/images/swordfish/guide-5.png">
-=======
 			      	<img src="{{Msg "seo" "cdn"}}/images/swordfish/guide-1.png">
 			     	<div class="carousel-caption"></div>
 			    </div>
@@ -56,7 +41,6 @@
 				<div class="item">
 			      	<img src="{{Msg "seo" "cdn"}}/images/swordfish/guide-5.png">
 			     	<div class="carousel-caption"></div>
->>>>>>> release
 			    </div>
 		  	</div>
 			<div class="swordfish-guide-right">

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

@@ -321,7 +321,7 @@ $(function(){
 <!-- 模态框(Modal) -->
 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
    aria-labelledby="myModalLabel" aria-hidden="true">
-   <div class="modal-dialog">
+	<div class="modal-dialog">
       <div class="modal-content" style="height:500px;">
          <div class="modal-header">
             <button type="button" class="close" 
@@ -337,7 +337,7 @@ $(function(){
          </div>
          
       </div><!-- /.modal-content -->
-</div><!-- /.modal -->
+	</div><!-- /.modal -->
 </div>
 <!-- 底部 -->
 {{include "/common/bottom.html"}}

+ 60 - 11
core/src/web/templates/swordfish/wxsearch.html

@@ -102,42 +102,87 @@
 </head>
 <body>
 
-<div class="wxhead"><span class="tubiao"><img src="/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
-<span class="xiaochu"><img class="qcimg" src="/images/wxqc.png"/></span>
+<div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<span class="xiaochu"><img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/></span>
 </div>
 <div class="searchshow">
+		<!--招标 start-->
 	<form action="/member/wxswordfish/searchlist" name="searchone" method="post">
 		<div onClick="searchbiao(1)" style="height:45px;line-height:45px;cursor:hand;">
-		<div class="searchzhao1"><img src="/images/wxjs.png"/></div>
+		<div class="searchzhao1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhao2">查询招标公告:</div>
 		<div class="searchzhao3">
 		<span>{{.T.keywords}}</span>
 		</div>
-		<div style="both:clear;"></div>
+		<div style="clear:both"></div>
 		<input name="searchname" id="searchname1" value="" style="display:none;"/>
 		<input name="s_type" id="sea_type" value="1" style="display:none;"/>
 		<input name="s_name" id="sea_name1" value="" style="display:none;"/>
 		</div>
 	</form>
+		<!--招标 end-->
 		<div  style="border-top:1px solid #e5e6e9; width:100%;"></div>
+		<!--中标 start-->
 	<form action="/member/wxswordfish/searchlist" name="searchtwo" method="post">
 		<div onClick="searchbiao(2)" style="height:45px;line-height:45px;cursor:hand;">
-		<div class="searchzhong1"><img src="/images/wxjs.png"/></div>
+		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhong2">查询中标公告:</div>
 		<div class="searchzhong3">
 		<span>{{.T.keywords}}</span>
 		</div>
-		<div style="both:clear;"></div>
+		<div style="clear:both"></div>
 		<input name="searchname" id="searchname2" value="" style="display:none;"/>
 		<input name="s_type" id="sea_type" value="2" style="display:none;"/>
 		<input name="s_name" id="sea_name2" value="" style="display:none;"/>
 		</div>
 	</form>
+		<!--中标 end-->
+		<div  style="border-top:1px solid #e5e6e9; width:100%;"></div>
+		<!--企业情报 start-->
+	<form action="/member/wxswordfish/searchlist" name="searchone" method="post">
+		<div onClick="searchbiao(3)" style="height:45px;line-height:45px;cursor:hand;">
+		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
+		<div class="searchzhong2">查询企业情报:</div>
+		<div class="searchzhong3">
+		<span>{{.T.keywords}}</span>
+		</div>
+		<div style="clear:both"></div>
+		
+		</div>
+	</form>
+		<!--企业情报 end-->
 		<div style="border-top:1px solid #e5e6e9; width:100%;"></div>
 		<div id="myorder" class="text-center">
 		<div class="rsssetbtn" onClick="window.location.href='/swordfish/page';">进入我的信息订阅</div>
 		</div>
 </div>
+
+<!-- 按钮触发模态框 -->
+<button class="btn hidden kfing" data-toggle="modal" 
+   data-target="#myModal">
+</button>
+
+<!-- 模态框(Modal) -->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+	<div class="modal-dialog">
+      <div class="modal-content" style="height:180px;">
+         <div class="modal-header">
+            <button type="button" class="close" 
+               data-dismiss="modal" aria-hidden="true">
+                  &times;
+            </button>
+            <h4 class="modal-title" id="myModalLabel">
+               企业情报
+            </h4>
+         </div>
+         <div class="modal-body text-center" style="margin-top:30px;">
+            开发中,敬请期待!
+         </div>
+         
+      </div><!-- /.modal-content -->
+	</div><!-- /.modal -->
+</div>
 {{include "/swordfish/wxtoolbar.html"}}
 <script type="text/javascript">
 	$(".searchname").keyup(function(){
@@ -151,14 +196,18 @@
 		$(".searchzhong3 span").html("");
 	});
 	function searchbiao(i){
-		var searchname = $(".searchname").val();
-		document.getElementById("searchname"+i).value = searchname;
-		searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
-		document.getElementById("sea_name"+i).value = searchname;
+		if(i!=3){
+			var searchname = $(".searchname").val();
+			document.getElementById("searchname"+i).value = searchname;
+			searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+			document.getElementById("sea_name"+i).value = searchname;
+		}
 		if (i==1){
 			document.forms['searchone'].submit();
-		}else{
+		}else if (i==2){
 			document.forms['searchtwo'].submit();
+		}else if (i==3){
+			$(".kfing").click();
 		}
 		
 	}

+ 4 - 4
core/src/web/templates/swordfish/wxsearchlist.html

@@ -271,8 +271,8 @@ body{
 </head>
 <body>
 <div style="background-color:#fff;">
-<div class="wxhead"><span class="tubiao"><img src="/images/wxjss.png"/></span><input class="form-control searchname" name="searchname" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
-<span class="xiaochu"><img class="qcimg" src="/images/wxqc.png"/></span>
+<div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchname" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<span class="xiaochu"><img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/></span>
 </div>
 <div class="rescontent">
 	
@@ -286,12 +286,12 @@ body{
 直接订阅
 </div>
 
-<div style="both:clear;"></div>
+<div style="clear:both"></div>
 </div>
 
 <div class="nullcontent text-center  hidden">
 <div >
-<img style="width:137px;margin-top:160px;" src="/images/findnull.png">
+<img style="width:137px;margin-top:160px;" src="{{Msg "seo" "cdn"}}/images/findnull.png">
 </div>
 <div>没有找到和该关键词匹配的信息</div>
 </div>

+ 45 - 17
core/src/web/templates/swordfish/wxtoolbar.html

@@ -1,15 +1,24 @@
 <ul class="bottom-toolbar">
-	<li class="parent-node" id="goToGuide">
-		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/demo.png">
-		查看演示
+	<li class="parent-node">
+		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/sousuo.png">
+		搜索
 	</li>
-	<li class="parent-node" id="feedback">
-		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/fankui.png">
-		意见反馈
+	<li class="parent-node">
+		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/dingyue.png">
+		我得订阅
 	</li>
-	<li class="parent-node" id="goToShare">
-		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/share.png">
-		分享
+	<li class="parent-node toolbar-list" id="toolbar-list">
+		<div class="toolbar-popover">
+			<ul class="popover-ul" style="padding-left: 10px;
+    text-align: left;">
+				<li>查看演示</li>
+				<li>分享</li>
+				<li>意见反馈</li>
+			</ul>
+			<div class="popover-arrow"></div>
+		</div>
+		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/liebiao.png">
+		列表
 	</li>
 </ul>
 <div class="dialog share-dialog">
@@ -75,15 +84,34 @@
 //意见反馈
 var feedback = null;
 $(function(){
-	$("#goToGuide").click(function(){
-		window.location.href = "/swordfish/guide/other";
-	});
-	$("#feedback").click(function(){
-		if(feedback == null){
-			feedback = new Feedback();
+	$(".bottom-toolbar>li").click(function(){
+		if($(this).index() == 0){
+			alert("搜索");
+		}else if($(this).index() == 1){
+			alert("我得订阅");
+		}else if($(this).index() == 2){
+			$(this).children(".toolbar-popover").show();
 		}
-		feedback.show();
-		$("#feedback-textarea").focus().parent().removeClass("red-border");
+	});
+	$(".popover-ul>li").click(function(event){
+		event.stopPropagation(); 
+		var obj = $(this);
+		obj.addClass("active");
+		setTimeout(function(){
+			if(obj.index() == 0){
+				window.location.href = "/swordfish/guide/other";
+			}else if(obj.index() == 1){
+				window.location.href = "/swordfish/guide/share";
+			}else if(obj.index() == 2){
+				if(feedback == null){
+					feedback = new Feedback();
+				}
+				feedback.show();
+				$("#feedback-textarea").focus().parent().removeClass("red-border");
+			}
+			obj.parents(".toolbar-popover").hide();
+			obj.removeClass("active");
+		},100);
 	});
 	$("[id='goToShare']").click(function(){
 		window.location.href = "/swordfish/guide/share";

+ 45 - 44
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -13,11 +13,7 @@
 <div class="b-content container-fluid">
 	<!--企业名片-->
 	<div class="b-com-head">
-<<<<<<< HEAD
-		<img src="{{if .T.res.s_avatar}}{{.T.res.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
-=======
-		<img src="{{Msg "seo" "cdn"}}/images/ent-logo.png">
->>>>>>> release
+		<img src="{{if .T.res.s_avatar}}{{Msg "seo" "cdn"}}{{.T.res.s_avatar}}{{else}}null{{end}}" onerror="this.src='{{Msg "seo" "cdn"}}/images/ent-logo.png'">
 		<div class="entinfo-cart">
 			<div class="b-com-first">
 				<font class="b-com-title">{{if .T.res.EntName}}{{.T.res.EntName}}{{end}}</font>
@@ -125,6 +121,7 @@
 		<li class="ent-active">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
 		<li>关系网</li>
 		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}>主要人员</li>
+		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}>著作权</li>
 		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}>变更信息</li>
 		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}>失信信息</li>
 		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
@@ -313,49 +310,62 @@
 					<h5>认证后即可查看企业股东信息,投资关系,公司关系脉络图等内容</h5>
 					<a href="/member/accountset/index" class="btn btn-primary">认证</a>
 				</div>
-<<<<<<< HEAD
 				<div class="dashed padding-0"></div>
-				<img src="/images/entcommunity/relation.png">
-=======
 				<img src="{{Msg "seo" "cdn"}}/images/entcommunity/relation.png">
->>>>>>> release
 			</div>
 			<div id="entrelation-findnull" class="ent-findnull hide">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-<<<<<<< HEAD
 		<div class="hide ent-mainperson">
 			<div class="ent-findnull hide">
-				<img src="/images/findnull.png" class="b-findnull">
-=======
-		<div class="hide">
-		{{if or .T.res.OpScope .T.res.s_synopsis}}
-			<div class="ent-layout-up">
+				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
+				<h4>抱歉,未找到相关数据!</h4>
+			</div>
+		</div>
+		<div class="ent-copyright hide">
+			<!--计算机软件著作权信息-->
+			{{if .T.copyright.ComputerSoftCopyRight}}
+			<div class="ent-layout-down">
 				<div class="b-com-title">
-					<span class="glyphicon jianzhu"></span>公司简介
+					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>计算机软件著作权信息
 				</div>
-				<div class="b-com-content margin-0"></div>
+				<table class="table ent-table" id="computerSoftCopyRightList">
+					<tr>
+						<td class="text-center" id="computerSoftCopyRightListPaging"></td>
+					</tr>
+				</table>
 			</div>
+			{{end}}
+			<!--作品著作权信息-->
+			{{if .T.copyright.WorkCopyRight}}
 			<div class="ent-layout-down">
-				{{if .T.res.OpScope}}
 				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>经营范围
+					<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}}
+				<table class="table ent-table" id="workCopyRightList">
+					<tr>
+						<td class="text-center" id="workCopyRightListPaging"></td>
+					</tr>
+				</table>
+			</div>
+			{{end}}
+			<!--专利信息-->
+			{{if .T.copyright.Patent}}
+			<div class="ent-layout-down">
 				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>公司介绍
+					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>专利信息
 				</div>
-				<div class="b-com-content">{{.T.res.s_synopsis}}</div>
-				{{end}}
+				<table class="table ent-table" id="patentList">
+					<tr>
+						<td class="text-center" id="patentListPaging"></td>
+					</tr>
+				</table>
 			</div>
-			{{else}}
-			<div class="ent-findnull">
+			{{end}}
+			<div class="ent-findnull hide">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
->>>>>>> release
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
@@ -401,14 +411,13 @@
 					</ul>
 				</div>
 			</div>
-			{{else}}
+		{{else}}
 			<div class="ent-findnull">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		{{end}}
 		</div>
-<<<<<<< HEAD
 		<div class="hide ent-dishonesty">
 			<div class="ent-layout-up">
 				<div class="b-com-title">
@@ -423,12 +432,7 @@
 				</div>
 			</div>
 			<div class="ent-findnull hide">
-				<img src="/images/findnull.png" class="b-findnull">
-=======
-		<div class="hide">
-			<div class="ent-findnull">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
->>>>>>> release
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
@@ -458,8 +462,8 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-<<<<<<< HEAD
 	</div>
+	{{if or .T.relevantEnts .T.relevantNews}}
 	<div class="b-right">
 		{{if .T.relevantEnts}}
 		<div class="b-adver b-scroll-list">
@@ -469,19 +473,13 @@
 				{{range $k,$v := .T.relevantEnts}}
 					<li class="cursor-pointer{{if eq $k 0}} margin-0 border-t-0{{end}}" onclick="window.location.href='/enterprise/{{$v._id}}.html'">
 						<div>
-							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='{{Msg "seo" "cdn"}}/images/ent-logo.png'">
 							<a href="/enterprise/{{$v._id}}.html">{{$v.EntName}}</a>
 						</div>
 					</li>
 				{{end}}
 				</ul>
 				<div class="clearfix"></div>
-=======
-		<div class="hide">
-			<div class="ent-findnull">
-				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
-				<h4>抱歉,未找到相关数据!</h4>
->>>>>>> release
 			</div>
 		</div>
 		{{end}}
@@ -499,7 +497,7 @@
 							if(!s_link.startWith("http://") && !s_link.startWith("https://")){
 								s_link = "http://"+s_link;
 							}
-							document.write('<span><img src="/images/swordfish/circle.png">'+l_comeintime+'</span><br><a href="'+s_link+'" target="_bank">{{$v.s_title}}</a></li>');
+							document.write('<span><img src="{{Msg "seo" "cdn"}}/images/swordfish/circle.png">'+l_comeintime+'</span><br><a href="'+s_link+'" target="_bank">{{$v.s_title}}</a></li>');
 						</script>
 					</li>
 				{{end}}
@@ -509,6 +507,7 @@
 		</div>
 		{{end}}
 	</div>
+	{{end}}
 </div>
 <!--显示地图信息-->
 <div id="mapshowdiv" class="white_content"></div>
@@ -517,6 +516,7 @@
 {{include "/common/bottom.html"}}
 </body>
 <script type="text/javascript">
+var cdn = {{Msg "seo" "cdn"}};
 var entId = {{.T.res._id}};
 var regNo = {{.T.res.RegNo}};
 var regCapCurName = {{.T.res.RegCapCurName}};
@@ -531,6 +531,7 @@ var investor = {{.T.res.investor}};
 var OpScope = {{.T.res.OpScope}};
 var service = {{.T.service}};
 var relation = {{.T.relation}};
+var copyright = {{.T.copyright}};
 /*var entId = "556db79cc2e8753072b3c9dd";
 var regNo = "410000100052878";
 var regCapCurName = "";

+ 8 - 8
credit/src/config.json

@@ -44,12 +44,12 @@
         "A2": -1000
     },
     "message": {
-        "swordfish_dueTitle": "剑鱼服务提醒",
-        "swordfish_due": "您的剑鱼服务%d天后到期,请及时续费。",
-        "swordfish_closeTitle": "剑鱼服务暂停提醒",
-        "swordfish_close": "您的剑鱼服务已经到期,已经暂停,请及时续费。",
-        "swordfish_payTitle": "剑鱼服务订单提醒",
-        "swordfish_pay": "您已成功订阅剑鱼,扣除%d积分,剩余%d积分,剑鱼服务时长到:%s",
+        "swordfish_dueTitle": "剑鱼%s信息服务提醒",
+        "swordfish_due": "您的剑鱼%s信息服务将于%d天后到期。您的积分余额为%d,如果继续使用,到期后系统将会自动扣除1000积分,如果积分余额不足服务将会中止。电脑登录qmx.top查看用户中心-积分,了解如何通过做任务赚取积分。",
+        "swordfish_closeTitle": "剑鱼%s信息服务暂停提醒",
+        "swordfish_close": "您的剑鱼%s信息服务已到期,由于积分余额不足,系统已停止推送。电脑登录qmx.top查看用户中心-积分,了解如何通过做任务赚取积分。",
+        "swordfish_payTitle": "剑鱼%s信息服务订单提醒",
+        "swordfish_pay": "您已成功订阅剑鱼%s信息服务,扣除%d积分,剩余%d积分,服务时间至:%s",
         "give": "转赠提醒",
         "give_pay": "转赠扣除提醒",
         "recharge": "充值成功提醒",
@@ -81,8 +81,8 @@
         "txt_c3": "邀请用户",
         "txt_d1": "微信充值",
         "txt_e1": "二维码转入",
-        "txt_A1": "剑鱼招标",
-        "txt_A2": "剑鱼中标",
+        "txt_A1": "招标",
+        "txt_A2": "中标",
         "txt_B1": "转赠"
     },
     "smtp": {

+ 3 - 3
credit/src/main.go

@@ -235,7 +235,7 @@ func TimerSwordFishFromUser() {
 									//提示
 									for _, v := range swordfish_tipBeforeDays {
 										if v == sub64 {
-											creditrpc.SendMsgWebAndWx(swordfish_dueTitle+"["+creditrpc.Message["txt_"+code]+"]", fmt.Sprintf(swordfish_due, v), util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string))
+											creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_dueTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_due, creditrpc.Message["txt_"+code], v, tmp["i_credit"]), util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string))
 										}
 									}
 								}
@@ -283,7 +283,7 @@ func doSubCreditByUser(userId, umid, typeName, code string, next *time.Time, use
 			}
 			if creditlog.Save(creditDoc) {
 				//发送微信通知扣积分成功
-				creditrpc.SendMsgWebAndWx(swordfish_payTitle+"["+creditrpc.Message["txt_"+code]+"]", fmt.Sprintf(swordfish_pay, -codeNum, restNum, util.FormatDate(&newDate, util.Date_Full_Layout)), userId, umid)
+				creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_payTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_pay, creditrpc.Message["txt_"+code], -codeNum, restNum, util.FormatDate(&newDate, util.Date_Full_Layout)), userId, umid)
 			}
 		} else { //暂停操作
 			//更新操作
@@ -294,7 +294,7 @@ func doSubCreditByUser(userId, umid, typeName, code string, next *time.Time, use
 				},
 			}, false, false) {
 				//暂停通知,因积分不够
-				creditrpc.SendMsgWebAndWx(swordfish_closeTitle+"["+creditrpc.Message["txt_"+code]+"]", swordfish_close, userId, umid)
+				creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_closeTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_close, creditrpc.Message["txt_"+code]), userId, umid)
 			}
 		}
 	}, func(e interface{}) {

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

@@ -305,7 +305,7 @@ func (c *CreditRpc) OutCreadit(param *qrpc.CreditData, replay *int) error {
 			*replay = creditDoc["i_score"].(int)
 			//发送微信通知扣积分成功
 			if first == "A" {
-				go SendMsgWebAndWx(Message["swordfish_payTitle"]+"["+txt+"]", fmt.Sprintf(Message["swordfish_pay"], creditDoc["i_score"], creditDoc["i_scorenow"], util.FormatDate(&newDate, util.Date_Full_Layout)), param.Uid, param.Umid)
+				go SendMsgWebAndWx(fmt.Sprintf(Message["swordfish_payTitle"], txt), fmt.Sprintf(Message["swordfish_pay"], txt, creditDoc["i_score"], creditDoc["i_scorenow"], util.FormatDate(&newDate, util.Date_Full_Layout)), param.Uid, param.Umid)
 			}
 		}
 	}

+ 19 - 7
weixin/src/qfw/weixin/rpc/downimg.go

@@ -5,19 +5,31 @@ import (
 	"log"
 	"os"
 	"qfw/util"
+	wutil "qfw/weixin/util"
 	wf "qfw/weixinconfig"
 	"time"
 )
 
-func (wxrpc *WeiXinRpc) DownloadMingpian(mediaid string, picpath *string) error {
-	*picpath = getSavePath()
-	err := wxrpc.wx.DownloadMediaToFile(mediaid, *picpath)
-	if err != nil {
-		log.Println("DownloadMingpian err", err.Error())
-		*picpath = ""
+func (wxrpc *WeiXinRpc) DownloadMingpian(mediaid string, ret *[]string) error {
+	p := []string{}
+	b := wutil.CheckLimit()
+	if b {
+		p = append(p, "n")
+		p = append(p, "")
 	} else {
-		log.Println("图片路径", *picpath)
+		picpath := getSavePath()
+		err := wxrpc.wx.DownloadMediaToFile(mediaid, picpath)
+		if err != nil {
+			log.Println("DownloadMingpian err", err.Error())
+			p = append(p, "y")
+			p = append(p, picpath)
+		} else {
+			p = append(p, "y")
+			p = append(p, picpath)
+			log.Println("图片路径", picpath)
+		}
 	}
+	*ret = p
 	return nil
 }
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません