瀏覽代碼

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

renzheng 9 年之前
父節點
當前提交
a6c22d4a25
共有 100 個文件被更改,包括 2693 次插入1671 次删除
  1. 1 1
      common/src/github.com/go-xweb/xweb/app.go
  2. 55 0
      common/src/github.com/surfer/README.md
  3. 320 0
      common/src/github.com/surfer/agent/agent.go
  4. 26 0
      common/src/github.com/surfer/agent/agent_bsd.go
  5. 41 0
      common/src/github.com/surfer/agent/agent_linux.go
  6. 25 0
      common/src/github.com/surfer/agent/agent_windows.go
  7. 84 0
      common/src/github.com/surfer/example/example.go
  8. 141 0
      common/src/github.com/surfer/param.go
  9. 188 0
      common/src/github.com/surfer/request.go
  10. 117 0
      common/src/github.com/surfer/surf.go
  11. 36 0
      common/src/github.com/surfer/surfer.go
  12. 94 0
      common/src/github.com/surfer/util/util.go
  13. 112 24
      common/src/main.go
  14. 7 7
      common/src/qfw/util/credit/credit.go
  15. 10 1
      common/src/qfw/util/elastic/elasticutil.go
  16. 29 0
      common/src/qfw/util/mongodbutil/mongodbutil.go
  17. 二進制
      core/doc/表初步设计及功能划分.xlsx
  18. 1 2
      core/src/config.json
  19. 0 7
      core/src/main.go
  20. 0 1
      core/src/qfw/coreconfig/SysConfig.go
  21. 0 1
      core/src/qfw/coreutil/mail.go
  22. 5 0
      core/src/qfw/front/index.go
  23. 55 43
      core/src/qfw/manage/auditing.go
  24. 3 3
      core/src/qfw/member/bidmanage.go
  25. 2 2
      core/src/qfw/member/credit/creditdetail.go
  26. 2 3
      core/src/qfw/member/memberindex.go
  27. 27 35
      core/src/qfw/member/membermanager.go
  28. 3 3
      core/src/qfw/member/ordermanage.go
  29. 105 101
      core/src/qfw/member/yellowpage.go
  30. 16 6
      core/src/qfw/microwebsite/microwebsite.go
  31. 4 7
      core/src/qfw/mobile/wxmenu.go
  32. 21 2
      core/src/qfw/search/searchService.go
  33. 3 2
      core/src/qfw/search/wxsearchservice.go
  34. 1 1
      core/src/qfw/searchmarket/demand.go
  35. 12 1
      core/src/qfw/searchmarket/service.go
  36. 9 0
      core/src/qfw/swordfish/swordfishmanage.go
  37. 0 18
      core/src/qfw/yellowpage/yellowpage.go
  38. 107 232
      core/src/qfw/yellowpage/yellowpagemanager.go
  39. 1 1
      core/src/timetask.json
  40. 44 2
      core/src/web/staticres/css/dev-qfw.css
  41. 167 60
      core/src/web/staticres/css/entcommunity.css
  42. 4 0
      core/src/web/staticres/css/mobile/incmobile.css
  43. 1 0
      core/src/web/staticres/css/qfw.css
  44. 二進制
      core/src/web/staticres/images/mobile/unauth.png
  45. 二進制
      core/src/web/staticres/images/u906.png
  46. 二進制
      core/src/web/staticres/images/u908.png
  47. 101 0
      core/src/web/staticres/js/baiduMap.js
  48. 1 1
      core/src/web/staticres/js/demand.js
  49. 9 3
      core/src/web/staticres/js/entcommunity.js
  50. 163 108
      core/src/web/staticres/js/entportrait.js
  51. 0 84
      core/src/web/staticres/js/geocoder.js
  52. 8 3
      core/src/web/staticres/js/qfw.js
  53. 34 23
      core/src/web/staticres/wxswordfish/style.css
  54. 50 4
      core/src/web/templates/_error.html
  55. 1 1
      core/src/web/templates/common/bottom.html
  56. 7 1
      core/src/web/templates/common/centerhead.html
  57. 1 1
      core/src/web/templates/common/indexhead.html
  58. 34 82
      core/src/web/templates/common/login.html
  59. 19 25
      core/src/web/templates/common/memberleft.html
  60. 1 1
      core/src/web/templates/common/newshead.html
  61. 1 1
      core/src/web/templates/common/reghead.html
  62. 6 9
      core/src/web/templates/common/swordfishhead.html
  63. 5 5
      core/src/web/templates/common/top.html
  64. 2 2
      core/src/web/templates/common/wsitehead.html
  65. 52 42
      core/src/web/templates/enterprise/detail.html
  66. 1 1
      core/src/web/templates/manage/audithead.html
  67. 27 8
      core/src/web/templates/manage/web_help.html
  68. 1 1
      core/src/web/templates/manage/webactivitycontent.html
  69. 48 1
      core/src/web/templates/manage/webmobindex.html
  70. 3 0
      core/src/web/templates/member/accountset/bindmail.html
  71. 2 1
      core/src/web/templates/member/accountset/index.html
  72. 8 6
      core/src/web/templates/member/comauthent.html
  73. 4 4
      core/src/web/templates/member/credit/mycredit.html
  74. 35 17
      core/src/web/templates/member/editenterprise.html
  75. 1 1
      core/src/web/templates/member/employeemanage/joinByLink.html
  76. 4 1
      core/src/web/templates/member/incmobile/detailindex.html
  77. 51 2
      core/src/web/templates/member/incmobile/index.html
  78. 2 0
      core/src/web/templates/member/incmobile/list.html
  79. 6 14
      core/src/web/templates/member/incmobile/relation.html
  80. 2 2
      core/src/web/templates/member/memberindex.html
  81. 20 6
      core/src/web/templates/member/microwebsite.html
  82. 11 8
      core/src/web/templates/member/otherauthentication.html
  83. 14 6
      core/src/web/templates/member/personalauthent.html
  84. 2 2
      core/src/web/templates/member/register.html
  85. 1 1
      core/src/web/templates/member/registercomplete.html
  86. 4 4
      core/src/web/templates/member/showenterprise.html
  87. 46 6
      core/src/web/templates/search/enterpriseList.html
  88. 0 172
      core/src/web/templates/search/wxentlist.html
  89. 2 2
      core/src/web/templates/service/appointment.html
  90. 1 1
      core/src/web/templates/service/viewsingledemand.html
  91. 4 4
      core/src/web/templates/swordfish/infolist.html
  92. 1 1
      core/src/web/templates/swordfish/rssset.html
  93. 2 2
      core/src/web/templates/swordfish/searchinfolist.html
  94. 2 2
      core/src/web/templates/swordfish/wxpush.html
  95. 1 1
      core/src/web/templates/swordfish/wxrssset.html
  96. 2 2
      core/src/web/templates/swordfish/wxsearchlist.html
  97. 11 3
      core/src/web/templates/swordfish/wxtoolbar.html
  98. 0 1
      core/src/web/templates/yellowpage/config.json
  99. 0 19
      core/src/web/templates/yellowpage/error.html
  100. 0 407
      core/src/web/templates/yellowpage/ungxenterpriseinfo.html

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

@@ -605,7 +605,7 @@ func (a *App) run(req *http.Request, w http.ResponseWriter, route Route, args []
 }
 
 func (a *App) error(w http.ResponseWriter, status int, content string) error {
-	w.WriteHeader(200)
+	w.WriteHeader(status)
 	if errorTmpl == "" {
 		errTmplFile := a.AppConfig.TemplateDir + "/_error.html"
 		if file, err := os.Stat(errTmplFile); err == nil && !file.IsDir() {

+ 55 - 0
common/src/github.com/surfer/README.md

@@ -0,0 +1,55 @@
+# surfer    [![GoDoc](https://godoc.org/github.com/tsuna/gohbase?status.png)](https://godoc.org/github.com/henrylee2cn/surfer) [![GitHub release](https://img.shields.io/github/release/henrylee2cn/surfer.svg)](https://github.com/henrylee2cn/surfer/releases)
+
+A high level concurrency downloader.
+
+</br>
+surfer是一款Go语言编写的高并发爬虫下载器,拥有surf与phantom两种下载内核。
+
+</br>
+支持固定UserAgent自动保存cookie与随机大量UserAgent禁用cookie两种模式,高度模拟浏览器行为,可实现模拟登录等功能。
+
+</br>
+高并发爬虫[Pholcus](https://github.com/henrylee2cn/pholcus)的专用下载器。(官方QQ群:Go大数据 42731170,欢迎加入我们的讨论)
+</br>
+
+
+
+### Usage
+
+```
+package main
+
+import (
+    "github.com/henrylee2cn/surfer"
+    "io/ioutil"
+    "log"
+)
+
+func main() {
+    // 默认使用surf内核下载
+    resp, err := surfer.Download(&surfer.DefaultRequest{
+        Url: "http://github.com/henrylee2cn/surfer",
+    })
+    if err != nil {
+        log.Fatal(err)
+    }
+    b, err := ioutil.ReadAll(resp.Body)
+    log.Println(string(b), err)
+
+    // 指定使用phantomjs内核下载
+    resp, err = surfer.Download(&surfer.DefaultRequest{
+        Url:          "http://github.com/henrylee2cn",
+        DownloaderID: 1,
+    })
+    if err != nil {
+        log.Fatal(err)
+    }
+    b, err = ioutil.ReadAll(resp.Body)
+    log.Println(string(b), err)
+
+    resp.Body.Close()
+    surfer.DestroyJsFiles()
+}
+```
+
+详情参考:[example.go](https://github.com/henrylee2cn/surfer/blob/master/example/example.go)

+ 320 - 0
common/src/github.com/surfer/agent/agent.go

@@ -0,0 +1,320 @@
+// Package agent generates user agents strings for well known browsers
+// and for custom browsers.
+//
+// When submitting patches to add user agents formats, please *always* include
+// "{{.Coms}}" between the opening ( and closing ) braces, even if you're
+// sure the browser would never have additional comments.
+package agent
+
+import (
+	"bytes"
+	"math/rand"
+	"runtime"
+	"strings"
+	"text/template"
+	"time"
+)
+
+const (
+	// Windows operating system.
+	Windows int = iota
+	// Linux based operating system.
+	Linux
+	// Macintosh/OS X operating system.
+	Macintosh
+)
+
+// TemplateData structure for template data.
+type TemplateData struct {
+	Name string
+	Ver  string
+	OSN  string
+	OSV  string
+	Coms string
+}
+
+// OSAttributes stores OS attributes.
+type OSAttributes struct {
+	// OSName is the operating system name.
+	OSName string
+	// OSVersion is the operating system version.
+	OSVersion string
+	// Comments are additional comments to add to a user agent string.
+	Comments []string
+}
+
+// DefaultOSAttributes stores default OS attributes.
+var DefaultOSAttributes = map[int]OSAttributes{
+	Windows:   {"Windows NT", "6.3", []string{"x64"}},
+	Linux:     {"Linux", "3.16.1", []string{"x64"}},
+	Macintosh: {"Intel Mac OS X", "10_6_8", []string{}},
+}
+
+// Formats is a collection of UA format strings.
+// key is the browser version.
+// value is the browser info.
+type Formats map[string]string
+
+// UAData stores information on a browser user agent.
+type UAData struct {
+	TopVersion string
+	DefaultOS  int
+	Formats    Formats
+}
+
+// UATable is a collection of UAData values.
+// key is the name of the browser.
+type UATable map[string]UAData
+
+// Database is the "database" of user agents.
+var Database = UATable{
+	"chrome": {
+		"37.0.2049.0",
+		Windows,
+		Formats{
+			"37": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"36": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"35": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"34": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"33": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"32": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"31": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+			"30": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}) Chrome/{{.Ver}} Safari/537.36",
+		},
+	},
+	"firefox": {
+		"31.0",
+		Windows,
+		Formats{
+			"31": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:31.0) Gecko/20100101 Firefox/{{.Ver}}",
+			"30": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:30.0) Gecko/20120101 Firefox/{{.Ver}}",
+			"29": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:29.0) Gecko/20120101 Firefox/{{.Ver}}",
+			"28": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:28.0) Gecko/20100101 Firefox/{{.Ver}}",
+			"27": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:27.0) Gecko/20130101 Firefox/{{.Ver}}",
+			"26": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:26.0) Gecko/20121011 Firefox/{{.Ver}}",
+			"25": "Mozilla/5.0 ({{.OSN}} {{.OSV}}{{.Coms}}; rv:25.0) Gecko/20100101 Firefox/{{.Ver}}",
+		},
+	},
+	"msie": {
+		"10.0",
+		Windows,
+		Formats{
+			"10": "Mozilla/5.0 (compatible; MSIE 10.0; {{.OSN}} {{.OSV}}{{if .Coms}}{{.Coms}}; {{end}}Trident/5.0; .NET CLR 3.5.30729)",
+			"9":  "Mozilla/5.0 (compatible; MSIE 9.0; {{.OSN}} {{.OSV}}{{if .Coms}}{{.Coms}}; {{end}}Trident/5.0; .NET CLR 3.0.30729)",
+			"8":  "Mozilla/5.0 (compatible; MSIE 8.0; {{.OSN}} {{.OSV}}{{if .Coms}}{{.Coms}}; {{end}}Trident/4.0; .NET CLR 3.0.04320)",
+			"7":  "Mozilla/4.0 (compatible; MSIE 7.0; {{.OSN}} {{.OSV}}{{if .Coms}}{{.Coms}}; {{end}}.NET CLR 2.0.50727)",
+		},
+	},
+	"opera": {
+		"12.14",
+		Windows,
+		Formats{
+			"12": "Opera/9.80 ({{.OSN}} {{.OSV}}; U{{.Coms}}) Presto/2.9.181 Version/{{.Ver}}",
+			"11": "Opera/9.80 ({{.OSN}} {{.OSV}}; U{{.Coms}}) Presto/2.7.62 Version/{{.Ver}}",
+			"10": "Opera/9.80 ({{.OSN}} {{.OSV}}; U{{.Coms}}) Presto/2.2.15 Version/{{.Ver}}",
+			"9":  "Opera/9.00 ({{.OSN}} {{.OSV}}; U{{.Coms}})",
+		},
+	},
+	"safari": {
+		"6.0",
+		Macintosh,
+		Formats{
+			"6": "Mozilla/5.0 (Macintosh; {{.OSN}} {{.OSV}}{{.Coms}}) AppleWebKit/536.26 (KHTML, like Gecko) Version/{{.Ver}} Safari/8536.25",
+			"5": "Mozilla/5.0 (Macintosh; {{.OSN}} {{.OSV}}{{.Coms}}) AppleWebKit/531.2+ (KHTML, like Gecko) Version/{{.Ver}} Safari/531.2+",
+			"4": "Mozilla/5.0 (Macintosh; {{.OSN}} {{.OSV}}{{.Coms}}) AppleWebKit/528.16 (KHTML, like Gecko) Version/{{.Ver}} Safari/528.16",
+		},
+	},
+	"itunes": {
+		"9.1.1",
+		Macintosh,
+		Formats{
+			"9": "iTunes/{{.Ver}}",
+			"8": "iTunes/{{.Ver}}",
+			"7": "iTunes/{{.Ver}} (Macintosh; U; PPC Mac OS X 10.4.7{{.Coms}})",
+			"6": "iTunes/{{.Ver}} (Macintosh; U; PPC Mac OS X 10.4.5{{.Coms}})",
+		},
+	},
+	"aol": {
+		"9.7",
+		Windows,
+		Formats{
+			"9": "Mozilla/5.0 (compatible; MSIE 9.0; AOL {{.Ver}}; AOLBuild 4343.19; {{.OSN}} {{.OSV}}; WOW64; Trident/5.0; FunWebProducts{{.Coms}})",
+			"8": "Mozilla/4.0 (compatible; MSIE 7.0; AOL {{.Ver}}; {{.OSN}} {{.OSV}}; GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727{{.Coms}})",
+			"7": "Mozilla/4.0 (compatible; MSIE 7.0; AOL {{.Ver}}; {{.OSN}} {{.OSV}}; FunWebProducts{{.Coms}})",
+			"6": "Mozilla/4.0 (compatible; MSIE 6.0; AOL {{.Ver}}; {{.OSN}} {{.OSV}}{{.Coms}})",
+		},
+	},
+	"konqueror": {
+		"4.9",
+		Linux,
+		Formats{
+			"4": "Mozilla/5.0 (compatible; Konqueror/4.0; {{.OSN}}{{.Coms}}) KHTML/4.0.3 (like Gecko)",
+			"3": "Mozilla/5.0 (compatible; Konqueror/3.0-rc6; i686 {{.OSN}}; 20021127{{.Coms}})",
+			"2": "Mozilla/5.0 (compatible; Konqueror/2.1.1; {{.OSN}}{{.Coms}})",
+		},
+	},
+	"netscape": {
+		"9.1.0285",
+		Windows,
+		Formats{
+			"9": "Mozilla/5.0 ({{.OSN}}; U; {{.OSN}} {{.OSV}}; rv:1.9.2.4{{.Coms}}) Gecko/20070321 Netscape/{{.Ver}}",
+			"8": "Mozilla/5.0 ({{.OSN}}; U; {{.OSN}} {{.OSV}}; rv:1.7.5{{.Coms}}) Gecko/20050519 Netscape/{{.Ver}}",
+			"7": "Mozilla/5.0 ({{.OSN}}; U; {{.OSN}} {{.OSV}}; rv:1.0.1{{.Coms}}) Gecko/20020921 Netscape/{{.Ver}}",
+		},
+	},
+	"lynx": {
+		"2.8.8dev.3",
+		Linux,
+		Formats{
+			"2": "Lynx/{{.Ver}} libwww-FM/2.14 SSL-MM/1.4.1",
+			"1": "Lynx (textmode)",
+		},
+	},
+	"googlebot": {
+		"2.1",
+		Linux,
+		Formats{
+			"2": "Mozilla/5.0 (compatible; Googlebot/{{.Ver}}; +http://www.google.com/bot.html{{.Coms}})",
+			"1": "Googlebot/{{.Ver}} (+http://www.google.com/bot.html{{.Coms}})",
+		},
+	},
+	"bingbot": {
+		"2.0",
+		Windows,
+		Formats{
+			"2": "Mozilla/5.0 (compatible; bingbot/{{.Ver}}; +http://www.bing.com/bingbot.htm{{.Coms}})",
+		},
+	},
+	"yahoobot": {
+		"2.0",
+		Linux,
+		Formats{
+			"2": "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp{{.Coms}})",
+		},
+	},
+	"default": {
+		"1.0",
+		Linux,
+		Formats{
+			"1": "{{.Name}}/{{.Ver}} ({{.OSN}} {{.OSV}}{{.Coms}})",
+		},
+	},
+}
+
+// 全部UserAgent
+var UserAgents = map[string][]string{}
+
+func init() {
+	for browser, userAgentData := range Database {
+		if browser == "default" {
+			continue
+		}
+		os := userAgentData.DefaultOS
+		osAttribs := DefaultOSAttributes[os]
+		for version, _ := range userAgentData.Formats {
+			ua := createFromDetails(
+				browser,
+				version,
+				osAttribs.OSName,
+				osAttribs.OSVersion,
+				osAttribs.Comments)
+			UserAgents["all"] = append(UserAgents["all"], ua)
+
+			if browser != "itunes" && browser != "lynx" && browser != "googlebot" && browser != "bingbot" && browser != "yahoobot" {
+				UserAgents["common"] = append(UserAgents["common"], ua)
+			}
+		}
+	}
+	l := len(UserAgents["common"])
+	r := rand.New(rand.NewSource(time.Now().UnixNano()))
+	idx := r.Intn(l)
+	UserAgents["all"][0], UserAgents["all"][idx] = UserAgents["all"][idx], UserAgents["all"][0]
+	UserAgents["common"][0], UserAgents["common"][idx] = UserAgents["common"][idx], UserAgents["common"][0]
+}
+
+// Create generates and returns a complete user agent string.
+func CreateReal() string {
+	return createFromDetails("Surfer", "1.0", osName(), osVersion(), []string{runtime.Version()})
+}
+
+// CreateDefault returns a user agent string using default values.
+func CreateDefault(browser string) string {
+	bn := strings.ToLower(browser)
+	data := Database[bn]
+	os := data.DefaultOS
+	osAttribs := DefaultOSAttributes[os]
+
+	return createFromDetails(
+		browser,
+		data.TopVersion,
+		osAttribs.OSName,
+		osAttribs.OSVersion,
+		osAttribs.Comments)
+}
+
+// CreateVersion generates and returns a complete user agent string for a specific browser version.
+func CreateVersion(browser, version string) string {
+	bn := strings.ToLower(browser)
+	data := Database[bn]
+	os := data.DefaultOS
+	osAttribs := DefaultOSAttributes[os]
+
+	return createFromDetails(
+		browser,
+		version,
+		osAttribs.OSName,
+		osAttribs.OSVersion,
+		osAttribs.Comments)
+}
+
+// TopVersion returns the most recent version for the given browser name.
+func TopVersion(bname string) string {
+	bname = strings.ToLower(bname)
+	data, ok := Database[bname]
+	if ok {
+		return data.TopVersion
+	}
+	return Database["default"].TopVersion
+}
+
+// Format returns the format string for the given browser name and version.
+//
+// When a format can't be found for a version, the first format string for the browser
+// is returned. When a format can't be found for the browser the default format is
+// returned.
+func Format(bname, bver string) string {
+	bname = strings.ToLower(bname)
+	majVer := strings.Split(bver, ".")[0]
+	data, ok := Database[bname]
+	if ok {
+		format, ok := data.Formats[majVer]
+		if ok {
+			return format
+		} else {
+			top := TopVersion(bname)
+			majVer = strings.Split(top, ".")[0]
+			return data.Formats[majVer]
+		}
+	}
+
+	return Database["default"].Formats["1"]
+}
+
+// createFromDetails generates and returns a complete user agent string.
+func createFromDetails(bname, bver, osname, osver string, c []string) string {
+	if bver == "" {
+		bver = TopVersion(bname)
+	}
+	comments := strings.Join(c, "; ")
+	if comments != "" {
+		comments = "; " + comments
+	}
+
+	data := TemplateData{bname, bver, osname, osver, comments}
+	buff := &bytes.Buffer{}
+	t := template.New("formatter")
+	t.Parse(Format(bname, bver))
+	t.Execute(buff, data)
+
+	return buff.String()
+}

+ 26 - 0
common/src/github.com/surfer/agent/agent_bsd.go

@@ -0,0 +1,26 @@
+// +build darwin dragonfly freebsd netbsd openbsd
+
+package agent
+
+import (
+	"runtime"
+	"syscall"
+)
+
+// osName returns the name of the OS.
+func osName() string {
+	name, err := syscall.Sysctl("kern.ostype")
+	if err != nil {
+		return runtime.GOOS
+	}
+	return name
+}
+
+// osVersion returns the OS version.
+func osVersion() string {
+	release, err := syscall.Sysctl("kern.osrelease")
+	if err != nil {
+		return "0.0"
+	}
+	return release
+}

+ 41 - 0
common/src/github.com/surfer/agent/agent_linux.go

@@ -0,0 +1,41 @@
+// +build linux
+
+package agent
+
+import (
+	"runtime"
+	"syscall"
+)
+
+// osName returns the name of the OS.
+func osName() string {
+	buf := &syscall.Utsname{}
+	err := syscall.Uname(buf)
+	if err != nil {
+		return runtime.GOOS
+	}
+	return charsToString(buf.Sysname)
+}
+
+// osVersion returns the OS version.
+func osVersion() string {
+	buf := &syscall.Utsname{}
+	err := syscall.Uname(buf)
+	if err != nil {
+		return "0.0"
+	}
+	return charsToString(buf.Release)
+}
+
+// charsToString converts a [65]int8 byte array into a string.
+func charsToString(ca [65]int8) string {
+	s := make([]byte, len(ca))
+	var lens int
+	for ; lens < len(ca); lens++ {
+		if ca[lens] == 0 {
+			break
+		}
+		s[lens] = uint8(ca[lens])
+	}
+	return string(s[0:lens])
+}

+ 25 - 0
common/src/github.com/surfer/agent/agent_windows.go

@@ -0,0 +1,25 @@
+// +build windows
+
+package agent
+
+import (
+	"fmt"
+	"runtime"
+	"syscall"
+)
+
+// osName returns the name of the OS.
+func osName() string {
+	return runtime.GOOS
+}
+
+// osVersion returns the OS version.
+func osVersion() string {
+	v, err := syscall.GetVersion()
+	if err != nil {
+		return "0.0"
+	}
+	major := uint8(v)
+	minor := uint8(v >> 8)
+	return fmt.Sprintf("%d.%d", major, minor)
+}

+ 84 - 0
common/src/github.com/surfer/example/example.go

@@ -0,0 +1,84 @@
+package main
+
+import (
+	"github.com/henrylee2cn/surfer"
+	"io/ioutil"
+	"log"
+	"time"
+)
+
+func main() {
+	// 默认使用surf内核下载
+	log.Println("********************************************* surf内核GET下载测试开始 *********************************************")
+	resp, err := surfer.Download(&surfer.DefaultRequest{
+		Url: "http://www.baidu.com/",
+	})
+	if err != nil {
+		log.Fatal(err)
+	}
+	log.Println(resp.Header)
+
+	b, err := ioutil.ReadAll(resp.Body)
+	log.Println(string(b), err)
+
+	log.Println("********************************************* surf内核GET下载测试完毕 *********************************************")
+
+	// 默认使用surf内核下载
+	log.Println("********************************************* surf内核POST下载测试开始 *********************************************")
+	resp, err = surfer.Download(&surfer.DefaultRequest{
+		Url:      "http://accounts.lewaos.com/",
+		Method:   "POST",
+		PostData: "username=123456@qq.com&password=123456&login_btn=login_btn&submit=login_btn",
+	})
+	if err != nil {
+		log.Fatal(err)
+	}
+	log.Println(resp.Header)
+
+	b, err = ioutil.ReadAll(resp.Body)
+	log.Println(string(b), err)
+
+	log.Println("********************************************* surf内核POST下载测试完毕 *********************************************")
+
+	log.Println("********************************************* phantomjs内核GET下载测试开始 *********************************************")
+
+	// 指定使用phantomjs内核下载
+	resp, err = surfer.Download(&surfer.DefaultRequest{
+		Url:          "http://www.baidu.com/",
+		DownloaderID: 1,
+	})
+	if err != nil {
+		log.Fatal(err)
+	}
+	log.Println(resp.Header)
+
+	b, err = ioutil.ReadAll(resp.Body)
+	log.Println(string(b), err)
+
+	log.Println("********************************************* phantomjs内核GET下载测试完毕 *********************************************")
+
+	log.Println("********************************************* phantomjs内核POST下载测试开始 *********************************************")
+
+	// 指定使用phantomjs内核下载
+	resp, err = surfer.Download(&surfer.DefaultRequest{
+		DownloaderID: 1,
+		Url:          "http://accounts.lewaos.com/",
+		Method:       "POST",
+		PostData:     "username=123456@qq.com&password=123456&login_btn=login_btn&submit=login_btn",
+	})
+	if err != nil {
+		log.Fatal(err)
+	}
+	log.Println(resp.Header)
+
+	b, err = ioutil.ReadAll(resp.Body)
+	log.Println(string(b), err)
+
+	log.Println("********************************************* phantomjs内核POST下载测试完毕 *********************************************")
+
+	resp.Body.Close()
+
+	surfer.DestroyJsFiles()
+
+	time.Sleep(600e9)
+}

+ 141 - 0
common/src/github.com/surfer/param.go

@@ -0,0 +1,141 @@
+package surfer
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"math/rand"
+	"mime/multipart"
+	"net/http"
+	"net/url"
+	"strings"
+	"time"
+
+	"github.com/surfer/agent"
+	"github.com/surfer/util"
+)
+
+type Param struct {
+	method        string
+	url           *url.URL
+	proxy         *url.URL
+	contentType   string
+	body          io.Reader
+	header        http.Header
+	enableCookie  bool
+	dialTimeout   time.Duration
+	connTimeout   time.Duration
+	tryTimes      int
+	retryPause    time.Duration
+	redirectTimes int
+	client        *http.Client
+}
+
+func NewParam(req Request) (param *Param, err error) {
+	param = new(Param)
+	param.url, err = util.UrlEncode(req.GetUrl())
+	if err != nil {
+		return nil, err
+	}
+
+	if req.GetProxy() != "" {
+		if param.proxy, err = url.Parse(req.GetProxy()); err != nil {
+			return nil, err
+		}
+	}
+
+	switch method := strings.ToUpper(req.GetMethod()); method {
+	case "GET", "HEAD":
+		param.method = method
+	case "POST":
+		param.method = method
+		param.contentType = "application/x-www-form-urlencoded"
+		param.body = strings.NewReader(req.GetPostData())
+	case "POST-M":
+		param.method = "POST"
+		body := &bytes.Buffer{}
+		writer := multipart.NewWriter(body)
+		values, _ := url.ParseQuery(req.GetPostData())
+		for k, vs := range values {
+			for _, v := range vs {
+				writer.WriteField(k, v)
+			}
+		}
+		err := writer.Close()
+		if err != nil {
+			return nil, err
+		}
+		param.contentType = writer.FormDataContentType()
+		param.body = body
+
+	default:
+		param.method = "GET"
+	}
+
+	param.header = make(http.Header)
+
+	if param.contentType != "" {
+		param.header.Set("Content-Type", param.contentType)
+	}
+
+	for k, v := range req.GetHeader() {
+		for _, vv := range v {
+			param.header.Add(k, vv)
+		}
+	}
+
+	param.enableCookie = req.GetEnableCookie()
+
+	if len(param.header.Get("User-Agent")) == 0 {
+		if param.enableCookie {
+			param.header.Set("User-Agent", agent.UserAgents["common"][0])
+		} else {
+			l := len(agent.UserAgents["common"])
+			r := rand.New(rand.NewSource(time.Now().UnixNano()))
+			param.header.Set("User-Agent", agent.UserAgents["common"][r.Intn(l)])
+		}
+	}
+
+	param.dialTimeout = req.GetDialTimeout()
+	if param.dialTimeout < 0 {
+		param.dialTimeout = 0
+	}
+
+	param.connTimeout = req.GetConnTimeout()
+	param.tryTimes = req.GetTryTimes()
+	param.retryPause = req.GetRetryPause()
+	param.redirectTimes = req.GetRedirectTimes()
+	return
+}
+
+// 回写Request内容
+func (self *Param) writeback(resp *http.Response) *http.Response {
+	if resp == nil {
+		resp = new(http.Response)
+		resp.Request = new(http.Request)
+	} else if resp.Request == nil {
+		resp.Request = new(http.Request)
+	}
+
+	resp.Request.Method = self.method
+	resp.Request.Header = self.header
+	resp.Request.Host = self.url.Host
+
+	return resp
+}
+
+// checkRedirect is used as the value to http.Client.CheckRedirect
+// when redirectTimes equal 0, redirect times is ∞
+// when redirectTimes less than 0, not allow redirects
+func (self *Param) checkRedirect(req *http.Request, via []*http.Request) error {
+	if self.redirectTimes == 0 {
+		return nil
+	}
+	if len(via) >= self.redirectTimes {
+		if self.redirectTimes < 0 {
+			return fmt.Errorf("not allow redirects.")
+		}
+		return fmt.Errorf("stopped after %v redirects.", self.redirectTimes)
+	}
+	return nil
+}

+ 188 - 0
common/src/github.com/surfer/request.go

@@ -0,0 +1,188 @@
+package surfer
+
+import (
+	"net/http"
+	"strings"
+	"sync"
+	"time"
+)
+
+type Request interface {
+	// url
+	GetUrl() string
+	// GET POST POST-M HEAD
+	GetMethod() string
+	// POST values
+	GetPostData() string
+	// http header
+	GetHeader() http.Header
+	// enable http cookies
+	GetEnableCookie() bool
+	// dial tcp: i/o timeout
+	GetDialTimeout() time.Duration
+	// WSARecv tcp: i/o timeout
+	GetConnTimeout() time.Duration
+	// the max times of download
+	GetTryTimes() int
+	// the pause time of retry
+	GetRetryPause() time.Duration
+	// the download ProxyHost
+	GetProxy() string
+	// max redirect times
+	GetRedirectTimes() int
+	// select Surf ro PhomtomJS
+	GetDownloaderID() int
+}
+
+const (
+	SurfID             = 0               // Surf下载器标识符
+	PhomtomJsID        = 1               // PhomtomJs下载器标识符
+	DefaultMethod      = "GET"           // 默认请求方法
+	DefaultDialTimeout = 2 * time.Minute // 默认请求服务器超时
+	DefaultConnTimeout = 2 * time.Minute // 默认下载超时
+	DefaultTryTimes    = 3               // 默认最大下载次数
+	DefaultRetryPause  = 2 * time.Second // 默认重新下载前停顿时长
+)
+
+// 默认实现的Request
+type DefaultRequest struct {
+	// url (必须填写)
+	Url string
+	// GET POST POST-M HEAD (默认为GET)
+	Method string
+	// http header
+	Header http.Header
+	// 是否使用cookies,在Spider的EnableCookie设置
+	EnableCookie bool
+	// POST values
+	PostData string
+	// dial tcp: i/o timeout
+	DialTimeout time.Duration
+	// WSARecv tcp: i/o timeout
+	ConnTimeout time.Duration
+	// the max times of download
+	TryTimes int
+	// how long pause when retry
+	RetryPause time.Duration
+	// max redirect times
+	// when RedirectTimes equal 0, redirect times is ∞
+	// when RedirectTimes less than 0, redirect times is 0
+	RedirectTimes int
+	// the download ProxyHost
+	Proxy string
+
+	// 指定下载器ID
+	// 0为Surf高并发下载器,各种控制功能齐全
+	// 1为PhantomJS下载器,特点破防力强,速度慢,低并发
+	DownloaderID int
+
+	// 保证prepare只调用一次
+	once sync.Once
+}
+
+func (self *DefaultRequest) prepare() {
+	if self.Method == "" {
+		self.Method = DefaultMethod
+	}
+	self.Method = strings.ToUpper(self.Method)
+
+	if self.Header == nil {
+		self.Header = make(http.Header)
+	}
+
+	if self.DialTimeout < 0 {
+		self.DialTimeout = 0
+	} else if self.DialTimeout == 0 {
+		self.DialTimeout = DefaultDialTimeout
+	}
+
+	if self.ConnTimeout < 0 {
+		self.ConnTimeout = 0
+	} else if self.ConnTimeout == 0 {
+		self.ConnTimeout = DefaultConnTimeout
+	}
+
+	if self.TryTimes == 0 {
+		self.TryTimes = DefaultTryTimes
+	}
+
+	if self.RetryPause <= 0 {
+		self.RetryPause = DefaultRetryPause
+	}
+
+	if self.DownloaderID != PhomtomJsID {
+		self.DownloaderID = SurfID
+	}
+}
+
+// url
+func (self *DefaultRequest) GetUrl() string {
+	self.once.Do(self.prepare)
+	return self.Url
+}
+
+// GET POST POST-M HEAD
+func (self *DefaultRequest) GetMethod() string {
+	self.once.Do(self.prepare)
+	return self.Method
+}
+
+// POST values
+func (self *DefaultRequest) GetPostData() string {
+	self.once.Do(self.prepare)
+	return self.PostData
+}
+
+// http header
+func (self *DefaultRequest) GetHeader() http.Header {
+	self.once.Do(self.prepare)
+	return self.Header
+}
+
+// enable http cookies
+func (self *DefaultRequest) GetEnableCookie() bool {
+	self.once.Do(self.prepare)
+	return self.EnableCookie
+}
+
+// dial tcp: i/o timeout
+func (self *DefaultRequest) GetDialTimeout() time.Duration {
+	self.once.Do(self.prepare)
+	return self.DialTimeout
+}
+
+// WSARecv tcp: i/o timeout
+func (self *DefaultRequest) GetConnTimeout() time.Duration {
+	self.once.Do(self.prepare)
+	return self.ConnTimeout
+}
+
+// the max times of download
+func (self *DefaultRequest) GetTryTimes() int {
+	self.once.Do(self.prepare)
+	return self.TryTimes
+}
+
+// the pause time of retry
+func (self *DefaultRequest) GetRetryPause() time.Duration {
+	self.once.Do(self.prepare)
+	return self.RetryPause
+}
+
+// the download ProxyHost
+func (self *DefaultRequest) GetProxy() string {
+	self.once.Do(self.prepare)
+	return self.Proxy
+}
+
+// max redirect times
+func (self *DefaultRequest) GetRedirectTimes() int {
+	self.once.Do(self.prepare)
+	return self.RedirectTimes
+}
+
+// select Surf ro PhomtomJS
+func (self *DefaultRequest) GetDownloaderID() int {
+	self.once.Do(self.prepare)
+	return self.DownloaderID
+}

+ 117 - 0
common/src/github.com/surfer/surf.go

@@ -0,0 +1,117 @@
+package surfer
+
+import (
+	"crypto/tls"
+	"math/rand"
+	"net"
+	"net/http"
+	"net/http/cookiejar"
+	"strings"
+	"time"
+
+	"github.com/surfer/agent"
+)
+
+// Default is the default Download implementation.
+type Surf struct {
+	cookieJar *cookiejar.Jar
+}
+
+func New() Surfer {
+	s := new(Surf)
+	s.cookieJar, _ = cookiejar.New(nil)
+	return s
+}
+
+func (self *Surf) Download(req Request) (resp *http.Response, err error) {
+	param, err := NewParam(req)
+	if err != nil {
+		return nil, err
+	}
+	param.client = self.buildClient(param)
+	resp, err = self.httpRequest(param)
+	resp = param.writeback(resp)
+	// if err != nil {
+	// 	resp.Status = "200 OK"
+	// 	resp.StatusCode = 200
+	// }
+	return
+}
+
+// buildClient creates, configures, and returns a *http.Client type.
+func (self *Surf) buildClient(param *Param) *http.Client {
+	client := &http.Client{
+		CheckRedirect: param.checkRedirect,
+	}
+
+	if param.enableCookie {
+		client.Jar = self.cookieJar
+	}
+
+	transport := &http.Transport{
+		DisableKeepAlives: true,
+		Dial: func(network, addr string) (net.Conn, error) {
+			c, err := net.DialTimeout(network, addr, param.dialTimeout)
+			if err != nil {
+				return nil, err
+			}
+			if param.connTimeout > 0 {
+				c.SetDeadline(time.Now().Add(param.connTimeout))
+			}
+			return c, nil
+		},
+	}
+
+	if param.proxy != nil {
+		transport.Proxy = http.ProxyURL(param.proxy)
+	}
+
+	if strings.ToLower(param.url.Scheme) == "https" {
+		transport.TLSClientConfig = &tls.Config{RootCAs: nil, InsecureSkipVerify: true}
+		transport.DisableCompression = true
+	}
+	client.Transport = transport
+	return client
+}
+
+// send uses the given *http.Request to make an HTTP request.
+func (self *Surf) httpRequest(param *Param) (resp *http.Response, err error) {
+	req, err := http.NewRequest(param.method, param.url.String(), param.body)
+	if err != nil {
+		return nil, err
+	}
+
+	req.Header = param.header
+
+	if param.tryTimes <= 0 {
+		for {
+			resp, err = param.client.Do(req)
+			if err != nil {
+				if !param.enableCookie {
+					l := len(agent.UserAgents["common"])
+					r := rand.New(rand.NewSource(time.Now().UnixNano()))
+					req.Header.Set("User-Agent", agent.UserAgents["common"][r.Intn(l)])
+				}
+				time.Sleep(param.retryPause)
+				continue
+			}
+			break
+		}
+	} else {
+		for i := 0; i < param.tryTimes; i++ {
+			resp, err = param.client.Do(req)
+			if err != nil {
+				if !param.enableCookie {
+					l := len(agent.UserAgents["common"])
+					r := rand.New(rand.NewSource(time.Now().UnixNano()))
+					req.Header.Set("User-Agent", agent.UserAgents["common"][r.Intn(l)])
+				}
+				time.Sleep(param.retryPause)
+				continue
+			}
+			break
+		}
+	}
+
+	return resp, err
+}

+ 36 - 0
common/src/github.com/surfer/surfer.go

@@ -0,0 +1,36 @@
+// surfer是一款Go语言编写的高并发爬虫下载器,支持 GET/POST/HEAD 方法及 http/https 协议,同时支持固定UserAgent自动保存cookie与随机大量UserAgent禁用cookie两种模式,高度模拟浏览器行为,可实现模拟登录等功能。
+package surfer
+
+import (
+	"net/http"
+	"os"
+	"sync"
+)
+
+var (
+	surf          Surfer
+	phantom       Surfer
+	once_surf     sync.Once
+	once_phantom  sync.Once
+	tempJsDir     = "./tmp"
+	phantomjsFile = os.Getenv("GOPATH") + `\src\github.com\surfer\phantomjs\phantomjs`
+)
+
+func Download(req Request) (resp *http.Response, err error) {
+	switch req.GetDownloaderID() {
+	case SurfID:
+		once_surf.Do(func() { surf = New() })
+		resp, err = surf.Download(req)
+
+	}
+	return
+}
+
+// Downloader represents an core of HTTP web browser for crawler.
+type Surfer interface {
+	// GET @param url string, header http.Header, cookies []*http.Cookie
+	// HEAD @param url string, header http.Header, cookies []*http.Cookie
+	// POST PostForm @param url, referer string, values url.Values, header http.Header, cookies []*http.Cookie
+	// POST-M PostMultipart @param url, referer string, values url.Values, header http.Header, cookies []*http.Cookie
+	Download(Request) (resp *http.Response, err error)
+}

+ 94 - 0
common/src/github.com/surfer/util/util.go

@@ -0,0 +1,94 @@
+// Package util contains some utility methods used by other packages.
+package util
+
+import (
+	"fmt"
+	"hash/crc32"
+	"log"
+	"net/url"
+	"os"
+	"path/filepath"
+	"strings"
+)
+
+// 返回编码后的url.URL指针、及解析错误
+func UrlEncode(urlStr string) (*url.URL, error) {
+	urlObj, err := url.Parse(urlStr)
+	urlObj.RawQuery = urlObj.Query().Encode()
+	return urlObj, err
+}
+
+// 制作特征值
+func MakeHash(s string) string {
+	const IEEE = 0xedb88320
+	var IEEETable = crc32.MakeTable(IEEE)
+	hash := fmt.Sprintf("%x", crc32.Checksum([]byte(s), IEEETable))
+	return hash
+}
+
+// The GetWDPath gets the work directory path.
+func GetWDPath() string {
+	wd := os.Getenv("GOPATH")
+	if wd == "" {
+		panic("GOPATH is not setted in env.")
+	}
+	return wd
+}
+
+// The IsDirExists judges path is directory or not.
+func IsDirExists(path string) bool {
+	fi, err := os.Stat(path)
+
+	if err != nil {
+		return os.IsExist(err)
+	} else {
+		return fi.IsDir()
+	}
+
+	panic("util isDirExists not reached")
+}
+
+// The IsFileExists judges path is file or not.
+func IsFileExists(path string) bool {
+	fi, err := os.Stat(path)
+
+	if err != nil {
+		return os.IsExist(err)
+	} else {
+		return !fi.IsDir()
+	}
+
+	panic("util isFileExists not reached")
+}
+
+// 遍历目录,可指定后缀
+func WalkDir(targpath string, suffixes ...string) (dirlist []string) {
+	if !filepath.IsAbs(targpath) {
+		targpath, _ = filepath.Abs(targpath)
+	}
+	err := filepath.Walk(targpath, func(retpath string, f os.FileInfo, err error) error {
+		if err != nil {
+			return err
+		}
+		if !f.IsDir() {
+			return nil
+		}
+		if len(suffixes) == 0 {
+			dirlist = append(dirlist, retpath)
+			return nil
+		}
+		for _, suffix := range suffixes {
+			if strings.HasSuffix(retpath, suffix) {
+				dirlist = append(dirlist, retpath)
+			}
+		}
+		return nil
+	})
+
+	if err != nil {
+		log.Printf("utils.WalkDir: %v\n", err)
+		return
+	}
+
+	return
+}

+ 112 - 24
common/src/main.go

@@ -1,53 +1,141 @@
 package main
 
 import (
+	"fmt"
 	"gopkg.in/mgo.v2/bson"
 	"strconv"
+	"strings"
 
 	"log"
 	"os"
 	"qfw/util/elastic"
-	"qfw/util/mongodb"
+	. "qfw/util/mongodbutil"
 )
 
 var N = 200
 
 //生enterprise表
-func main() {
-	//6 参数 mongodb elastic collection area index-db inde-type N
-	if len(os.Args[7]) > 0 {
-		n1, _ := strconv.Atoi(os.Args[7])
+func main1() {
+	// 参数 mongodb(网站库) mongodb(公示库) elastic collection area index-db inde-type N
+	initConfig(os.Args[1], "web", "qfw")
+	if os.Args[4] == "enterprise" {
+		initConfig(os.Args[2], "ecps", "qfw")
+
+	}
+	InitMongodbPool()
+	elastic.InitElastic(os.Args[3])
+	if len(os.Args[8]) > 0 {
+		n1, _ := strconv.Atoi(os.Args[8])
 		if n1 > 0 {
 			N = n1
 		}
 	}
-	mongodb.InitMongodbPool(1, os.Args[1], "qfw")
-	elastic.InitElastic(os.Args[2])
-	session := mongodb.GetMgoConn()
+	ecps_session := GetMgoConn("ecps")
 	var m map[string]interface{}
-	if os.Args[4] == "all" {
+	if os.Args[5] == "all" {
 		m = nil
 	} else {
-		m = bson.M{"Area": os.Args[4]}
+		m = bson.M{"Area": os.Args[5]}
 	}
 	log.Printf("%v", m)
-	query := session.DB("qfw").C(os.Args[3]).Find(m).Iter()
-	arr := make([]map[string]interface{}, N)
-	var n int
 	i := 0
-	for tmp := make(map[string]interface{}); query.Next(tmp); i = i + 1 {
-		n++
-		arr[i] = elastic.ConverData(&tmp)
-		if i == N-1 {
-			elastic.BulkSave(os.Args[5], os.Args[6], &arr, true)
-			i = 0
-			arr = make([]map[string]interface{}, N)
+	query := ecps_session.DB("qfw").C(os.Args[4]).Find(m).Iter()
+	arr := make([]map[string]interface{}, 0)
+	for tmp := make(map[string]interface{}); query.Next(tmp); i++ {
+		arr = append(arr, tmp)
+		if i%N == 0 && i != 0 {
+			elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
+			arr = make([]map[string]interface{}, 0)
+			log.Printf("当前索引位置:=%d \n", i)
 		}
-		if n%2000 == 0 {
-			log.Printf("current index:=%d \n", n)
+	}
+	if len(arr) > 0 {
+		elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
+		arr = make([]map[string]interface{}, 0)
+	}
+	if os.Args[4] == "enterprise" {
+		//生成带名片索引
+		i = 0
+		count := Count("enterprise", "web", "qfw", m)
+		log.Println("网站库,一共", count, "条数据")
+		for {
+			limit := i + N
+			if limit > count {
+				limit = count
+			}
+			query := *Find("enterprise", "web", "qfw", m, nil, nil, false, i, i+N)
+			regNos := make([]string, 0)
+			arr := make([]map[string]interface{}, 0)
+			if len(query) > 0 {
+				for _, v := range query {
+					if v["_id"] != nil {
+						regno := fmt.Sprint(v["RegNo"])
+						regNos = append(regNos, "\""+regno+"\"")
+						delete(v, "_id")
+					}
+				}
+
+				findstr := `{"RegNo":{"$in":[` + strings.Join(regNos, ",") + `]}}`
+				query1 := *Find("enterprise", "ecps", "qfw", findstr, nil, nil, false, -1, -1)
+				for _, v := range query {
+					for _, _v := range query1 {
+						if fmt.Sprint(_v["RegNo"]) == fmt.Sprint(v["RegNo"]) {
+							delete(v, "_id")
+							if len(v) > 1 {
+								for field, value := range v {
+									_v[field] = value
+								}
+								arr = append(arr, elastic.ConverData(&_v))
+							}
+						}
+					}
+				}
+				elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
+			}
+			if i >= count {
+				break
+			} else {
+				i = i + N
+			}
+			log.Printf("当前索引位置:=%d \n", i)
 		}
 	}
-	if i > 0 {
-		elastic.BulkSave(os.Args[5], os.Args[6], &arr, true)
+
+}
+func main() {
+	// 参数 mongodb(网站库) elastic collection query
+	initConfig(os.Args[1], "web", "qfw")
+	InitMongodbPool()
+	log.Println("初始化完毕")
+	elastic.InitElastic(os.Args[2])
+	log.Println("elatic初始化完毕")
+	query := ""
+	if len(os.Args) > 4 && os.Args[4] != "" {
+		query = os.Args[4]
+		query = strings.Replace(query, "^", "$", -1)
 	}
+	log.Println("query:", query)
+	list := *Find(os.Args[3], "web", "qfw", query, nil, nil, false, -1, -1)
+	log.Println("len:", len(list))
+	log.Println("查询完毕")
+	var i = 0
+	for i <= len(list) {
+		var tmp []map[string]interface{}
+		if i+100 >= len(list) {
+			tmp = list[i:len(list)]
+		} else {
+			tmp = list[i : i+100]
+		}
+		elastic.BulkSave(os.Args[3], os.Args[3], &tmp, true)
+		log.Println("当前索引:", i)
+		i = i + 100
+	}
+}
+func initConfig(ip, alias, db string) {
+	conf := *new(PoolConfig)
+	conf.Addr = ip
+	conf.Alias = alias
+	conf.DB = db
+	conf.Size = 5
+	Config = append(Config, conf)
 }

+ 7 - 7
common/src/qfw/util/credit/credit.go

@@ -67,7 +67,7 @@ func init() {
 }
 
 //一次性任务积分
-func InCreditA(userId, code string, credit_a int) (bool, int, int, error) {
+func InCreditA(userId, code string, credit_a int64) (bool, int64, int, error) {
 	result := false
 	if len(userId) < 1 {
 		return result, credit_a, 0, nil
@@ -87,7 +87,7 @@ func InCreditA(userId, code string, credit_a int) (bool, int, int, error) {
 }
 
 //剑鱼一次性任务
-func CheckSword(userId, code string, credit_a int, xb *xweb.Action) bool {
+func CheckSword(userId, code string, credit_a int64, xb *xweb.Action) bool {
 	result := false
 	if !AIsHasDo(code, credit_a) {
 		result, credit_a = UpuserCreditA(code, userId, credit_a)
@@ -116,18 +116,18 @@ func InCreditB(userId, code string, param map[string]interface{}) (bool, int, er
 }
 
 //更新用户一次性积分状态
-func UpuserCreditA(code, userId string, credit_a int) (bool, int) {
+func UpuserCreditA(code, userId string, credit_a int64) (bool, int64) {
 	var ret uint64
 	if tmp, ok := CreditA[code]; ok {
 		ret = 1 << (tmp - 1)
 	}
 	n_credit_a := uint64(credit_a) + ret
 	b := mogo.Update("user", `{"_id":"`+userId+`"}`, &map[string]interface{}{"$set": &map[string]interface{}{"credit_a": int64(n_credit_a)}}, true, false)
-	return b, int(n_credit_a)
+	return b, int64(n_credit_a)
 }
 
 //判断一次性积分是否完成
-func AIsHasDo(code string, num int) bool {
+func AIsHasDo(code string, num int64) bool {
 	b := false
 	var ret uint64
 	if tmp, ok := CreditA[code]; ok {
@@ -140,7 +140,7 @@ func AIsHasDo(code string, num int) bool {
 }
 
 //判断A是否完成
-func AAllIsHasDo(num int) bool {
+func AAllIsHasDo(num int64) bool {
 	b := false
 	var ret uint64
 	for k, v := range CreditA {
@@ -187,7 +187,7 @@ func UpuserCreditSession(userId, code, dtype string, param map[string]interface{
 	score := 0
 	util.Try(func() {
 		if dtype == "A" {
-			credit_a := util.IntAll(xb.GetSession("credit_a"))
+			credit_a := util.Int64All(xb.GetSession("credit_a"))
 			b, credit_a, score, _ = InCreditA(userId, code, credit_a)
 			if b {
 				xb.Session().UpdateByCustomField("id", userId, "credit_a", credit_a)

+ 10 - 1
common/src/qfw/util/elastic/elasticutil.go

@@ -12,6 +12,7 @@ import (
 	"log"
 	"qfw/util"
 	"qfw/util/mongodb"
+	mongodbutil "qfw/util/mongodbutil"
 	"reflect"
 
 	"strconv"
@@ -508,7 +509,15 @@ func UpdateNewDoc(index, itype string, obj ...interface{}) bool {
 
 func UpdateEntDoc(id string) bool {
 	b := false
-	ent := mongodb.FindById("enterprise", id, "")
+	map2 := map[string]interface{}{}
+	util.ReadConfig(&map2)
+	ent := mongodbutil.FindById("enterprise", map2["entMongodbAlias"].(string), map2["entMongodbName"].(string), id, "")
+	_ent := mongodb.FindById("enterprise", id, "")
+	if _ent != nil && len(*_ent) > 0 {
+		for k, v := range *_ent {
+			(*ent)[k] = v
+		}
+	}
 	if ent != nil {
 		b = UpdateNewDoc("enterprise", "enterprise", ConverData(ent))
 	}

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

@@ -132,6 +132,35 @@ func FindOneByField(c, alias, db string, query interface{}, fields interface{})
 	return nil
 }
 
+//查询单条对象
+func FindById(c, alias, db, query string, fields interface{}) *map[string]interface{} {
+	sess := GetMgoConn(alias)
+	var res map[string]interface{}
+	if sess != nil {
+		defer func() {
+			if r := recover(); r != nil {
+				log.Println("[E]", r)
+				for skip := 1; ; skip++ {
+					_, file, line, ok := runtime.Caller(skip)
+					if !ok {
+						break
+					}
+					go log.Printf("%v,%v\n", file, line)
+				}
+			}
+		}()
+		defer DestoryMongoConn(alias, sess)
+		res = make(map[string]interface{})
+		coll := sess.DB(db).C(c)
+		var err error
+		err = coll.FindId(ObjectIdHex(query)).Select(ObjToOth(fields)).One(&res)
+		if nil != err {
+			log.Println("FindByIdError", err)
+		}
+	}
+	return &res
+}
+
 //底层查询方法
 func Find(c, alias, db string, query interface{}, order interface{}, fields interface{}, single bool, start int, limit int) *[]map[string]interface{} {
 	sess := GetMgoConn(alias)

二進制
core/doc/表初步设计及功能划分.xlsx


+ 1 - 2
core/src/config.json

@@ -11,7 +11,7 @@
         "addr": "smtp.exmail.qq.com",
         "port": 465,
         "user": "qyfw@topnet.net.cn",
-        "pwd": "qy123456",
+        "pwd": "QYfw@123456",
         "fromuser": "企明星"
     },
     "sms": {
@@ -33,7 +33,6 @@
     "ocr_uid": "120.25.216.197",
     "ocr_servicekey": "c1608f6b-b507-46d4-98de-12e98f613715",
     "ocr_servicecode": "91f6a58d-e418-4e58-8ec2-61b583c55ba2",
-	"mongodbAlias":"A",
 	"entMongodbServers": "192.168.3.18:27090",
 	"entMongodbPoolSize": 5,
     "entMongodbName": "qfw",

+ 0 - 7
core/src/main.go

@@ -55,13 +55,6 @@ func init() {
 	mongodb.InitMongodbPool(SysConfig.MongodbPoolSize, SysConfig.Mongodbservers, SysConfig.MongodbName)
 	//企业mongodb初始化
 	conf := *new(mongodbutil.PoolConfig)
-	conf.Addr = SysConfig.Mongodbservers
-	conf.Alias = SysConfig.MongodbAlias
-	conf.DB = SysConfig.MongodbName
-	conf.Size = SysConfig.MongodbPoolSize
-	mongodbutil.Config = append(mongodbutil.Config, conf)
-
-	conf = *new(mongodbutil.PoolConfig)
 	conf.Addr = SysConfig.EntMongodbservers
 	conf.Alias = SysConfig.EntMongodbAlias
 	conf.DB = SysConfig.EntMongodbName

+ 0 - 1
core/src/qfw/coreconfig/SysConfig.go

@@ -12,7 +12,6 @@ type config struct {
 	MongodbPoolSize    int         `json:"mongodbPoolSize"`
 	MongodbName        string      `json:"mongodbName"`
 	Elasticsearch      string      `json:"elasticsearch"`
-	MongodbAlias       string      `json:"mongodbAlias"`
 	Smtp               smtp        `json:"smtp"`
 	Sms                sms         `json:"sms"`
 	Entrelation        entrelation `json:"entrelation”`

+ 0 - 1
core/src/qfw/coreutil/mail.go

@@ -11,7 +11,6 @@ import (
 func SendMail(tplcode /*模板代码*/, mailto /*接收人邮件地址*/, subject /*主题*/ string, arg ...interface{}) {
 	tpl := coreconfig.GetTemplate(tplcode)
 	content := fmt.Sprintf(tpl, arg...)
-	fmt.Println(coreconfig.SysConfig.Smtp.Addr)
 	mail.SendMail(&mail.MailAuth{
 		coreconfig.SysConfig.Smtp.Addr, coreconfig.SysConfig.Smtp.Port, coreconfig.SysConfig.Smtp.User, coreconfig.SysConfig.Smtp.Pwd}, &mail.Message{subject, coreconfig.SysConfig.Smtp.FromUser, []string{mailto}, content})
 }

+ 5 - 0
core/src/qfw/front/index.go

@@ -131,6 +131,11 @@ func (i *Index) GetWebSiteTop() error {
 		}
 		if audittype := i.GetSession("audittype"); audittype != nil && audittype == "y" {
 			i.DelSession("audittype")
+			if userId := i.GetSession("userId"); userId != nil {
+				Update("user", &map[string]interface{}{
+					"_id": ObjectIdHex(userId.(string)),
+				}, `{'$set':{'s_audittype':'n'}}`, false, false)
+			}
 			result["auditType"] = audittype.(string)
 			result["entId"] = i.GetSession("entid")
 			result["entName"] = i.GetSession("entname")

+ 55 - 43
core/src/qfw/manage/auditing.go

@@ -18,6 +18,7 @@ import (
 	credit "qfw/util/credit"
 	"qfw/util/elastic"
 	. "qfw/util/mongodb"
+	mongodbutil "qfw/util/mongodbutil"
 	. "qfw/util/msg"
 	"qfw/util/redis"
 	qrpc "qfw/util/rpc"
@@ -464,10 +465,10 @@ func (s *SystemManage) Updateaudit() error {
 		s_submitname := s.GetString("s_submitname")                 //提交者名称
 		i_identificationtype := s.GetString("i_identificationtype") //认证类型
 		s_id_new := s.GetString("s_id_new")                         //个人变更企业 更改前的企业注册号
-		s_enterprisename_new := s.GetString("s_enterprisename_new") //个人变更企业 更改前的企业名称
-		i_organizetype, _ := s.GetInt("i_organizetype")             //机构认证 机构类型
-		s_comauthenttype := s.GetString("s_comauthenttype")         //企业名片认证追加营业执照认证
-		i_comauthenttype, _ := s.GetInt("i_comauthenttype")         //企业名片认证追加营业执照认证类型
+		//s_enterprisename_new := s.GetString("s_enterprisename_new") //个人变更企业 更改前的企业名称
+		i_organizetype, _ := s.GetInt("i_organizetype")     //机构认证 机构类型
+		s_comauthenttype := s.GetString("s_comauthenttype") //企业名片认证追加营业执照认证
+		i_comauthenttype, _ := s.GetInt("i_comauthenttype") //企业名片认证追加营业执照认证类型
 		//s_mail := s.GetString("s_mail")                             //年报邮箱
 		data := make(M)
 		_status, _ := s.GetInteger("i_identificationstatus")
@@ -522,6 +523,7 @@ func (s *SystemManage) Updateaudit() error {
 			title = s_result
 			content = s_remark
 		} else {
+			_data4 := make(map[string]interface{})
 			data4 := make(map[string]interface{})
 			var query = ""
 			if s_id != "" {
@@ -531,7 +533,7 @@ func (s *SystemManage) Updateaudit() error {
 				//当审核通过的时候,根据企业名称查看企业表是否有数据
 				query = `{"EntName":"` + s_enterprisename + `"}`
 			}
-			t := Find("enterprise", query, nil, `{"_id":1}`, true, -1, -1)
+			t := mongodbutil.Find("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, query, nil, `{"_id":1}`, true, -1, -1)
 			ret := (*t)[0]
 			if nil != ret["_id"] {
 				//如果存在此企业,取出企业名称和企业id 更新企业表
@@ -560,9 +562,15 @@ func (s *SystemManage) Updateaudit() error {
 					i_identType = 1
 				}
 				tm := fmt.Sprintf("%d", time.Now().Unix())
-				Update("enterprise", &map[string]interface{}{
-					"_id": ObjectIdHex(s_enterpriseid),
-				}, `{'$set':{'s_action':'`+s_action+`','EntName':'`+s_enterprisename+`','RegNo':'`+s_id+`','s_submitid':'`+s_submitid+`','s_submitname':'`+s_submitname+`','l_submittime':`+tm+`}}`, false, false)
+				mongodbutil.Update("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, M{"_id": ret["_id"]}, M{"$set": M{"EntName": s_enterprisename}}, false, false)
+				Update("enterprise", M{"_id": ret["_id"]}, M{"$set": M{"_id": ret["_id"],
+					"RegNo":        s_id,
+					"s_action":     s_action,
+					"s_submitid":   s_submitid,
+					"s_submitname": s_submitname,
+					"l_submittime": tm,
+				}}, true, false)
+
 				elastic.UpdateEntDoc(s_enterpriseid)
 				if i_identificationtype == "5" {
 					per := FindOne("enterprise", M{"RegNo": s_id_new})
@@ -571,59 +579,60 @@ func (s *SystemManage) Updateaudit() error {
 						Del("enterprise", M{"RegNo": s_id_new})
 					}
 				}
-
 			} else {
 				if i_identificationtype == "5" {
+					s_enterpriseid = s.GetString("s_enterpriseid")
 					s_action = "01"              //是否已认证并判断认证类型-个人变更企业
-					data4["SourceType"] = "02"   //网站录入个人变更企业信息
+					_data4["SourceType"] = "02"  //网站录入个人变更企业信息
 					data4["s_action"] = s_action //是否已认证并判断认证类型-个人变更企业
-					var querynew = ""
-					if s_id_new != "" {
-						//当审核通过的时候,根据注册号查看企业表是否有数据
-						querynew = `{"RegNo":"` + s_id_new + `"}`
-					} else {
-						//当审核通过的时候,根据企业名称查看企业表是否有数据
-						querynew = `{"EntName":"` + s_enterprisename_new + `"}`
-					}
-					Update("enterprise", querynew, `{'$set':{'s_action':'`+s_action+`','s_submitid':'`+s_submitid+`','EntName':'`+s_enterprisename+`','RegNo':'`+s_id+`'}}`, false, false)
-					s_enterpriseid = s.GetString("s_enterpriseid")
+					var querynew = `{"_id":"` + s_enterpriseid + `"}`
+					_data4["EntName"] = s_enterprisename
+					_data4["RegNo"] = s_id
+					mongodbutil.Update("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, querynew, M{"$set": _data4}, false, false)
+					data4["RegNo"] = s_id
+					data4["s_action"] = s_action
+					data4["s_submitid"] = s_submitid
+					Update("enterprise", querynew, M{"$set": data4}, false, false)
 					elastic.UpdateEntDoc(s_enterpriseid)
-
 				} else {
+					//如果没有此企业,则把此企业保存到公式企业表里
+					_data4["EntName"] = s.GetString("s_enterprisename")    //企业名称
+					_data4["RegNo"] = s_id                                 //注册号
+					_data4["LeRep"] = s.GetString("s_legalrepresentative") //法定代表人
+					_data4["EstDate"], _ = s.GetInt("l_establishmentdate") //成立日期
+					_data4["Dom"] = s.GetString("s_enterpriseaddress")     //住所
 					//如果没有此企业,则把此企业保存到企业表里
-					data4["EntName"] = s.GetString("s_enterprisename")    //企业名称
-					data4["RegNo"] = s_id                                 //注册号
-					data4["LeRep"] = s.GetString("s_legalrepresentative") //法定代表人
-					data4["EstDate"], _ = s.GetInt("l_establishmentdate") //成立日期
-					data4["Dom"] = s.GetString("s_enterpriseaddress")     //住所
-					data4["i_organizetype"] = i_organizetype              //组织机构类型
-					data4["s_pic"] = s.GetString("s_pic")                 //组织机构代码证
-					rel := s.GetString("l_submitdate")                    //提交审核时间
+					data4["RegNo"] = s_id
+					data4["i_organizetype"] = i_organizetype //组织机构类型
+					data4["s_pic"] = s.GetString("s_pic")    //组织机构代码证
+					rel := s.GetString("l_submitdate")       //提交审核时间
 					tim, _ := time.ParseInLocation("2006-01-02 15:04:05", rel, time.Local)
 					data4["l_submitdate"] = tim.Unix()
 					data4["s_submitname"] = s.GetString("s_submitname")
 					data4["s_submitid"] = s_submitid
 					data4["l_submittime"] = time.Now().Unix() //审核时间
 					if i_identificationtype == "1" {
-						data4["SourceType"] = "02" //网站录入企业认证信息
-						data4["s_action"] = "01"   //是否已认证并判断认证类型-企业认证
+						_data4["SourceType"] = "02" //网站录入企业认证信息
+						data4["s_action"] = "01"    //是否已认证并判断认证类型-企业认证
 						i_identType = 1
 					} else if i_identificationtype == "2" {
-						data4["SourceType"] = "03" //网站录入个人认证信息
-						data4["s_action"] = "02"   //是否已认证并判断认证类型-个人认证
+						_data4["SourceType"] = "03" //网站录入个人认证信息
+						data4["s_action"] = "02"    //是否已认证并判断认证类型-个人认证
 						i_identType = 2
 					} else if i_identificationtype == "3" {
-						data4["SourceType"] = "04" //网站录入机构认证信息
-						data4["s_action"] = "03"   //是否已认证并判断认证类型-机构认证
+						_data4["SourceType"] = "04" //网站录入机构认证信息
+						data4["s_action"] = "03"    //是否已认证并判断认证类型-机构认证
 						i_identType = 3
 					} else if i_identificationtype == "4" {
 						//data4["SourceType"] = "03" //网站录入商家名称变更信息
 						data4["s_action"] = "02" //是否已认证并判断认证类型-商家名称变更
 						i_identType = 2
 					}
-					i := Save("enterprise", data4)
-					elastic.UpdateEntDoc(i)
-					s_enterpriseid = i
+					_data4_id := mongodbutil.Save("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, _data4)
+					data4["_id"] = ObjectIdHex(_data4_id)
+					Update("enterprise", `{"_id":"`+_data4_id+`"}`, M{"$set": data4}, true, false)
+					elastic.UpdateEntDoc(_data4_id)
+					s_enterpriseid = _data4_id
 				}
 			}
 			//根据提交人id更新到user表中
@@ -632,9 +641,12 @@ func (s *SystemManage) Updateaudit() error {
 			data1["freezeremark"] = freezeremark
 			data1["s_enterprisename"] = s_enterprisename
 			data1["s_enterpriseid"] = s_enterpriseid
-			data1["i_identificationway"] = 1             //user表默认=0,审核通过标志=1,审核不通过标志=-1,审核中标志=2
-			data1["s_role"] = "9"                        //权限设为企业管理员
-			data1["s_audittype"] = "y"                   //作为认证后第一次登录的标识
+			data1["i_identificationway"] = 1 //user表默认=0,审核通过标志=1,审核不通过标志=-1,审核中标志=2
+			data1["s_role"] = "9"            //权限设为企业管理员
+			//作为认证后第一次登录的标识
+			if i_identificationtype == "1" || i_identificationtype == "2" || i_identificationtype == "3" {
+				data1["s_audittype"] = "y"
+			}
 			data1["i_comauthenttype"] = i_comauthenttype //user企业认证是名片认证和营业执照认证
 			data1["s_audit_record_id"] = _id
 			if i_identificationtype == "5" {
@@ -784,7 +796,7 @@ func (s *SystemManage) Updateaudit() error {
 					}
 					member.UpdateSession(s.Action, r)
 				}, func(e interface{}) {})
-				redis.Del("enterprise", "enterpriseInfo_"+s_enterpriseid, "enterpriseInfo_user_"+s_enterpriseid)
+				redis.Del("enterprise", "enterpriseInfo_"+s_enterpriseid)
 			}()
 		} else {
 			flag = "false"
@@ -792,7 +804,7 @@ func (s *SystemManage) Updateaudit() error {
 		}
 		//认证送积分
 		if flag == "true" && _status == 1 {
-			b, credit_a, score, _ := credit.InCreditA(s_submitid, credit.A_RZ, util.IntAll((*f)["credit_a"]))
+			b, credit_a, score, _ := credit.InCreditA(s_submitid, credit.A_RZ, util.Int64All((*f)["credit_a"]))
 			if b {
 				s.Session().UpdateByCustomField("id", s_submitid, "i_credit", util.IntAll((*f)["i_credit"])+score)
 				s.Session().UpdateByCustomField("id", s_submitid, "credit_a", credit_a)

+ 3 - 3
core/src/qfw/member/bidmanage.go

@@ -206,7 +206,7 @@ func (d *BidManage) ChangeStatus() error {
 			if status == 3 {
 				param := make(map[string]interface{})
 				param["objid"] = wtb["s_userid"].(string)
-				credit_a := util.IntAll(d.GetSession("credit_a"))
+				credit_a := util.Int64All(d.GetSession("credit_a"))
 				//log.Println("选标", credit.AIsHasDo(credit.A_WCJY, credit_a), userId, param["objid"])
 				if credit.AIsHasDo(credit.A_WCJY, credit_a) {
 					credit.UpuserCreditSession(userId, credit.C_JY, "B", param, d.Action)
@@ -216,8 +216,8 @@ func (d *BidManage) ChangeStatus() error {
 				}
 				//判断对方是否完成一次性任务
 				rr := *FindById("user", param["objid"].(string), nil)
-				if !credit.AIsHasDo(credit.A_WCJY, util.IntAll(rr["credit_a"])) {
-					b, credit_a, score, _ := credit.InCreditA(param["objid"].(string), credit.A_WCJY, util.IntAll(rr["credit_a"]))
+				if !credit.AIsHasDo(credit.A_WCJY, util.Int64All(rr["credit_a"])) {
+					b, credit_a, score, _ := credit.InCreditA(param["objid"].(string), credit.A_WCJY, util.Int64All(rr["credit_a"]))
 					if b {
 						d.Session().UpdateByCustomField("id", param["objid"].(string), "credit_a", credit_a)
 						d.Session().UpdateByCustomField("id", param["objid"].(string), "i_credit", util.IntAll(rr["i_credit"])+score)

+ 2 - 2
core/src/qfw/member/credit/creditdetail.go

@@ -33,7 +33,7 @@ func (c *credit) MyCredit() error {
 	if len(userId) > 0 {
 		user := *mongodb.FindById("user", userId, nil)
 		c.T["user"] = user
-		credit_a := util.IntAll(user["credit_a"])
+		credit_a := util.Int64All(user["credit_a"])
 		b := cd.AAllIsHasDo(credit_a)
 		u := c.Header("User-Agent")
 		if strings.Index(u, "Mobile") > -1 {
@@ -104,7 +104,7 @@ func (c *credit) InCreditAjx() error {
 	result := make(M)
 	result["result"] = "n"
 	if len(userId) > 0 {
-		credit_a := util.IntAll(c.GetSession("credit_a"))
+		credit_a := util.Int64All(c.GetSession("credit_a"))
 		param := c.GetString("param")
 		//分享服务
 		if param == "fx" {

+ 2 - 3
core/src/qfw/member/memberindex.go

@@ -147,7 +147,7 @@ func (m *MemberIndex) ModifySellerNamePs() error {
 		data := make(M)
 		data["i_identificationstatus"] = 2
 		data["i_identificationtype"] = 4
-		data["s_submitname"] = m.Session().Get("nickName")
+		data["s_submitname"] = m.GetSession("userName")
 		data["s_submitid"] = userId
 		data["s_enterprisename_new"] = cname
 		data["l_submitdate"] = time.Now().Unix()
@@ -212,7 +212,6 @@ func (m *MemberIndex) CheckPersonalStatus() error {
 			ist := util.IntAll(mobj["i_identificationstatus"]) //审核
 			it := util.IntAll(mobj["i_identificationtype"])
 			cty := util.IntAll(mobj["i_comauthenttype"]) //企业认证类型:1营业执照,2名片,3年报邮箱
-			s_tid := mobj["s_enterpriseid"].(string)
 			b := false
 			info := ""
 			otherinfo := ""
@@ -271,7 +270,7 @@ func (m *MemberIndex) CheckPersonalStatus() error {
 					m.ServeJson(&map[string]string{
 						"type": "4",
 						"cty":  fmt.Sprintf("%d", cty),
-						"url":  "/member/yellowpage/show/enterprise/" + s_tid,
+						"url":  "/member/enterprise/show",
 					})
 				}
 			}

+ 27 - 35
core/src/qfw/member/membermanager.go

@@ -149,7 +149,7 @@ func autoAuth(uid, uname, s_avatar, entid, promotion_id string) {
 
 				Update("enterprise", `{"_id":"`+entid+`"}`, `{'$set':{'s_action':'01','s_avatar':'`+s_avatar+`','s_submitid':'`+uid+`'}}`, false, false)
 				elastic.UpdateEntDoc(entid)
-				redis.Del("enterprise", "enterpriseInfo_"+entid, "enterpriseInfo_user_"+entid)
+				redis.Del("enterprise", "enterpriseInfo_"+entid)
 			}()
 		}
 	}
@@ -217,7 +217,6 @@ func (m *Member) GetLogin(key string) error {
 			}
 			if bcon {
 				UpdateCookieSession(m.Action, "s_name", false, *user)
-				updateAudittype(m.Action, user)
 				flag := 0
 				if redis.GetStr("sso", "new_"+key) == res {
 					flag = 1
@@ -425,58 +424,51 @@ func (m *Member) RegisterComplete() error {
 	return m.Render("/member/registercomplete.html", &m.T)
 }
 
-func updateAudittype(action *xweb.Action, r *map[string]interface{}) {
-	if action.GetSession("audittype") == "y" {
-		Update("user", &map[string]interface{}{
-			"_id": ObjectIdHex(strings.Split(fmt.Sprintf("%s", (*r)["_id"]), `"`)[1]),
-		}, `{'$set':{'s_audittype':'n'}}`, false, false)
-	}
-}
-
 //登录
 func (m *Member) Login() {
 	var status string = "n"
-	var info, freeze, code string
+	var entId interface{}
+	var userType, freeze, identWay int
 	s_pwd := m.GetString("s_pwd") //密码
 	if s_pwd != "" {              //密码为空不可登录
-		var loginType string            //登录类型
 		s_name := m.GetString("s_name") //用户名
 		r := FindOne("user", M{"$or": []M{M{"s_name": s_name}, M{"s_phone": s_name}, M{"s_email": s_name}}})
 		if r == nil || len(*r) == 0 {
-			info = "s_error" //用户不存在
+			status = "s_error" //用户不存在
 		} else {
-			if s_name == (*r)["s_name"].(string) {
-				loginType = "s_name"
-			} else if (*r)["s_phone"] != nil && s_name == (*r)["s_phone"].(string) {
-				loginType = "s_phone" //手机登录
-			} else if (*r)["s_email"] != nil && s_name == (*r)["s_email"].(string) {
-				loginType = "s_email" //邮箱登录
-			}
 			if GetMd5String(s_pwd) != (*r)["s_pwd"] {
-				info = "p_error" //密码错误
+				status = "p_error" //密码错误
 			} else {
+				var loginType string //登录类型
+				status = "y"
+				if s_name == (*r)["s_name"].(string) {
+					loginType = "s_name"
+				} else if (*r)["s_phone"] != nil && s_name == (*r)["s_phone"].(string) {
+					loginType = "s_phone" //手机登录
+				} else if (*r)["s_email"] != nil && s_name == (*r)["s_email"].(string) {
+					loginType = "s_email" //邮箱登录
+				}
 				//获取绑定企业信息
-				if (*r)["s_enterpriseid"] != nil && (*r)["s_enterpriseid"].(string) != "" {
-					code = (*r)["s_enterpriseid"].(string)
-					//enter := *FindOne("enterprise", `M{"_id":"`+r["s_enterpriseid"].(string)+`"}`)
-					enter := *FindById("enterprise", (*r)["s_enterpriseid"].(string), nil)
+				identWay = IntAll((*r)["i_identificationway"])
+				entId = (*r)["s_enterpriseid"]
+				if identWay == 1 && entId != nil && entId.(string) != "" {
+					enter := *FindById("enterprise", entId.(string), `{"_id":-1,"OpLocDistrict":1}`)
 					if enter != nil && enter["OpLocDistrict"] != nil {
 						(*r)["opLocDistrict"] = enter["OpLocDistrict"]
 					}
 				}
-				status = strconv.Itoa((*r)["i_type"].(int)) //用户类型
-				freeze = fmt.Sprint((*r)["i_freeze"])       //冻结状态
-				if freeze != "2" {
+				userType = IntAll((*r)["i_type"]) //用户类型
+				freeze = IntAll((*r)["i_freeze"]) //冻结状态
+				if freeze != 2 {
 					//更新session、cookie
 					UpdateCookieSession(m.Action, loginType, m.GetString("rememberMe") == "y", *r)
 				}
-				updateAudittype(m.Action, r)
 			}
 		}
 	} else {
-		info = "p_error" //密码错误
+		status = "p_error" //密码错误
 	}
-	m.Write("{\"info\":\"" + info + "\",\"status\":\"" + status + "\",\"freeze\":\"" + freeze + "\",\"code\":\"" + code + "\"}")
+	m.ServeJson(M{"status": status, "freeze": freeze, "identWay": identWay, "userType": userType, "entId": entId})
 }
 
 //找回密码之后直接登录
@@ -878,7 +870,7 @@ func (m *Member) Bindmail() error {
 				bol := Update("user", M{"_id": ObjectIdHex(m.GetSession("userId").(string))}, M{"$set": updateMap}, false, false)
 				if bol {
 					//绑邮箱送积分
-					if !credit.AIsHasDo(credit.A_BYX, IntAll(m.GetSession("credit_a"))) {
+					if !credit.AIsHasDo(credit.A_BYX, Int64All(m.GetSession("credit_a"))) {
 						credit.UpuserCreditSession(usid, credit.A_BYX, "A", nil, m.Action)
 					}
 					//邮箱绑定认证
@@ -888,7 +880,7 @@ func (m *Member) Bindmail() error {
 						if len(r) > 0 && ac == "" {
 							autoAuth(usid, uname, avatar, entid, proid)
 							//认证送积分
-							credit.InCreditA(usid, credit.A_RZ, IntAll(m.GetSession("credit_a")))
+							credit.InCreditA(usid, credit.A_RZ, Int64All(m.GetSession("credit_a")))
 							//发系统消息
 							msg := &msg.Msg{
 								Msgtype:   1,
@@ -966,7 +958,7 @@ func (m *Member) Bindphone() error {
 				bol := Update("user", M{"_id": ObjectIdHex(m.GetSession("userId").(string))}, M{"$set": updateMap}, false, false)
 				if bol {
 					//绑手机送积分
-					if !credit.AIsHasDo(credit.A_BSJ, IntAll(m.GetSession("credit_a"))) {
+					if !credit.AIsHasDo(credit.A_BSJ, Int64All(m.GetSession("credit_a"))) {
 						credit.UpuserCreditSession(m.GetSession("userId").(string), credit.A_BSJ, "A", nil, m.Action)
 					}
 					UpdateCookieSession(m.Action, m.GetSession("loginType").(string), false, *FindById("user", m.GetSession("userId").(string), nil))
@@ -1131,7 +1123,7 @@ func UpdateSession(action *xweb.Action, r map[string]interface{}) {
 		setSessMap["identType"] = IntAll(r["i_identificationtype"])
 		setSessMap["identWay"] = IntAll(r["i_identificationway"])
 		setSessMap["opLocDistrict"] = r["opLocDistrict"]
-		setSessMap["credit_a"] = IntAll(r["credit_a"])
+		setSessMap["credit_a"] = Int64All(r["credit_a"])
 		setSessMap["i_credit"] = IntAll(r["i_credit"])
 		if r["s_phone"] == nil || r["s_phone"].(string) == "" {
 			setSessMap["phone"] = ""

+ 3 - 3
core/src/qfw/member/ordermanage.go

@@ -76,7 +76,7 @@ func (o *OrderManage) ChangeStatus() error {
 		if flag && status == 3 {
 			param := make(map[string]interface{})
 			param["objid"] = (*r)["s_editorid"]
-			credit_a := util.IntAll(o.GetSession("credit_a"))
+			credit_a := util.Int64All(o.GetSession("credit_a"))
 			userId := util.ObjToString(o.GetSession("userId"))
 			//log.Println("预约", credit.AIsHasDo(credit.A_WCJY, credit_a), userId, param["objid"])
 			if credit.AIsHasDo(credit.A_WCJY, credit_a) {
@@ -87,8 +87,8 @@ func (o *OrderManage) ChangeStatus() error {
 			}
 			//判断对方是否完成一次性任务
 			rr := *FindById("user", param["objid"].(string), nil)
-			if !credit.AIsHasDo(credit.A_WCJY, util.IntAll(rr["credit_a"])) {
-				b, credit_a, score, _ := credit.InCreditA(param["objid"].(string), credit.A_WCJY, util.IntAll(rr["credit_a"]))
+			if !credit.AIsHasDo(credit.A_WCJY, util.Int64All(rr["credit_a"])) {
+				b, credit_a, score, _ := credit.InCreditA(param["objid"].(string), credit.A_WCJY, util.Int64All(rr["credit_a"]))
 				if b {
 					o.Session().UpdateByCustomField("id", param["objid"].(string), "credit_a", credit_a)
 					o.Session().UpdateByCustomField("id", param["objid"].(string), "i_credit", util.IntAll(rr["i_credit"])+score)

+ 105 - 101
core/src/qfw/member/yellowpage.go

@@ -6,7 +6,6 @@ package member
 
 import (
 	"fmt"
-	"github.com/bluemonday-master"
 	"github.com/go-xweb/xweb"
 	"gopkg.in/mgo.v2/bson"
 	"log"
@@ -30,17 +29,17 @@ import (
 type K map[string]interface{}
 type Yellowpage struct {
 	*xweb.Action
-	editEnterprise xweb.Mapper `xweb:"/member/yellowpage/edit/enterprise/(\\w+)"`  //编辑
-	dosave         xweb.Mapper `xweb:"/member/yellowpage/dosave/enterprise"`       //保存企业黄页信息
-	showEnterprise xweb.Mapper `xweb:"/member/yellowpage/show/enterprise/(\\w+)"`  //显示企黄页信息
-	showService    xweb.Mapper `xweb:"/member/yellowpage/show/showService/(\\w+)"` //显示添加服务页面
-	editService    xweb.Mapper `xweb:"/member/yellowpage/edit/showService/(\\w+)"` //编辑服务页面
-	updateEntLogo  xweb.Mapper `xweb:"POST /member/yellowpage/updateEntLogo"`      //修改企业logo
+	editEnterprise xweb.Mapper `xweb:"/member/enterprise/edit"`              //编辑
+	showEnterprise xweb.Mapper `xweb:"/member/enterprise/show"`              //显示企黄页信息
+	dosave         xweb.Mapper `xweb:"/member/yellowpage/dosave/enterprise"` //保存企业黄页信息
+	upLoadEntImg   xweb.Mapper `xweb:"POST /member/yellowpage/upLoadEntImg"` //上传企业相关图片
 
 	addService    xweb.Mapper `xweb:"/member/yellowpage/add/service/addservice"` //增加服务
 	delservice    xweb.Mapper `xweb:"POST /member/service/delservice"`           //删除数据
 	findservice   xweb.Mapper `xweb:"POST /member/service/findservice"`          //查找要修改数据
 	removeservice xweb.Mapper `xweb:"POST /member/service/removeservice"`        //下架服务
+
+	follow xweb.Mapper `xweb:"POST /member/enterprise/follow"` //关注企业
 }
 
 const ESTYPE string = "enterprise"
@@ -166,103 +165,71 @@ func (u *Yellowpage) Removeservice() error {
 	return nil
 }
 
-//编辑企业黄页的信息
-func (yp *Yellowpage) EditEnterprise(id string) error {
-	//判断用户是否登录,如果没有登录直接返回首页
-	if yp.GetSession("userId") == nil {
-		return yp.Redirect("/")
-	}
-	id = strings.Split(id, "#")[0]
-
-	yp.T["entinfo"] = yps.GetEntInfo(id)
-
-	yp.T["entid"] = id
-
-	return yp.Render("/member/editenterprise.html", &yp.T)
-}
-
-//保存企业黄页的信息
-func (yp *Yellowpage) Dosave() error {
-	var info string = "保存成功"
-	var status string = "y"
-	//判断用户是否登录,如果没有登录直接返回首页
-	if yp.GetSession("userId") == nil {
-		return yp.Redirect("/")
-	}
-
-	data := make(map[string]interface{})
-
-	var entid string = yp.GetString("id")
-	//过滤XSS
-	s_synopsis := Repl(yp.GetStringComm("s_synopsis"))
-
-	html := strings.ToLower(s_synopsis)
-	p := bluemonday.UGCPolicy()
-	p.AllowElements("s", "blockquote", "sup", "sub", "ol", "li", "ul", "b", "div", "strong", "p", "table", "span", "em", "u", "td", "tr", "tbody", "th", "thead", "i")
-	p.AllowAttrs("style", "align", "width", "height").OnElements("s", "blockquote", "sup", "sub", "ol", "li", "ul", "b", "div", "strong", "p", "table", "span", "em", "u", "td", "tr", "tbody", "th", "thead", "i")
-
-	html = p.Sanitize(html)
-	s_synopsis = html
-
-	data["s_synopsis"] = s_synopsis
-
-	data["s_persion"] = Repl(yp.GetString("s_persion"))
-	data["s_mobile"] = Repl(yp.GetString("s_mobile"))
-	data["s_enturl"] = Repl(yp.GetString("s_enturl"))
-	data["s_qq"] = Repl(yp.GetString("s_qq"))
-	data["s_weixin"] = Repl(yp.GetString("s_weixin"))
-	images := yp.GetString("imgurl")
-	//上传二维码图片
-	if len(images) > 0 {
-		data["s_weixinbarcode"] = images
-	}
-	province, _ := yp.GetInt("province")
-	data["i_province"] = province
-	city, _ := yp.GetInt("city")
-	data["i_city"] = city
-	area, _ := yp.GetInt("area")
-	data["i_area"] = area
-	data["s_address"] = Repl(yp.GetString("s_address"))
-
-	dataSet := map[string]interface{}{
-		"$set": data,
-	}
-	//向mongodb库中写数据
-	flag := mongodb.Update(ESTYPE, "{'_id':'"+entid+"'}", &dataSet, false, false)
-	redis.Del("enterprise", "enterpriseInfo_"+entid)
-	redis.Del("enterprise", "enterpriseInfo_user_"+entid)
-	elastic.UpdateNewDoc("enterprise", "enterprise", mongodb.FindById("enterprise", entid, nil))
-	redis.DelByCodePattern("enterprise", "ipcity_*")
-	if !flag {
-		status = "n"
-		info = "保存信息失败"
-	} else { //首次创建企业名片,送积分
-		if !credit.AIsHasDo(credit.A_CJMP, util.IntAll(yp.GetSession("credit_a"))) {
-			credit.UpuserCreditSession(util.ObjToString(yp.GetSession("userId")), credit.A_CJMP, "A", nil, yp.Action)
-		}
+//我的黄页
+func (yp *Yellowpage) ShowEnterprise() error {
+	//判断用户是否审核通过
+	if checkuser(yp) == false {
+		return yp.Redirect("/member/accountset/index", http.StatusFound)
 	}
-	return yp.Write("{\"info\":\"" + info + "\",\"status\":\"" + status + "\"}")
+	return yps.CommonEntInfo(yp.Action, yp.GetSession("entid").(string), 1, false)
 }
 
-//用户登录后转到黄页选择模板与编辑黄页界面
-func (yp *Yellowpage) ShowEnterprise(id string) error {
-	if yp.GetSession("userId") == nil {
-		return yp.Redirect("/")
-	}
+//编辑企业黄页的信息
+func (yp *Yellowpage) EditEnterprise() error {
 	//判断用户是否审核通过
 	if checkuser(yp) == false {
 		return yp.Redirect("/member/accountset/index", http.StatusFound)
 	}
-	id = strings.Split(id, "#")[0]
-
-	yp.T["entinfo"] = yps.GetEntInfo(id)
-
-	yp.T["entid"] = id
-	yp.T["serviceClassify"] = coreconfig.ServiceClassify
+	return yps.CommonEntInfo(yp.Action, yp.GetSession("entid").(string), 2, false)
+}
 
-	opLocD := yp.GetSession("opLocDistrict")
-	yp.T["opLocDistrict"] = opLocD
-	return yp.Render("/member/showenterprise.html", &yp.T)
+//保存企业黄页的信息
+func (yp *Yellowpage) Dosave() error {
+	status := "n"
+	s_persion := Repl(yp.GetString("s_persion"))
+	//联系人不能为空
+	if s_persion == "" {
+		status = "personError"
+	} else {
+		data := make(map[string]interface{})
+		data["s_persion"] = s_persion
+		entid := yp.GetSession("entid").(string)
+		data["s_persion"] = Repl(yp.GetString("s_persion"))
+		data["s_mobile"] = Repl(yp.GetString("s_mobile"))
+		data["s_enturl"] = Repl(yp.GetString("s_enturl"))
+		data["s_qq"] = Repl(yp.GetString("s_qq"))
+		data["s_weixin"] = Repl(yp.GetString("s_weixin"))
+		data["s_email"] = Repl(yp.GetString("s_email"))
+		province, _ := yp.GetInt("i_province")
+		data["i_province"] = province
+		city, _ := yp.GetInt("i_city")
+		data["i_city"] = city
+		area, _ := yp.GetInt("i_area")
+		data["i_area"] = area
+		data["s_address"] = Repl(yp.GetString("s_address"))
+		dataSet := map[string]interface{}{
+			"$set": data,
+		}
+		//向mongodb库中写数据
+		if mongodb.Update(ESTYPE, "{'_id':'"+entid+"'}", &dataSet, false, false) {
+			status = "y"
+			go func() {
+				util.Try(func() {
+					redis.Del("enterprise", "enterpriseInfo_"+entid)
+					redis.DelByCodePattern("enterprise", "ipcity_*")
+					elastic.UpdateEntDoc(entid)
+					//首次创建企业名片,送积分
+					if !credit.AIsHasDo(credit.A_CJMP, util.Int64All(yp.GetSession("credit_a"))) {
+						credit.UpuserCreditSession(util.ObjToString(yp.GetSession("userId")), credit.A_CJMP, "A", nil, yp.Action)
+					}
+				}, func(e interface{}) {
+					log.Println(e)
+				})
+			}()
+		}
+	}
+	yp.ServeJson(&map[string]interface{}{"status": status})
+	return nil
 }
 
 //显示增加编辑服务页面
@@ -435,7 +402,7 @@ func (yp *Yellowpage) AddService() error {
 		tempFlag = len(_id) > 0
 		//发服务送积分
 		if tempFlag {
-			if credit.AIsHasDo(credit.A_FFW, util.IntAll(yp.GetSession("credit_a"))) {
+			if credit.AIsHasDo(credit.A_FFW, util.Int64All(yp.GetSession("credit_a"))) {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.B_FFW, "B", nil, yp.Action)
 			} else {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.A_FFW, "A", nil, yp.Action)
@@ -452,7 +419,6 @@ func (yp *Yellowpage) AddService() error {
 	if tempFlag {
 		//删除缓存信息
 		redis.Del("enterprise", "enterpriseInfo_"+enterpriseid)
-		redis.Del("enterprise", "enterpriseInfo_user_"+enterpriseid)
 		redis.DelByCodePattern("enterprise", "service-"+enterpriseid+"-*")
 		//将数据存到elastic中
 		flag2 := elastic.UpdateNewDoc("service", "service", doc)
@@ -636,12 +602,20 @@ func checkuser(yp *Yellowpage) bool {
 }
 
 //上传企业logo
-func (yp *Yellowpage) UpdateEntLogo() error {
+func (yp *Yellowpage) UpLoadEntImg() error {
 	//更新企业logo
 	entid := yp.GetSession("entid").(string)
-	bol := mongodb.Update("enterprise", "{'_id':'"+entid+"'}", map[string]interface{}{"$set": map[string]interface{}{"s_avatar": yp.GetString("url")}}, false, false)
+	field := yp.GetString("field")
+	if field == "s_avatar" {
+		field = "s_avatar"
+	} else {
+		field = "s_qrcode"
+	}
+	bol := mongodb.Update("enterprise", "{'_id':'"+entid+"'}", map[string]interface{}{"$set": map[string]interface{}{field: yp.GetString("url")}}, false, false)
 	redis.Del("enterprise", "enterpriseInfo_"+entid, "newIndentEnts")
-	redis.DelByCodePattern("enterprise", "ipcity_*")
+	if field == "s_avatar" {
+		redis.DelByCodePattern("enterprise", "ipcity_*")
+	}
 	if bol {
 		elastic.UpdateEntDoc(entid)
 		return yp.Write("y")
@@ -649,3 +623,33 @@ func (yp *Yellowpage) UpdateEntLogo() error {
 		return yp.Write("n")
 	}
 }
+
+//关注企业
+func (yp *Yellowpage) Follow() error {
+	entId := yp.GetString("entId")
+	flag, _ := yp.GetBool("flag")
+	userId := yp.GetSession("userId").(string)
+	status := "n"
+	if flag {
+		if mongodb.Del("follow-enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`) {
+			status = "y"
+		}
+	} else {
+		userInfo := yp.GetSession("userInfo").(*map[string]interface{})
+		s_m_openId := (*userInfo)["s_m_openid"]
+		if mongodb.Count("follow-enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`) >= 10 {
+			status = "m"
+		} else {
+			if len(mongodb.Save("follow-enterprise", bson.M{
+				"s_userid":     userId,
+				"s_entid":      entId,
+				"s_m_openid":   s_m_openId,
+				"l_createdate": time.Now().Unix(),
+			})) > 0 {
+				status = "y"
+			}
+		}
+	}
+	yp.ServeJson(bson.M{"status": status})
+	return nil
+}

+ 16 - 6
core/src/qfw/microwebsite/microwebsite.go

@@ -9,10 +9,12 @@ import (
 	"encoding/json"
 	"github.com/go-xweb/xweb"
 	. "gopkg.in/mgo.v2/bson"
+	. "qfw/coreconfig"
 	. "qfw/util"
 	elastic "qfw/util/elastic"
 	"qfw/util/fsw"
 	. "qfw/util/mongodb"
+	mongodbutil "qfw/util/mongodbutil"
 	"qfw/util/redis"
 	"strings"
 	"time"
@@ -173,12 +175,13 @@ func (m *MicroWebsite) Preview(entId string) error {
  */
 func getDetail(entId string, m *MicroWebsite) bool {
 	//企业查询
+	_e := mongodbutil.FindOneByField("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, "{'_id':'"+entId+"'}", `{"EntName":1}`)
 	e := *FindOne("enterprise", "{'_id':'"+entId+"'}")
 	if e == nil {
 		return false
 	}
+	m.T["EntName"] = (*_e)["EntName"]           //企业名
 	m.T["entId"] = entId                        //企业id
-	m.T["EntName"] = e["EntName"]               //企业名
 	m.T["s_persion"] = e["s_persion"]           //联系人
 	m.T["s_mobile"] = e["s_mobile"]             //手机号
 	m.T["s_address"] = e["s_address"]           //地址
@@ -229,15 +232,16 @@ func (m *MicroWebsite) AjaxPorcess() error {
 			break
 		case 2:
 			if EntName := fsw.Repl(m.GetString("EntName")); EntName != "" {
-				entObj["EntName"] = fsw.Repl(m.GetString("EntName")) //修改企业名称
+				mongodbutil.Update("enterprise", SysConfig.EntMongodbAlias, SysConfig.EntMongodbName, "{'_id':'"+entId+"'}", M{"$set": M{"EntName": fsw.Repl(m.GetString("EntName"))}}, false, false) //修改企业名称
 			}
 			entObj["s_synopsis"] = fsw.Repl(m.GetStringComm("s_synopsis")) //修改企业简介
 			break
 		}
-		//修改企业信息
-		if len(entObj) > 0 && Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": entObj}, false, false) {
-			elastic.UpdateEntDoc(entId) //更新该企业的elastic数据
+		if len(entObj) > 0 {
+			Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": entObj}, false, false)
 		}
+		//修改企业信息
+		elastic.UpdateEntDoc(entId) //更新该企业的elastic数据
 	} else if reqType == "addService" {
 		tempId := m.GetString("tempId")
 		serviceObj := make(M)
@@ -297,7 +301,13 @@ func (m *MicroWebsite) AjaxPorcess() error {
 			elastic.DelById("service", "service", _id) //删除该企业的elastic数据
 		}
 	} else if reqType == "entImg" { //修改企业logo
-		b := Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": M{m.GetString("field"): m.GetString("src")}}, false, false)
+		field := m.GetString("field")
+		if field == "s_avatar" {
+			field = "s_avatar"
+		} else {
+			field = "s_qrcode"
+		}
+		b := Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": M{field: m.GetString("src")}}, false, false)
 		if b {
 			elastic.UpdateEntDoc(entId) //更新该企业的elastic数据
 			result["status"] = "y"

+ 4 - 7
core/src/qfw/mobile/wxmenu.go

@@ -31,11 +31,8 @@ func (m *Mobile) Guide(sign string) error {
 	m.T["signature"] = GetSignature(m.Action)
 	m.T["shareid"] = cutil.FindMyShareId("topjy", m.Session().Get("s_m_openid").(string))
 	m.T["sign"] = sign
-	log.Println("----------------")
-	log.Println(sign)
 	if sign == "other" {
 		userInfo := mongodb.FindById("user", m.GetSession("userId").(string), `{"o_msgset":1}`)
-		log.Println(userInfo)
 		m.T["msgset"] = (*userInfo)["o_msgset"]
 	}
 	if sign == "share" {
@@ -207,7 +204,7 @@ func (m *Mobile) SwordfishPay() error {
 						}
 						//i_credit -= len(isPay) * 1000
 						if i_credit >= 0 {
-							credit_a := util.IntAll(m.GetSession("credit_a"))
+							credit_a := util.Int64All(m.GetSession("credit_a"))
 							b := false
 							if b, _ = credit.OutCreditB(userId.(string), strings.Join(mapCode, ","), util.ObjToString(m.GetSession("s_m_openid")), 0, isPay, m.Action); b {
 								//先扣分,然后更新,然后返回结果
@@ -324,10 +321,10 @@ func (m *Mobile) AjaxReq() error {
 			}
 			//更新数据库
 			msgset["l_modifydate"] = time.Now().Unix()
-			
+
 			if mongodb.Update("user", `{"_id":"`+userId.(string)+`"}`, &map[string]interface{}{"$set": set}, false, false) {
 				flag = "y"
-			/**
+				/**
 				credit_a := util.Int64All(m.GetSession("credit_a"))
 				if !credit.AIsHasDo(credit.A_JYSCTS, credit_a) && len(mapPush) > 0 {
 					util.Try(func() {
@@ -350,7 +347,7 @@ func (m *Mobile) AjaxReq() error {
 				}
 				**/
 			}
-			
+
 		}
 		break
 	}

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

@@ -4,6 +4,7 @@ import (
 	"encoding/base64"
 	"encoding/json"
 	"fmt"
+	"github.com/go-xweb/httpsession"
 	"github.com/go-xweb/xweb"
 	"gopkg.in/mgo.v2/bson"
 	"html/template"
@@ -158,13 +159,13 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 		}
 		//查询生成列表数据
 		data, pagination := searhWebContentent(querymap, n, reqType)
-
+		appendFollow(data, n.Session())
 		//查询送积分
 		queryStr := querymap["query"]
 		if len(queryStr) > 0 {
 			userId := ObjToString(n.GetSession("userId"))
 			if len(userId) > 0 {
-				credit_a := IntAll(n.GetSession("credit_a"))
+				credit_a := Int64All(n.GetSession("credit_a"))
 				if credit.AIsHasDo(credit.A_QYCX, credit_a) {
 					credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
 				} else {
@@ -182,6 +183,7 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 
 		json.Unmarshal(bs, &querymap)
 		data, pagination := searhWebContentent(querymap, n, reqType)
+		appendFollow(data, n.Session())
 		n.Render("/search/enterpriseList.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
 	}
 	return nil
@@ -189,6 +191,23 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 	//return n.Render("/search/entcommunity.html")
 	//}
 }
+func appendFollow(data *[]map[string]interface{}, session *httpsession.Session) {
+	userId := session.Get("userId")
+	if userId == nil {
+		return
+	}
+	follows := Find("follow-enterprise", `{"s_userid":"`+userId.(string)+`"}`, nil, `{"s_entid":1}`, false, -1, -1)
+	if follows != nil && len(*follows) > 0 {
+		for _, d := range *data {
+			for _, f := range *follows {
+				if f["s_entid"] == BsonIdToSId(d["_id"]) {
+					d["followFlag"] = true
+					continue
+				}
+			}
+		}
+	}
+}
 
 //即时搜索
 func (n *Search) Sim() error {

+ 3 - 2
core/src/qfw/search/wxsearchservice.go

@@ -108,8 +108,9 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 	if currentPage < 1 {
 		currentPage = 1
 	}
-	if currentPage > 20 {
-		currentPage = 20
+	if currentPage > 1 {
+		tmp := make([]map[string]interface{}, 0)
+		return &tmp
 	}
 	queryStr := querymap["query"]
 	fmt.Println("检索条件:", queryStr)

+ 1 - 1
core/src/qfw/searchmarket/demand.go

@@ -176,7 +176,7 @@ func (d *Demand) AddDemand() error {
 			b := UpdateNewDoc("demand", "demand", mongo.FindById("demand", rs, ""))
 			//发布需求送积分
 			if b {
-				credit_a := util.IntAll(d.GetSession("credit_a"))
+				credit_a := util.Int64All(d.GetSession("credit_a"))
 				if credit.AIsHasDo(credit.A_FXQ, credit_a) {
 					credit.UpuserCreditSession(util.ObjToString(s_userid), credit.B_FXQ, "B", nil, d.Action)
 				} else {

+ 12 - 1
core/src/qfw/searchmarket/service.go

@@ -14,6 +14,8 @@ import (
 	"qfw/util/credit"
 	"qfw/util/image"
 	mongo "qfw/util/mongodb"
+	mutil "qfw/util/mongodbutil"
+	//	"qfw/util/redis"
 	"strings"
 	"time"
 )
@@ -82,6 +84,11 @@ func (s *Service) ServiceInfo(params string) error {
 					}
 				}
 				einfo := *mongo.FindOne("enterprise", `{"_id":"`+_id+`"}`)
+				einfo1 := *mutil.FindOne("enterprise", coreconfig.SysConfig.EntMongodbAlias, coreconfig.SysConfig.EntMongodbName, `{"_id":"`+_id+`"}`)
+				for k, v := range einfo1 {
+					einfo[k] = v
+					log.Println("sdfsdf")
+				}
 				//取自身评价
 				if s.T["status"] != nil && s.T["status"].(string) == "appendcomment" && s.GetSession("userId") != nil {
 					tempquery := make(map[string]interface{})
@@ -180,6 +187,10 @@ func (s *Service) ShowService(params string) error {
 		if sinfos["s_enterpriseid"] != nil {
 			_id := sinfos["s_enterpriseid"].(string)
 			einfo := *mongo.FindOne("enterprise", `{"_id":"`+_id+`"}`)
+			einfo1 := *mutil.FindOne("enterprise", coreconfig.SysConfig.EntMongodbAlias, coreconfig.SysConfig.EntMongodbName, `{"_id":"`+_id+`"}`)
+			for k, v := range einfo1 {
+				einfo[k] = v
+			}
 			s.T["einfo"] = einfo
 		}
 		return s.Render("/service/showdetail.html", &s.T)
@@ -281,7 +292,7 @@ func (s *Service) Comment() error {
 						//评价送积分
 						param := make(map[string]interface{})
 						param["serviceid"] = s_serviceid
-						credit_a := util.IntAll(s.GetSession("credit_a"))
+						credit_a := util.Int64All(s.GetSession("credit_a"))
 						if credit.AIsHasDo(credit.A_WCJYPJ, credit_a) {
 							credit.UpuserCreditSession(s_userid, credit.C_PJ, "B", param, s.Action)
 						} else {

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

@@ -7,6 +7,8 @@ import (
 	"gopkg.in/mgo.v2/bson"
 	"net/rpc"
 	"qfw/coreconfig"
+	cutil "qfw/coreutil"
+	"qfw/mobile"
 	"qfw/util"
 	"qfw/util/mongodb"
 	"qfw/util/redis"
@@ -94,6 +96,8 @@ func (s *SwordFish) Wxprotocol() error {
 
 //剑鱼微信查询页面
 func (s *SwordFish) Wxsearch() error {
+	s.T["signature "] = mobile.GetSignature(s.Action)
+	s.T["shareid"] = cutil.FindMyShareId("topjy", s.Session().Get("s_m_openid").(string))
 	return s.Render("/swordfish/wxsearch.html")
 }
 
@@ -133,6 +137,9 @@ func (s *SwordFish) Wxsearchlist() error {
 			}
 		}
 	}
+	//搜索列表增加分享
+	s.T["signature "] = mobile.GetSignature(s.Action)
+	s.T["shareid"] = cutil.FindMyShareId("topjy", s.Session().Get("s_m_openid").(string))
 	return s.Render("/swordfish/wxsearchlist.html", &s.T)
 }
 
@@ -256,6 +263,8 @@ func getSwordFish(lasttime int64, sid string, res []map[string]interface{}, coun
 func (s *SwordFish) VisitRedirect() {
 	sid := s.GetString("id")
 	surl := s.GetString("url")
+	s.T["signature "] = mobile.GetSignature(s.Action)
+	s.T["shareid"] = cutil.FindMyShareId("topjy", s.Session().Get("s_m_openid").(string))
 	if len(sid) > 5 {
 		obj := *mongodb.FindById("bidding", sid, `{"publishtime":1,"_id":0,"detail":1,"title":1}`)
 		if obj != nil && len(obj) == 3 {

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

@@ -2,37 +2,19 @@ package yellowpage
 
 //企业黄页的Action
 import (
-	"fmt"
 	"github.com/go-xweb/xweb"
-	. "gopkg.in/mgo.v2/bson"
-	. "qfw/util/mongodb"
-	"strings"
 )
 
 type Yellowpage struct {
 	*xweb.Action
 	//进入企业黄页
-	wxenterpriseInfo xweb.Mapper `xweb:"/wx/enterprise/(\\w+).html"`
-	//进入企业黄页
 	enterpriseInfo xweb.Mapper `xweb:"/enterprise/(\\w+).html"`
-	//根据企业注册号进入企业黄页
-	enterpriseInfoByRegNO xweb.Mapper `xweb:"/enterpriseInfoByRegNO/(\\w+).html"`
 	//获取关系网数据
 	getRelation xweb.Mapper `xweb:"/member/getRelation"`
 	//获取失信信息
 	getDishonesty xweb.Mapper `xweb:"/front/getDishonesty"`
-	//获取企业的服务列表
-	findServiceByEntId xweb.Mapper `xweb:"/front/findServiceByEntId"`
 }
 
-func (yp *Yellowpage) EnterpriseInfoByRegNO(regNO string) error {
-	r := FindOne("enterprise", M{"RegNo": regNO})
-	if r == nil || len(*r) == 0 {
-		return yp.Render("/yellowpage/error.html")
-	}
-	id := strings.Split(fmt.Sprintf("%s", (*r)["_id"]), `"`)[1]
-	return yp.Redirect("/enterprise/" + id + ".html")
-}
 func init() {
 	xweb.AddAction(&Yellowpage{})
 }

+ 107 - 232
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -5,8 +5,7 @@ import (
 	"container/list"
 	"encoding/json"
 	"fmt"
-	"github.com/go-xweb/httpsession"
-	_ "github.com/go-xweb/xweb"
+	"github.com/go-xweb/xweb"
 	mgo "gopkg.in/mgo.v2"
 	. "gopkg.in/mgo.v2/bson"
 	"html/template"
@@ -17,6 +16,7 @@ import (
 	"qfw/util/credit"
 	elastic "qfw/util/elastic"
 	. "qfw/util/mongodb"
+	mongodbutil "qfw/util/mongodbutil"
 	"qfw/util/redis"
 	"regexp"
 	"strconv"
@@ -47,21 +47,14 @@ func FormatDate(src *interface{}) string {
 }
 
 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,"RegCapCurName":1}`)
+	res := mongodbutil.FindById("enterprise", cf.SysConfig.EntMongodbAlias, cf.SysConfig.EntMongodbName, 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,"SourceType":1, "Nb_email":1,"IndustryPhyName":1,"investor":1,"alterInfo":1,"staffinfo":1,"RegCapCurName":1}`)
 	if res != nil && len(*res) > 0 {
-		id := (*res)["s_submitid"]
-		if id != nil {
-			ud := FindById("user", id.(string), `{"i_comauthenttype":1}`)
-			(*res)["i_comauthenttype"] = (*ud)["i_comauthenttype"]
-		}
 		opl, _ := (*res)["OpLocDistrict"].(string)
 		if len(opl) >= 2 {
 			if v, ok := city_map[opl[:2]]; ok {
 				(*res)["OpLoc"] = v
 			}
 		}
-		syno, _ := (*res)["s_synopsis"].(string)
-		(*res)["s_synopsis"] = template.HTML(syno)
 		ty, _ := (*res)["SourceType"].(string)
 		if ty == "01" {
 			(*res)["gs"] = true
@@ -77,10 +70,6 @@ func GetEntInfo(id string) map[string]interface{} {
 			(*res)["OpTo"] = FormatDate(&OpTo)
 		}
 		IssBLicDate := (*res)["IssBLicDate"]
-		s_action := (*res)["s_action"]
-		if s_action == nil || s_action == "" {
-			(*res)["s_action"] = "N"
-		}
 		if OpFrom != nil {
 			(*res)["IssBLicDate"] = FormatDate(&IssBLicDate)
 		}
@@ -108,7 +97,6 @@ func GetEntInfo(id string) map[string]interface{} {
 		}
 		//
 		(*res)["EntTypeLabel"] = (mobile.GetDiffName(EntType))[0]
-		(*res)["entid"] = id
 		//企业变更排序
 		var alterInfo []map[string]interface{}
 		if d, err := json.Marshal((*res)["alterInfo"]); err == nil {
@@ -126,205 +114,143 @@ func GetEntInfo(id string) map[string]interface{} {
 			}
 		}
 		(*res)["alterInfo"] = alterInfo
-		return *res
-	}
-	return nil
-}
-func WxGetEntInfo(id string, flag bool) interface{} {
-	res := FindById("enterprise", id, `{"RegNo":1, "EntName":1, "EntType":1, "EntTypeName":1, "OpLocDistrict":1, "LeRep":1, "LegCerNO":1, "Tel":1, "Dom":1, "OpScope":1, "OpFrom":1, "OpTo":1, "RegCap":1, "EstDate":1, "CompForm":1, "CompFormName":1, "OpState":1, "OpStateName":1, "RegOrgName":1, "IssBLicDate":1, "Timestamp":1, "s_synopsis":1, "SourceType":1, "s_weixin":1, "s_enturl, "i_province":1, "i_city":1, "i_area":1,"s_action":1,"s_persion":1,"s_mobile":1,"s_address":1,"s_avatar":1,"s_microwebsite":1,"s_qq":1,"s_submitid":1}`)
-	if res != nil {
-		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)
-		if len(opl) >= 2 {
-			if v, ok := city_map[opl[:2]]; ok {
-				(*res)["OpLoc"] = v
+		ent := FindById("enterprise", id, `{"s_synopsis":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}`)
+		if ent != nil && len(*ent) > 0 {
+			for k, v := range *ent {
+				(*res)[k] = v
 			}
-		}
-		syno, _ := (*res)["s_synopsis"].(string)
-		(*res)["s_synopsis"] = template.HTML(syno)
-		ty, _ := (*res)["SourceType"].(string)
-		if ty == "01" {
-			(*res)["gs"] = true
-		} else {
-			(*res)["gs"] = false
-		}
-		OpFrom := (*res)["OpFrom"]
-		if OpFrom != nil {
-			(*res)["OpFrom"] = FormatDate(&OpFrom)
-		}
-		OpTo := (*res)["OpTo"]
-		if OpFrom != nil {
-			(*res)["OpTo"] = FormatDate(&OpTo)
-		}
-		IssBLicDate := (*res)["IssBLicDate"]
-		s_action := (*res)["s_action"]
-		if s_action == nil || s_action == "" {
-			(*res)["s_action"] = "N"
-		}
-		if OpFrom != nil {
-			(*res)["IssBLicDate"] = FormatDate(&IssBLicDate)
-		}
-		EstDate := (*res)["EstDate"]
-		if OpFrom != nil {
-			(*res)["EstDate"] = FormatDate(&EstDate)
-		}
-		//查询企业关系
-		//relation := Find("entrelation", &map[string]interface{}{
-		//	"aid": ObjectIdHex(id),
-		//}, nil, nil, false, -1, -1)
-		EntType, _ := (*res)["EntType"].(string)
-		//处理分公司
-		if EntType != "" {
-			if EntType == "5810" || EntType == "6810" || EntType == "7310" || EntType == "3200" || EntType == "3100" {
-				(*res)["EntType"] = "5810"
-			} else if len(EntType) > 1 {
-				if EntType[:1] == "2" {
-					(*res)["EntType"] = "5810"
-				}
+			id := (*res)["s_submitid"]
+			if id != nil {
+				ud := FindById("user", id.(string), `{"i_comauthenttype":1}`)
+				(*res)["i_comauthenttype"] = (*ud)["i_comauthenttype"]
 			}
-		}
-		en, _ := (*res)["EntName"].(string)
-		if en == "" {
-			(*res)["EntName"] = (*res)["LeRep"]
-		}
-		//
-		(*res)["EntTypeLabel"] = (mobile.GetDiffName(EntType))[0]
-		if flag {
-			RegNo, _ := (*res)["RegNo"].(string)
-			relation := makeRelation(RegNo, en)
-			if relation != nil {
-				(*res)["relation"] = relation
+			syno, _ := (*res)["s_synopsis"].(string)
+			(*res)["s_synopsis"] = template.HTML(syno)
+			s_action := (*res)["s_action"]
+			if s_action == nil || s_action == "" {
+				(*res)["s_action"] = "N"
 			}
 		}
-
-		(*res)["entid"] = id
 		return *res
 	}
 	return nil
 }
 
-//企业黄查询结果
-func (yp *Yellowpage) WxenterpriseInfo(regNO string) error {
-	r := FindOne("enterprise", M{"RegNo": regNO})
-	if r == nil || len(*r) == 0 {
-		return yp.Render("/yellowpage/error.html")
-	}
-	id := strings.Split(fmt.Sprintf("%s", (*r)["_id"]), `"`)[1]
-	return yp.Redirect("/enterprise/" + id + ".html")
-}
-
 //企业黄查询结果
 func (yp *Yellowpage) EnterpriseInfo(id string) error {
 	id = strings.Split(id, "#")[0]
 	regex, _ := regexp.Compile("(Android|Mobile)")
-	ismobile := regex.FindAllString(yp.Header("User-Agent"), -1)
+	ismobile := len(regex.FindAllString(yp.Header("User-Agent"), -1)) > 0
 	key := "enterpriseInfo_"
-	if len(ismobile) > 0 {
+	if ismobile {
 		key = "menterpriseInfo_"
 	}
 	if ret, err := redis.GetBytes("enterprise", key+id); err == nil {
 		return yp.SetBody(*ret)
 	} else {
-		if info := GetEntInfo(id); info != nil {
-			yp.T["res"] = info
-			regNo, _ := info["RegNo"].(string)
-			entName, _ := info["EntName"].(string)
-			relation, relflag := getRelation(regNo, entName)
-			var nodes *[]map[string]interface{}
-			if relflag {
-				if d, err := json.Marshal(relation["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
-					//相关企业
-					var entmids []ObjectId
-					for _, v := range *nodes {
-						if v["type"] == "e" && v["entmid"] != nil && v["entmid"].(string) != "" {
-							entmids = append(entmids, ObjectIdHex(v["entmid"].(string)))
-						}
+		return CommonEntInfo(yp.Action, id, 0, ismobile)
+	}
+}
+func CommonEntInfo(yp *xweb.Action, id string, editFlag int, ismobile bool) error {
+	if info := GetEntInfo(id); info != nil {
+		yp.T["res"] = info
+		regNo, _ := info["RegNo"].(string)
+		entName, _ := info["EntName"].(string)
+		relation, relflag := getRelation(regNo, entName)
+		var nodes *[]map[string]interface{}
+		if relflag {
+			if d, err := json.Marshal(relation["nodes"]); err == nil && json.Unmarshal(d, &nodes) == nil && len(*nodes) > 0 {
+				//相关企业
+				var entmids []ObjectId
+				for _, v := range *nodes {
+					if v["type"] == "e" && v["entmid"] != nil && v["entmid"].(string) != "" {
+						entmids = append(entmids, ObjectIdHex(v["entmid"].(string)))
 					}
-					if len(entmids) > 0 {
-						relevantEnts := Find("enterprise", M{"_id": M{"$in": entmids}}, nil, `{"s_avatar":1,"RegNo":1,"EntName":1}`, false, -1, -1)
-						if relevantEnts != nil && len(*relevantEnts) > 0 {
-							for _, relevantEnt := range *relevantEnts {
-								relevantEnt["_id"] = util.BsonIdToSId(relevantEnt["_id"])
-								for _, node := range *nodes {
-									if node["entmid"] != nil && node["entmid"].(string) == relevantEnt["_id"] {
-										node["haslink"] = true
-										break
-									}
+				}
+				if len(entmids) > 0 {
+					relevantEnts := mongodbutil.Find("enterprise", cf.SysConfig.EntMongodbAlias, cf.SysConfig.EntMongodbName, M{"_id": M{"$in": entmids}}, nil, `{"s_avatar":1,"RegNo":1,"EntName":1}`, false, -1, -1)
+					if relevantEnts != nil && len(*relevantEnts) > 0 {
+						for _, relevantEnt := range *relevantEnts {
+							relevantEnt["_id"] = util.BsonIdToSId(relevantEnt["_id"])
+							for _, node := range *nodes {
+								if node["entmid"] != nil && node["entmid"].(string) == relevantEnt["_id"] {
+									node["haslink"] = true
+									break
 								}
 							}
-							yp.T["relevantEnts"] = relevantEnts
 						}
-						relation["nodes"] = nodes
-						redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
+						yp.T["relevantEnts"] = relevantEnts
 					}
+					relation["nodes"] = nodes
+					redis.Put("enterprise", "relation-"+regNo, relation, 7*ONEDAY)
 				}
 			}
-			//相关新闻
-			var ids []ObjectId
-			newsIds := Find("rel_news", `{"s_entid":"`+id+`"}`, nil, `{"s_newsid":1}`, false, -1, -1)
-			if newsIds != nil && len(*newsIds) > 0 {
-				for _, v := range *newsIds {
-					if v["s_newsid"] != nil {
-						newsid, _ := v["s_newsid"].(string)
-						if newsid == "" {
-							continue
-						}
-						ids = append(ids, ObjectIdHex(newsid))
+		}
+		//相关新闻
+		var ids []ObjectId
+		newsIds := Find("rel_news", `{"s_entid":"`+id+`"}`, nil, `{"s_newsid":1}`, false, -1, -1)
+		if newsIds != nil && len(*newsIds) > 0 {
+			for _, v := range *newsIds {
+				if v["s_newsid"] != nil {
+					newsid, _ := v["s_newsid"].(string)
+					if newsid == "" {
+						continue
 					}
+					ids = append(ids, ObjectIdHex(newsid))
 				}
-				if len(ids) > 0 {
-					news := Find("trs_news", M{"_id": M{"$in": ids}}, `{"l_comeintime":-1}`, `{"s_link":1,"s_title":1,"l_comeintime":1}`, false, 0, 8)
-					if news != nil && len(*news) > 0 {
-						yp.T["relevantNews"] = news
-					}
+			}
+			if len(ids) > 0 {
+				news := Find("trs_news", M{"_id": M{"$in": ids}}, `{"l_comeintime":-1}`, `{"s_link":1,"s_title":1,"l_comeintime":1}`, false, 0, 8)
+				if news != nil && len(*news) > 0 {
+					yp.T["relevantNews"] = news
 				}
 			}
-			//失信信息第一页数据
-			yp.T["dishonesty"] = getDishonesty(util.If(info["LegCerNO"] != nil, info["LegCerNO"], "").(string), 1)
-			//服务列表第一页数据
-			yp.T["service"] = findServiceByEntId(id, 1, yp.Session())
-			//关系网数据
-			yp.T["relflag"] = relflag
-			//著作权
-			yp.T["copyright"] = FindOne("enterprise_copyright", `{"EntId":"`+id+`"}`)
-
+		}
+		//失信信息第一页数据
+		yp.T["dishonesty"] = getDishonesty(util.If(info["LegCerNO"] != nil, info["LegCerNO"], "").(string), 1)
+		//关系网数据
+		yp.T["relflag"] = relflag
+		//著作权
+		yp.T["copyright"] = FindOne("enterprise_copyright", `{"EntId":"`+id+`"}`)
+		//编辑企业名片标识
+		yp.T["editFlag"] = editFlag
+		//过滤企业名
+		if relflag && 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)
+				})
+			}()
+		}
+		if editFlag > 0 {
+			return yp.Render("/enterprise/detail.html", &yp.T)
+		} else {
+			//服务数量
+			yp.T["serviceCount"] = getEntServiceCount(id)
 			var contentuser []byte
 			var erruser error
-			if len(ismobile) > 0 {
+			if ismobile {
 				contentuser, erruser = yp.Render4Cache("/member/incmobile/detailindex.html", &yp.T)
 			} else {
-				contentuser, erruser = yp.Render4Cache("/yellowpage/enterpriseinfo.html", &yp.T)
+				contentuser, erruser = yp.Render4Cache("/enterprise/detail.html", &yp.T)
 			}
-
 			if erruser == nil {
-				if len(ismobile) > 0 {
+				if ismobile {
 					redis.PutBytes("enterprise", "menterpriseInfo_"+id, &contentuser, 7*ONEDAY)
 				} else {
 					redis.PutBytes("enterprise", "enterpriseInfo_"+id, &contentuser, 7*ONEDAY)
 				}
 			}
-			//过滤企业名
-			if relflag && 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")
 		}
+	} else {
+		return yp.Render("/_error.html")
 	}
 }
 
@@ -453,7 +379,7 @@ func (yp *Yellowpage) GetRelation() error {
 		entName := yp.GetString("entName")
 		if regNo != "" && entName != "" {
 			relation, flag = getRelation(regNo, entName)
-			if flag && !credit.AIsHasDo(credit.A_CKGXW, util.IntAll(yp.GetSession("credit_a"))) {
+			if flag && !credit.AIsHasDo(credit.A_CKGXW, util.Int64All(yp.GetSession("credit_a"))) {
 				credit.UpuserCreditSession(yp.GetSession("userId").(string), credit.A_CKGXW, "A", nil, yp.Action)
 			}
 		}
@@ -485,8 +411,8 @@ func getRelation(regNo, entName string) (r map[string]interface{}, ok bool) {
 //生成图用的结果
 func makeRelation(mnregno, mnname string) interface{} {
 	t1 := time.Now()
-	sess := GetMgoConn()
-	defer DestoryMongoConn(sess)
+	sess := mongodbutil.GetMgoConn(cf.SysConfig.EntMongodbAlias)
+	defer mongodbutil.DestoryMongoConn(cf.SysConfig.EntMongodbAlias, sess)
 	//mnregno := "410522010001059"
 	//mnname := "安阳市长江工程有限责任公司"
 	mntype := "ce"
@@ -601,67 +527,16 @@ func getDishonesty(legcerNo string, currentPage int) map[string]interface{} {
 		return ret
 	}
 }
-func (yp *Yellowpage) FindServiceByEntId() error {
-	if yp.Method() == "POST" {
-		id := yp.GetString("entId")
-		currentPage, _ := yp.GetInteger("currentPage")
-		yp.ServeJson(findServiceByEntId(id, currentPage, yp.Session()))
-	}
-	return nil
-}
-func findServiceByEntId(id string, currentPage int, session *httpsession.Session) map[string]interface{} {
-	var res map[string]interface{}
-	if ret := redis.Get("enterprise", "service-"+id+"-"+fmt.Sprint(currentPage)); ret != nil {
-		res = ret.(map[string]interface{})
-	} else {
-		limit := 10
-		start := (currentPage - 1) * limit
-		var count int64
-		//分页
-		mustnot := `{"term" : {"i_status" : 1 }}`
-		var fields, collection, query, tempstrquery string
-		collection = "service"
-		tempstrquery = `{"query_string":{"default_field": "s_enterpriseid","query":"` + id + `"}}`
-		servicequery := ""
-		if session.Get("entid") == nil || session.Get("entid").(string) != id {
-			servicequery = `,"must_not" : [` + mustnot + `]`
-		}
-		query = `{"query": {
+
+//获取该企业的服务数量
+func getEntServiceCount(id string) int64 {
+	query := `{"query": {
 		    "bool": {
-			  "must":[` + tempstrquery + `]` + servicequery + `
+			  "must":[{"query_string":{"default_field": "s_enterpriseid","query":"` + id + `"}}],"must_not" : [{"term" : {"i_status" : 1 }}]
 		    }
 		  }}`
-		//需要查到的字段信息
-		fields = `"_id","s_name","s_introduction","s_images","s_enterpriseid","s_isshow","i_status","s_pricemy","i_comments","f_price","i_sales"`
-		if currentPage == 1 {
-			count = 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", start)+`,
-		size:`+fmt.Sprintf("%v", limit)+`
-		}`)
-		for _, v := range *result {
-			b, _ := checkAuth(v)
-			if b {
-				v["s_isEdit"] = "1"
-			} else {
-				v["s_isEdit"] = "0"
-			}
-			if util.IntAll(v["i_status"]) == 1 {
-				v["s_remove"] = 1
-			} else {
-				v["s_remove"] = 0
-			}
-		}
-		res = map[string]interface{}{"list": result, "count": count, "pageSize": limit}
-		redis.Put("enterprise", "service-"+id+"-"+fmt.Sprint(currentPage), res, 7*24*60*60)
-	}
-	return res
+	return elastic.Count("service", "service", query)
 }
-
 func checkAuth(obj map[string]interface{}) (b bool, err string) {
 	if len(obj) > 0 {
 		//判断有没有预约的情况
@@ -718,7 +593,7 @@ func filterEntName(nodes *[]map[string]interface{}) int {
 				v["shorttext"] = shortText
 				count++
 				if v["type"] == "e" {
-					Update("entrelation", `{"_id":"`+v["_id"].(string)+`"}`, `{"$set":{"shortname":"`+shortText+`"}}`, false, false)
+					mongodbutil.Update("entrelation", cf.SysConfig.EntMongodbAlias, cf.SysConfig.EntMongodbName, `{"_id":"`+v["_id"].(string)+`"}`, `{"$set":{"shortname":"`+shortText+`"}}`, false, false)
 				}
 			}
 		}

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

+ 44 - 2
core/src/web/staticres/css/dev-qfw.css

@@ -2378,9 +2378,11 @@ style="color:#D03102;margin-right:5px;"
 	margin-right: 5px;
 }
 .b-head .b-loginStatus{
-	padding-left: 15px;
+	padding-left: 5px;
+	padding-right: 5px;
 	position: relative;
 	cursor: pointer;
+	margin-right: -5px;
 }
 .b-head .b-logined:hover{
 	background-color: #F7F9FB;
@@ -2412,7 +2414,6 @@ style="color:#D03102;margin-right:5px;"
 .b-head .head-hideMenu ul{
 	background-color: #F7F9FB;
 	box-shadow: 0 5px 10px rgba(0,0,0,.2);
-	margin-top: 1px;
 	float: left;
 }
 .b-head .head-hideMenu li{
@@ -2898,4 +2899,45 @@ style="color:#D03102;margin-right:5px;"
 	line-height: 75px;
 	text-align: center;
 	background: #FFF;
+}
+/**********百度地图*********/
+.baiduMap{
+	position: absolute;
+	top: 15%;
+	left: 15%;
+	right: 15%;
+	bottom: 15%;
+	border: 5px solid #dd4814;
+	background-color: rgb(255, 255, 255);
+	z-index: 1002;
+}
+.baiduMapError{
+	position: absolute;
+	top: 50%;
+	left: 50%;
+	font-size: 18px;
+	text-align: center;
+	color: red;
+	width: 240px;
+	line-height: 24px;
+	margin-top: -12px;
+	margin-left: -120px;
+	letter-spacing: 2px;
+}
+.baiduMapArea{
+	position: fixed;
+	top: 0px;
+	left: 0px;
+	right: 0px;
+	bottom: 0px;
+	background: rgba(0, 0, 0, 0.8);
+	z-index: 1001;
+}
+.closeBaiduMap{
+    position: absolute;
+    top: 15%;
+    right: 15.5%;
+    margin-top: 5px;
+    z-index: 1003;
+	font-size: 16px;
 }

+ 167 - 60
core/src/web/staticres/css/entcommunity.css

@@ -34,6 +34,97 @@ a:focus, a:hover{
 .ttcon ul li:hover{
 	color: #16a086;
 }
+.ent-follow{
+	position: absolute;
+	top: 50%;
+	right: 0px;
+	line-height: 27px;
+	margin-top: -14.5px;
+	color: green;
+	cursor: pointer;
+}
+.ent-follow span{
+	margin-right: 5px;
+	font-size: 16px;
+	vertical-align: middle;
+}
+/*********企业列表样式***************/
+.entlist-page .rowFl{
+	position:relative;
+	margin-top: 20px;
+	padding-bottom: 20px;
+}
+.entlist-page .rowFltt{
+	border-bottom:1px solid #ddd;
+}
+.entlist-page .rowsolid-bottom{
+	border-bottom:1px solid #CCCCCC;	
+}
+.entlist-page .rowFltt .qfw-text-more{
+	position:absolute;
+	right:10px;
+	top:2px;
+	font-weight:bold;
+	cursor:pointer;
+	color: #16a086;
+}
+.entlist-page .tt{
+	width:90px;
+	padding-left: 15px;
+}
+.entlist-page .city_china{
+	font-size:12px;
+}
+.entlist-page .city_china select{
+	border-bottom:1px dashed #CCCCCC;
+}
+.entlist-page .less{
+	height:20px;
+	overflow:hidden
+}
+.entlist-page .ttcon{
+	width:85%;
+	vertical-align:top
+}
+.entlist-page .ttcon ul{
+	display:inline-block;
+}
+.entlist-page .ttcon ul li{
+	display:inline-block;
+	margin-right:35px;
+	height:25px;
+	line-height:25px;
+	cursor:pointer;
+	margin-top:-2px;
+}
+.entlist-page .sel{
+	width: 20%;
+	min-width:80px;
+	max-width:180px;
+	height: 35px;
+	font-size: 14px;
+	color: #a0a0a0;
+	background-color: #fff;
+	border: 1px solid #ccc;
+	margin-right: 15px;
+}
+.entlist-page #navs {
+	position:relative
+}
+.entlist-page #navs .renzheng {
+	position:absolute;
+	right:10px;
+	bottom:0px;
+}
+/******列表详细信息*******/
+.entlist-page .borderB .qfw-entcontent-padding{
+	padding:20px 50px 20px 20px;
+	line-height: 25px;
+	position: relative;
+}
+.entlist-page .qfw-entcontent-padding .lineb a{
+	font-size:16px;
+}
 .entlist-page .entlist-allclaify{
 	color: #16a086;
 	font-weight: bold;
@@ -256,22 +347,40 @@ a:focus, a:hover{
 /*********企业画像***************/
 .entinfo-page .b-com-head{
 	background-color: #FFFFFF;
+	padding: 30px 30px 10px 30px;
 	position: relative;
-	padding: 30px;
 }
-.entinfo-page .b-com-head>img{
+.entinfo-page .b-com-head>.ent-logo{
 	position: absolute;
-	height: 130px;
-	width: 130px;
 	left: 30px;
 	top: 30px;
 }
+.entinfo-page .b-com-head>.ent-logo>img{
+	height: 130px;
+	width: 130px;
+}
+.entinfo-page .b-com-head>.ent-logo>.ent-uploadLogo{
+	position: absolute;
+	left: 0px;
+	right: 0px;
+	bottom: 0px;
+	line-height: 30px;
+	color: #ffffff;
+	background-color: gray;
+	opacity: 0.5;
+	text-align: center;
+	cursor: pointer;
+}
+.entinfo-page .b-com-head>div{
+	position: relative;
+}
 .entinfo-page .b-com-head>.entinfo-cart{
 	margin-left: 160px;
-	height: 130px;
+	position: relative;
 }
 .entinfo-page .b-com-head .b-com-first{
 	line-height: 25px;
+	margin-right: 60px;
 }
 .entinfo-page .b-com-head .b-com-first a{
 	color: #16a086;
@@ -285,6 +394,13 @@ a:focus, a:hover{
 .entinfo-page .b-com-head .b-com-second{
 	height: 29px;
 	line-height: 29px;
+	margin-right: 60px;
+}
+.entinfo-page .b-com-head .b-com-second>span{
+	margin-right: 30px;
+}
+.entinfo-page .b-com-head .b-com-second a{
+	color: rgb(22, 160, 134);
 }
 .entinfo-page .b-com-head .b-com-second .glyphicon{
 	color: #FF5A5F;
@@ -305,7 +421,7 @@ a:focus, a:hover{
 	line-height: 25px;
 	color: #A0A0A0;
 }
-.entinfo-page .b-com-head .b-com-last .glyphicon{
+.entinfo-page .b-com-head .glyphicon{
 	font-size: 17px;
 	color: #cccccc;
 	margin-right: 5px;
@@ -314,43 +430,6 @@ a:focus, a:hover{
 .entinfo-page .b-com-head .b-com-last a{
 	color: #415fcf;
 }
-.white_content {
-	display: none;
-	position: absolute;
-	top: 25%;
-	left: 25%;
-	width: 55%;
-	height: 55%;
-	padding: 20px;
-	border: 5px solid #dd4814;
-	background-color: white;
-	z-index: 1002;
-	overflow: auto;
-}
-.black_overlay {
-	display: none;
-	position: absolute;
-	top: 0px;
-	left: 0px;
-	right: 0px;
-	bottom: 0px;
-	background-color: black;
-	z-index: 1001;
-	-moz-opacity: 0.8;
-	opacity: .80;
-	filter: alpha(opacity=88);
-}
-.closeshowmap{
- 	display: none; 
-    position: absolute; 
-    top: 25%; 
-    left: 79%; 
-    float:right;
-    margin:5px 5px 0px 0px; 
-    background-color: white; 
-    z-index:1003; 
-    overflow: auto; 	
-}
 .ent-tab{
 	height: 50px;
 	background-color: #F6F8FA;
@@ -726,19 +805,6 @@ a:focus, a:hover{
 	margin-top: 20px;
 	width: 200px;
 }
-/*************产品服务******************/
-.ent-yellowpage td img{
-	width: 110px;
-	height: 101px;
-}
-.ent-table td.ent-servicepaging{
-	padding-bottom: 0px !important;
-}
-.ent-serviceintroduction{
-	word-wrap: break-word;
-	word-break: break-all;
-	white-space: normal !important;
-}
 /**************变更信息**********************/
 .ent-alterinfo li{
 	width: 100%;
@@ -956,10 +1022,6 @@ a:focus, a:hover{
 .ent-dishonesty .ent-table tr{
 	border-top: 1px solid #e5e6e9;
 }
-.ent-yellowpage .ent-table tr:nth-child(2n+1){
-	border-top: 1px solid #e5e6e9;
-	font-size: 16px;
-}
 .ent-table .b-com-name{
 	font-weight: bold;
 	word-wrap: break-word;
@@ -1007,4 +1069,49 @@ a:focus, a:hover{
 }
 .entinfo-page .badge.disabled{
 	background-color: #a0a0a0;
+}
+/************编辑***********/
+.b-editEnt-form .form-control{
+	display: inline-block;
+	width: 200px;
+	height: 32px;
+	margin-right: 20px;
+}
+.b-editEnt-form .b-com-last .form-control{
+	margin-right: 5px;
+}
+.b-editEnt-form [name='s_address']{
+	width: 315px;
+}
+.b-editEnt-form .glyphicon{
+	margin-right: 10px !important;
+}
+.b-editEnt-form .glyphicon.dizhi{
+	margin-right: 5px !important;
+}
+.b-editEnt-form>div{
+	margin: 8px 0px;
+}
+.select-control{
+	height: 34px;
+    width: 126px;
+    padding: 6px 12px;
+    font-size: 14px;
+    line-height: 1.42857143;
+	vertical-align: middle;
+    color: #555;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
+    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+}
+.entinfo-cart .btn-save{
+	position: absolute;
+	right: 0px;
+	top: 0px;
 }

+ 4 - 0
core/src/web/staticres/css/mobile/incmobile.css

@@ -42,6 +42,7 @@ ul{
 .m-searchbar .immediately div{
 	height:30px;
 	line-height:30px ;
+	overflow:hidden !important;
 }
 .m-searchbar .immediately div:hover{
 	cursor:pointer;
@@ -460,6 +461,9 @@ span#camera {
 .yellowpage li div.text-right{
 	padding-right:20px;
 }
+#immediately a:hover{
+	    text-decoration: blink;
+}
 /*折角效果*/
 .note.taupe {
     background: red;

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

@@ -364,6 +364,7 @@ a.new_red:hover, a.new_red:active {
 .member-left, .member-right {
 	vertical-align: top;
 	display: inline-block;
+	width: 942px;
 }
 
 .member-left {

二進制
core/src/web/staticres/images/mobile/unauth.png


二進制
core/src/web/staticres/images/u906.png


二進制
core/src/web/staticres/images/u908.png


+ 101 - 0
core/src/web/staticres/js/baiduMap.js

@@ -0,0 +1,101 @@
+function BaiduMap(){
+	var closeMapNodeId = "closeBaiduMap";
+	(function(){
+		var div = document.createElement("div");
+		div.id = BaiduMap.mainNodeId;
+		div.className = BaiduMap.mainNodeId;
+		div.innerHTML = '<a href ="javascript:void(0)"><div id="'+closeMapNodeId+'" class="closeBaiduMap">X</div></a>'
+						+'<div id="baiduMap" class="'+BaiduMap.mapId+'"></div>';
+		document.body.appendChild(div);
+		div.onclick = function(e){
+			if(e.target.id == BaiduMap.mainNodeId || e.target.id == closeMapNodeId){
+				BaiduMap.closeMap();
+			}
+		}
+	})();
+	this.showMap = function(){
+		document.body.className += " overflow-hidden";
+		document.getElementById(BaiduMap.mainNodeId).style.display = 'block';
+	};
+	//地址解析
+	this.analysisAddress = function(province,city,area,address){
+		city = province + city;
+		address = area + address;
+		this.showMap();
+		var script = document.createElement('script');
+	    script.type = 'text/javascript';
+		script.src = "http://api.map.baidu.com/geocoder/v2/?address="+address+"&output=json&ak="+BaiduMap.key+"&callback=BaiduMap.renderOption";
+	    document.body.appendChild(script);
+	};
+	this.sign = function(callback){
+		var map = null;
+		var showInfo = function(e){
+			map.clearOverlays();
+			var point = new BMap.Point(e.point.lng,e.point.lat);
+			BaiduMap.showInfo(map,point,callback);
+			var marker = new BMap.Marker(point);
+			map.addOverlay(marker); //将标记添加到地图中
+		}
+		var myFun = function(result){
+			var point = new BMap.Point(result.center.lng,result.center.lat);
+			map = BaiduMap.initMap(point);
+			BaiduMap.showInfo(map,point,callback);
+			map.addEventListener("click", showInfo)
+		}
+		var myCity = new BMap.LocalCity();
+		myCity.get(myFun);
+	}
+};
+BaiduMap.key = "AFd8b176f363f23e6a23d516f4cfb742";
+BaiduMap.mainNodeId = "baiduMapArea";
+BaiduMap.mapId = "baiduMap";
+BaiduMap.error = function(){
+	document.getElementById(this.mapId).innerHTML = "<span class='baiduMapError'>您地址没有解析到结果!</span>";
+};
+BaiduMap.renderOption = function(response){
+	try{
+		if(response.status != 0){
+			this.error();
+			return;
+		}
+		var location = response.result.location;
+		BaiduMap.initMap(new BMap.Point(location.lng,location.lat));
+	}catch(e){}
+};
+BaiduMap.initMap = function(point){
+	var map = new BMap.Map(this.mapId); //初始化地图  
+	map.enableScrollWheelZoom(true);
+	if(point){
+		map.addOverlay(new BMap.Marker(point)); //将标记添加到地图中
+		map.centerAndZoom(point, 12); //设置中心点坐标和地图级别
+	}
+	return map;
+};
+BaiduMap.closeMap = function(){
+	var reg = new RegExp('(\\s|^)overflow-hidden(\\s|$)');
+    document.body.className = document.body.className.replace(reg, '');
+	document.getElementById(BaiduMap.mainNodeId).style.display = 'none';
+};
+BaiduMap.showInfo = function(map,point,callback){
+	BaiduMap.signCallback = callback;
+	var opts = {
+		width: 100     // 信息窗口宽度
+	}
+	var geoc = new BMap.Geocoder();
+	geoc.getLocation(point, function(rs){
+		var addComp = rs.addressComponents;
+		var province = addComp.province;
+		var city = addComp.city;
+		var district = addComp.district;
+		var street = addComp.street;
+		var streetNumber = addComp.streetNumber;
+		var html = "地址:"+province+city+district+street+streetNumber;
+		html+='<br><a class="btn btn-default pull-right" onclick="BaiduMap.signComplate(\''+province+'\',\''+city+'\',\''+district+'\',\''+street+streetNumber+'\')">使用当前地址</a>';
+		var infoWindow = new BMap.InfoWindow(html,opts);  // 创建信息窗口对象
+		map.openInfoWindow(infoWindow,point); //开启信息窗口  
+	});
+}
+BaiduMap.signComplate = function(province,city,district,address){
+	BaiduMap.closeMap();
+	BaiduMap.signCallback(province,city,district,address);
+}

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

@@ -105,7 +105,7 @@ function getCaptchaImg(){
 
 function rechoose(t){
 		if (!isLogined){
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 			return;
 		}
 		if(t==0){

+ 9 - 3
core/src/web/staticres/js/entcommunity.js

@@ -26,8 +26,14 @@ mCommunity.prototype={
 				$("#immediately").show();
 			}
 		});
+		document.getElementById("query").addEventListener("input", function(){
+			imFind($("#query"));
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		}, false); 
 		$("#query").blur(function(){
-			$("#immediately").hide();
+			//$("#immediately").hide();
 		});
 		//高级搜索
 		$(".searchlink").click(function(){
@@ -262,9 +268,9 @@ mCommunity.prototype.init.prototype = mCommunity.prototype;
 
 function changeSearchBorder(){
 	var width=$("#query").css("width");
-	width=width.substr(0,width.indexOf("p"))-30+"px";
+	width=width.substr(0,width.indexOf("p"))-45+"px";
 	$("#immediately").css("width",width);
-	$("#immediately").css("margin-left",$("#query").offset().left+15);
+	$("#immediately").css("margin-left",$("#query").offset().left);
 }
 
 function viewcontent(n){

+ 163 - 108
core/src/web/staticres/js/entportrait.js

@@ -1,7 +1,6 @@
 var entType = "企业";
 var relationEntity = null;//关系网
 var copyrightEntity = null;//著作权
-var servicePaging = null;//服务列表
 var staffinfoEntity = null;//主要人员
 var dishonestyPaging = null;//失信
 var hasLoadPagingJs = false;//是否已经加载过js
@@ -19,6 +18,11 @@ var computerSoftCopyRightFlag = false;
 //专利
 var patent = null;
 var patentFlag = false;
+var baiduMap = null;
+//根据城市名和地址解析
+var provinceName = "";
+var cityName = "";
+var areaName = "";
 //解析服务列表
 $(function(){
 	staffinfoFlag = typeof(staffinfo) != "undefined" && staffinfo != null && staffinfo.length > 0;
@@ -66,25 +70,133 @@ $(function(){
 		$("#ent-tab-staffinfo").addClass("disabled");
 	}
 	//联系地址
-	if($address){
+	if(editFlag){
+		$("#uploadLogo").click(function(){
+			document.getElementById("upload").click();
+		});
+		var option={
+			btnname:"",
+			action:"/filemanage/upload",
+			btnClass:"",
+			afterError:function(data,e){
+				alert("上传LOGO失败,请重新上传。");
+			},
+			afterUpload:function(data){ //此处可以重写,上传后的处理
+				if(data.flag == true){
+					$.ajax({
+					  	type: "POST",
+					  	url: "/member/yellowpage/upLoadEntImg",
+					  	data: "field=s_avatar&url="+data.url,
+					 	dataType: "text",
+					  	success: function(result){
+							if (result == "y"){
+								$("#entLogo>img").attr("src",data.url);
+							}else{
+								alert("上传LOGO失败,请重新上传。");
+							}
+						},
+						error: function(){
+							alert("上传LOGO失败,请重新上传。");
+						}
+					});
+				}else{
+					alert(data.msg)
+				}
+		 	}
+		};
+		try{
+			loadJS(cdn+"/js/upload.js",function(){
+				$("#uploadLogo>div").upload(option);
+			});
+		}catch(e){}
+		//编辑的时候输入框失去焦点验证格式
+		$("#editForm").find("input").blur(function(){
+			var thisValue = $.trim(this.value);
+			if(this.name == "s_persion" && thisValue == ""){
+				alert("请输入联系人!");
+				return;
+			}
+			if(thisValue == ""){
+				return;
+			}
+			switch(this.name){
+				case "s_mobile":
+					if(!ValidDatatype.m(thisValue)){
+						alert("手机号格式不正确!");
+					}
+					break;
+				case "s_email":
+					if(!ValidDatatype.e(thisValue)){
+						alert("邮箱格式不正确!");
+					}
+					break;
+				case "s_enturl":
+					if(!ValidDatatype.url(thisValue)){
+						alert("网址格式不正确!");
+					}
+					break;
+			}
+		});
+		$("#editSave").click(function(){
+			var formNode = $("#editForm");
+			var value = formNode.find("[name='s_persion']").val();
+			if(value == ""){
+				alert("请输入联系人!");
+				return;
+			}
+			value = formNode.find("[name='s_mobile']").val();
+			if(value != "" && !ValidDatatype.m(value)){
+				alert("手机号格式不正确!");
+				return;
+			}
+			value = formNode.find("[name='s_email']").val();
+			if(value != "" && !ValidDatatype.e(value)){
+				alert("邮箱格式不正确!");
+				return;
+			}
+			value = formNode.find("[name='s_enturl']").val();
+			if(value != "" && !ValidDatatype.url(value)){
+				alert("网址格式不正确!");
+				return;
+			}
+			$.post("/member/yellowpage/dosave/enterprise",formNode.serialize(),function(r){
+				if(r.status == "personError"){
+					alert("请输入联系人!");
+				}else if(r.status == "y"){
+					alert("保存成功!");
+					window.location.href = "/member/enterprise/show";
+				}else{
+					alert("保存失败!");
+				}
+			});
+		});
 		loadJS(cdn+"/js/jquery.cxselect.js",function(){
 			$('#city_china').cxSelect({
 				selects: ['province', 'city', 'area'],
 				required:0
 			});
 			$.cxSelect.setVal(province,city,area);
-			var pt=province?($("#provincesel option[value="+province+"]").text()):"";
-			var ct=city?($("#citysel option[value="+city+"]").text()):"";
-			var at=area?($("#areasel option[value="+area+"]").text()):"";
-			//设置地图上显示的位置
-			$("#location").attr("value",as1);
-			$("#cityname").attr("value",pt.trim()+ct.trim()+at.trim());		
-			initMap();
-			$("#city_china").text(pt+ct+at+as1);
 		});
+	}else{
+		if($address){
+			loadJS(cdn+"/js/jquery.cxselect.js",function(){
+				$('#city_china').cxSelect({
+					selects: ['province', 'city', 'area'],
+					required:0
+				});
+				$.cxSelect.setVal(province,city,area);
+				var pt=province?($("#provincesel option[value="+province+"]").text()):"";
+				var ct=city?($("#citysel option[value="+city+"]").text()):"";
+				var at=area?($("#areasel option[value="+area+"]").text()):"";
+				provinceName = pt;
+				cityName = ct;
+				areaName = at;
+				//设置地图上显示的位置
+				$("#city_china").text(pt+ct+at+address);
+			});
+		}
+		pcShare();
 	}
-	//隐藏地图
-	$("#fade").click(closeMap);
 	//分享
 	$(".entinfo-share").click(function(){
 		$(".bdsharebuttonbox").show();
@@ -112,7 +224,7 @@ $(function(){
 			}
 		}
 		if(index == 1){
-			b_afterLogin(isLogined);
+			afterReLoadTop(isLogined);
 		}else if($(this).index() == 2 && staffinfoEntity == null){
 			//加载服务列表
 			staffinfoEntity = new StaffinfoEntity();
@@ -122,36 +234,10 @@ $(function(){
 		}else if($(this).index() == 5 && dishonestyPaging == null){
 			//加载失信列表
 			dishonestyPaging = new DishonestyPaging();
-		}else if($(this).index() == 6 && servicePaging == null){
-			//加载服务列表
-			servicePaging = new ServicePaging();
 		}
 	});
-	pcShare();
 });
-function initMap(){
-	//获取地图的经纬度
-	loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){
-		loadJS(cdn+"/js/geocoder.js",function(){
-			doOptions();
-		});
-	});
-}
-//显示地图
-function showMap(){
-	document.getElementById('mapshowdiv').style.display = 'block';
-	document.getElementById('closeshowmap').style.display = 'block';
-	document.getElementById('fade').style.display = 'block';
-	$("html,body").addClass("overflow-hidden");
-}
-//关闭地图
-function closeMap(){
-	document.getElementById('mapshowdiv').style.display = 'none';
-	document.getElementById('closeshowmap').style.display = 'none';
-	document.getElementById('fade').style.display = 'none';
-	$("html,body").removeClass("overflow-hidden");
-}
-function b_afterLogin(flag,result){
+function afterReLoadTop(flag,result){
 	//关系网如果没有数据,选项卡不可点
 	if(typeof(result) != "undefined"){
 		identWayFlag = result.identWay == 1;
@@ -384,74 +470,6 @@ function CopyrightEntity(){
 		$("#copyright .ent-findnull").removeClass("hide");
 	}
 }
-//服务列表
-function ServicePaging(){
-	this.initServiceList = function(){
-		var paging = new Paging("serviceListPaging","/front/findServiceByEntId",{entId:entId},service.pageSize,function(r){
-			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;
-				if(typeof(f_price) == "undefined" || f_price == null || f_price == ""){
-					f_price = 0;
-				}
-				var i_sales = r[i].i_sales;
-				if(typeof(i_sales) == "undefined" || i_sales == null || i_sales == ""){
-					i_sales = 0;
-				}
-				var i_comments = r[i].i_comments;
-				if(typeof(i_comments) == "undefined" || i_comments == null || i_comments == ""){
-					i_comments = 0;
-				}
-				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":(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">';
-				}
-				html += r[i].s_name;
-				if(flag){
-					html += '</a>';
-				}
-				html += '</td>';
-				if(flag){
-					html += '<td width="150" class="text-center"><font class="b-disabled">报价:</font><font class="text-primary">'+(r[i].s_pricemy==1?"面议":f_price+"元")+'</font></td>'
-						+'<td width="250" class="text-center"><font class="b-disabled">成交:</font><font class="text-primary">'+i_sales+'</font><font class="margin-lr-5 b-disabled">|</font><font class="b-disabled">评价:</font><font class="text-primary">'+i_comments+'</font></td>';
-				}else{
-					html += '<td>&nbsp;</td><td>&nbsp;</td>';
-				}
-				html += '</tr><tr>'
-					+'<td colspan="3"><div class="ent-serviceintroduction">'+r[i].s_introduction+'</div></td>'
-					+'</tr>';
-			}
-			$("#serviceListPaging").parent().prevAll().remove();
-			$("#serviceListPaging").parent().before(html);
-			$(".ent-serviceintroduction").each(function(){
-				var text = $(this).text();
-				if(text.length > 200){
-					text = text.substring(0,150)+"...";
-				}
-				$(this).html(text);
-			});
-		},service);
-		paging.firstPageDatas = null;
-	}
-	if(hasLoadPagingJs){
-		this.initServiceList();
-	}else{
-		var thisClass = this;
-		loadJS(cdn+"/js/paging.js",function(){
-			hasLoadPagingJs = true;
-			thisClass.initServiceList();
-		});
-	}
-}
 //失信信息
 function DishonestyPaging(){
 	this.initDishonesty = function(){
@@ -487,4 +505,41 @@ function DishonestyPaging(){
 			thisClass.initDishonesty();
 		});
 	}
+}
+function showMap(){
+	if(baiduMap == null){
+		loadJS("http://api.map.baidu.com/getscript?v=2.0&ak="+BaiduMap.key,function(){
+			baiduMap = new BaiduMap();
+			if(editFlag){
+				baiduMap.sign(function(province,city,district,address){
+					$("select.province option").each(function(){
+						if(province.startWith($(this).text())){
+							$(this).attr("selected",true);
+							$("select.province").trigger("change");
+							return false;
+						}
+					});
+					$("select.city option").each(function(){
+						if(city == $(this).text()){
+							$(this).attr("selected",true);
+							$("select.city").trigger("change");
+							return false;
+						}
+					});
+					$("select.area option").each(function(){
+						if(district == $(this).text()){
+							$(this).attr("selected",true);
+							$("select.area").trigger("change");
+							return false;
+						}
+					});
+					$("[name='s_address']").val(address);
+				});
+			}else{
+				baiduMap.analysisAddress(provinceName,cityName,areaName,address);
+			}
+		});
+	}else{
+		baiduMap.showMap();
+	}
 }

+ 0 - 84
core/src/web/staticres/js/geocoder.js

@@ -1,84 +0,0 @@
-var SAMPLE_ADVANCED_POST = 'http://api.map.baidu.com/geocoder/v2/?ak=您的密钥&callback=renderOption&output=json';
-
-var advancedOptions = '';
-var address;
-var marker;
-function showOptionsURL(type) {	
-	try{
-	    advancedOptions = SAMPLE_ADVANCED_POST;   
-		address = document.getElementById('location').value; 
-	    var cityname=document.getElementById('cityname').value;
-		advancedOptions+="&address="+address;
-		advancedOptions+="&city="+cityname;
-	}catch(e){}
-};
-
-function renderOption(response) {
-	try{
-		if (response.status ) {
-				var text = "无正确的返回结果:\n";
-				document.getElementById('mapshowdiv').innerHTML = text;
-				return;
-		}
-		var location = response.result.location;
-		//纬度 location.lat
-		//经度 location.lng
-		ptlat =location.lng;
-		ptlng =location.lat;	
-		var map = new BMap.Map("mapshowdiv"); //初始化地图   
-		var opts = {type: BMAP_NAVIGATION_CONTROL_LARGE}; //初始化地图控件  
-		map.addControl(new BMap.NavigationControl(opts)); 
-		//经度                 纬度
-		//var ptlat=113.69884285509,  ptlng=34.791342526551;
-		var point = new BMap.Point(ptlat,ptlng); //初始化地图中心点  
-		marker = new BMap.Marker(point); //初始化地图标记  
-		marker.enableDragging(); //标记开启拖拽  
-		  
-		var gc = new BMap.Geocoder();
-		
-		//添加标记拖拽监听  
-		marker.addEventListener("dragend", function(e){  
-		    //获取地址信息  
-		    gc.getLocation(e.point, function(rs){  
-		        showLocationInfo(e.point, rs);  
-		    });  
-		});  
-		  
-		//添加标记点击监听  
-		marker.addEventListener("click", function(e){  
-		   gc.getLocation(e.point, function(rs){  
-		        showLocationInfo(e.point, rs);  
-		    });  
-		});  
-		map.clearOverlays(); 
-		map.centerAndZoom(point, 12); //设置中心点坐标和地图级别  
-		map.addOverlay(marker); //将标记添加到地图中 
-		map.panBy(280, 200);//中心点偏移多少像素(width,height)为div 宽高的1/2; 
-		}catch(e){}
-}
-
-function doOptions() {
-    var script = document.createElement('script');
-    script.type = 'text/javascript';
-    showOptionsURL('buttonClick');
-    var newURL = advancedOptions.replace('您的密钥','AFd8b176f363f23e6a23d516f4cfb742');
-	script.src = newURL;
-    document.body.appendChild(script);
-};
-
-//显示地址信息窗口  
-function showLocationInfo(pt, rs){  
-    var opts = {  
-      width : 280,     //信息窗口宽度  
-      height: 100,     //信息窗口高度  
-      title : ""  //信息窗口标题  
-    }  
-      
-    var addComp = rs.addressComponents;  
-    var addr = "当前位置:" + addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber + "<br />";  
-    //addr += "纬度: " + pt.lat + ", " + "经度:" + pt.lng;  
-    //alert(addr);  
-	
-    var infoWindow = new BMap.InfoWindow(addr, opts);  //创建信息窗口对象  
-    marker.openInfoWindow(infoWindow);  
-}  

+ 8 - 3
core/src/web/staticres/js/qfw.js

@@ -24,6 +24,9 @@ var ValidDatatype = {
 	"e": function(gets,obj,curform,regxp){
 		return !!gets.match("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
 	},
+	"url": function(gets,obj,curform,regxp){
+		return /^(\w+:\/\/)?\w+(\.\w+)+.*$/.test(gets);
+	},
 	"*4": /^[^\s]{4,4}$/,//四位任意字符
 	"n4": /^\d{4,4}$/,	//四位数字
 	"n6": /^\d{6,6}$/,	//六位数字
@@ -222,6 +225,7 @@ function makeData(d,_this,b){
 			}catch(e){}
 		}
 		s.html(res).show()
+		$("#immediately").trigger("reload")
 	}else{
 		s.html("").hide()
 	}
@@ -274,13 +278,14 @@ function makeImmediately(data,b){
 			//res+="<div onclick=''>"+ds[0]+"</div>"
 			var clickVal = "iq(this)";
 			if(!b){
-				if($("#loginStatus").length == 1){
-					clickVal = "window.open('/wx/enterprise/"+ds[1]+".html')";
+				if ($("#ismobile").length==1){
+					clickVal = "/enterprise/"+ds[1]+".html";
+					res+='<a href="'+clickVal+'"><div data-id="'+clickVal+'">'+ds[0]+'</div></a>';
 				}else{
 					clickVal = "window.open('/enterprise/"+ds[1]+".html')";
+					res+='<div onclick="'+clickVal+'">'+ds[0]+'</div>';
 				}
 			}
-			res+='<div onclick="'+clickVal+'">'+ds[0]+'</div>';
 		}
 		if(b){
 			res+=delLog

+ 34 - 23
core/src/web/staticres/wxswordfish/style.css

@@ -644,48 +644,59 @@ img{
 .toolbar-popover{
 	position: absolute;
 	width: 90px;
-	height: 120px;
-	border: 1px solid #CCCCCC;
-	background-color: #F8F8F8;
-	bottom: 65px;
+	border: 1px solid #D0D0D0;
+	background-color: #F9FAFA;
+	bottom: 60px;
 	left: 50%;
-	margin-left: -45px;
+	margin-left: -50px;
 	display: none;
+	border-radius: 5px;
+	padding: 4px 2px;
 }
 .popover-ul li{
-	line-height: 38px;
-	padding-left: 10px;
-	width: 100%;
-	text-align: left;
+	line-height: normal;
+	width: 90px;
+	text-align: center;
+}
+.popover-ul li div{
+	padding: 5px 0px;
+}
+.popover-ul li span{
+	display: block;
+	height: 1px;
+	width: 60px;
+	margin: 3px auto;
+	background-color: #BFBFBF;
 }
 .toolbar-popover .popover-arrow{
-	bottom: -11px;
+	bottom: -6px;
 	left: 50%;
-	margin-left: -11px;
-	border-width: 11px;
+	margin-left: -3px;
 	border-bottom-width: 0;
+	border-left-width: 5px;
+	border-right-width: 5px;
+	border-top-width: 6px;
 	position: absolute;
 	border-color: transparent;
 	border-style: solid;
-	border-top-color: #CCCCCC;
+	border-top-color: #D0D0D0;
 }
 .toolbar-popover .popover-arrow:after{
 	position: absolute;
-	bottom: -9px;
-	margin-left: -10px;
+	bottom: 1px;
+	margin-left: -5px;
 	content: " ";
 	border-color: transparent;
-	border-top-color: #F8F8F8;
+	border-top-color: #F9FAFA;
 	border-bottom-width: 0;
-	border-width: 10px;
+	border-left-width: 5px;
+	border-right-width: 5px;
+	border-top-width: 6px;
 	border-style: solid;
 }
-.popover-ul li.active{
-	background-color: #EAEAEA;
-}
-.popover-ul >li:nth-child(2){
-	border-top:1px solid #e5e6e9;
-	border-bottom:1px solid #e5e6e9;
+.popover-ul li.active>div{
+	background-color: #D2D2D2;
+	border-radius: 5px;
 }
 .toolbar-popover-mask{
 	background-color: transparent;

文件差異過大導致無法顯示
+ 50 - 4
core/src/web/templates/_error.html


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

@@ -12,7 +12,7 @@
 		<div class="text-center hidden-xs"><img src="{{Msg "seo" "cdn"}}/images/bottom_logo.png"/></div>
 		<div class="qfw-bottom-text text-center">
 			<a href="/front/web_A_help.html">关于我们</a><span>|</span><a href="/front/web_L_help.html">联系我们</a><span>|</span>&nbsp;&nbsp;<span style="color:white">法律声明&nbsp;&nbsp;&nbsp;&nbsp;</span><span>|</span><a href="/front/web_H_help.html">帮助中心</a><span>|</span><a href="/front/web_O_help.html">意见反馈</a>
-			<div style="line-height:25px">©2015 拓普丰联&nbsp;版权所有<span>&nbsp;|&nbsp;</span><a href="http://www.miibeian.gov.cn/state/outPortal/loginPortal.action">京ICP备14030217号-2</a></div>
+			<div style="line-height:25px">©2015-2016&nbsp;拓普丰联&nbsp;版权所有<span>&nbsp;|&nbsp;</span><a target="_blank" href="http://www.miibeian.gov.cn/publish/query/indexFirst.action">京ICP备14030217号-2</a></div>
 		</div>
 	</div>
 </div>

+ 7 - 1
core/src/web/templates/common/centerhead.html

@@ -17,6 +17,12 @@
 body{
 	background-color:#f0f0f0;
 }
+.b-round-dot {
+    background-color: rgb(255, 90, 95);
+}
+.index-new-head .head-hidemenu i {
+    color: rgb(255, 90, 95);
+}
 </style>
 <!---->
 <div class="index-new-head b-head">
@@ -68,7 +74,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

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

@@ -108,7 +108,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

+ 34 - 82
core/src/web/templates/common/login.html

@@ -54,17 +54,13 @@
 </style>
 <script src="/js/validform-min.js"></script>
 <script type="text/javascript">
+//登录完之后要跳转的url
+var afterLoginUrl = null;
 //打开登录窗口
-function loginModalShow(lbt){
-	$("#head-navbar").toggleClass("hidden-xs");
-	if(loginBackType == null){
-		if(typeof(lbt) == "undefined" || lbt == null){
-			loginBackType = 0;
-		}else{
-			loginBackType = lbt;
-		}
+function loginModalShow(url){
+	if(typeof(url) != "undefined"){
+		afterLoginUrl = url;
 	}
-	if(lbt>7)loginBackType = lbt;
 	$("#wxPic").attr("src","");
 	$.post("/front/wxlogin/getNum",function(data){
 		if(data&&data.num){		
@@ -73,7 +69,6 @@ function loginModalShow(lbt){
 		}
 	},'json');
 	$('#loginModal').modal('show');
- 
 }
 t=''
 function setTimes(num,n){
@@ -86,7 +81,7 @@ function setTimes(num,n){
 			$.post("/front/wxlogin/getLogin/"+num,function(data){
 				try{			
 					if(data&&data.res){
-						if (data.freeze == "2"){
+						if (data.freeze == 2){
 			    				window.location.href="/front/webhelpcontent/55c818d8af537440a700000d.html";
 								return
 							}
@@ -145,33 +140,31 @@ $(function (){
 			$(o.obj).prev().text(msg).show();
 		},
 		callback:function(data){
-			if(data.status == "n"){
-				if (data.info == "s_error"){
-					login_errorProcess($("[name='s_name']"),"用户不存在")
-				}else{
-					login_errorProcess($("[name='s_pwd']"),"密码输入有误")
-				}
-			}else if (data.freeze == "2"){
-			    window.location.href="/front/webhelpcontent/55c818d8af537440a700000d.html";
-			}else if (data.status == "0"){//后台管理员
-				window.location.href="/manage/system";
-			}else{
-				//注册页面登录之后
-				$("#loginStatus").trigger("login");
-				afterLoginSkip(data,true);
-			}
-			//
 			if($("#loginModal [name='rememberMe']").is(':checked')==true){
 				document.cookie="loginName="+$("#loginModal [name='s_name']").val(); 
 			}
 			clearInterval(t);
+			if(data.status == "y"){
+				if(data.freeze == 2){
+				    window.location.href="/front/webhelpcontent/55c818d8af537440a700000d.html";
+				}else if (data.userType == 0){//后台管理员
+					window.location.href="/manage/system";
+				}else{
+					afterLoginSkip(data,true);
+				}
+			}else if (data.status == "s_error"){
+				login_errorProcess($("[name='s_name']"),"用户不存在")
+			}else if (data.status == "p_error"){
+				login_errorProcess($("[name='s_pwd']"),"密码输入有误")
+			}else{
+				window.location.reload();	
+			}
 		}
 	},"loginForm");
 	function login_errorProcess(obj,msg){
 		login_cssctlObj(obj.prev(),3);
 		obj.prev().text(msg).show();
 	}
-	
 	$(".loginFont").click(function(){
 		var v=$(this).attr("v")
 		$("#loginModal .loginFont").removeClass("text-primary");
@@ -179,68 +172,27 @@ $(function (){
 		$("#loginModal .login").hide();	
 		$("#loginModal ."+v).show();	
 	});
-	$("#loginStatus").bind("login",function(){
-		
-	});
 });
 function afterLoginSkip(data,flag){
-	//强制刷新
 	if(compulsoryreRresh){
-		window.location.href = window.location.href;
+		window.location.reload();
 		return;
 	}
 	if(flag){
-		switch(loginBackType){
-			case -1:
-				window.location.href = window.location.href;
-				break;
-			case 1://微官网
-				window.location.href="/member/wsite";
-				break;
-			case 2://员工邀请
-				window.location.href="/member/employeemanage/loginUserJoin";
-				break;
-			case 4://注册
-				window.location.href="/";
-				break;
-			case 5://预约
-				window.location.href="/front/appointlogin";
-				break;
-			case 6://投标
-				window.location.href="/front/reurl";
-				break;
-			case 7://用户中心首页
-				window.location.href = "/member/show/memberindex";
-				break;
-			case 8://录入产品服务信息
-				if(data.code==null || data.code == ""){
-					window.location.href = '/member/show/memberindex';
-				}else{
-					window.location.href = '/member/yellowpage/show/showService/'+data.code;
-				}
-				break;
-			case 9://录入企业信息
-				if(data.code==null || data.code == ""){
-					window.location.href = '/member/show/memberindex';
-				}else{
-					window.location.href = '/member/yellowpage/edit/enterprise/'+data.code;
-				}
-				break;
-			case 10://订阅设置
-				window.location.href = '/member/swordfish/rssset';
-				break;
-			case 11://信息列表
-				window.location.href = '/member/swordfish/infolist';
-				break;
-			default:
-				$('#loginModal').modal('hide');
+		if(afterLoginUrl == -1){//登录完之后回调
+			window.location.reload();
+		}else if(afterLoginUrl == 0){//登录完之后回调
+			try{
+				afterLogin(data);
+			}catch(e){}
+		}else if(afterLoginUrl == null){//登录完之后重新加载头部
+			reLoadTop();
+		}else{//登录完之后跳转到指定页面
+			window.location.href = afterLoginUrl;
 		}
+		$('#loginModal').modal('hide');
 	}
-	try{
-		reLoadTop();
-	}catch(e){
-		b_loadTop();
-	}
+	
 }
 </script>
 <!-- 登录弹出框 -->

+ 19 - 25
core/src/web/templates/common/memberleft.html

@@ -20,7 +20,7 @@
 }
 .member-loginName{
 	display: inline-block;
-	max-width: 110px;
+	max-width: 240px;
 	text-overflow:ellipsis;
 	overflow:hidden;
 	white-space:nowrap;
@@ -235,19 +235,12 @@ var isCanEditEnt = entId!="";
 var MemberLeftMenu = {
 	authentHref: "/member/authentication/index",//企业认证页面url
 	init: function (){
-		var editEnterHref = null;
-		if(isCanEditEnt){//可以编辑黄页
-			editEnterHref = "/member/yellowpage/show/enterprise/"+entId;
-		}else{//不可编辑黄页跳转到企业认证页面
-			editEnterHref = this.authentHref;
-		}
 		var html = "";
-
 		if(/^[2]$/.test(role)){//客服组长
 			html += this.accountSetMenu()+this.accountMenu()+this.messageMenu();
 			return;
 		}else if(role == "" || /^[9]$/.test(role)){//最大权限
-			html += this.myAppointment()+this.myDemand()+this.myYellowPageMenu(editEnterHref)+this.serverMenu(editEnterHref)+this.employeemanageMenu();
+			html += this.myAppointment()+this.myDemand()+this.myYellowPageMenu()+this.serverMenu()+this.employeemanageMenu();
 			if(/^[9]$/.test(role)){
 				html += this.callCenterMenu();
 			}
@@ -259,21 +252,13 @@ var MemberLeftMenu = {
 			html += this.accountSetMenu()+this.accountMenu()+this.messageMenu();
 			html += this.vipMenu()+this.myCredit()+this.creditRule();
 		}else if(isCanEditEnt){
-			html += this.myYellowPageMenu(editEnterHref);
+			html += this.myYellowPageMenu();
 			if(/^[1]$/.test(role)){//黄页编辑者
-				html += this.serverMenu(editEnterHref);
+				html += this.serverMenu();
 			}
 			html += this.accountSetMenu()+this.accountMenu()+this.messageMenu();
 		}
 		$("#member-left-nav").append(html);
-		//$("#serviceMerchan").click(function(){
-		//	$(this).children(".a-com-collapse").toggleClass("glyphicon-menu-up");
-		//	$(".menu-childnode").toggleClass("hide");
-		//});
-		//$("#vipMenu").click(function(){
-		//	$(this).children(".a-com-collapse2").toggleClass("glyphicon-menu-up");
-		//	$(".menu-childnode2").toggleClass("hide");
-		//});
 	},
 	//实名认证菜单
 	autheMenu: function(){
@@ -310,13 +295,22 @@ var MemberLeftMenu = {
 		return '<a onclick="openSChat()" class="list-group-item">客服中心</a>';
 	},
 	//我的黄页菜单
-	myYellowPageMenu: function(href){
+	myYellowPageMenu: function(){
+		var href = null;
+		if(isCanEditEnt){//可以编辑黄页
+			href = "/member/enterprise/show";
+		}else{//不可编辑黄页跳转到企业认证页面
+			href = this.authentHref;
+		}
 		return '<a onclick="window.location.href=\''+href+'\'" class="list-group-item myyellow">我的黄页</a>';
 	},
 	//产品服务菜单
-	serverMenu: function(href){
-		if(this.authentHref != href){
-			href += '#service';
+	serverMenu: function(){
+		var href = null;
+		if(isCanEditEnt){
+			href = "";
+		}else{//不可编辑黄页跳转到企业认证页面
+			href = this.authentHref;
 		}
 		return '<a onclick="window.location.href=\''+href+'\'" class="list-group-item">产品服务</a>';
 	},
@@ -372,8 +366,8 @@ function openSChat() {
 function qd(){
 	$.post("/member/credit/inCreditAjx",{"param":"qd"},function(r){
 		if (r.result=="y"){
-					bookinfo(1);
-				}
+			bookinfo(1);
+		}
 		changeStatus();
 	});
 }

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

@@ -67,7 +67,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

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

@@ -65,7 +65,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

+ 6 - 9
core/src/web/templates/common/swordfishhead.html

@@ -21,7 +21,7 @@ function open_window(link){
 	}
 	window.open("/visit/redirect?url="+escape(link));
 }
-function b_afterLogin(flag,result){
+function afterReLoadTop(flag,result){
 	if(flag){
 		//立即体验
 		$("#experience").click(function(){
@@ -37,18 +37,15 @@ function b_afterLogin(flag,result){
 			window.location.href = "/member/swordfish/infolist";
 		});
 	}else{
-		//立即体验
-		$("#experience").click(function(){
-			loginModalShow();
-		});
-		$("#goToSearch").click(function(){
-			loginModalShow();
+		//立即体验,信息查询
+		$("#experience,#goToSearch").click(function(){
+			loginModalShow("/member/swordfish/searchinfolist");
 		});
 		$("#goToRssset").click(function(){
-			loginModalShow(10);
+			loginModalShow("/member/swordfish/rssset");
 		});
 		$("#goToInfolist").click(function(){
-			loginModalShow(11);
+			loginModalShow("/member/swordfish/infolist");
 		});
 	}
 }

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

@@ -11,7 +11,7 @@
 </div>
 <script type="text/javascript">
 $(function(){
-	b_loadTop();
+	reLoadTop();
 });
 //认证完之后首次登录
 function afterAutheFirstLogin(result){
@@ -21,7 +21,7 @@ function afterAutheFirstLogin(result){
 		$("body").append('{{include "/common/ploginmodal.html"}}');
 		$("#fristAutheLoginModal .com-nickName").text(result.nickName);
 		$("#fristAutheLoginModal .com-entName").text(result.entName+"店铺");
-		$("#fristAutheLoginModal .com-entCard a").attr("href","/member/yellowpage/edit/enterprise/"+entId);
+		$("#fristAutheLoginModal .com-entCard a").attr("href","/member/enterprise/edit");
 	}else{
 		$("body").append('{{include "/common/ologinmodal.html"}}');
 		$("#fristAutheLoginModal .com-nickName").text(result.nickName);
@@ -39,14 +39,14 @@ function afterAutheFirstLogin(result){
 			//$("#fristAutheLoginModal .com-who").text("完成以下操作,就可以领取红包啦:");
 		}else{
 			$("#fristAutheLoginModal .com-entCard").removeClass("hide");
-			$("#fristAutheLoginModal .com-entCard a").attr("href","/member/yellowpage/edit/enterprise/"+entId);
+			$("#fristAutheLoginModal .com-entCard a").attr("href","/member/enterprise/edit");
 		}
 	}
 	$("#fristAutheLoginModal .com-releaseService a").attr("href","/member/yellowpage/show/showService/"+entId);
 	$("#fristAutheLoginModal").modal('show');
 }
 //
-function b_loadTop(){
+function reLoadTop(){
 	$.ajax({
 	  	type: "POST",
 	  	url: "/front/getWebSiteTop",
@@ -106,7 +106,7 @@ function b_loadTop(){
 				$("body").append('{{include "/common/login.html"}}');
 			}
 			try{
-				b_afterLogin(isLogined,result);
+				afterReLoadTop(isLogined,result);
 			}catch(e){}
 		},
 		error: function(e){

+ 2 - 2
core/src/web/templates/common/wsitehead.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="/front/content_qykb_list.html">微官网</a></li>
+			<li class="b-nav-link b-nav-main"><a href="/front/wsite.html">微官网</a></li>
 			
 			<li class="b-h-search hidden">
 				<div class="input-group">
@@ -66,7 +66,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

+ 52 - 42
core/src/web/templates/yellowpage/enterpriseinfo.html → core/src/web/templates/enterprise/detail.html

@@ -6,6 +6,7 @@
 <meta name="Keywords" content="{{.T.res.EntName}},{{.T.res.EntName}}地址,{{.T.res.EntName}}怎么样"/>
 <meta name="Description" content="{{.T.res.OpScope}}"/>
 <link href="{{Msg "seo" "cdn"}}/css/entcommunity.css" rel="stylesheet">
+<script src="{{Msg "seo" "cdn"}}/js/baiduMap.js"></script>
 <script src="{{Msg "seo" "cdn"}}/js/entportrait.js"></script>
 </head>
 <body class="entinfo-page">
@@ -13,8 +14,18 @@
 <div class="b-content container-fluid">
 	<!--企业名片-->
 	<div class="b-com-head">
-		<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="ent-logo" id="entLogo">
+			<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'">
+			{{if eq .T.editFlag 2}}
+			<div id="uploadLogo" class="ent-uploadLogo">
+				上传企业LOGO
+				<div class="hide"></div>
+			</div>
+			{{end}}
+		</div>
 		<div class="entinfo-cart">
+			{{if eq .T.editFlag 1}}<a class="btn btn-primary btn-save" href="/member/enterprise/edit">编辑</a>{{end}}
+			{{if eq .T.editFlag 2}}<button id="editSave" class="btn btn-primary btn-save">保存</button>{{end}}
 			<div class="b-com-first">
 				<font class="b-com-title">{{if .T.res.EntName}}{{.T.res.EntName}}{{end}}</font>
 				{{if .T.res.OpState}}
@@ -41,23 +52,53 @@
 				{{end}}
 			</div>
 			<div class="b-com-second">
-				{{if .T.res.EntName }}
+				{{if .T.res.EntName}}
 					{{if .T.res.s_action}}
 						{{$identaction:=.T.res.s_action}}
 						{{if eq $identaction "01"}}
 						<script>entType="企业"</script>
+						<span>
 							<span class="glyphicon qyrz"></span>
 							已认证企业{{if .T.res.i_comauthenttype}}{{if eq .T.res.i_comauthenttype 2}}<font class="margin-lr-5">-</font><span class="glyphicon mprz"></span>名片认证{{else if eq .T.res.i_comauthenttype 1}}<font class="margin-lr-5">-</font><span class="glyphicon yyzzrz"></span>营业执照认证{{else if eq .T.res.i_comauthenttype 3}}<font class="margin-lr-5">-</font><span class="glyphicon yjrz"></span>年报邮箱认证{{end}}{{else}}<font class="margin-lr-5">-</font><span class="glyphicon yyzzrz"></span>营业执照认证{{end}}
+						</span>
 						{{else if eq $identaction "02"}}
 						<script>entType="商家"</script>
+						<span>
 							<span class="glyphicon grrz"></span>已认证个人
+						</span>
 						{{else if eq $identaction "03"}}
 						<script>entType="机构"</script>
+						<span>
 							<span class="glyphicon jgrz"></span>已认证机构
+						</span>
 						{{end}}
 					{{end}}
 				{{end}}
+				{{if .T.serviceCount}}<a>服务信息列表</a>{{end}}
 			</div>
+			{{if eq .T.editFlag 2}}
+			<form class="b-editEnt-form" id="editForm">
+				<div>
+					<span class="glyphicon ren2"></span><input type="text" name="s_persion" class="form-control" maxlength="10" value="{{.T.res.s_persion}}">
+					<span class="glyphicon shouji"></span><input type="text" name="s_mobile" class="form-control" maxlength="11" onKeyUp="rePlaceUnDigital(this)" value="{{.T.res.s_mobile}}">
+					<span class="glyphicon qq1"></span><input type="text" name="s_qq" class="form-control" maxlength="30" value="{{.T.res.s_qq}}">
+				</div>
+				<div>
+					<span class="glyphicon youjian2"></span><input type="text" name="s_email" class="form-control" value="{{.T.res.s_email}}">
+					<span class="glyphicon wangzhi1"></span><input type="text" name="s_enturl" class="form-control" value="{{.T.res.s_enturl}}">
+				</div>
+				<div class="b-com-last">
+					<span class="glyphicon dizhi"></span>
+					<span id="city_china">
+						<select class="province cxselect select-control" id="provincesel" name="i_province" data-first-title="全国"></select>								
+						<select class="city cxselect select-control" id="citysel" name="i_city" data-first-title="选择市"></select>
+						<select class="area cxselect select-control" id="areasel" name="i_area" data-first-title="选择县"></select>
+					</span>
+					<input type="text" name="s_address" class="form-control" maxlength="50" value="{{.T.res.s_address}}">
+					<a href="javascript:void(0)" class="font-size-12" onclick="showMap()">添加标记</a>
+				</div>
+			</form>
+			{{else}}
 			<div class="b-com-last">
 				{{if .T.res.s_persion}}<span class="glyphicon ren2"></span>{{.T.res.s_persion}}<span class="margin-r-15"></span>{{end}}
 				{{if or .T.res.s_mobile .T.res.Tel}}<span class="glyphicon shouji"></span>{{if .T.res.s_mobile}}{{.T.res.s_mobile}}{{else if .T.res.Tel}}{{.T.res.Tel}}{{end}}<span class="margin-r-15"></span>{{end}}
@@ -105,12 +146,12 @@
 							{{.T.res.Dom}}
 						{{end}}
 					</span>
-					<input id="location" type="hidden" value="{{if .T.res.Dom}}{{.T.res.Dom}}{{end}}">
-					<input id="cityname" type="hidden" value="">
 					<a href="javascript:void(0)" class="font-size-12" onclick="showMap()">查看详细地图</a>
 				{{end}}
 			</div>
+			{{end}}
 		</div>
+		{{if ne .T.editFlag 2}}
 		<div class="b-pcshare">
 			<span id="pcShare"><span class="glyphicon fenxiang"></span>分享</span>
 			<div class="b-pcshare-content" id="pcShare-content">
@@ -126,16 +167,16 @@
 				</div>
 			</div>
 		</div>
+		{{end}}
 	</div>
 	<!--切换-->
 	<ul class="ent-tab">
-		<li class="ent-active"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}概况</li>
+		<li class="ent-active"><div class="b-com-border-top"></div>{{if .T.res.s_action}}{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}{{else}}企业{{end}}概况</li>
 		<li><div class="b-com-border-top"></div>关系网</li>
 		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>主要人员<front class="badge" id="ent-tab-staffinfo">0</front></li>
 		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.SoftWareCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}><div class="b-com-border-top"></div>著作权<front class="badge" id="ent-tab-copyright">0</front></li>
 		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>变更信息<front class="badge{{if .T.res.alterInfo}}{{if eq (len .T.res.alterInfo) 0}} disabled{{end}}{{else}} disabled{{end}}">{{if .T.res.alterInfo}}{{len .T.res.alterInfo}}{{else}}0{{end}}</front></li>
 		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}><div class="b-com-border-top"></div>失信信息<front class="badge" id="ent-tab-dishonesty">0</front></li>
-		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0"><div class="b-com-border-top"></div>{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
 	</ul>
 	<div class="ent-tab-content b-left{{if and (not .T.relevantNews) (not .T.relevantEnts)}} b-right-none{{end}}">
 		<!--企业概况-->
@@ -451,33 +492,6 @@
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-		<!--企业黄页-->
-		<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="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
-				<h4>抱歉,未找到相关数据!</h4>
-			</div>
-		</div>
 	</div>
 	{{if or .T.relevantEnts .T.relevantNews}}
 	<div class="b-right">
@@ -527,10 +541,6 @@
 	</div>
 	{{end}}
 </div>
-<!--显示地图信息-->
-<div id="mapshowdiv" class="white_content"></div>
-<a href ="javascript:void(0)" onclick="closeMap();"><div id="closeshowmap" class="closeshowmap">X</div></a>
-<div id="fade" class="black_overlay"></div>
 {{include "/common/bottom.html"}}
 </body>
 <script type="text/javascript">
@@ -550,18 +560,18 @@ var OpScope = {{.T.res.OpScope}};
 var service = {{.T.service}};
 var relFlag = {{.T.relflag}};
 var copyright = {{.T.copyright}};
+var editFlag = {{.T.editFlag}}==2;
+var opLocDistrict = {{.T.res.OpLocDistrict}};
 //联系地址
-//定义默认的郑州经纬度
-var ptlat=113.69884285509,  ptlng=34.791342526551;
 var province = {{.T.res.i_province}};
 var city = {{.T.res.i_city}};
 var area = {{.T.res.i_area}};
-var as1="{{.T.res.s_address}}";
-var $address=false,$listent=false;
+var address = {{.T.res.s_address}};
+var $address=false;
 {{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address}}
 	$address = true;
 {{else if .T.res.Dom}}
-	initMap();
+	address = {{.T.res.Dom}};
 {{end}}
 </script>
 </html>

+ 1 - 1
core/src/web/templates/manage/audithead.html

@@ -2,7 +2,7 @@
 <div class="container-fluid" style="border-bottom: 1px solid #eeeeee;">
 <div class="row qfw-header">
 <div class="col-lg-5 col-md-6  hidden-sm hidden-xs ">
-	<a href="/"><img id="searchHeader-logo" src="{{Msg "seo" "cdn"}}/images/logo.png" class="lineb header_logo"/></a>
+	<a href="/"><img id="searchHeader-logo" src="{{Msg "seo" "cdn"}}/images/logo.png" class="lineb logo"/></a>
 	<img  src="{{Msg "seo" "cdn"}}/images/v_line.png" class="lineb" style="margin:0 5px;" />
 	<div class="text-muted lineb fontb" style="font-size:30px;height:80px;line-height:80px;vertical-align:middle">系统设置</div>
 </div>

+ 27 - 8
core/src/web/templates/manage/web_help.html

@@ -280,9 +280,10 @@
 		</div>
 	  
 		<div class="form-group" style="margin-top:35px; ">
-        <label id="col-sm-2" class="col-sm-2 control-label" for="name"><span style="color:#D03102;margin-right:5px;">*</span>问题描述:</label>
+        <label id="col-sm-2" class="col-sm-2 control-label" for="name"><span style="color:#D03102;margin-right:5px;">*</span>反馈内容:</label>
 	    <div class="col-sm-10">
-		<textarea style=" width:100%;padding:10px 8px; height:120px; max-width:740px;"  name="s_remark" class="form-control" id="remark"   placeholder="请在这里输入您的问题描述。" ></textarea>
+		<textarea style=" width:100%;padding:10px 8px; height:120px; max-width:740px;"  name="s_remark" class="form-control" id="remark"   placeholder="" >1.请输入您的宝贵意见
+2.如果有好的信息源,请告诉我们</textarea>
 		</div>
 		</div>
 		
@@ -407,6 +408,24 @@
 </div>
 {{include "/common/bottom.html"}}
 <script type="text/javascript">
+var rm = $("#remark").val();
+$("#remark").css("color","cccccc");
+$("#remark").click(function(){
+	var rm2 = $("#remark").val();
+	if (rm == rm2){
+		$("#remark").val("");
+	}else{
+		$("#remark").css("color","000");
+	}
+});
+$("#remark").blur(function(){
+	var rm3 = $("#remark").val();
+	var rm4;
+	if (rm3 == ""||rm3 == rm){
+		$("#remark").css("color","cccccc");
+		document.getElementById("remark").value = "1.请输入您的宝贵意见\n2.如果有好的信息源,请告诉我们"
+	}
+});
 var tp = {{.T.tp}}
 active(tp)
 $("#tdbtn").click(function(){
@@ -415,7 +434,12 @@ $("#tdbtn").click(function(){
 function reLoadCaptcha(id){
 	document.getElementById(id).src='/tool/captcha?rnd='+Math.random()
 }
-function insertback(){    
+function insertback(){  
+	var str1 = $("#remark").val();
+	if (str1 == '' || rm == str1){
+	alert('请输入您的反馈内容!')
+	return
+	}  
     var str4 = $("#chedkcode").val();
 	if (str4 == ''){
 	alert('验证码不能为空!')
@@ -426,11 +450,6 @@ function insertback(){
 	//alert('问题标题不能为空!')
 	//return
 	//}
-	var str1 = $("#remark").val();
-	if (str1 == ''){
-	alert('问题描述不能为空!')
-	return
-	}
 	
     var Param = $("#insertback").serialize();
     $.ajax({    

+ 1 - 1
core/src/web/templates/manage/webactivitycontent.html

@@ -126,7 +126,7 @@ $(function (){
 		if(isLogined){
 			window.location.href = "/front/reurl";
 		}else{
-			loginModalShow(6);
+			loginModalShow("/front/reurl");
 		}
 	});
 });

+ 48 - 1
core/src/web/templates/manage/webmobindex.html

@@ -29,6 +29,34 @@ body{
      width: auto; 
     border-radius: 4px;
 }
+#webbtsm{
+	border-top:1px solid #E5E6E9; 
+	height:88px; 
+	width:100%;
+	background-color:#f0f0f0;
+	line-height:25px;
+}
+#chup{
+	float:left;
+	width:50%;
+	padding-left:80px;
+	margin-top: 10px;
+}
+#diann{
+	float:left;
+	width:50%;
+	padding-right:80px;
+	margin-top: 10px;
+	color: #999999;
+}
+#banquan{
+	border-top:1px solid #E5E6E9; 
+	height:50px; 
+	width:100%;
+	background-color:#f0f0f0;
+	line-height:20px;
+	padding-top: 10px;
+}
 </style>
 </head>
 <body>
@@ -66,7 +94,7 @@ body{
 
 
 </div>
-<div class="row" style="padding:0px; margin-left:auto; margin-right:auto;margin-bottom:20px;">
+<div class="row" style="padding:0px; margin-left:auto; margin-right:auto;">
 		<div id="contentindex">
 			<div class="container-fluid">
 				<div style="margin-top:0px;" class="row-fluid">
@@ -92,6 +120,21 @@ body{
 
 
 </div>
+<div class="text-center" id="webbtsm">
+<div id="chup">
+<img style="height:49px;" src="/images/u906.png"><br/>
+触屏版
+</div>
+<div id="diann">
+<img style="height:49px;" src="/images/u908.png"><br/>
+电脑版
+</div>
+<div style="clear:both;"></div>
+</div>
+<div class="text-center" id="banquan">
+©2015-2016 拓普丰联 版权所有 | 京ICP备14030217号-2
+</div>
+
 {{include "/common/bottom.html"}}
 <script type="text/javascript">
 function currPos(){
@@ -101,6 +144,10 @@ $(function (){
 	$(".backTop").click(function (){
 		$(window).scrollTop(0);
 	});
+	$("#diann").click(function(){
+		//跳转到电脑版
+		
+	});
 	$('#loginModal').on('shown.bs.modal', function () {
 		$("#username").focus();
 	});

+ 3 - 0
core/src/web/templates/member/accountset/bindmail.html

@@ -137,6 +137,9 @@
 <script type="text/javascript">
 function ocheckMail(){
 	var checkmail = $("#ocheckmail").val();
+	if($.trim(checkmail) == ""){
+		return;
+	}
 	$.post('/member/accountset/checkConMail',{checkmail:checkmail},function(data){
 		if (data.pk == "2")	{
 			$("#tishi1").removeClass("hide");

+ 2 - 1
core/src/web/templates/member/accountset/index.html

@@ -161,7 +161,8 @@ function editInfoComplate(obj,type){
 	$.post("/member/show/editInfo",{type:type,value:obj.value},function(result){
 		if(result.status == true){
 			if(type == "s_nickname"){
-				$("#topNickName,.member-loginName").text(obj.value);//修改顶部和用户中心左边导航条昵称
+				$("#b-loginStatus>span:eq(1)").text(obj.value);//修改顶部昵称
+				$(".member-loginName").text(obj.value);//修改户中心左边导航条昵称
 			}
 			$(obj).prev().children("font").text(obj.value);//修改显示的值
 		}

+ 8 - 6
core/src/web/templates/member/comauthent.html

@@ -40,11 +40,9 @@ label {
 .Validform_wrong{
 	display:inline;
 	line-height:16px;
-	width:50%;
 }.Validform_wrongbottom{
 	display: table-cell;
 	line-height:16px;
-	width:50%;
 	color: #97310e;
     background-image: url('{{Msg "seo" "cdn"}}/images/error_bg.png');
 }
@@ -181,8 +179,8 @@ label {
 			 <!--div 模拟表格布局结束-->
 			  <div style="position:relative">
 				<input type="hidden" name="imgurl" id="imgurl" value="" datatype="*" /><span id="imgurlv" style="width:105px;" class="Validform_checktip"></span> 
-				<div class="text-left margin-t-15" id="mm"></div>
-				<span id="showImgTip" class="Validform_checktip Validform_wrongbottom" style="width:25%;display:none">请上传营业执照</span>
+				<div class="text-left margin-t-15" id="mm" style="display: inline-block;margin-right: 15px;"></div>
+				<div style="display: inline-block;vertical-align:sub;"><span id="showImgTip" class="Validform_checktip Validform_wrongbottom" style="display:none">请上传营业执照</span></div>
 				<!--<a class="btn btn-default" style="position:absolute;top:0;left:120px;color:#000 " onclick="viewimg()">预览</a>-->
 			  </div>
 		
@@ -338,6 +336,7 @@ function checkcname(){
 	if (!obj){
 		($("#cnamev").removeClass("Validform_right").addClass("Validform_wrong"))[0].innerHTML="请输入企业名称"
 		$("#btn").addClass("disabled");
+		$("#cnamev").next().hide();
 	}else{
 		//根据企业名称查询
 		$.ajax({
@@ -348,11 +347,13 @@ function checkcname(){
 			success:function(data){
 				if(data){
 					if(data.msg){
-						$("#cnamev").removeClass("Validform_wrong")[0].innerHTML=""
+						$("#cnamev").removeClass("Validform_wrong font-size-12")[0].innerHTML=""
 						$("#btn").removeClass("disabled");
+						$("#cnamev").next().show();
 					}else{
-						($("#cnamev").addClass("Validform_wrong"))[0].innerHTML="企业名称已经认证过,请仔细核对或联系网站工作人员";
+						($("#cnamev").addClass("Validform_wrong font-size-12"))[0].innerHTML="企业名称已经认证过,请仔细核对或联系网站工作人员";
 						$("#btn").addClass("disabled");
+						$("#cnamev").next().hide();
 					}
 				}
 			}
@@ -405,6 +406,7 @@ function upcomauthent(){
 	if(cname.length==0){
 		($("#cnamev").removeClass("Validform_right").addClass("Validform_wrong"))[0].innerHTML="请输入企业名称"
 		$("#btn").addClass("disabled");
+		$("#cnamev").next().hide();
 		return;
 	}
 	

+ 4 - 4
core/src/web/templates/member/credit/mycredit.html

@@ -151,7 +151,7 @@ a.mycredit{
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
 								<td width="10%" align="center"><span class="n-ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 未完成</td>
-								<td width="30%" style="padding:110px">去 <button class="btn btn-primary" onclick="toUrl('{{if session "identWay"}}{{if eq (session "identWay") 1}}/member/yellowpage/show/enterprise/{{.T.user.s_enterpriseid}}{{else}}/member/accountset/index{{end}}{{else}}/member/accountset/index{{end}}')" style="padding-top:3px;padding-bottom:3px;">完善资料</button></td>
+								<td width="30%" style="padding:110px">去 <button class="btn btn-primary" onclick="toUrl('{{if session "identWay"}}{{if eq (session "identWay") 1}}/member/enterprise/show{{else}}/member/accountset/index{{end}}{{else}}/member/accountset/index{{end}}')" style="padding-top:3px;padding-bottom:3px;">完善资料</button></td>
 								{{end}}
 							</tr>
 							<tr class="rowtwo">
@@ -161,7 +161,7 @@ a.mycredit{
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
 								<td width="10%" align="center"><span class="n-ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 未完成</td>
-								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/search/enterprise/ent.html')">企业社区</span>查询</td>
+								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/front/entCommunity.html')">企业社区</span>查询</td>
 								{{end}}
 							</tr>
 							<tr class="rowone">
@@ -201,7 +201,7 @@ a.mycredit{
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
 								<td width="10%" align="center"><span class="n-ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span> 未完成</td>
-								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/search/enterprise/ent.html')">企业社区</span>查看</td>
+								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/front/entCommunity.html')">企业社区</span>查看</td>
 								{{end}}
 							</tr>
 							<tr class="rowone">
@@ -263,7 +263,7 @@ a.mycredit{
 								<td width="30%" style="padding:110px"></td>
 								{{else}}
 								<td width="10%" align="center"><span class="n-ok-sign bootstrap-glyphicon glyphicon-ok-sign"></span><span style="padding:0 13px">{{.T.B_QYCX.B}}/{{.T.B_QYCX.C}}</span></td>
-								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/search/enterprise/ent.html')">企业社区</span>完成</td>
+								<td width="30%" style="padding:110px">去<span class="mx" onclick="toUrl('/front/entCommunity.html')">企业社区</span>完成</td>
 								{{end}}
 							</tr>
 							<tr class="rowone">

+ 35 - 17
core/src/web/templates/member/editenterprise.html

@@ -105,11 +105,11 @@ var entType="企业"
 						<div class="two"><script>document.write(entType)</script>LOGO:</div> 
 						<div class="three" id="logoArea">
 							{{if .T.entinfo.s_avatar}}
-							<img class='ent-LOGO cursor-pointer' src='{{.T.entinfo.s_avatar}}' onerror="$(this).next().removeClass('hide');$(this).remove();" onclick="document.getElementById('upload').click();">
+							<img class='ent-LOGO cursor-pointer' src='{{.T.entinfo.s_avatar}}' onerror="$(this).next().removeClass('hide');$(this).remove();" onclick="document.getElementById('upload').click();uploadType=0;">
 							{{end}}
 							<div{{if .T.entinfo.s_avatar}} class="hide"{{end}}>
-								<img src="/images/services/default.png" style="width: 90px; height: 90px;cursor: pointer;" onclick="document.getElementById('upload').click();">
-								<div id="tips" style="cursor: pointer;text-align: center; width: 90px; position: absolute; color: #fff; top: 64px; background-color: #cccccc;"  onclick="document.getElementById('upload').click();">上传logo</div>
+								<img src="/images/services/default.png" style="width: 90px; height: 90px;cursor: pointer;" onclick="document.getElementById('upload').click();uploadType=0;">
+								<div id="tips" style="cursor: pointer;text-align: center; width: 90px; position: absolute; color: #fff; top: 64px; background-color: #cccccc;"  onclick="document.getElementById('upload').click();uploadType=0;">上传logo</div>
 								<span class="margin-l-10" style="position: relative;top: 33px;">上传一张不超过10M的图片,支持jpg、png、bmp格式。建议尺寸260*260像素</span>
 							</div>
 						</div> 
@@ -132,14 +132,8 @@ var entType="企业"
 						<div class="one"><span class="glyphicon weixinhao icon_gray"></span></div> 
 						<div class="two" style="letter-spacing: 4.5px;">微信号&nbsp;:</div> 
 						<div class="three" id="mblocation"><input type="text" name="s_weixin" class="form-control" id="s_weixin" value="{{.T.entinfo.s_weixin}}" maxlength="20">
-						 <a href="#" class="text-primary "  onClick="uploadBarCode();">上传二维码</a>
-						 <img class="imgs barcode" alt="预览" name="imgurl" style="margin-left:10px;width:35px;height:35px;" src="{{Msg "seo" "cdn"}}{{.T.entinfo.s_weixinbarcode}}">
-						<div  style="display:none;">
-							<div class="mupload"></div>
-							<ul  class="pic">
-							</ul>
-							<input type="hidden" value=""  class="imgs" name="imgurl"/>
-						</div>
+							<a href="#" class="text-primary "  onClick="document.getElementById('upload').click();uploadType=1;">上传二维码</a>
+							<img class="imgs barcode" style="margin-left:10px;width:35px;height:35px;{{if not .T.entinfo.s_qrcode}}display:none;{{end}}" src="{{Msg "seo" "cdn"}}{{.T.entinfo.s_qrcode}}" onerror="$(this).hide();">
 						</div> 
 					</div> 
 				</div>
@@ -210,30 +204,51 @@ var entType="企业"
 </body>
 
 <script>
+var uploadType = 0;
 //
 var option={
 	btnname:"",
 	action:"/filemanage/upload",
 	btnClass:"",
 	afterError:function(data,e){
-		alert("上传LOGO失败,请重新上传。");
+		if(uploadType == 1){
+			alert("上传二维码失败,请重新上传。");
+		}else{
+			alert("上传LOGO失败,请重新上传。");
+		}
 	},
 	afterUpload:function(data){ //此处可以重写,上传后的处理
 		if(data.flag == true){
+			var field = "s_avatar";
+			if(uploadType == 1){
+				field = "s_qrcode";
+			}
 			$.ajax({
 			  	type: "POST",
-			  	url: "/member/yellowpage/updateEntLogo",
-			  	data: "url="+data.url,
+			  	url: "/member/yellowpage/upLoadEntImg",
+			  	data: "field="+field+"&url="+data.url,
 			 	dataType: "text",
 			  	success: function(result){
 					if (result == "y"){
-						$("#logoArea").html('<img class="ent-LOGO cursor-pointer" src="'+data.url+'" onclick="document.getElementById(\'upload\').click();">');
+						if(uploadType == 1){
+							$(".barcode").attr("src",data.url).show();
+						}else{
+							$("#logoArea").html('<img class="ent-LOGO cursor-pointer" src="'+data.url+'" onclick="document.getElementById(\'upload\').click();uploadType=0;">');
+						}
 					}else{
-						alert("上传LOGO失败,请重新上传。");
+						if(uploadType == 1){
+							alert("上传二维码失败,请重新上传。");
+						}else{
+							alert("上传LOGO失败,请重新上传。");
+						}
 					}
 				},
 				error: function(){
-					alert("上传LOGO失败,请重新上传。");
+					if(uploadType == 1){
+						alert("上传二维码失败,请重新上传。");
+					}else{
+						alert("上传LOGO失败,请重新上传。");
+					}
 				}
 			});
 		}else{
@@ -245,6 +260,9 @@ try{
 	$("#uploadLogo").upload(option);
 }catch(e){}
      //
+function uploadProcess(url,field){
+	
+}
 $("#s_persion").blur(function(){
 	var str = $("#s_persion").val();
 	if (str == ""){

+ 1 - 1
core/src/web/templates/member/employeemanage/joinByLink.html

@@ -44,7 +44,7 @@ $(function (){
 		window.location.href = "/front/registerByLink";
 	});
 	$("#joinByLink-login").click(function(){
-		loginModalShow(2);
+		loginModalShow("/member/employeemanage/loginUserJoin");
 	});
 });
 </script>

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

@@ -75,6 +75,7 @@
  <body>
 <div class="modal-backdrop fade in" style="display:none;"></div>
 	<div id="header">
+	
 		<div class="col-xs-12 index-header" style="text-align:center;">
 			<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'" height=85 width=85>
 			<div class="col-xs-12 title"> 
@@ -247,7 +248,9 @@
 			$("#header").hide();
 			$("#"+node.attr("data-id")).show();
 			if (node.attr("data-id")=="c_relation" && $("svg").length==0){
-				initRelation();
+				{{if session "identWay"}}
+					initRelation();
+				{{end}}
 			}
 		}else{
 			$("#header").show();

+ 51 - 2
core/src/web/templates/member/incmobile/index.html

@@ -52,7 +52,29 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
     });
 }	
 </script>
-
+	<style>
+			.immediately {
+		    position: absolute;
+		    display: none;
+		    z-index: 9999;
+		    border: 1px solid #B5B6BB;
+		    border-top: 0px;
+		    padding: 3px;
+		    background: #FFF;
+		}
+		 .immediately div:hover {
+		    cursor: pointer;
+		    background-color: #16A086;
+		    color: #FFF;
+		}
+		.immediately div {
+		        height: 30px;
+			    line-height: 30px;
+			    color: #000;
+			    text-align: center;
+				overflow: hidden;
+		}
+	</style>
 	</head>
 <body class="index-bodybg">
 		<div class="main">
@@ -73,6 +95,8 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 							<span class="glyphicon glyphicon-camera input-after" id="camera"></span>
 							<span class="input-group-addon"><span onclick="$('#search').submit();" class="glyphicon glyphicon-search"></span></span>
              		</div>
+						<div id="immediately" class="immediately">
+						</div>
 					</form>
 			</div>
 		</div>
@@ -132,7 +156,32 @@ function getmpname(serverId){
         } 
     }); 
 }
-
+	function changeSearchBorder(){
+		var width=$("#query").css("width");
+		width=width.substr(0,width.indexOf("p"))+"px";
+		$("#immediately").css("width",width);
+	}
+$(function(){
+	changeSearchBorder();
+	$(window).resize(function(){
+			changeSearchBorder();
+	});
+	$("#query").focus(function(){
+		$(".main").css("margin-top","-130px");
+	});
+	$("#query").keyup(function(){
+			imFind(this);
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		});
+		 document.getElementById("query").addEventListener("input", function(){
+			imFind($("#query"));
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		}, false);  
+});
 </script>
 
 </body>

+ 2 - 0
core/src/web/templates/member/incmobile/list.html

@@ -11,6 +11,7 @@
  </head>
  <body>
 	<div class="col-xs-12">
+	<input type="hidden"  id="ismobile" value="1">
 	<div class="m-searchbar">
 		<div class="containers">
 			<form  id="queryform" method="post">
@@ -283,6 +284,7 @@
 				}
 			});
 		}
+		
 		</script>
 
  </body>

+ 6 - 14
core/src/web/templates/member/incmobile/relation.html

@@ -4,23 +4,15 @@
 </div>
 		<div class="entrelation" id="entrelation">
 			<div id="entrelation-infovis"></div>
-			<div id="entrelation-limit" class="hide entrelation-limit">
-				<div id="entrelation-nologin" class="hide text-center">
-					<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
-					<h5>扫码登录认证后,即可查看企业股东信息,投资关系,公司关系脉络图等内容</h5>
-					<button class="btn btn-primary" onclick="loginModalShow();">扫码登录</button>
-				</div>
-				<div id="entrelation-noauthe" class="hide text-center">
-					<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
-					<h5>认证后即可查看企业股东信息,投资关系,公司关系脉络图等内容</h5>
-					<a href="/member/accountset/index" class="btn btn-primary">认证</a>
-				</div>
-				<div class="dashed padding-0"></div>
-				<img src="{{Msg "seo" "cdn"}}/images/entcommunity/relation.png">
+			{{if session "identWay"}}
+			
+			{{else}}
+			<div id="entrelation-limit" class="entrelation-limit">
+					<img src="/images/mobile/unauth.png" width=100% style="margin-top:20px;" />
 			</div>
+			{{end}}
 			<div id="entrelation-findnull" class="ent-findnull hide">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
-	

+ 2 - 2
core/src/web/templates/member/memberindex.html

@@ -64,9 +64,9 @@
 						<table class="table">
 							<tr>
 								<td class="yellowpage-content">
-									<div onclick="window.location.href='{{if session "entid"}}/member/yellowpage/show/enterprise/{{session "entid"}}{{else}}/member/authentication/index{{end}}'">企业信息</div>
+									<div onclick="window.location.href='{{if session "entid"}}/member/enterprise/show{{else}}/member/authentication/index{{end}}'">企业信息</div>
 									<span>完善企业信息让您获得更精准的服务和商机</span>
-									<div onclick="window.location.href='{{if session "entid"}}/member/yellowpage/show/enterprise/{{session "entid"}}#service{{else}}/member/authentication/index{{end}}'">产品服务信息</div>
+									<div onclick="window.location.href='{{if session "entid"}}/member/enterprise/show{{session "entid"}}#service{{else}}/member/authentication/index{{end}}'">产品服务信息</div>
 									<span>完善 产品服务信息列表让您获得更多商业机会</span>
 									<div onclick="window.location.href='/market/demand/add.html'">发需求</div>
 									<span>一对一服务,迅速,高效的响应您的需求</span>

+ 20 - 6
core/src/web/templates/member/microwebsite.html

@@ -123,10 +123,9 @@ body{
 <!-- 底部 -->
 {{include "/common/bottom.html"}}
 <script type="text/javascript">
-loginBackType = 1;
+var loginType = 0;
 var isPreview = "{{.T.isPreview}}" == "true";
 $(function(){
-	//setNavbarActive(5);
 	if(!isPreview){
 		$(".step-1 span").each(function(){
 			if($(this).attr("value") == "{{.T.s_microwebsite}}"){
@@ -138,23 +137,25 @@ $(function(){
 	$(".editEnt").click(function(){
 		if(isPreview){
 			if(this.id == "editService"){
-				loginModalShow(8);
+				loginType = 1;
 			}else{
-				loginModalShow(9);
+				loginType = 2;
 			}
+			loginModalShow(0);
 		}else{
 			var href = null;
 			if(this.id == "editService"){
 				href = '/member/yellowpage/show/showService/{{session "entid"}}';
 			}else{
-				href = '/member/yellowpage/edit/enterprise/{{session "entid"}}';
+				href = '/member/enterprise/edit';
 			}
 			window.location.href = href;
 		}
 	});
 	$(".step-1 span").click(function(){
 		if(isPreview){
-			loginModalShow();
+			loginType = 0;
+			loginModalShow(0);
 			return;
 		}
 		$(".step-1 span").removeClass("selected");
@@ -170,6 +171,19 @@ $(function(){
    		});
 	});
 });
+function afterLogin(data){
+	if(data.identWay != 1){
+		window.location.href = '/member/show/memberindex';
+	}else{
+		if(loginType == 0){
+			window.location.reload();
+		}else if(loginType == 1){
+			window.location.href = '/member/yellowpage/show/showService/'+data.entId;
+		}else{
+			window.location.href = '/member/enterprise/edit';
+		}
+	}
+}
 </script>
 </body>
 </html>

+ 11 - 8
core/src/web/templates/member/otherauthentication.html

@@ -125,8 +125,8 @@
 						<!--身份证右边显示信息结束-->
 						 <div style="position:relative">
 							<input type="hidden" name="imgurl" id="imgurl" value="" datatype="*" />
-							<span id="imgurlv" style="width:105px;" class="Validform_checktip"></span> 
-							<div class="text-left" style="margin-left:5px;" id="mm"></div>
+							<div class="text-left" style="margin-top:15px;margin-right: 15px;display:inline-block;" id="mm"></div>
+							<div style="display:inline-block;vertical-align:sub;"><span id="imgurlv" class="Validform_checktip"></span> </div>
 							<div id="showImgTip" class="Validform_checktip Validform_wrongbottom" style="width:100%;display:none">请上传身份证照片</div>
 							<!--<a class="btn btn-default" style="position:absolute;top:0;left:120px;color:#000 " onclick="viewimg()">预览</a>-->
 						  </div>
@@ -137,10 +137,11 @@
 					<span class="col-sm-2" ></span>
 					<span class="col-sm-10" style="margin:0px;padding:0px;font-size:12px;color:#999;">您提供的照片信息将予以保护,不会挪作他用,详见<span style="color:#dd4814;">企业网隐私权政策</span></span>
 				</div>
-				
-				<div style="text-align:left; width:100%;margin:20px;margin-left:108px;">
-					<button id="btn" type="button" onclick="upcomauthent()" class="btn btn-primary" >提交审核
-			        </button>
+				<div class="form-group">
+					<span class="col-sm-2" ></span>
+					<span class="col-sm-10">
+						<button id="btn" type="button" onclick="upcomauthent()" class="btn btn-primary" >提交审核</button>
+					</span>
 				</div>
 			</form>
 	      
@@ -180,11 +181,13 @@ function checkname(obj){
 	if (obj.trim()==""){
 		$("#namev").addClass("Validform_wrong")
 		document.getElementById("namev").innerHTML="请输入组织名称"
-		$("#btn").addClass("disabled")
+		$("#btn").addClass("disabled");
+		$("#namev").next().hide();
 	}else{
 		$("#namev").removeClass("Validform_wrong")
 		document.getElementById("namev").innerHTML=""
-		$("#btn").removeClass("disabled")
+		$("#btn").removeClass("disabled");
+		$("#namev").next().show();
 	}
 }
 function checkorganizetype(obj){

+ 14 - 6
core/src/web/templates/member/personalauthent.html

@@ -133,8 +133,8 @@ label {
 							<!--身份证右边显示信息结束-->
 							 <div style="position:relative">							
 								<input type="hidden" name="imgurl" id="imgurl" value="" datatype="*" />
-								<span id="imgurlv" style="width:105px;" class="Validform_checktip"></span> 
-								<div class="text-left margin-t-15" id="mm"></div>
+								<div class="text-left margin-t-15" id="mm" style="margin-right: 15px;display: inline-block;"></div>
+								<div style="display:inline-block;vertical-align:sub;"><span id="imgurlv" class="Validform_checktip"></span></div>
 								<div id="showImgTip" class="Validform_checktip Validform_wrongbottom" style="width:100%;display:none">请上传身份证照片</div>
 								<!--<a class="btn btn-default" style="position:absolute;top:0;left:120px;color:#000 " onclick="viewimg()">预览</a>-->
 							</div>
@@ -165,10 +165,11 @@ label {
 				         
 					  </div>
 					</div>
-					
-					<div style="text-align:left; width:100%;margin:20px;margin-left:140px;">
+					<div class="form-group">
+					  <div class="col-sm-offset-2 col-sm-10">
 						<a id="btnshangyibu" class="btn btn-primary" onclick="btnshangyibu();"  >上一步</a>
 						<button id="btn" type="button" onclick="upcomauthent();" class="btn btn-primary" >提交审核</button>
+					  </div>
 					</div>
 				</div><!--secondform-->
 				
@@ -251,14 +252,17 @@ function checkname(obj){
 		$("#namev").addClass("Validform_wrong");
 		document.getElementById("namev").innerHTML="请输入姓名";
 		$("#btnnext").addClass("disabled");
+		$("#namev").next().hide();
 	}else if(obj.trim().length>50){
 		$("#namev").addClass("Validform_wrong");
 		document.getElementById("namev").innerHTML="长度小于50";
 		$("#btnnext").addClass("disabled");
+		$("#namev").next().hide();
 	}else{
 		$("#namev").removeClass("Validform_wrong");
 		document.getElementById("namev").innerHTML="";
 		$("#btnnext").removeClass("disabled");
+		$("#namev").next().show();
 	}
 }
 
@@ -361,11 +365,13 @@ function checkshopname(obj){
 	if(obj.trim()==""){
 		$("#shopnamev").addClass("Validform_wrong")
 		document.getElementById("shopnamev").innerHTML="请输入商家名称"
-		$("#btn").addClass("disabled")
+		$("#btn").addClass("disabled");
+		$("#shopnamev").next().hide();
 	}else{
 		$("#shopnamev").removeClass("Validform_wrong")
 		document.getElementById("shopnamev").innerHTML=""
-		$("#btn").removeClass("disabled")
+		$("#btn").removeClass("disabled");
+		$("#shopnamev").next().show();
 	}
 }
 
@@ -429,10 +435,12 @@ $(function(){
 	    if(name.trim()==""){
 			$("#namev").addClass("Validform_wrong");
 			document.getElementById("namev").innerHTML="请输入姓名";
+			$("#namev").next().hide();
 			return;
 		}else if(name.trim().length>30){
 			$("#namev").addClass("Validform_wrong");
 			document.getElementById("namev").innerHTML="姓名长度小于30";
+			$("#namev").next().hide();
 		}
 		var cardnum = $("#cardnum").val();    
 	    if(cardnum.trim()==""){

+ 2 - 2
core/src/web/templates/member/register.html

@@ -53,7 +53,7 @@
 <div class="container-fluid">
 	<div class="qfw-header">
 		<div>
-			<a href="/"><img alt="" src="{{Msg "seo" "cdn"}}/images/logo.png" class="header_logo"></a>
+			<a href="/"><img alt="" src="{{Msg "seo" "cdn"}}/images/logo.png" class="logo"></a>
 			<img alt="" src="{{Msg "seo" "cdn"}}/images/v_line.png" class="header_line">
 			<font class="text-muted">注册</font>
 		</div>
@@ -83,7 +83,7 @@
 		  <span class="reg-thirdParty">
 			使用第三方账号<img class="weixinLoginBtn" src="{{Msg "seo" "cdn"}}/images/weixin.png" onClick="weixinLogin()"/>
 			<img class="qqLoginBtn" src="{{Msg "seo" "cdn"}}/images/u87.png" onClick="qqLogin()"/>登录,
-			<a href="javascript:void(0)" onclick="loginModalShow(4)" class="text-primary">已有账号去登录</a>
+			<a href="javascript:void(0)" onclick="loginModalShow('/')" class="text-primary">已有账号去登录</a>
 		  </span>
 		  <!-- Tab panes -->
 		  <div class="tab-content">

+ 1 - 1
core/src/web/templates/member/registercomplete.html

@@ -63,7 +63,7 @@ function getRecomService(){
 <div class="container-fluid">
 	<div class="qfw-header">
 		<div>
-			<a href="/"><img alt="" src="{{Msg "seo" "cdn"}}/images/logo.png" class="header_logo"></a>
+			<a href="/"><img alt="" src="{{Msg "seo" "cdn"}}/images/logo.png" class="logo"></a>
 			<img alt="" src="{{Msg "seo" "cdn"}}/images/v_line.png" class="header_line">
 			<font class="text-muted">注册完成</font>
 		</div>

+ 4 - 4
core/src/web/templates/member/showenterprise.html

@@ -136,8 +136,8 @@ var entType="企业"
 						<div class="one"><span class="glyphicon weixinhao icon_gray"></span></div> 
 						<div class="two" style="letter-spacing: 4.5px;">微信号&nbsp;:</div> 
 						<div class="three"><span class="span999">{{.T.entinfo.s_weixin}}</span> 
-						{{if .T.entinfo.s_weixinbarcode}}
-						&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary " onClick="viewBarCode({{.T.entinfo.s_weixinbarcode}});">扫一扫</a>
+						{{if .T.entinfo.s_qrcode}}
+						&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="text-primary " onClick="viewBarCode({{.T.entinfo.s_qrcode}});">扫一扫</a>
 						{{end}}
 						</div>
 					</div> 
@@ -501,8 +501,8 @@ function clearWeixin(){
 	}
 }
 //
-var s_weixinbarcode = {{.T.entinfo.s_weixinbarcode}}
-  if (s_weixinbarcode == ""){
+var s_qrcode = {{.T.entinfo.s_qrcode}}
+  if (s_qrcode == ""){
 	$(".span999").next().css("display","none")
 }
 //手机号

+ 46 - 6
core/src/web/templates/search/enterpriseList.html

@@ -4,7 +4,6 @@
 <meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
 {{include "/common/inc.html"}}
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cxselect.js"></script>
-<link href="{{Msg "seo" "cdn"}}/css/enterprise.css" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/entcommunity.css" rel="stylesheet">
 <meta name="Keywords" content="{{Msg "seo" "qfw.enterprise.key"}}"/>
 <meta name="Description" content="{{Msg "seo" "qfw.enterprise.description"}}"/>
@@ -17,13 +16,12 @@
 		<!--查询条件-->
 		<div class="border container-fluid hidden-sm hidden-xs" >
 			<div class="rowFl rowFltt">
-				<div class="tt lineb qfw-p-margintop" ><b>&nbsp;所&nbsp;在&nbsp;地:</b></div>
+				<div class="tt lineb margin-t-5" ><b>&nbsp;所&nbsp;在&nbsp;地:</b></div>
 				<div id="city_china" class="lineb ttcon" >
 					<select class="sel province cxselect yselect" disabled="disabled" id="c_province" name="province"></select>
 					<select class="sel city cxselect yselect" disabled="disabled" id="c_city" name="city"></select>
 					<select class="sel area cxselect yselect" disabled="disabled" id="c_area" name="area"></select>
 				</div>
-				<!--<div class="rowFlTip"><span class="text-primary lineb marginLeft qfw-p-margintoplist"><span class="glyphicon biaojidizhi icon_default text-primary" style="width:20px;"></span><small style="color:#999999;">目前系统有河南、广西、黑龙江、青海、西藏、安徽、山西和湖北的官方企业数据,更多数据持续加入中...</small></span></div>-->
 			</div>
 			<div class="rowFl rowFltt" >
 				<div class="tt lineb"><b>行业类别:</b></div>
@@ -127,6 +125,9 @@
 									{{if $v.OpScope }}<div><font class="b-disabled">经营范围:</font><font  class="lineb ">{{index $v "OpScope"}}</font></div>{{end}}
 								</div>
 							</div>
+							<div class="ent-follow{{if $v.followFlag}} ent-followed{{end}}">
+								<span class="bootstrap-glyphicon {{if $v.followFlag}}glyphicon-heart{{else}}glyphicon-heart-empty{{end}}"></span>关注
+							</div>
 						</div>
 					</div>
 				{{end}}
@@ -204,16 +205,55 @@
 	<!--右边显示区结束-->
 </div>
 {{include "/common/bottom.html"}}
-
-
 <script>
+compulsoryreRresh = true;
 var entsel = {{index .T.querymap "city"}}
-
 var btempwords={{.T.words}}
 var chf1= {{index .T.querymap "c_hfl"}};
 var czb= '{{index .T.querymap "c_zb"}}';
 var $chiancity= true,$listent=true;
 $(function(){
+	$(".ent-follow").click(function(){
+		if(!isLogined){
+			loginModalShow();
+			return;
+		}
+		var dataObj = {};
+		dataObj["flag"] = $(this).hasClass("ent-followed");
+		var entObj = $(this).prev().children("div").children("a:first");
+		if(!dataObj.flag && !confirm("你将关注“"+entObj.text().replace(/\s+/g,"")+"”,剑鱼将会推送该企业的企业情报给你,每月将会扣除1000积分")){
+			return;
+		}
+		dataObj["entId"] = entObj.attr("href").split("/")[2].replace(".html","");
+		var thisClass = $(this);
+		$.post("/member/enterprise/follow",dataObj,function(r){
+			if(r.status == "y"){
+				if(dataObj.flag){
+					thisClass.children("span").removeClass("glyphicon-heart").addClass("glyphicon-heart-empty");
+					alert("已取消关注");
+				}else{
+					thisClass.children("span").addClass("glyphicon-heart").removeClass("glyphicon-heart-empty");
+					alert("已关注");
+				}
+				thisClass.toggleClass("ent-followed");
+			}else if(r.status == "m"){
+				alert("剑鱼为给你更好的使用体验目前仅支持关注10家企业,你已成功关注10家企业,如需继续关注,请到“用户中心-我的关注”对已关注的企业进行取消关注后,可关注新的企业!");
+			}else if(r.status == "n"){
+				if(dataObj.flag){
+					alert("取消关注失败,请重新取消!");
+				}else{
+					alert("关注失败,请重新关注!");
+				}
+			}else{
+				if(dataObj.flag){
+					alert("取消关注失败,请重新取消!");
+				}else{
+					alert("关注失败,请重新关注!");
+				}
+				window.location.reload();
+			}
+		});
+	});
 	scrollUp("entlist-recommend");
 });
 </script>

+ 0 - 172
core/src/web/templates/search/wxentlist.html

@@ -1,172 +0,0 @@
-<html>
-<head>
-<title>{{Msg "seo" "qfw.enterprise.title"}}</title>
-<meta name="msvalidate.01" content="D5F3ADC7EB4E65FFB8BF943AD56DD1F7" />
-{{include "/common/inc.html"}}
-<script src="{{Msg "seo" "cdn"}}/js/jquery.cxselect.js"></script>
-<link href="{{Msg "seo" "cdn"}}/wxent/qfw-enterprise.css" rel="stylesheet">
-<meta name="Keywords" content="{{Msg "seo" "qfw.enterprise.key"}}"/>
-<meta name="Description" content="{{Msg "seo" "qfw.enterprise.description"}}"/>
-</head>
-<body>
-{{include "/common/head.html"}}
-<div class="a-content">
-	<!--中间内容开始-->
-	<div class="row qfw-row">
-		<!--左边显示区开始-->
-		<div class="col-lg-9" style="padding-right: 0px;">
-		<div class="borderB text-primary fontb frontS hidden-sm hidden-xs">所有分类</div>
-			<!--查询条件-->
-			<div class="border container-fluid hidden-sm hidden-xs qfw-p-margintoplist" >
-				<div class="rowFl rowFltt">
-					<div class="tt lineb qfw-p-margintop" >&nbsp;所&nbsp;在&nbsp;地:</div>
-					<div id="city_china" class="lineb ttcon qfw-p-margintoplist" >
-						<select class="sel province cxselect yselect" disabled="disabled" id="c_province" name="province"></select>
-						<select class="sel city cxselect yselect" disabled="disabled" id="c_city" name="city"></select>
-						<select class="sel area cxselect yselect" disabled="disabled" id="c_area" name="area"></select>
-					</div>
-					<!--<div class="rowFlTip"><span class="text-primary lineb marginLeft qfw-p-margintoplist"><span class="glyphicon biaojidizhi icon_default text-primary" style="width:20px;"></span><small style="color:#999999;">目前系统有河南、广西、黑龙江、青海、西藏、安徽、山西和湖北的官方企业数据,更多数据持续加入中...</small></span></div>-->
-				</div>
-				<div class="rowFl rowFltt" >
-					<div class="tt lineb">行业类别:</div>
-					<div class="lineb ttcon less" id="c_hfl"></div>
-					<div class="text-muted qfw-text-more" onClick="less(this)"><small>更多></small></div>
-				</div>
-				<div class="rowFl ">
-					<div class="tt lineb">注册资本:</div>
-					<div class="lineb ttcon less" id="c_zb"></div>
-				</div>
-			</div>
-			<!--查询条件结束-->
-			<!--注册资本、认证-->
-			<ul id="navs" class="nav nav-tabs  hidden-sm hidden-md hidden-xs qfw-p-margintoplist ">
-				<li class="active" id="c_all" name="all" value="0"><a href="#home" data-toggle="tab">全部</a></li>
-               	<span  class=" hidden-sm hidden-md hidden-xs renzheng" ><input type="checkbox" name="c_author" id="c_author" value="Y" {{if .T.querymap.c_author}}checked{{end}}/>认证</span>
-	        </ul>
-			<!--注册资本、认证结束-->
-			
-			<!--列表详细信息开始-->
-			<div>
-				{{if gt (len .T.data) 0}}
-					{{range $k,$v:=.T.data}}
-						<div class="borderB">
-							<div class="qfw-entcontent-padding">
-								<div class="lineb " >
-									<a target="_blank" href="/wx/enterprise/{{index $v "_id"}}.html">
-										{{$lens:=len (index $v "EntName")}}									 
-										{{if eq $lens 0}}
-											{{index $v "LeRep"}}
-										{{else}}
-											{{index $v "EntName"}}
-										{{end}}
-									</a>
-									
-									{{ if index $v "s_action"}}
-										{{ if eq (index $v "s_action") "01"}}
-											<span class="glyphicon qyrz   margin-l-10 jhtb"></span><span class=" " ><small>已认证企业</small></span>
-											{{ if $v.i_comauthenttype }}
-													{{ if eq $v.i_comauthenttype 2}}
-														<span class="glyphicon mprz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-right:5px;">名片认证</small></span>					
-													{{else if eq $v.i_comauthenttype 1}}
-														<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
-													{{else if eq $v.i_comauthenttype 3}}
-														<span class="glyphicon yjrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-right:5px;">年报邮箱认证</small></span>
-													{{end}}
-											{{else}}
-													<span class="glyphicon yyzzrz   margin-r-10 jhtbtype"></span><span class=" " ><small style="margin-left:3px;margin-right:5px;">营业执照认证</small></span>
-											{{end}}
-										{{else if eq (index $v "s_action") "02"}}
-											<span class="glyphicon grrz   margin-l-10 jhtb"></span><span class=" " ><small> 已认证个人</small></span>
-										{{else if eq (index $v "s_action") "03"}}
-											<span class="glyphicon jgrz   margin-l-10 jhtb"></span><span class=" " ><small> 已认证机构</small></span>
-										{{end}}
-									{{end}}
-								</div>
-								
-								<div>
-									<span>注册号:<small  class="lineb " >{{index $v "RegNo"}}</small></span>
-									{{if index $v "EntType"}}
-										{{if eq $v.EntType "9600"}}
-											<span>经营者:<small  class="lineb " >{{index $v "LeRep"}}</small></span>
-										{{else if eq $v.EntType "5810"}}
-											<span>负责人:<small  class="lineb " >{{index $v "LeRep"}}</small></span>
-										{{else}}
-											<span>法定代表人:<small  class="lineb " >{{index $v "LeRep"}}</small></span>
-										{{end}}
-									{{end}}
-									<span>经营状态:<small  class="lineb " >{{index $v "OpStateName"}}</small></span>
-									<span>成立日期:<small  class="lineb " >{{index $v "EstDate"}}</small></span>
-									<span>所在地:<small  class="lineb " >{{index $v "OpLocDistrictName"}}</small></span>
-								</div>
-								{{if $v.s_servicenames}}<div>产品服务:<small  class="lineb ">{{Html (Replace $v.s_servicenames "," "" 1)}}</small></div>{{end}}
-								{{if $v.stock }}<div>股东:<small  class="lineb ">{{index $v "stock"}}</small></div>{{end}}
-								{{if $v.OpScope }}<div>经营范围:<small  class="lineb ">{{index $v "OpScope"}}</small></div>{{end}}
-							</div>
-						</div>
-					{{end}}
-					<!--页码信息-->
-					<div class="text-center  hidden-sm hidden-md hidden-xs">
-						<ul class="pagination pagination-md ">
-						{{range $k,$v:=.T.pagination}}
-							<li {{if index $v "iscurrent"}}class="disabled active"{{end}}>
-							<a {{if index $v "iscurrent"}}  style="background-color:#f5f5f5" href="#"{{else}}href="{{index $v "url"}}"{{end}}>{{index $v "page"}}</a>
-							
-							</li>
-						{{end}}
-						</ul>
-					</div>
-					<!--页码信息结束-->
-					
-					<!--页码信息-->
-					<div class="text-center hidden-lg">
-						<ul class="pagination pagination-md ">
-						{{range $k,$v:=.T.pagination}}
-							
-							{{if eq $k 6}}
-							{{else if eq $k 7}}
-							{{else if eq $k 8}}
-							{{else}}
-								<li {{if index $v "iscurrent"}}class="disabled active"{{end}}>
-								<a {{if index $v "iscurrent"}}  style="background-color:#f5f5f5" href="#"{{else}}href="{{index $v "url"}}"{{end}}>
-								{{index $v "page"}}
-								</a>
-								</li>
-							{{end}}
-							
-						{{end}}
-						</ul>
-					</div>
-					<!--页码信息结束-->
-				
-				{{else}}
-					<div class="alert alert-error "><div class="text-center" style="margin:20px auto;"><img src="{{Msg "seo" "cdn"}}/images/u20.png"><h4><span class="glyphicon biaojidizhi icon_default text-primary"></span>&nbsp;<strong class="text-muted">没有找到相关内容,换个关键词试试</strong></h4></div></div>
-				{{end}}
-			</div>
-			<!--列表详细信息结束-->	
-		</div>
-		<!--左边显示区结束-->
-		
-		<!--右边显示区开始-->
-		<div class="col-lg-3 hidden-sm hidden-md hidden-xs collg3_width">
-			<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>
-		</div>
-		<!--右边显示区结束-->
-	</div>
-	<!--中间内容结束-->
-</div>
-
-
-<script>
-var entsel = {{index .T.querymap "city"}}
-
-var btempwords={{.T.words}}
-var chf1= {{index .T.querymap "c_hfl"}};
-var czb= '{{index .T.querymap "c_zb"}}';
-var $chiancity= true,$listent=true;
-setNavbarActive(2);
-</script>
-<script src="/wxent/qfw-enterprise.js"></script>
-
-</body>
-</html>

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

@@ -154,7 +154,7 @@ function appointment(){
 		dataType: 'json', 
 		success:function(data){
 			if (data.status == "no"){	
-				loginModalShow(5);
+				loginModalShow("/front/appointlogin");
 			}else if (data.status == "yes"){		
 	            $(".after_submit").click();
 			}
@@ -173,7 +173,7 @@ $(document).ready(function(){
 			if(status == "CheckCodeId_error"){
 				alert("验证码输入有误!"); 
 		  	}else if (status == "no"){//未登录用户	
-				loginModalShow(5);
+				loginModalShow("/front/appointlogin");
 			}else if(status == "aly"){
 			    $('#appointmentModal').modal('hide');
 				alert("您不能预约自己公司发布的服务!");

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

@@ -254,7 +254,7 @@
 	<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"http://test.qimingxing.info/upload/2015/10/27/2015102708191301041479.jpg","bdStyle":"0","bdSize":"16","onAfterClick":function(){$.post("/member/credit/inCreditAjx",{"param":"fx"},function(r){})}},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
 	<script>
 		
-		loginBackType = -1;
+		compulsoryreRresh = true;
 		$(function(){
 			$(".m-title span").click(function(e){
 					node=$(e.target);

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

@@ -72,7 +72,7 @@ $(function(){
 					return v
 				});
 				//关键词高亮
-				var html = $(this).html();
+				var html = $(this).find("a").text();
 				for(var i=0;i<s_words.length;i++){
 					if(s_words[i] != ""){
 						var wordsArray = s_words[i].split("+");
@@ -95,7 +95,7 @@ $(function(){
 						}
 					}
 				}
-				$(this).html(html);
+				$(this).find("a").html(html);
 				//已访问过的灰色
 				var xh = $(this).children(".xh").text();
 				if(typeof(a_visitedindex)!= "undefined"){
@@ -205,7 +205,7 @@ function loadMore(){
 					return n+1
 				});
 				//关键词高亮
-				var html = $(this).html();
+				var html = $(this).find("a").text();
 				for(var i=0;i<s_words.length;i++){
 					if(s_words[i] != ""){
 						var wordsArray = s_words[i].split("+");
@@ -228,7 +228,7 @@ function loadMore(){
 						}
 					}
 				}
-				$(this).html(html);
+				$(this).find("a").html(html);
 				//已访问过的灰色
 				var xh = $(this).children(".xh").text();
 				

+ 1 - 1
core/src/web/templates/swordfish/rssset.html

@@ -13,7 +13,7 @@
 	<div class="b-left">
 		<div class="swordfish-page-title">
 			<i class="img-circle glyphicon jianyu"></i>订阅设置
-			<span >继续使用表明已经同意了<span><a href='/member/swordfish/protocol'>剑鱼用户服务协议</a>
+			<span >继续使用表明已经同意了<span><a href='/member/swordfish/protocol'>剑鱼用户服务协议</a>
 			<span style="float:right;width:190px">
 			<a id="ckys">查看演示&nbsp;&nbsp;</a>
 			<a id="sfbz" onclick="$('#sfbzModal').modal('show')">收费标准</a>

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

@@ -41,7 +41,7 @@ $(function(){
 				return v
 			});
 			//关键词高亮
-			var html = $(this).html();
+			var html = $(this).find("a").text();
 				if(s_words != ""){
 					var wordsArray = s_words.split("+");
 					for(var si=0;si<wordsArray.length;si++){
@@ -53,7 +53,7 @@ $(function(){
 				}
 			
 			
-			$(this).html(html);
+			$(this).find("a").html(html);
 			//已访问过的灰色
 			var xh = $(this).children(".xh").text();
 			if(typeof(a_visitedindex)!= "undefined"){

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

@@ -40,7 +40,7 @@ $(function(){
 		});
 		//关键词高亮
 		if(typeof(s_words) != "undefined"){
-			var html = $(this).html();
+			var html = $(this).find("a").text();
 			for(var i=0;i<s_words.length;i++){
 				if(s_words[i] != ""){
 					var wordsArray = s_words[i].split("+");
@@ -52,7 +52,7 @@ $(function(){
 					}
 				}
 			}
-			$(this).html(html);
+			$(this).find("a").html(html);
 		}
 		//已访问过的灰色
 		if(typeof(a_visitedindex) != "undefined"){

+ 1 - 1
core/src/web/templates/swordfish/wxrssset.html

@@ -91,7 +91,7 @@ if(sessionStorage&&sessionStorage.version=="1"){
 	</ul>
 	<!--剑鱼服务协议-->
 	<div style="margin-bottom:80px;text-align:center;">
-		<span id="prexieyi" style="color:#CCCCDD">继续使用表明已经同意了</span>
+		<span id="prexieyi" style="color:#CCCCDD">继续使用表明已经同意了</span>
 		<a style="color:#33ABFF" href='/member/swordfish/wxprotocol'>剑鱼用户服务协议</a>
 	</div>
 	<!--关键词-->

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

@@ -41,7 +41,7 @@ $(function(){
 			});
 			$(this).children(".xh").wrap('<div class="resnumb"><div class="one"></div></div>');
 			//关键词高亮
-			var html = $(this).html();
+			var html = $(this).find("a").text();
 				if(s_words != ""){
 					var wordsArray = s_words.split("+");
 					for(var si=0;si<wordsArray.length;si++){
@@ -53,7 +53,7 @@ $(function(){
 				}
 			
 			
-			$(this).html(html);
+			$(this).find("a").html(html);
 			//已访问过的灰色
 			var xh = $(this).find("span.xh").text();
 			if(typeof(a_visitedindex)!= "undefined"){

+ 11 - 3
core/src/web/templates/swordfish/wxtoolbar.html

@@ -10,9 +10,17 @@
 	<li class="parent-node toolbar-list" id="toolbar-list">
 		<div class="toolbar-popover">
 			<ul class="popover-ul">
-				<li>查看演示</li>
-				<li>分享</li>
-				<li>意见反馈</li>
+				<li>
+					<div>查看演示</div>
+					<span></span>
+				</li>
+				<li>
+					<div>分享</div>
+					<span></span>
+				</li>
+				<li>
+					<div>意见反馈</div>
+				</li>
 			</ul>
 			<div class="popover-arrow"></div>
 		</div>

+ 0 - 1
core/src/web/templates/yellowpage/config.json

@@ -1 +0,0 @@
-{"bid":{"interval":60,"lastpushtime":"2015-10-10 10:10:10"},"bidStartTime":"2016-03-07 08:38:24","bidTitle":"亲!剑鱼为您速报最新鲜的中标信息啦","bidViewDomain":"test.qimingxing.info","durationMinutes":10,"mail_bid":"\u003cdiv\u003e%s\u003c/div\u003e,想了解更多信息,请访问http://www.qimingxing.info。","maxPushSize":50,"mgoAddr":"127.0.0.1:27080","mgoSize":10,"province":{"上海":9,"云南":25,"内蒙古":5,"北京":1,"台湾":32,"吉林":7,"四川":13,"天津":2,"宁夏":30,"安徽":12,"山东":15,"山西":4,"广东":19,"广西":20,"新疆":31,"江苏":10,"江西":14,"河北":3,"河南":16,"浙江":11,"海南":21,"湖北":17,"湖南":18,"澳门":34,"甘肃":28,"福建":13,"西藏":26,"贵州":24,"辽宁":6,"重庆":22,"陕西":27,"青海":29,"香港":33,"黑龙江":8},"pushInfoScopeDays":30,"rpcPort":"8766","smtpAddr":"smtp.exmail.qq.com","smtpFromUser":"企明星","smtpPort":465,"smtpPwd":"qy123456","smtpUser":"qyfw@topnet.net.cn","tenderStartTime":"2016-03-07 08:50:46","tenderTitle":"亲!剑鱼为您速报最新鲜的招标信息啦","weixinRpcServer":"127.0.0.1:91","weixin_bid":"\u003cdiv\u003e%s最新招标信息\u003c/div\u003e\u003cdiv\u003e%s\u003c/div\u003e","wxRpcRemark":"请到网站个人中心查看详细."}

+ 0 - 19
core/src/web/templates/yellowpage/error.html

@@ -1,19 +0,0 @@
-<html>
-<head>
-	<title>企明星----未收录</title>
-	{{include "/common/inc.html"}}
-	<body>
-	{{include "/common/errorhead.html"}}
-	<div class="container-fluid b-content">
-		<div class="row" style="margin:50px 0;">
-			<div class="col-lg-6 col-md-6 col-sm-6" style="text-align:right">
-			 <img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull"/>
-			</div>
-			<div class="col-lg-6 col-md-6 col-sm-6" style="padding-top: 70px;">
-				<div style="text-indent:20px;"><h4><strong class="text-muted">抱歉!企明星网站暂未收录该企业信息。</strong></h4></div>
-			</div>
-		</div>
-	</div>
-	{{include "/common/bottom.html"}}
-	</body>
-</html>

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

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

部分文件因文件數量過多而無法顯示