renzheng %!s(int64=9) %!d(string=hai) anos
pai
achega
a30e8f507e
Modificáronse 70 ficheiros con 1560 adicións e 706 borrados
  1. 20 9
      common/src/main.go
  2. 8 2
      common/src/qfw/util/elastic/elasticutil_test.go
  3. 4 0
      common/src/qfw/util/mongodb/mongodbSim.go
  4. 38 2
      common/src/qfw/util/mongodb/mongodbutil_test.go
  5. 5 8
      common/src/qfw/util/rpc/weixin.go
  6. 12 1
      core/src/config.json
  7. 28 27
      core/src/qfw/coreconfig/SysConfig.go
  8. 1 1
      core/src/qfw/front/index.go
  9. 1 1
      core/src/qfw/member/credit/creditdetail.go
  10. 3 3
      core/src/qfw/member/service.go
  11. 28 0
      core/src/qfw/member/yellowpage.go
  12. 35 7
      core/src/qfw/microwebsite/microwebsite.go
  13. 4 3
      core/src/qfw/search/searchService.go
  14. 5 7
      core/src/qfw/search/wxsearchservice.go
  15. 26 0
      core/src/qfw/searchmarket/demand.go
  16. 13 12
      core/src/qfw/searchmarket/service.go
  17. 13 13
      core/src/qfw/swordfish/swordfish.go
  18. 4 3
      core/src/qfw/swordfish/swordfishmanage.go
  19. 2 0
      core/src/qfw/yellowpage/yellowpage.go
  20. 72 17
      core/src/qfw/yellowpage/yellowpagemanager.go
  21. 1 1
      core/src/serviceclassify.json
  22. 1 1
      core/src/timetask.json
  23. 7 10
      core/src/web/staticres/css/dev-qfw.css
  24. 1 1
      core/src/web/staticres/css/entcommunity.css
  25. 0 3
      core/src/web/staticres/css/index-new.css
  26. 10 3
      core/src/web/staticres/css/qfw.css
  27. 1 1
      core/src/web/staticres/css/swordfish.css
  28. BIN=BIN
      core/src/web/staticres/images/bottom_bg_b.png
  29. BIN=BIN
      core/src/web/staticres/images/swordfish/sorry.png
  30. 11 2
      core/src/web/staticres/js/enterprise.js
  31. 4 3
      core/src/web/staticres/js/qfw.js
  32. 1 1
      core/src/web/staticres/wxent/qfw-enterprise.js
  33. 45 10
      core/src/web/templates/_error.html
  34. 1 44
      core/src/web/templates/common/centerhead.html
  35. 6 0
      core/src/web/templates/common/errorhead.html
  36. 3 3
      core/src/web/templates/common/head.html
  37. 1 1
      core/src/web/templates/common/login.html
  38. 2 10
      core/src/web/templates/common/memberleft.html
  39. 263 0
      core/src/web/templates/common/newsfhead.html
  40. 1 1
      core/src/web/templates/common/top.html
  41. 7 5
      core/src/web/templates/enterprise/detail.html
  42. 142 0
      core/src/web/templates/enterprise/relation.html
  43. 3 3
      core/src/web/templates/index.html
  44. 33 16
      core/src/web/templates/manage/tj.html
  45. 0 3
      core/src/web/templates/manage/webcontent-new.html
  46. 45 5
      core/src/web/templates/member/credit/mcreditindex.html
  47. 1 1
      core/src/web/templates/member/credit/mycredit.html
  48. 3 7
      core/src/web/templates/member/editservice.html
  49. 11 3
      core/src/web/templates/member/incmobile/baseinfo.html
  50. 47 1
      core/src/web/templates/member/incmobile/detailindex.html
  51. 1 2
      core/src/web/templates/member/incmobile/index.html
  52. 101 15
      core/src/web/templates/member/incmobile/list.html
  53. 4 1
      core/src/web/templates/member/incmobile/myfollow.html
  54. 2 2
      core/src/web/templates/member/memberindex.html
  55. 4 4
      core/src/web/templates/member/microwebsite.html
  56. 1 1
      core/src/web/templates/member/mydemand.html
  57. 6 2
      core/src/web/templates/search/enterpriseList.html
  58. 0 2
      core/src/web/templates/service/demand.html
  59. 8 5
      core/src/web/templates/service/detail.html
  60. 0 4
      core/src/web/templates/service/list.html
  61. 85 5
      core/src/web/templates/service/viewsingledemand.html
  62. 43 226
      core/src/web/templates/swordfish/newindex.html
  63. 45 17
      core/src/web/templates/swordfish/searchinfolist.html
  64. 1 63
      push/src/config.json
  65. 6 4
      weixin/src/config.json
  66. 2 0
      weixin/src/main.go
  67. 210 45
      weixin/src/qfw/weixin/distinguishwork.go
  68. 19 12
      weixin/src/qfw/weixin/msgtxtchandler.go
  69. 12 4
      weixin/src/qfw/weixin/rpc/rpc.go
  70. 37 37
      weixin/src/qfw/weixinconfig/weixinconfig.go

+ 20 - 9
common/src/main.go

@@ -39,23 +39,34 @@ func main() {
 		m = bson.M{"Area": os.Args[5]}
 	}
 	log.Printf("检索条件:%v", m)
-	i := 0
 	var dbType = "web"
 	if isEnterprise {
 		dbType = "ecps"
 	}
-	count := Count(os.Args[4], dbType, "qfw", nil)
+	count := Count(os.Args[4], dbType, "qfw", dbType)
 	totalPages := ((count + N - 1) / N)
 	log.Println(util.If(isEnterprise, "公式库", "网站库"), os.Args[4], "表有", count, "条数据", "一共", totalPages, "页")
-	for i := 0; i < totalPages; i++ {
-		arr := Find(os.Args[4], dbType, "qfw", m, nil, nil, false, i*N, N)
-		if isEnterprise {
-			for a, v := range *arr {
-				(*arr)[a] = elastic.ConverData(&v)
+	sess := GetMgoConn(dbType)
+	defer DestoryMongoConn(dbType, sess)
+	query := sess.DB("qfw").C(os.Args[4]).Find(m).Iter()
+	arr := make([]map[string]interface{}, 0)
+	i := 0
+	for tmp := make(map[string]interface{}); query.Next(tmp); i++ {
+		if i >= 12690000 {
+			arr = append(arr, elastic.ConverData(&tmp))
+			if len(arr) == N {
+				elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
+				arr = make([]map[string]interface{}, 0)
 			}
 		}
-		elastic.BulkSave(os.Args[6], os.Args[7], arr, true)
-		log.Println("当前是第", i+1, "页")
+		if i%N == 0 {
+			log.Printf("当前索引位置:=%d \n", i)
+		}
+	}
+	log.Println("剩余.....", len(arr))
+	if len(arr) > 0 {
+		elastic.BulkSave(os.Args[6], os.Args[7], &arr, true)
+		arr = make([]map[string]interface{}, 0)
 	}
 	if isEnterprise {
 		//生成带名片索引

+ 8 - 2
common/src/qfw/util/elastic/elasticutil_test.go

@@ -2,12 +2,13 @@ package elastic
 
 import (
 	"fmt"
-	"gopkg.in/mgo.v2/bson"
-	_ "gopkg.in/olivere/elastic.v1"
 	"log"
 	"qfw/util/mongodb"
 	"testing"
 	"time"
+
+	"gopkg.in/mgo.v2/bson"
+	_ "gopkg.in/olivere/elastic.v1"
 )
 
 func Test_Find1(t *testing.T) {
@@ -200,3 +201,8 @@ func Test_Getpage(t *testing.T) {
 	data := *GetPage("enterprise", "enterprise", `{"s_action":"01"}`, `{"l_submittime":-1}`, `"EntName","l_submittime","_id"`, 0, 8)
 	log.Println("data:", data)
 }
+
+func Test_q(t *testing.T) {
+	//log.Println(MakeQuery(`{"_id":"556349a6a442ab325177ade0"}`, "", `"_id"`, -1, -1))
+	//Count("enterprise","enterprise",)
+}

+ 4 - 0
common/src/qfw/util/mongodb/mongodbSim.go

@@ -223,3 +223,7 @@ func (m *MongodbSim) Del(c string, query interface{}) bool {
 	}
 	return b
 }
+
+func (m *MongodbSim) GetObjectId(str string) ObjectId {
+	return ObjectIdHex(str)
+}

+ 38 - 2
common/src/qfw/util/mongodb/mongodbutil_test.go

@@ -101,6 +101,26 @@ func Test_aggregate(t *testing.T) {
 
 }
 
+func Test_aa(t *testing.T) {
+	InitMongodbPool(1, "192.168.3.18:27080", "qfw")
+	sess := GetMgoConn()
+	defer DestoryMongoConn(sess)
+	var res M
+	sess.DB("qfw").C("wxpush").Pipe([]M{M{"$match": M{"l_date": M{"$gt": 1136326192}}},
+		M{"$group": M{"_id": "sum", "totalAmount": M{"$sum": "$i_size"}}}}).One(&res)
+	log.Println(res["totalAmount"])
+}
+
+func Test_aa1(t *testing.T) {
+	InitMongodbPool(1, "123.56.236.148:27080", "qfw")
+	Update("swordfish_index", "{'_id':'574db5003568887e8b00000f'}", M{
+		"$set": M{
+			"i_bidtoday": 28919,
+		},
+	}, false, false)
+
+}
+
 //检测query正确性
 func Test_nextQuery(t *testing.T) {
 	InitMongodbPool(2, "192.168.3.18:27080", "qfw")
@@ -178,7 +198,23 @@ func Test_Credit(t *testing.T) {
 	//u:=FindById("user","55a30cdfaf53744fca000b51",nil)
 	//cre:=util.IntAll((*u)["credit_a"])
 	//cre2:=util.Int64All((*u)["credit_a"])
-	s := int64(1152921504606848907)
-	log.Println(s, int(s))
+	///s := int64(1152921504606848907)
+	//log.Println(s, int(s))
+	//Find("user",`{}`,)
+	log.Println(ObjToArr(`{"_id":-1,"name":1}`), []string{"-_id", "name"})
+
+}
 
+func Test_name(t *testing.T) {
+	InitMongodbPool(1, "192.168.3.18:27080", "spider")
+	sess := GetMgoConn()
+	defer DestoryMongoConn(sess)
+	query := sess.DB("spider").C("entinv").Find(nil).Iter()
+	res := map[ObjectId]int{}
+	for tmp := make(map[string]interface{}); query.Next(tmp); {
+		util.Try(func() {
+			res[tmp["_id"].(ObjectId)]++
+		}, func(e interface{}) {})
+		tmp = make(map[string]interface{})
+	}
 }

+ 5 - 8
common/src/qfw/util/rpc/weixin.go

@@ -24,16 +24,13 @@ type BonusMsg struct {
 	Actname     string `json:"act_name"`     //活动名称
 	Remark      string `json:"remark"`       //说明
 }
-type Articles struct {
+type Article struct {
 	Title       string `json:"title"`
 	Description string `json:"description"`
+	PicUrl      string `json:"picurl"`
 	Url         string `json:"url"`
-	Picurl      string `json:"picurl"`
 }
-type ImgTextMsg struct {
-	ToUser  string `json:"touser"`
-	MsgType string `json:"msgtype"`
-	News    struct {
-		Articles []Articles `json:"articles"`
-	} `json:"news"`
+type News struct {
+	ToUser   string //用户id
+	Articles []Article
 }

+ 12 - 1
core/src/config.json

@@ -37,5 +37,16 @@
 	"entMongodbPoolSize": 5,
     "entMongodbName": "qfw",
 	"entMongodbAlias":"B",
-	"followEnterprise":10
+	"followEnterprise":10,
+	"atrrTitle": {
+        "s_persion": [0,99],
+        "s_mobile": [1,99],
+        "s_email": [2,99],
+        "s_enturl": [3,99],
+        "s_address": [4,99],
+        "i_scale": [5,99],
+        "s_descript": [6,99],
+        "s_industry": [7,99],
+		"s_avatar": [8,99]
+    }
 }

+ 28 - 27
core/src/qfw/coreconfig/SysConfig.go

@@ -5,33 +5,34 @@ package coreconfig
 
 //系统配置
 type config struct {
-	Webserverport      string      `json:"webServerPort"` //web服务器端口
-	Redisservers       string      `json:"redisServers"`  //redis缓存服务器列表
-	Useredis           bool        `json:"useRedis"`
-	Mongodbservers     string      `json:"mongodbServers"` //mongodb节点
-	MongodbPoolSize    int         `json:"mongodbPoolSize"`
-	MongodbName        string      `json:"mongodbName"`
-	Elasticsearch      string      `json:"elasticsearch"`
-	Smtp               smtp        `json:"smtp"`
-	Sms                sms         `json:"sms"`
-	Entrelation        entrelation `json:"entrelation”`
-	Allownfiletype     string      `json:"allownfiletype"`
-	Filesize           int         `json:"filesize"`
-	TemplateCache      bool        `json:"templateCache"`
-	HttpCache          bool        `json:"httpCache"`
-	MailFailureTime    int         `json:"mailFailureTime"`
-	ChatServer         string      `json:"chatServer"`
-	ChatRpc            string      `json:"chatRpc"`
-	PushRpc            string      `json:"pushRpc"`
-	ElasticPoolSize    int         `json:"elasticPoolSize"`
-	Ocr_uid            string      `json:"orc_uid"`
-	Ocr_servicekey     string      `json:"ocr_servicekey"`
-	Ocr_servicecode    string      `json:"ocr_servicecode"`
-	EntMongodbservers  string      `json:"entMongodbServers"` //mongodb节点
-	EntMongodbPoolSize int         `json:"entMongodbPoolSize"`
-	EntMongodbName     string      `json:"entMongodbName"`
-	EntMongodbAlias    string      `json:"entMongodbAlias"`
-	FollowEnterprise   int         `json:"followEnterprise"`
+	Webserverport      string                 `json:"webServerPort"` //web服务器端口
+	Redisservers       string                 `json:"redisServers"`  //redis缓存服务器列表
+	Useredis           bool                   `json:"useRedis"`
+	Mongodbservers     string                 `json:"mongodbServers"` //mongodb节点
+	MongodbPoolSize    int                    `json:"mongodbPoolSize"`
+	MongodbName        string                 `json:"mongodbName"`
+	Elasticsearch      string                 `json:"elasticsearch"`
+	Smtp               smtp                   `json:"smtp"`
+	Sms                sms                    `json:"sms"`
+	Entrelation        entrelation            `json:"entrelation”`
+	Allownfiletype     string                 `json:"allownfiletype"`
+	Filesize           int                    `json:"filesize"`
+	TemplateCache      bool                   `json:"templateCache"`
+	HttpCache          bool                   `json:"httpCache"`
+	MailFailureTime    int                    `json:"mailFailureTime"`
+	ChatServer         string                 `json:"chatServer"`
+	ChatRpc            string                 `json:"chatRpc"`
+	PushRpc            string                 `json:"pushRpc"`
+	ElasticPoolSize    int                    `json:"elasticPoolSize"`
+	Ocr_uid            string                 `json:"orc_uid"`
+	Ocr_servicekey     string                 `json:"ocr_servicekey"`
+	Ocr_servicecode    string                 `json:"ocr_servicecode"`
+	EntMongodbservers  string                 `json:"entMongodbServers"` //mongodb节点
+	EntMongodbPoolSize int                    `json:"entMongodbPoolSize"`
+	EntMongodbName     string                 `json:"entMongodbName"`
+	EntMongodbAlias    string                 `json:"entMongodbAlias"`
+	FollowEnterprise   int                    `json:"followEnterprise"`
+	AtrrTitle          map[string]interface{} `json:"atrrTitle"`
 }
 type smtp struct {
 	Addr     string `json:"addr"`

+ 1 - 1
core/src/qfw/front/index.go

@@ -232,7 +232,7 @@ func (i *Index) Reurl() error {
 	if i.GetSession("entid") == nil || i.GetSession("entid").(string) == "" {
 		i.Redirect("/member/show/memberindex")
 	} else {
-		str := "/member/yellowpage/show/showService/" + i.GetSession("entid").(string)
+		str := "/member/service/add"
 		i.Redirect(str)
 	}
 	return nil

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

@@ -177,7 +177,7 @@ func (c *credit) CreditList() error {
 		for i := 0; i < len(r); i++ {
 			r[i]["index"] = (i + 1) + (currentPage-1)*limit
 			d := r[i]["l_date"]
-			r[i]["l_date"] = util.FormatDateWithObj(&d, util.Date_Full_Layout)
+			r[i]["l_date"] = util.FormatDateWithObj(&d, "2006/01/02 15:04:05")
 		}
 		c.ServeJson(M{"list": r, "count": count})
 		return nil

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

@@ -168,9 +168,7 @@ func (yp *Service) Save() error {
 	}
 	if tempFlag {
 		//删除缓存信息
-		if len(serviceid) == 0 {
-			redis.Del("enterprise", "enterpriseInfo_"+enterpriseid)
-		}
+		redis.Del("enterprise", "enterpriseInfo_"+util.ObjToString(yp.GetSession("entid")))
 		//将数据存到elastic中
 		flag2 := elastic.UpdateNewDoc("service", "service", doc)
 		//Insertservicenames(enterpriseid)
@@ -313,6 +311,7 @@ func (u *Service) Del() error {
 			//再删除elasticsearch中的数据
 			flag2 := elastic.DelById(index, itype, id)
 			if flag2 {
+				redis.Del("enterprise", "enterpriseInfo_"+util.ObjToString(entid))
 				u.ServeJson(&map[string]interface{}{
 					"msg": "删除服务成功!",
 				})
@@ -369,6 +368,7 @@ func (u *Service) Remove() error {
 				isUpdate := elastic.UpdateNewDoc(index, itype, mongodb.FindById("service", sid, nil))
 
 				if isUpdate {
+					redis.Del("enterprise", "enterpriseInfo_"+util.ObjToString(entid))
 					u.ServeJson(&map[string]interface{}{
 						"msg": "下架成功!",
 					})

+ 28 - 0
core/src/qfw/member/yellowpage.go

@@ -5,6 +5,7 @@
 package member
 
 import (
+	"encoding/hex"
 	"fmt"
 	"github.com/go-xweb/xweb"
 	"gopkg.in/mgo.v2/bson"
@@ -92,6 +93,26 @@ func (yp *Yellowpage) Save() error {
 		area, _ := yp.GetInt("i_area")
 		data["i_area"] = area
 		data["s_address"] = Repl(yp.GetString("s_address"))
+		//权重
+		atrrTitle := coreconfig.SysConfig.AtrrTitle
+		web := mongodb.FindById(ESTYPE, entid, `{"_id":-1,"attrWeight":1}`)
+		var attrWeight []byte
+		if tmp, ok := (*web)["attrWeight"].(string); ok {
+			attrWeight, _ = hex.DecodeString(tmp)
+		} else {
+			attrWeight = make([]byte, 30)
+		}
+		for k, v := range atrrTitle {
+			arr, _ := v.([]interface{})
+			index := util.IntAll(arr[0])
+			weight := util.IntAll(arr[1])
+			if weight < int(attrWeight[index]) {
+				delete(data, k)
+			} else {
+				attrWeight[index] = byte(weight)
+			}
+		}
+		data["attrWeight"] = hex.EncodeToString(attrWeight)
 		dataSet := map[string]interface{}{
 			"$set": data,
 		}
@@ -241,11 +262,18 @@ func (yp *Yellowpage) WxFollow() error {
 
 //关注企业
 func (yp *Yellowpage) Follow() error {
+	defer util.Catch()
 	entId := yp.GetString("entId")
 	flag, _ := yp.GetBool("flag")
 	userId := yp.GetSession("userId").(string)
 	status := "n"
 	if flag {
+		data := mongodb.FindOne("follow_enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`)
+		if data != nil && len(*data) > 0 {
+			(*data)["s_followid"] = util.BsonIdToSId((*data)["_id"])
+			delete((*data), "_id")
+			mongodb.Save("follow_enterprise_back", data)
+		}
 		if mongodb.Del("follow_enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`) {
 			status = "y"
 		}

+ 35 - 7
core/src/qfw/microwebsite/microwebsite.go

@@ -6,10 +6,12 @@ package microwebsite
 
 import (
 	"encoding/base64"
+	"encoding/hex"
 	"encoding/json"
 	"github.com/go-xweb/xweb"
 	. "gopkg.in/mgo.v2/bson"
 	. "qfw/coreconfig"
+	coreconfig "qfw/coreconfig"
 	. "qfw/util"
 	elastic "qfw/util/elastic"
 	"qfw/util/fsw"
@@ -237,11 +239,12 @@ func (m *MicroWebsite) AjaxPorcess() error {
 			entObj["s_synopsis"] = fsw.Repl(m.GetStringComm("s_synopsis")) //修改企业简介
 			break
 		}
-		if len(entObj) > 0 {
-			Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": entObj}, false, false)
-		}
+		setAttrWeight(entId, entObj)
 		//修改企业信息
-		elastic.UpdateEntDoc(entId) //更新该企业的elastic数据
+		if len(entObj) > 0 && Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": entObj}, false, false) {
+			redis.Del("enterprise", "enterpriseInfo_"+entId) //清除该企业的redis缓存
+			elastic.UpdateEntDoc(entId)                      //更新该企业的elastic数据
+		}
 	} else if reqType == "addService" {
 		tempId := m.GetString("tempId")
 		serviceObj := make(M)
@@ -307,9 +310,12 @@ func (m *MicroWebsite) AjaxPorcess() error {
 		} else {
 			field = "s_qrcode"
 		}
-		b := Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": M{field: m.GetString("src")}}, false, false)
+		data := M{field: m.GetString("src")}
+		setAttrWeight(entId, data)
+		b := Update("enterprise", "{'_id':'"+entId+"'}", M{"$set": data}, false, false)
 		if b {
-			elastic.UpdateEntDoc(entId) //更新该企业的elastic数据
+			redis.Del("enterprise", "enterpriseInfo_"+entId) //清除该企业的redis缓存
+			elastic.UpdateEntDoc(entId)                      //更新该企业的elastic数据
 			result["status"] = "y"
 		}
 	} else if reqType == "serviceImg" { //修改服务图片
@@ -321,7 +327,29 @@ func (m *MicroWebsite) AjaxPorcess() error {
 			result["status"] = "y"
 		}
 	}
-	redis.Del("enterprise", "enterpriseInfo_"+entId) //清除该企业的redis缓存
 	m.ServeJson(result)
 	return nil
 }
+
+//权重
+func setAttrWeight(entid string, data M) {
+	atrrTitle := coreconfig.SysConfig.AtrrTitle
+	web := FindById("enterprise", entid, `{"_id":-1,"attrWeight":1}`)
+	var attrWeight []byte
+	if tmp, ok := (*web)["attrWeight"].(string); ok {
+		attrWeight, _ = hex.DecodeString(tmp)
+	} else {
+		attrWeight = make([]byte, 30)
+	}
+	for k, v := range atrrTitle {
+		arr, _ := v.([]interface{})
+		index := IntAll(arr[0])
+		weight := IntAll(arr[1])
+		if weight < int(attrWeight[index]) {
+			delete(data, k)
+		} else {
+			attrWeight[index] = byte(weight)
+		}
+	}
+	data["attrWeight"] = hex.EncodeToString(attrWeight)
+}

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

@@ -318,6 +318,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 	tempBisOne := false
 	ipcity := ""
 	var total int64 = 500
+	fmt.Println("cityNo:", cityNo)
 	if cityNo == "" && len(queryStr) == 0 {
 		querymap["cityNo"] = "1"
 		tn, er := ip.Find(n.Protocol())
@@ -350,7 +351,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 						      }
 						    }
 						  }
-						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","RegCapCurName","s_avatar"]
+						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid","RegCapCurName","s_avatar","excDirect"]
 						,"from":0,
 						"size":` + fmt.Sprintf("%v", perPage) + `,
 						  "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
@@ -509,8 +510,8 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 
 		total = elastic.Count("enterprise", "enterprise", tempQuery)
 	}
-	if total > 500 {
-		total = 500
+	if total > 400 {
+		total = 400
 	}
 	//查询列表数据
 	client := elastic.GetEsConn()

+ 5 - 7
core/src/qfw/search/wxsearchservice.go

@@ -6,7 +6,6 @@ import (
 	"github.com/go-xweb/xweb"
 	"github.com/p/mahonia"
 	"html/template"
-	"log"
 	"qfw/coreutil"
 	"qfw/mobile"
 	. "qfw/util"
@@ -90,14 +89,13 @@ func FormatData(data *[]map[string]interface{}, action *xweb.Action) string {
 			"EstDate":       estDate,
 			"OpStateName":   fmt.Sprint(v["OpStateName"]),
 			"status":        "n",
+			"excDirect":     fmt.Sprint(v["excDirect"]),
 		}
 		//是否关注
 		entId := tmp["_id"]
 		userId := action.GetSession("userId").(string)
 		if userId != "" {
-			log.Println(userId)
 			if Count("follow_enterprise", `{"s_userid":"`+userId+`","s_entid":"`+entId+`"}`) > 0 {
-				log.Println("进入")
 				tmp["status"] = "y"
 			}
 		}
@@ -154,7 +152,7 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 						      }
 						    }
 						  }
-						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","RegCapCurName","s_avatar"]
+						,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","RegCapCurName","s_avatar","excDirect"]
 						,"from": ` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
 						"size":` + fmt.Sprintf("%v", perPage) + `,
 						  "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
@@ -295,7 +293,7 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			"s_synopsis":{"force_source": true},
 			"stock":{"force_source": true}
         }
-    },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid","RegCapCurName","s_avatar"]
+    },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid","RegCapCurName","s_avatar","excDirect"]
 	,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
 	"size":` + fmt.Sprintf("%v", perPage) +
 			`,"sort":[` + sort + `] }`
@@ -384,7 +382,7 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 			tmpdate, _ := res[i]["EstDate"]
 
 			//res[i]["OperatorLabel"] = getDiffName(EntType)[0]
-			if tmpdate != nil {
+			if tmpdate != nil && IntAll(tmpdate) != 0 {
 				res[i]["EstDate"] = FormatDateWithObj(&tmpdate, Date_Short_Layout)
 			} else {
 				res[i]["EstDate"] = ""
@@ -425,7 +423,7 @@ func wxsearhWebContententMp(querymap map[string]string, n *Wxsearch, reqType str
 	    "_source": [
 	        "_id","EntName","RegOrgName","RegNo","EntType",
 	        "LeRep","EstDate","OpLocDistrictName","OpStateName",
-	        "s_servicenames","s_action","OpLocDistrict","s_submitid"
+	        "s_servicenames","s_action","OpLocDistrict","s_submitid","excDirect"
 	    ],
 	    "from": 0,"size": 10,
 	    "sort": [{"OpSint": "desc","RegCap": "desc"}]

+ 26 - 0
core/src/qfw/searchmarket/demand.go

@@ -32,6 +32,32 @@ type Demand struct {
 	getpcode    xweb.Mapper `xweb:"POST /market/pcode"`
 	quote       xweb.Mapper `xweb:"POST /market/quote"` //查询服务商报价
 	blogin      xweb.Mapper `xweb:"/market/demand/blogin"`
+	demandList  xweb.Mapper `xweb:"/market/demand/list"`
+}
+
+//需求列表
+func (d *Demand) DemandList() error {
+	id := d.GetString("id")
+	if d.Is("GET") {
+		return d.Render("/market/demandview/" + id + ".html")
+	} else {
+		limit, _ := d.GetInteger("pageSize")
+		currentPage, _ := d.GetInteger("currentPage")
+		start := (currentPage - 1) * limit
+		var count int
+		var r []map[string]interface{}
+		searchtype := "demand"
+		tempQuery := `{"query":{"bool":{"must":[{"term":{"s_enterpriseid":"` + id + `"}}],"must_not": { "terms" : {"i_status":[4]}}}}}`
+		sort := `{"l_createdate":"desc"}`
+		if currentPage == 1 {
+			count = int(Count(searchtype, searchtype, tempQuery))
+		}
+		//
+		query := `{"query":{"bool":{"must":[{"term":{"s_enterpriseid":"` + id + `"}}],"must_not": { "terms" : {"i_status":[4]}}}},"from":` + fmt.Sprintf("%v", start) + `,"size":` + fmt.Sprintf("%v", limit) + `,"sort":[` + sort + `]}`
+		r = *Get(searchtype, searchtype, query)
+		d.ServeJson(M{"list": r, "count": count})
+		return nil
+	}
 }
 
 func (d *Demand) Index(id string) error {

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

@@ -50,22 +50,23 @@ func (s *Service) Slist() error {
 		start := (currentPage - 1) * limit
 		var count int
 		var r []map[string]interface{}
+		query := `{"query": {
+		    "bool": {
+			  "must":[
+				{"term":{"s_enterpriseid":"` + id + `"}},
+				{"query_string": {"default_field": "s_isshow","query": "*3*"}}
+			  ],
+			  "must_not":[{"term":{"i_status":1}}]
+		    }
+		  }`
+		queryCount := query + "}"
+		queryList := query + `,"from":` + fmt.Sprintf("%v", start) + `,"size":` + fmt.Sprintf("%v", limit) + `,"sort":[{"l_createdate":"desc"}]}`
 		searchtype := "service"
-		str := `{"prefix":{"s_enterpriseid":"` + id + `"}}`
-		var tempQuery = ""
-		tempQuery = `{"query": {
-	    "bool": {
-		  "must":[` + str + `],
-	      "minimum_should_match": 1
-	    }
-	  }}`
-		sort := `{"l_createdate":"desc"}`
 		if currentPage == 1 {
-			count = int(elastic.Count(searchtype, searchtype, tempQuery))
+			count = int(elastic.Count(searchtype, searchtype, queryCount))
 		}
 		//
-		query := `{"query":{"term":{"s_enterpriseid":"` + id + `"}},"from":` + fmt.Sprintf("%v", start) + `,"size":` + fmt.Sprintf("%v", limit) + `,"sort":[` + sort + `]}`
-		r = *elastic.Get(searchtype, searchtype, query)
+		r = *elastic.Get(searchtype, searchtype, queryList)
 		s.ServeJson(M{"list": r, "count": count})
 		return nil
 	}

+ 13 - 13
core/src/qfw/swordfish/swordfish.go

@@ -9,19 +9,19 @@ import (
 
 type SwordFish struct {
 	*xweb.Action
-	swordfish      xweb.Mapper `xweb:"/front/swordfish"`                 //剑鱼
-	rssSet         xweb.Mapper `xweb:"/member/swordfish/rssset"`         //订阅消息设置
-	infolist       xweb.Mapper `xweb:"/member/swordfish/infolist"`       //剑鱼
-	swordfishlist  xweb.Mapper `xweb:"/member/swordfish/swordfishlist"`  //剑鱼列表
-	setVisited     xweb.Mapper `xweb:"/member/swordfish/setVisited"`     //已经访问过的列表
-	visitRedirect  xweb.Mapper `xweb:"/visit/redirect"`                  //剑鱼跳转访问请求,后续统计
-	protocol       xweb.Mapper `xweb:"/member/swordfish/protocol"`       //剑鱼协议
-	wxprotocol     xweb.Mapper `xweb:"/member/swordfish/wxprotocol"`     //微信剑鱼协议
-	searchinfolist xweb.Mapper `xweb:"/member/swordfish/searchinfolist"` //剑鱼查询
-	wxsearch       xweb.Mapper `xweb:"/member/wxswordfish/search"`       //剑鱼微信查询
-	wxsearchlist   xweb.Mapper `xweb:"/member/wxswordfish/searchlist"`   //剑鱼微信查询结果展示
-	transfer       xweb.Mapper `xweb:"/member/wxswordfish/transfer"`     //剑鱼微信查询结果跳转到我的订阅
-	newSordfish    xweb.Mapper `xweb:"/front/newSwordfish"`              //剑鱼新首页
+	swordfish      xweb.Mapper `xweb:"/front/swordfish"`                     //剑鱼
+	rssSet         xweb.Mapper `xweb:"/member/swordfish/rssset"`             //订阅消息设置
+	infolist       xweb.Mapper `xweb:"/member/swordfish/infolist"`           //剑鱼
+	swordfishlist  xweb.Mapper `xweb:"/member/swordfish/swordfishlist"`      //剑鱼列表
+	setVisited     xweb.Mapper `xweb:"/member/swordfish/setVisited"`         //已经访问过的列表
+	visitRedirect  xweb.Mapper `xweb:"/visit/redirect"`                      //剑鱼跳转访问请求,后续统计
+	protocol       xweb.Mapper `xweb:"/member/swordfish/protocol"`           //剑鱼协议
+	wxprotocol     xweb.Mapper `xweb:"/member/swordfish/wxprotocol"`         //微信剑鱼协议
+	wxsearch       xweb.Mapper `xweb:"/member/wxswordfish/search"`           //剑鱼微信查询
+	wxsearchlist   xweb.Mapper `xweb:"/member/wxswordfish/searchlist"`       //剑鱼微信查询结果展示
+	transfer       xweb.Mapper `xweb:"/member/wxswordfish/transfer"`         //剑鱼微信查询结果跳转到我的订阅
+	newSordfish    xweb.Mapper `xweb:"/front/newSwordfish.html"`             //剑鱼新首页
+	searchinfolist xweb.Mapper `xweb:"/front/swordfish/searchinfolist.html"` //剑鱼查询
 
 }
 

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

@@ -101,7 +101,7 @@ func (s *SwordFish) Wxprotocol() error {
 
 //剑鱼微信查询页面
 func (s *SwordFish) Wxsearch() error {
-	s.T["signature "] = mobile.GetSignature(s.Action)
+	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")
 }
@@ -143,7 +143,7 @@ func (s *SwordFish) Wxsearchlist() error {
 		}
 	}
 	//搜索列表增加分享
-	s.T["signature "] = mobile.GetSignature(s.Action)
+	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)
 }
@@ -158,6 +158,7 @@ func (s *SwordFish) Searchinfolist() error {
 	} else if s_type == "2" {
 		s_type = "bid"
 	}
+	s.T["status"] = "Y"
 	s.T["keywords"] = keywords
 	s.SetSession("sf_keywords", keywords)
 	s.T["s_name"] = s_name
@@ -268,7 +269,7 @@ 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["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}`)

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

@@ -13,6 +13,8 @@ type Yellowpage struct {
 	getRelation xweb.Mapper `xweb:"/member/getRelation"`
 	//获取失信信息
 	getDishonesty xweb.Mapper `xweb:"/front/getDishonesty"`
+	//根据注册证号展示关系网
+	showRelationByRegNo xweb.Mapper `xweb:"/enterprise/relation/(\\w+)"`
 }
 
 func init() {

+ 72 - 17
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -12,6 +12,7 @@ import (
 	"log"
 	cf "qfw/coreconfig"
 	"qfw/mobile"
+	tag "qfw/tag"
 	"qfw/util"
 	"qfw/util/credit"
 	elastic "qfw/util/elastic"
@@ -212,28 +213,18 @@ func CommonEntInfo(yp *xweb.Action, id string, editFlag int, ismobile bool) erro
 		//关系网数据
 		yp.T["relflag"] = relflag
 		//著作权
-		yp.T["copyright"] = FindOne("enterprise_copyright", `{"EntId":"`+id+`"}`)
+		yp.T["copyright"] = mongodbutil.FindOne("enterprise_copyright", cf.SysConfig.EntMongodbAlias, cf.SysConfig.EntMongodbName, `{"EntName":"`+entName+`"}`)
 		//编辑企业名片标识
 		yp.T["editFlag"] = editFlag
+		yp.T["lastService"] = getLastService(id)
 		//过滤企业名
 		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)
-				})
-			}()
+			processRelation(nodes, relation, regNo, id)
 		}
 		if editFlag > 0 {
 			return yp.Render("/enterprise/detail.html", &yp.T)
 		} else {
 			//服务数量
-			yp.T["serviceCount"] = getEntServiceCount(id)
 			var contentuser []byte
 			var erruser error
 			if ismobile {
@@ -530,13 +521,21 @@ func getDishonesty(legcerNo string, currentPage int) map[string]interface{} {
 }
 
 //获取该企业的服务数量
-func getEntServiceCount(id string) int64 {
+func getLastService(id string) string {
 	query := `{"query": {
 		    "bool": {
-			  "must":[{"query_string":{"default_field": "s_enterpriseid","query":"` + id + `"}}],"must_not" : [{"term" : {"i_status" : 1 }}]
+			  "must":[
+				  {"term":{"s_enterpriseid":"` + id + `"}},
+				  {"query_string": {"default_field": "s_isshow","query": "*3*"}}
+				],
+			  "must_not":[{"term":{"i_status":1}}]
 		    }
-		  }}`
-	return elastic.Count("service", "service", query)
+		  },"from":0,"size":1,"sort":[{"l_createdate":"desc"}]}`
+	r := elastic.Get("service", "service", query)
+	if r != nil && len(*r) == 1 {
+		return util.ObjToString((*r)[0]["_id"])
+	}
+	return ""
 }
 func checkAuth(obj map[string]interface{}) (b bool, err string) {
 	if len(obj) > 0 {
@@ -561,6 +560,20 @@ func checkAuth(obj map[string]interface{}) (b bool, err string) {
 	}
 	return true, ""
 }
+func processRelation(nodes *[]map[string]interface{}, relation map[string]interface{}, regNo, id string) {
+	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)
+		})
+	}()
+}
+
 func filterEntName(nodes *[]map[string]interface{}) int {
 	if len(provinces) == 0 {
 		util.ReadConfig("./province.json", &provinces)
@@ -683,3 +696,45 @@ func filterRegion(text string) string {
 	}
 	return text
 }
+
+//根据注册证号展示关系网
+func (yp *Yellowpage) ShowRelationByRegNo(regNo string) error {
+	defer util.Catch()
+	data := tag.Ad("relation-limit", 1)
+	if strings.TrimSpace(regNo) == "" || data == nil || len(data) == 0 || len(data[0]) == 0 || data[0]["o_extend"] == nil {
+		log.Println("关系网接口没有开放!")
+		return yp.Render("/_error.html")
+	}
+	extend := data[0]["o_extend"].(map[string]interface{})
+	if util.ObjToString(extend["flag"]) != "true" {
+		log.Println("关系网接口没有开放!")
+		return yp.Render("/_error.html")
+	}
+	res := mongodbutil.FindOneByField("enterprise", cf.SysConfig.EntMongodbAlias, cf.SysConfig.EntMongodbName, `{"RegNo":"`+regNo+`"}`, `{"EntName":1,"LegCerNO":1,"RegCapCurName":1}`)
+	var flag = -1
+	if res != nil && len(*res) > 0 {
+		id := util.BsonIdToSId((*res)["_id"])
+		entName, _ := (*res)["EntName"].(string)
+		datas, ok := getRelation(regNo, entName)
+		var nodes *[]map[string]interface{}
+		if ok {
+			d, err := json.Marshal(datas["nodes"])
+			if err != nil || json.Unmarshal(d, &nodes) != nil {
+				flag = -2
+			}
+			if ok {
+				flag = 1
+				processRelation(nodes, datas, regNo, id)
+			}
+		}
+		yp.T["RegNo"] = regNo
+		yp.T["EntName"] = entName
+		yp.T["LegCerNO"] = (*res)["LegCerNO"]
+		yp.T["RegCapCurName"] = (*res)["RegCapCurName"]
+		yp.T["relation"] = datas
+	} else {
+		flag = -3
+	}
+	yp.T["relFlag"] = flag
+	return yp.Render("/enterprise/relation.html")
+}

+ 1 - 1
core/src/serviceclassify.json

@@ -59,7 +59,7 @@
                 "name": "认证服务",
                 "children": [
                     {
-                        "code": "010301",
+                        "code": "010401",
                         "name": "认证服务"
                     }
                 ]

+ 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-05-23 17:46:27"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-05-23 17:46:27"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-06-13 10:20:06"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-06-13 10:20:06"}},"marketisstart":true,"marketrate":300}

+ 7 - 10
core/src/web/staticres/css/dev-qfw.css

@@ -74,9 +74,8 @@ a{
 }
 .a-content {
 	width: 1200px;
-	margin-left: auto;
-	margin-right: auto;
 	padding: 0px;
+	margin: 10px auto;
 }
 
 .a-content .a-c-left,.a-content .a-c-right{
@@ -85,7 +84,7 @@ a{
 }
 
 .a-content .a-c-left{
-	width: 925px;
+	width: 940px;
 }
 
 .a-content .a-c-right{
@@ -587,7 +586,7 @@ a{
 	border-left: 3px solid #FF5A5F;
 	width: 250px;
 	height: 45px;
-	margin:1px 0 10px 1px;
+	margin:0px 0 10px 0px;
 	line-height: 45px;
 	padding-left: 20px;
 	background: #FFF;
@@ -599,6 +598,9 @@ a{
 .a-c-right>div>.a-com-ul-block {
 	margin-bottom: 15px;
 }
+.a-c-right>div>.a-com-ul-block:last-child {
+	margin-bottom: 0px;
+}
 /*类似热门需求的ul*/
 .a-com-ul-block {
 	font-size: 12px;
@@ -1169,10 +1171,6 @@ a{
 	color:#FFF;
 	background:#FF5A5F;
 }
-.a-servicedetail {
-	margin-top:10px;
-}
-
 .a-servicedetail .a-border{
 	border:none;
 }
@@ -1951,7 +1949,6 @@ style="color:#D03102;margin-right:5px;"
 
 /*新热门需求*/
 #hotDemand ul.a-com-ul-block{
-	margin-left:1px;
 	height:371px;
 }
 #hotDemand li.a-com-second ul{
@@ -2494,7 +2491,7 @@ style="color:#D03102;margin-right:5px;"
 }
 .b-content{
 	padding: 0px;
-	margin: 15px auto;
+	margin: 10px auto;
 	width: 1200px;
 }
 .b-left{

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

@@ -507,7 +507,7 @@ a:focus, a:hover{
     color: #fff !important;
 	font-size: 12px !important;
 	left: 6px;
-	top: 1.5px;
+	top: 1px;
 }
 .ent-exception{
 	padding: 0px 6px;

+ 0 - 3
core/src/web/staticres/css/index-new.css

@@ -226,9 +226,6 @@ a:focus, a:hover{
 .a-index .a-index-head .index-new-left{
 	border-top:3px solid #FF5A5F;
 }
-.a-index .a-index-head{
-	margin-top:10px;
-}
 .a-index-head .index-new-left > div {
 	background-color:#fff;
 	color:#FF5A5F;

+ 10 - 3
core/src/web/staticres/css/qfw.css

@@ -357,6 +357,11 @@ a.new_red:hover, a.new_red:active {
 	margin-left: 20px;
 }
 /*==========用户中心中间布局样式===========*/
+.member-content:after{
+	content: " ";
+	clear: both;
+	display: table;
+}
 .member-content {
 	margin-bottom: 30px;
 }
@@ -364,15 +369,17 @@ a.new_red:hover, a.new_red:active {
 .member-left, .member-right {
 	vertical-align: top;
 	display: inline-block;
-	width: 942px;
 }
 
 .member-left {
-	width: 200px;
+	color: #666;
+    width: 250px;
+	border: 1px solid #E5E6E9;
+	background-color: #fff;
 }
 
 .member-right {
-	width: 975px;
+	width: 940px;
 	float: right;
 }
 /*==========账号信息设置表单标题样式===========*/

+ 1 - 1
core/src/web/staticres/css/swordfish.css

@@ -344,4 +344,4 @@ a:focus, a:hover{
 }
 @media (max-width: 1200px) {
 	
-}
+}

BIN=BIN
core/src/web/staticres/images/bottom_bg_b.png


BIN=BIN
core/src/web/staticres/images/swordfish/sorry.png


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

@@ -70,7 +70,16 @@ function reloadData(obj,name){
 	$("#searchForm input[name=OpState]").val("");
 	$("#searchForm input[name=c_author]").val("");
 	$("#searchForm input[name="+name+"]").val(val);
-	
+	//
+	var wordsVal = $("#searchForm input[name=words]").val();
+	var cityVal = $("#searchForm input[name=city]").val();
+	var c_authorVal = $("#searchForm input[name=c_author]").val();
+	var OpStateVal = $("#searchForm input[name=OpState]").val();
+	var c_hflVal = $("#searchForm input[name=c_hfl]").val();
+	var c_zbVal = $("#searchForm input[name=c_zb]").val();
+	if(wordsVal=="" && cityVal=="" && c_authorVal=="" && OpStateVal=="" && c_hflVal=="" && c_zbVal==""){
+		$("#searchForm input[name=cityNo]").val("");
+	}
     document.forms['searchForm'].submit();
 }
 
@@ -1388,7 +1397,7 @@ function formclane(){
 }
 //在列表中点击添加服务按钮事件
 function addService(){
-	window.location.href="/member/yellowpage/show/showService/" + id;
+	window.location.href="/member/service/add";
 }
 //取消添加服务按钮事件
 function cancelService(){

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

@@ -304,6 +304,9 @@ function webSiteInit(){
 	}
 	try{
 		var setBottomPadding = function(){
+			if($("#testBottom").length == 0){
+				return;
+			}
 			$("#qfw-bottom").css("padding-top","0px");
 			var testBottom_offsetTop = $("#testBottom").offset().top;
 			var windowHeight = $(window).height();
@@ -336,9 +339,7 @@ function webSiteInit(){
 			}
 		}
 		//设置用户用心左右布局
-		var memberLeft_marginLeft = 0;
 		if($(".member-content").length == 1 && $(".member-content>.member-left").length == 1 && $(".member-content>.member-right").length == 1){
-			$(".member-right").width($(".member-content").width() - 250 - 50);
 			if($(".member-content").children(".clearfix").length == 0){
 				$(".member-content").append('<div class="clearfix"></div>');
 			}
@@ -705,7 +706,7 @@ var TipAssembly = {
 		this.timeout = setTimeout(function(){
 			thisClass.hide();
 			thisClass.timeout = null;
-		},3000);
+		},1000);
 		$("body").append('<div class="tipAssembly" id="tipAssembly">'+text+'</div>');
 		if(typeof(css) != "undefined"){
 			$("#tipAssembly").css(css);

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

@@ -1389,7 +1389,7 @@ function formclane(){
 }
 //在列表中点击添加服务按钮事件
 function addService(){
-	window.location.href="/member/yellowpage/show/showService/" + id;
+	window.location.href="/member/service/add";
 }
 //取消添加服务按钮事件
 function cancelService(){

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 45 - 10
core/src/web/templates/_error.html


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

@@ -35,47 +35,4 @@ body{
 			<li class="pull-right b-loginStatus" id="b-loginStatus"></li>
 		</ul>
 	</div>
-</div>
-<script type="text/javascript">
-//顶部是否加载完毕
-var topLoadOver = false;
-var keyCode=0;
-document.onkeydown=function(event){
-    var e = event || window.event || arguments.callee.caller.arguments[0];
-    if(e && e.keyCode==13){ // enter 键
-        keyCode=13
-    }
-};
-
-$(function (){
-	isMobile = !$("#b-loginStatus").is(":visible");
-	$("#searchFormBtn").click(function(){
-		keyCode = 13;
-		$("form#searchForm").submit();
-	});
-	$("form#searchForm").submit(function(){
-		var input_val = $(this).children("[type='text']").val().replace(/^\s+|\s+$/g,"");
-		if(input_val==""){
-			input_val = $("#header-searchInput").attr('placeholder');
-		}
-		if (keyCode==13){
-	 		if(input_val==""||input_val=="请输入关键字"){
-				keyCode=0;
-				return false;
-			}else {
-				$("input[name='words']").val(input_val);
-				keyCode=0;
-				return true;
-			}	
-		}
-	});
-	//
-	$("[id='releaseService']").click(function(){
-		if(isLogined){
-			window.location.href = "/front/reurl";
-		}else{
-			loginModalShow("/front/reurl");
-		}
-	});
-});
-</script>
+</div>

+ 6 - 0
core/src/web/templates/common/errorhead.html

@@ -8,6 +8,12 @@ body{
 h5 a{
 	color: #a0a0a0;
 }
+.b-head .head-hideMenu li:hover {
+    color: inherit;
+}
+.b-head .head-hideMenu li:hover>i {
+    color: inherit;
+}
 </style>
 <div class="b-head">
 	{{include "/common/top.html"}}

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

@@ -329,7 +329,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);
@@ -347,10 +347,10 @@ 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 .com-releaseService a").attr("href","/member/service/add");
 	$("#fristAutheLoginModal").modal('show');
 }
 </script>

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

@@ -64,7 +64,7 @@ function loginModalShow(url){
 	$("#wxPic").attr("src","");
 	$.post("/front/wxlogin/getNum",function(data){
 		if(data&&data.num){		
-			$("#wxPic").attr("src","http://wxs.qimingxing.info/weixin/sso/"+data.num);
+			$("#wxPic").attr("src","/weixin/sso/"+data.num);
 			setTimes(data.num,35)		
 		}
 	},'json');

+ 2 - 10
core/src/web/templates/common/memberleft.html

@@ -1,12 +1,4 @@
 <style type="text/css">
-.member-left{
-	font-weight: 100;
-	font-size: 14px;
-	color: #666;
-    width: 250px;
-	border: 1px solid #E5E6E9;
-	background-color: #fff;
-}
 .member_nav_a{
 	color: inherit;
 }
@@ -102,7 +94,7 @@
 .index-new-head .head-hidemenu i {
     color: #ff5a5f;
 }
-.member-left .glyphicon{
+.member-left .list-group .glyphicon{
 	font-size: 14px;
 	vertical-align: middle;
 	margin-right: 10px;
@@ -222,7 +214,7 @@
 	</div>
 	</a>
 	<div class="list-group-item" id="personal">个人菜单</div>
-	<a class="list-group-item" onclick="window.location.href = '/member/swordfish/rssset'"><i class="glyphicon qmx-icon-jianyu"></i>剑鱼</a>
+	<a class="list-group-item" onclick="window.location.href = 'http://www.zhaobiao.info'"><i class="glyphicon qmx-icon-jianyu"></i>剑鱼</a>
 	
 </div>
 <!-- vipcreditModal -->

+ 263 - 0
core/src/web/templates/common/newsfhead.html

@@ -0,0 +1,263 @@
+<link href="/css/swordfish.css" rel="stylesheet">
+<style>
+
+/*剑鱼首页*/
+.sf_search{
+	background: url('/images/swordfish/sf_02.png') center top no-repeat;
+	width:100%;
+	height:660px;
+	background-size: cover;
+	padding-top: 150px;
+}
+.sf_newscount{
+	background: url('/images/swordfish/sf_03.png') center top no-repeat;
+	width:100%;
+	height:500px;
+	background-size: cover;
+}
+.sf_GTwebsite{
+	background: url('/images/swordfish/sf_04.png') center top no-repeat;
+	width:100%;
+	height:500px;
+	background-size: cover;
+}
+.sf_Epwebsite{
+	background: url('/images/swordfish/sf_05.png') center top no-repeat;
+	width:100%;
+	height:500px;
+	background-size: cover;
+}
+.sf_type{
+	background: url('/images/swordfish/sf_06.png') center top no-repeat;
+	width:100%;
+	min-height:750px;
+	background-size: cover;
+}
+.sf_shm{
+    font-size: 16px;
+    line-height: 32px;
+	padding: 90px 0px 80px 10px;
+	width:100%; 
+	height:465px;
+}
+.sf_shmone{
+	float:left;
+	width:33%;
+}
+.sf_from span:first-child,.sf_lately span:first-child,.sf_today span:first-child{
+	font-size: 16px;
+    font-weight: bold;
+    color: #000;
+}
+.sf_ewm{
+	width:100%;
+	height:260px;
+	background-color:#f0f0f0;
+	padding-top:40px;
+	border:1px solid #E5E6E9;
+}
+.sf_firstewm{
+	width:100%;
+	height:260px;
+	padding-top:40px;
+}
+.sf_ewm img,.sf_firstewm img{
+	width:135px;
+	margin-bottom:20px;
+}
+.sf_ewm span,.sf_firstewm span{
+	font-size: 18px;
+    color: #000;
+}
+.sf_cp{
+	height:100px;
+	width:100%;
+	margin-bottom:100px;
+    line-height: 32px;
+    padding: 20px;
+    background-color: #f0f0f0;
+}
+.sf_cp span{
+	font-size:16px;
+	padding: 20px;
+	cursor:pointer;
+}
+.sf_ybh{
+	font-size: 14px !important;
+    color: #ccc;
+}
+.sf_geduan{
+	width:100%;
+	height:85px;
+	background-color:#fff;
+}
+.sf_collect{
+	color: #fff;
+	position: relative;
+	float:right;    
+	background-color: #24C0D7;
+    padding-top: 100px;
+	font-size: 32px;
+    width: 550px;
+    height: 300px;
+    margin-right: 10px;
+}
+.sf_collect span{
+	text-decoration: underline;
+	font-size: 36px;
+}
+.sf_GTcollect{
+	color: #fff;
+    position: relative;
+    float: left;
+    width: 551px;
+    height: 365px;
+    padding-top: 60px;
+    background-color: #316BAE;
+    margin-left: 10px;
+    font-size: 25px;
+}
+.sf_GTcollect span:first-child,.sf_Epcollect span:first-child{
+	text-decoration: underline;
+	font-size: 36px;
+}
+.sf_GTcollect span:nth-child(4),.sf_Epcollect span:nth-child(4){
+	font-size: 14px;
+    line-height: 24px;
+}
+.sf_Epcollect{
+	color: #fff;
+	position: relative;
+	float:right;    
+	width: 550px;
+    height: 309px;
+    background-color: #9A397C;
+    margin-right: 20px;
+    padding-top: 50px;
+	font-size: 32px;
+}
+.sf_jyzbdy{
+	font-size: 62px;
+    margin-bottom: 30px;
+	letter-spacing: 8px;
+}
+.sf_gxh{
+	font-size: 24px;
+    font-weight: bold;
+    margin-bottom: 40px;
+	letter-spacing: 5px;
+}
+.sf_gxh span{
+	color: #24C0D7;
+}
+.sf_form{
+	width: 30%;
+    margin-left: 31%;
+}
+.sf_form .sousuo{
+    top: 16px;
+    z-index: 99;
+    left: 12px;
+    color: #ccc;
+    font-size: 20px;
+    position: absolute;
+}
+.sf_form .sf_sousuo{
+	position: absolute;
+    display: inline-block;
+    width: 108px;
+    height: 50px;
+    background-color: #24C0D7;
+    color: #fff;
+    font-size: 20px;
+    text-align: center;
+    line-height: 50px;
+    right: -108px;
+	cursor: pointer;
+}
+.b-nav li:hover{
+	border-bottom: 3px solid #24C0D7;
+	/*cursor: pointer;*/
+}
+.b-nav li:first-child:hover{
+	border-bottom: 0px;
+}
+.b-nav-link a{
+	color:#000 !important;
+	font-weight: inherit !important;
+}
+.b-nav > ul {
+    height: 110px !important;
+    /*line-height: 110px !important;*/
+	max-width: 2250px !important;
+	padding-left: 40px;
+    padding-right: 30px;
+}
+.b-nav-main{
+	padding: 0px !important;
+    /*width: 80px !important;*/
+	background-color: #fff;
+	height: 110px;
+	line-height: 110px !important;
+}
+.b-loginStatus{
+	width:121px;
+	line-height: 110px !important;
+}
+.b-nav-logo{
+	padding-top:20px;
+}
+.sf_headjiansuo{
+	margin-right:40px;
+	margin-top: 36px;
+}
+.sf_headjiansuo:hover{
+	border-bottom: 0px !important;
+	/*cursor: pointer;*/
+}
+.sf_headinput{
+	float:left;
+}
+.sf_headinput input{
+	padding-left: 8px;
+	width:320px;
+	height:40px;
+	border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+}
+.sf_headsousuo{
+	float:left; 
+	height:40px; 
+	width:60px; 
+    padding-top: 6px;
+    font-size: 24px;
+    color: #fff;
+	background-color: rgb(55, 198, 218);
+	border-top-right-radius: 5px;
+    border-bottom-right-radius: 5px;
+	cursor:pointer;
+}
+.sf_nothing{
+	padding-top:150px;
+}
+</style>
+<div class="b-head">
+	<div class="b-nav index-new-nva" style="border-top:0px;box-shadow: 0 0 10px #E5E6E9;">
+		<ul>
+			<li class="b-nav-logo"><img src="{{Msg "seo" "cdn"}}/images/swordfish/sf_01.png"></li>
+			<li class="pull-right b-loginStatus hidden" id="b-loginStatus"></li>
+			<li class="pull-right b-nav-link b-nav-main"><a class="sf_zbsq">招标社区</a></li>
+			<li class="pull-right b-nav-link b-nav-main"><a class="sf_zbsq">招标百科</a></li>
+			<li class="pull-right b-nav-link b-nav-main"><a  onclick="subsea()">招标搜索</a></li>
+			<li class="pull-right b-nav-link sf_headjiansuo {{if .T.status}} {{else}} hidden{{end}} ">
+				<div class="sf_headinput" style="float:left;">
+				<input type="text" id="headsearchname" name="headsearchname" value="{{.T.keywords}}"  placeholder="信息检索"/>
+				</div>
+				<div class="text-center sf_headsousuo">
+				<span  class="glyphicon sousuo"></span>
+				</div>
+				<div style="clear:both;"></div>
+			</li>
+		</ul>
+	</div>
+</div>

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

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

+ 7 - 5
core/src/web/templates/enterprise/detail.html

@@ -24,7 +24,7 @@
 			{{end}}
 		</div>
 		<div class="entinfo-cart{{if eq .T.editFlag 2}} entinfo-editcart{{end}}">
-			{{if eq .T.editFlag 1}}<a class="btn btn-primary btn-save" href="/member/enterprise/edit">编辑</a>{{end}}
+			{{if eq .T.editFlag 1}}<button class="btn btn-primary btn-save" onclick="window.location.href='/member/enterprise/edit'">编辑</button>{{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>
@@ -74,7 +74,7 @@
 						{{end}}
 					{{end}}
 				{{end}}
-				{{if .T.serviceCount}}<a>服务信息<div class="servicelink"><i class="glyphicon qmx-icon-right"></i></div></a>{{end}}
+				{{if .T.lastService}}<a href="/market/detail/{{.T.lastService}}.html#moreservice">服务信息<div class="servicelink"><i class="glyphicon qmx-icon-right"></i></div></a>{{end}}
 			</div>
 			{{if eq .T.editFlag 2}}
 			<form class="b-editEnt-form" id="editForm">
@@ -235,8 +235,11 @@
 						<!--注册资本-->
 						<div class="entinfo-regcap">
 							<div>
-							{{if and .T.res.RegCap .T.res.EntType}}
-								{{if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810") (ne .T.res.EntType "4540") (ne .T.res.EntType "4533")}}
+							{{if and .T.res.RegCap}}
+								{{if not .T.res.EntType}}
+									<span>注册资本</span>
+									<span><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>万{{if .T.res.RegCapCurName}}{{.T.res.RegCapCurName}}{{else}}元{{end}}</span>
+								{{else if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810") (ne .T.res.EntType "4540") (ne .T.res.EntType "4533")}}
 									<span>注册资本</span>
 									<span><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>万{{if .T.res.RegCapCurName}}{{.T.res.RegCapCurName}}{{else}}元{{end}}</span>
 								{{else}}
@@ -562,7 +565,6 @@ var dishonesty = {{.T.dishonesty}};
 var gs = {{.T.res.gs}};
 var investor = {{.T.res.investor}};
 var OpScope = {{.T.res.OpScope}};
-var service = {{.T.service}};
 var relFlag = {{.T.relflag}};
 var copyright = {{.T.copyright}};
 var editFlag = {{.T.editFlag}}==2;

+ 142 - 0
core/src/web/templates/enterprise/relation.html

@@ -0,0 +1,142 @@
+<html>
+<head>
+<title>{{.T.res.EntName}}</title>
+<link href="{{Msg "seo" "cdn"}}/css/qfw.css" rel="stylesheet">
+<script src="{{Msg "seo" "cdn"}}/js/jquery.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/d3.v3.min.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/geometry.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/provinceData.min.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/relation.js"></script>
+<script type="text/javascript">
+	var regNo = {{.T.RegNo}};
+	var regCapCurName = {{.T.RegCapCurName}};
+	var legcerNo = {{.T.LegCerNO}};
+	var entName = {{.T.EntName}};
+	var relFlag = {{.T.relFlag}};
+	var relation = {{.T.relation}};
+	$(function(){
+		if(relFlag == 1){
+			var relationEntity = new Relation(legcerNo,regNo,regCapCurName,relation,relation.nodes.length>15);
+			relationEntity.init();
+		}else{
+			$("#entrelation-infovis").hide();
+			if(relFlag == -3){
+				$("#findnull h3").text("抱歉,未找到该企业!");
+			}else{
+				$("#findnull h3").text("抱歉,未找到相关数据!");
+			}
+			$("#findnull").show();
+		}
+	});
+</script>
+<style type="text/css">
+	body{
+		padding-top: 0px;
+		font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
+		color: #4e5051;
+		font-size: 14px;
+		padding: 20px;
+	}
+	.entrelation{
+		position: relative;
+		height: inherit;
+		height: 100%;
+	}
+	.entrelation svg{
+		position: relative;
+		z-index: 1;
+	}
+	.legend-text-bg>div{
+	    position: absolute;
+	    display: inline-block;
+	    border-radius: 4px;
+	    width: 110px;
+		height: 25px;
+	    line-height: 25px;
+	    text-align: center;
+		margin-top: -3px;
+	}
+	.legend-text-bg>span{
+		position: relative;
+	}
+	/*全屏代码*/
+	.entrelation .entrelation-controlls{
+		position: absolute;
+		z-index: 2;
+		right: 0px;
+	}
+	.entrelation .entrelation-controlls-fullscreen{
+		top: 15px;
+		right: 15px;
+	}
+	.entrelation .entrelation-controlls>div{
+		margin-bottom: 10px;
+		margin-left: 10px;
+		width: 35px;
+		height: 35px;
+		box-shadow: 0px 0px 5px #DADADA;
+	}
+	.entrelation .entrelation-controlls>div>span{
+		margin-top: 9px;
+	}
+	.entrelation .entrelation-controlls .entrelation-box{
+		border: 1px solid #e5e6e9;
+		text-align: center;
+		cursor: pointer;
+		vertical-align: top;
+		border-radius: 3px;
+		color: #16a086;
+		
+	}
+	.entrelation .entrelation-controlls .entrelation-box.checked{
+		display: none;
+	}
+	:-moz-full-screen .entrelation,:-webkit-full-screen .entrelation,:-o-full-screen .entrelation,
+	:-ms-full-screen .entrelation,:fullscreen .entrelation,:-ms-fullscreen .entrelation,:full-screen .entrelation{
+	  width: 100%;
+	  height: 100%;
+	  background-color:#fff;
+	}
+	:-moz-full-screen{
+		background: #fff;
+	}
+	:-webkit-full-screen{
+		background: #fff;
+	}
+	:-o-full-screen{
+		background: #fff;
+	}
+	:-ms-full-screen{
+		background: #fff;
+	}
+	:fullscreen{
+		background: #fff;
+	} 
+	:-ms-fullscreen{
+		background: #fff;
+	} 
+	:full-screen{
+		background: #fff;
+	}
+	.findnull{
+		text-align: center;
+		display: none;
+		margin-top: 13%;
+	}
+	.findnull img{
+		width: 200px;
+		height: 180px;
+	}
+</style>
+</head>
+<body class="entinfo-page">
+<!--关系网-->
+<div class="entrelation" id="entrelation">
+	<div id="entrelation-infovis"></div>
+	<div id="findnull" class="findnull">
+		<img src="{{Msg "seo" "cdn"}}/images/findnull.png">
+		<h3></h3>
+	</div>
+</div>
+</body>
+</html>

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

@@ -156,7 +156,7 @@
 			<div id="myCarousel" class="carousel slide" style="height:300px;">  
 			   <!-- 轮播(Carousel)项目 -->
 			   <div class="carousel-inner">
-			         	{{$s:=(Ad "index-center-06" 16)}}
+			         	{{$s:=(Ad "ent-recommend" 16)}}
 			      <div class="item active itemno">
 						<div class="index-qysq">
 						{{range $k,$v := $s}}
@@ -166,9 +166,9 @@
 			    		{{if eq $k 12}}</div><div class="index-qysq">{{end}}
 				
 						<div class="index-new-qysqlist text-center">
-						<a  target="_blank" href="{{$v.s_link}}"{{if ge $k 2}} class="hidden-xs"{{end}}><img{{if $v.s_picalt}} alt="{{$v.s_picalt}}"{{end}}  data-original="{{if $v.s_pic}}{{Msg "seo" "cdn"}}{{$v.s_pic}}{{else}}{{Msg "seo" "cdn"}}/images/u166.png{{end}}" class="lazy"  onerror="this.src='/images/u166.png'"></a>
+						<a  target="_blank" href="/enterprise/{{$v.s_id}}.html" {{if ge $k 2}} class="hidden-xs"{{end}}><img{{if $v.s_picalt}} alt="{{$v.s_picalt}}"{{end}}  data-original="{{if $v.s_pic}}{{Msg "seo" "cdn"}}{{$v.s_pic}}{{else}}{{Msg "seo" "cdn"}}/images/u166.png{{end}}" class="lazy"  onerror="this.src='/images/u166.png'"></a>
 						</br>
-						<a  target="_blank" href="{{$v.s_link}}" class="index-qysq-name font-size-12
+						<a  target="_blank" href="/enterprise/{{$v.s_id}}.html" class="index-qysq-name font-size-12
 ">{{$v.s_remark}}</a>
 						</div>
 						{{end}}

+ 33 - 16
core/src/web/templates/manage/tj.html

@@ -24,7 +24,7 @@
 				color:#ff5a5f;
 			}
 			.counttab{
-				width:420px;
+				width:440px;
 				height:34px;
 				margin:30px 0px 30px 18px;
 				background-color:#F8F8F8;
@@ -236,36 +236,53 @@
 						 title: "认证个人",
 						field: "personum",
 						callback:function(ct,cd,val,k,m){
-							if (!cd){
-								return "-";
+							var enternum=ct.enternum;
+							var personum=ct.personum;
+							var organnum=ct.organnum;
+							if(!enternum){
+								enternum=0;
 							}
-							 return cd;
+							if(!personum){
+								personum=0;
+							}
+							if(!organnum){
+								organnum=0;
+							}
+							 return enternum+personum+organnum;
 						}
 					},
 					{
-						 title: "认证企业",
-						field: "enternum",
-						callback:function(ct,cd,val,k,m){
-							if (!cd){
-								return "-";
+						 title: "剑鱼订阅(总)",
+						field: "sfish",
+						callback:function(ct,cd,val,k,m){	
+							var sfish=ct.sfish;
+							var snfish=ct.snfish;
+							if(!sfish){
+								sfish=0;
 							}
-							 return cd;
+							if(!snfish){
+								snfish=0;
+							}
+							 return (sfish+snfish)+"人";
 						}
 					},
 					{
-						 title: "认证机构",
-						field: "organnum",
+						 title: "剑鱼订阅(旧)",
+						field: "sfish",
 						callback:function(ct,cd,val,k,m){
-							if (!cd){
+							 if(!cd){
 								return "-";
 							}
-							 return cd;
+							 return cd+"人";
 						}
 					},
 					{
-						 title: "剑鱼订阅",
-						field: "sfish",
+						 title: "剑鱼订阅(新)",
+						field: "snfish",
 						callback:function(ct,cd,val,k,m){	
+							if(!cd){
+								return "-";
+							}
 							 return cd+"人";
 						}
 					},

+ 0 - 3
core/src/web/templates/manage/webcontent-new.html

@@ -29,9 +29,6 @@ body{
 .b-head  .b-com-five {
     background-color: #FF7F47;
 }
-.a-content{
-	margin-top:20px;
-}
 .b-head .head-hidemenu li:hover {
     background-color: #FF7F47;
 }

+ 45 - 5
core/src/web/templates/member/credit/mcreditindex.html

@@ -42,7 +42,7 @@
 			float:left;
 			margin-right:25px;
 		}
-		div.title{
+		div.title,div.mytitle{
 			border-bottom:1px solid #F8F8F8;
 			height:40px;
 			line-height:42px;
@@ -55,9 +55,15 @@
 		.m-rules{
 			padding-left: 15px;
 		}
+		.my-rules{
+			padding-left: 15px;
+		}
 		.m-rules div.title:hover{
 			background:#F6F9F4;
 		}
+		.my-rules div.mytitle:hover{
+			background:#F6F9F4;
+		}
 		.m-rules div.title span{
 			line-height:40px;
 			padding-right:30px;
@@ -65,15 +71,31 @@
 			font-weight:100;
 			float:right;
 		}
+		.my-rules div.mytitle span{
+			line-height:40px;
+			padding-right:30px;
+			color:#CCCCCC;
+			font-weight:100;
+			float:right;
+		}
 		.m-rules div.title button{
 			margin-top:2px;
 			font-weight:600;
 			font-size:15px;
 		}
+		.my-rules div.mytitle button{
+			margin-top:2px;
+			font-weight:600;
+			font-size:15px;
+		}
 		.m-rules img{
 			width:22px;
 			margin:-5px 5px 0 0 ;
 		}
+		.my-rules img{
+			width:22px;
+			margin:-5px 5px 0 0 ;
+		}
 		.padding0{
 			padding-right:0px;
 		}
@@ -155,6 +177,21 @@
 		div.title b.u-back small a{
 			color:#B3B3B3;
 		}
+		.my-rules div.mytitle i.u-prefix{
+			color:#FF5A5F;
+			margin-right:5px;
+		}
+		div.mytitle b.u-mycunt{
+			padding-left:10px;
+			color:#FF5A5F;
+		}
+		div.mytitle b.u-back small{
+			font-weight:normal;
+			color:#F8F8F8;
+		}
+		div.mytitle b.u-back small a{
+			color:#B3B3B3;
+		}
 		.mycredit .content{
 			padding:15px;
 			padding-right:0px;
@@ -275,8 +312,8 @@
 		<div class="m-rules" target="creditrules">
 				<div class="title"><i class="u-prefix  glyphicon qmx-icon-jifen"></i> 积分规则<span class="glyphicon xiayibu"></span></div>
 		</div>
-		<div class="m-rules" target="">
-			<div class="title"><i class="u-prefix glyphicon yiguanzhu"></i> 我关注的企业<span class="glyphicon xiayibu"></span></div>
+		<div class="my-rules">
+			<div class="mytitle" onclick="window.location='/member/myFollowEnts'"><i class="u-prefix glyphicon yiguanzhu"></i> 我关注的企业<b class="u-mycunt">( 8 )</b><span class="glyphicon xiayibu"></span></div>
 		</div>
 	</div>
 	
@@ -374,6 +411,9 @@
 			
 	<script>
 		$(function(){
+				$.get("/member/enterprise/entcount",function(a){
+					$(".u-mycunt").text("("+a+")");
+				})
 				changeStatus();
 				$(".m-rules").bind("click",show);
 				$(".bookin").bind("click",show);
@@ -473,9 +513,9 @@
 					if (current==1){
 						count=r.count;
 					}
-					var format="yyyy/MM/dd hh:mm:ss";
+					//var format="yyyy/MM/dd hh:mm:ss";
 					for(var i=0;i<list.length;i++){
-						var  d=new Date(list[i]["l_date"]).Format(format).split(" ");
+						var  d=list[i]["l_date"].split(" ");
 						var change=list[i]["i_score"];
 						var score=list[i]["i_scorenow"];	
 						if(change>0){

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

@@ -152,7 +152,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/enterprise/show{{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/edit{{else}}/member/accountset/index{{end}}{{else}}/member/accountset/index{{end}}')" style="padding-top:3px;padding-bottom:3px;">完善资料</button></td>
 								{{end}}
 							</tr>
 							<tr class="rowtwo">

+ 3 - 7
core/src/web/templates/member/editservice.html

@@ -256,9 +256,6 @@
 	</div>
 	</div>
 </div>
-
-<!--右侧导航菜单-->
-{{include "/common/rightnavbtn.html"}}
 <!--右侧导航菜单-->
 {{include "/common/bottom.html"}}
 
@@ -408,10 +405,9 @@ $("#tips").upload(
 	    name:"upload",
 		action:"/filemanage/upload?resize=250",
 		afterUpload:function(data){ //此处可以重写,上传后的处理	
-			
 			$("#mblocation .pic").css('display','block'); 
-			$("#mblocation .pic .imgLi").remove();
-			$("<li class='imgLi' style='background-color:#eee;width:85px;text-align: center; height:81px;border:1px dashed #000;'><img src='"+data.url+"' style='width:83px; height:79x;'><div id=tips style='text-align:center;width:83px;position: absolute;cursor: pointer; border:1px solid #ddd;background-color:#808080;color:#fff;font-size:14px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
+			$("#mblocation .pic .imgLi img").attr("src",data.url);
+			//$("<li class='imgLi' style='background-color:#eee;width:85px;text-align: center; height:81px;border:1px dashed #000;'><img src='"+data.url+"' style='width:83px; height:79x;'><div id=tips style='text-align:center;width:83px;position: absolute;cursor: pointer; border:1px solid #ddd;background-color:#808080;color:#fff;font-size:14px;'>图片上传</div></li>").appendTo("#mblocation ul.pic");
 			var urls=$("#mblocation input.imgs").val();
 			urls=urls||""
 			//urls +=data.url+",";
@@ -443,7 +439,7 @@ var TipAssembly = {
 			}else{
 				window.location.href="/market/0/list.html";
 			}
-		},3000);
+		},1000);
 		$("body").append('<div class="tipAssembly" id="tipAssembly">'+text+'</div>');
 		if(typeof(css) != "undefined"){
 			$("#tipAssembly").css(css);

+ 11 - 3
core/src/web/templates/member/incmobile/baseinfo.html

@@ -33,14 +33,22 @@
 			<span class="col-xs-7 entvar">{{if .T.res.OpFrom}}{{.T.res.OpFrom}}{{end}}{{if .T.res.OpTo}}&nbsp;-&nbsp;{{.T.res.OpTo}}{{else}}&nbsp;-&nbsp;长期{{end}}</span>
 		</li>
 		<li>
-		{{if and .T.res.RegCap .T.res.EntType}}
-			{{if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810") (ne .T.res.EntType "4540") (ne .T.res.EntType "4533")}}
+		{{if and .T.res.RegCap}}
+			{{if not .T.res.EntType}}
 				<div class="col-xs-5">
 					<img src="{{Msg "seo" "cdn"}}/images/entcommunity/zhuceziben.png"  width=23 />
 					<span class="ent">注册资本</span>
 				</div>
 				<span class="col-xs-7 entvar">
-								<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>万{{if .T.res.RegCapCurName}}{{.T.res.RegCapCurName}}{{else}}元{{end}}
+					<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>万{{if .T.res.RegCapCurName}}{{.T.res.RegCapCurName}}{{else}}元{{end}}
+				</span>
+			{{else if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810") (ne .T.res.EntType "4540") (ne .T.res.EntType "4533")}}
+				<div class="col-xs-5">
+					<img src="{{Msg "seo" "cdn"}}/images/entcommunity/zhuceziben.png"  width=23 />
+					<span class="ent">注册资本</span>
+				</div>
+				<span class="col-xs-7 entvar">
+					<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>万{{if .T.res.RegCapCurName}}{{.T.res.RegCapCurName}}{{else}}元{{end}}
 				</span>
 				{{else}}
 					<div class="col-xs-5">

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

@@ -72,6 +72,25 @@
 		li {
 			width: 100%;
 		}
+		.ent-status-g, .ent-status-r{
+			padding-top: 0px;
+			padding-bottom: 0px;
+			font-size: 14px;
+			margin-left: 5px;
+			font-weight: normal;
+		}
+		.excDirect{
+			font-size: 14px;
+			padding: 0px 6px;
+		    border: 1px solid #FF5A5F;
+		    color: #FF5A5F;
+			margin-left: 5px;
+			font-weight: normal;
+			background-color: #fff;
+			position: relative;
+			top: 5px;
+			display: inline-block;
+		}
 	</style>
  </head>
  <body>
@@ -102,7 +121,7 @@
 					
 				</script>
 				</div>
-			<!--	<div  class="abn" >经营异常</div>-->
+				{{if .T.res.excDirect}}<span class="excDirect">经营异常</span>{{end}}
 			</div>
 		</div>
 		<div class="col-xs-12 index-middle">
@@ -228,6 +247,33 @@
 				}
 			});
 	})
+	function follow(me){
+				$.get("/member/enterprise/isFollowed?entId="+entId,function(r){
+				if (r.status=="n"){
+					$.get("/member/enterprise/follow?entId="+entId+"&flag=false",function(rs){
+						if (rs.status == "y"){
+							TipAssembly.show("已关注");
+							$("#gz").find("i").attr("class","glyphicon yiguanzhu");
+							$("#gz").find("span").text("已关注");
+						}else if(rs.status == "n"){
+							TipAssembly.show("关注失败!");
+						}else if(rs.status == "m"){
+							TipAssembly.show("您最多关注10家企业!");
+						}
+					});
+				}else{
+					$.get("/member/enterprise/follow?entId="+entId+"&flag=true",function(rs){
+						if (rs.status == "y"){
+							TipAssembly.show("已取消关注");
+							$("#gz").find("i").attr("class","glyphicon weiguanzhu");
+							$("#gz").find("span").text("关注");
+						}else if(rs.status == "n"){
+							TipAssembly.show("取消关注失败!");
+						}
+					});
+				}
+			});
+		};
 	$(window).resize(function(){
 	 		resize();
 	});

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

@@ -116,8 +116,7 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 <script src="{{Msg "seo" "cdn"}}/js/qfw.js"></script>
 <script>
 $(function(){
-	$.get("http://127.0.0.1/member/enterprise/entcount",function(a){
-		alert(a)
+	$.get("/member/enterprise/entcount",function(a){
 		$("#entcount").text(a);
 	})
 });

+ 101 - 15
core/src/web/templates/member/incmobile/list.html

@@ -1,4 +1,3 @@
-<!DOCTYPE HTML>
 <html>
  <head>
   <title> 企业社区-列表</title>
@@ -8,6 +7,43 @@
 	{{include "/common/inc.html"}}
  	<link href="{{Msg "seo" "cdn"}}/css/mobile/incmobile.css" rel="stylesheet">
 	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+	<style>
+	.tipAssembly{
+		position: absolute;
+	    width: 160px;
+	    border: 1px solid #999;
+	    text-align: center;
+	    height: 50px;
+	    line-height: 50px;
+	    border-radius: 10px;
+		background-color: #ccc;
+    	color: #fff;
+		padding: 0px;
+		top: auto;
+	}
+	#province li,#city li{
+		width: 100%;
+    	padding-right: 50%;
+	}
+	#reg li,#category li{
+		width: 100%;
+	}
+	.ent-status-g, .ent-status-r{
+		padding-top: 0px;
+		padding-bottom: 0px;
+		font-size: 14px;
+		margin-left: 5px;
+		font-weight: normal;
+	}
+	.excDirect{
+		font-size: 14px;
+		padding: 0px 6px;
+	    border: 1px solid #FF5A5F;
+	    color: #FF5A5F;
+		margin-left: 5px;
+		font-weight: normal;
+	}
+	</style>
  </head>
  <body>
 	<div class="col-xs-12">
@@ -118,8 +154,7 @@
 		var data={{.T.data}}
 		var entcard={{.T.querymap.entcard}};
 		var strVar = "";
-		strVar += "<li class=\"col-xs-12\"><table align=\"center\"><caption><div class=\"left\"><a href=\"/enterprise/$Id.html\">$EntName</a><b class=\"$status\" style='display:inline-block;'>$OpStateName<\/b><\/div><div style='float:right;margin-right:10px;' data-id='$Id' onclick='follow(this)'><i class='glyphicon $gz' style=\"font-size:11px;\">&nbsp;<\/i><span>$gzt</span><\/div><\/caption><tr><td class=\"left\">注册号:<span>$RegNo<\/span><\/td><td align='right'>法定代表人:<span>$LeRep<\/span><\/td><\/tr><tr><td class=\"left\">成立时间:<span>$EstDate<\/span><\/td><td align='right'>所在地:<span>$OpLocDistrict<\/span><\/td><\/tr><tr><td colspan=\"2\"><hr class=\"list\"><\/td><\/tr><\/table><\/li>";
-		
+		strVar += "<li class=\"col-xs-12\"><table align=\"center\"><caption><div class=\"left\"><a href=\"/enterprise/$Id.html\">$EntName</a><b class=\"$status\" style='display:inline-block;'>$OpStateName<\/b><b class=\"$excClass\" style='display:inline-block;'>$excDirect<\/b><\/div><div style='float:right;margin-right:10px;' data-id='$Id' onclick='follow(this)'><i class='glyphicon $gz' style=\"font-size:11px;\">&nbsp;<\/i><span>$gzt</span><\/div><\/caption><tr><td class=\"left\">注册号:<span>$RegNo<\/span><\/td><td align='right'>法定代表人:<span>$LeRep<\/span><\/td><\/tr><tr><td class=\"left\">成立时间:<span>$EstDate<\/span><\/td><td align='right'>所在地:<span>$OpLocDistrict<\/span><\/td><\/tr><tr><td colspan=\"2\"><hr class=\"list\"><\/td><\/tr><\/table><\/li>";
 		function loadData(){
 			   var li="";
 				var len=i+5;
@@ -143,15 +178,18 @@
 											 .replace("$RegNo",data[i]["RegNo"])
 											 .replace("$LeRep",data[i]["LeRep"])
 											 .replace("$OpLocDistrict",data[i]["OpLocDistrict"])
-											 .replace("$EstDate",data[i]["EstDate"])
+											 .replace("$EstDate",data[i]["EstDate"]=="1970-01-01"?"":data[i]["EstDate"])
+											 .replace("$excDirect",data[i]["excDirect"]=="true"?"经营异常":"$excDirect")
 											 .replace("$Id",data[i]["_id"])
 											 .replace("$Id",data[i]["_id"])
-											 .replace("$OpStateName",data[i]["OpStateName"].substr(0,2));
+											 .replace("$OpStateName",data[i]["OpStateName"]=="<nil>"?"":data[i]["OpStateName"].substr(0,2));
 					if (data[i].OpStateName!="存续"&&data[i].OpStateName.indexOf("在营")==-1){
 						 tmp=tmp.replace("$status","ent-status-r");
 					}else{
 						tmp=tmp.replace("$status","ent-status-g");
 					}
+					tmp=tmp.replace("<b class=\"$excClass\" style='display:inline-block;'>$excDirect<\/b>","");
+					tmp=tmp.replace("$excClass","excDirect");
 					if(data[i]["status"]=="y"){
 						tmp=tmp.replace("$gz","yiguanzhu").replace("$gzt","已关注");	
 					}else{
@@ -298,23 +336,71 @@
 			$.get("/member/enterprise/isFollowed?entId="+id,function(r){
 				if (r.status=="n"){
 					$.get("/member/enterprise/follow?entId="+id+"&flag=false",function(rs){
-						TipAssembly.show("已关注");
-						me.find("i").attr("class","glyphicon yiguanzhu");
-						me.find("span").text("已关注");
-						
+						if (rs.status == "y"){
+							TipAssembly.show("已关注");
+							me.find("i").attr("class","glyphicon yiguanzhu");
+							me.find("span").text("已关注");
+						}else if(rs.status == "n"){
+							TipAssembly.show("关注失败!");
+						}else if(rs.status == "m"){
+							TipAssembly.show("您最多关注10家企业!");
+						}
 					});
 				}else{
 					$.get("/member/enterprise/follow?entId="+id+"&flag=true",function(rs){
-						
-						TipAssembly.show("已取消<br>关注");
-						me.find("i").attr("class","glyphicon weiguanzhu");
-						me.find("span").text("关注");
-					})	;
+						if (rs.status == "y"){
+							TipAssembly.show("已取消关注");
+							me.find("i").attr("class","glyphicon weiguanzhu");
+							me.find("span").text("关注");
+						}else if(rs.status == "n"){
+							TipAssembly.show("取消关注失败!");
+						}
+					});
 				}
 			})
 			  event.stopPropagation();
 		}
-		</script>
+		
+		
+//提示框
+var TipAssembly = {
+	timeout: null,
+	show: function(text,css){
+		if(this.timeout != null){
+			clearTimeout(this.timeout);
+			this.hide();
+			this.timeout = null;
+		}
+		var thisClass = this;
+		this.timeout = setTimeout(function(){
+			thisClass.hide();
+			thisClass.timeout = null;
+		},1000);
+		$(".bottom").append('<div class="tipAssembly" id="tipAssembly">'+text+'</div>');
+		if(typeof(css) != "undefined"){
+			$("#tipAssembly").css(css);
+		}
+		var height=document.body.clientHeight
+		$("#tipAssembly").css({"left":($(window).width()-140)/2});
+		$("#tipAssembly").css({"bottom":(height+200)/2});
+	},
+	hide: function(){
+		$("#tipAssembly").remove();
+	},
+	triangleShow: function(obj,direction,width,top,left){
+		$("#maskLayer").unbind("click").click(function(e){
+			$(this).hide();
+			$("#tipTriangle").hide();
+		});
+		$("#tipTriangle>span").addClass("triangle-"+direction);
+		$("#tipTriangle").css({width:width,top: obj.offset().top+top,left: obj.offset().left+left}).show();
+		$("#maskLayer,#tipTriangle").show();
+	},
+	triangleHide: function(){
+		$("#maskLayer,#tipTriangle").hide();
+	}
+}
+</script>
 
  </body>
 </html>

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

@@ -48,14 +48,16 @@
 		</div>
 {{end}}
 </div>
+<!--
 <div class="text-center" id="mf_add">
 	<span class="btn btn-default">+ 添加你关注的企业名称</span>
 </div>
-
+-->
 <div class="text-center" onClick="" id="mf_tishi">
 	<span class="glyphicon tishi"></span> <span>为给你更好的使用体验目前仅支持关注10家企业</span>
 </div>
 </div>
+<!--
 <div class="mf_addcontent  hidden">
 	<div class="mf_title">
 	<span class="mf_one">关注企业</span>
@@ -65,6 +67,7 @@
 	<textarea id="mf_entName" name="mf_entName" placeholder="企业名称"></textarea>
 	</div>
 </div>
+-->
 <body>
 
 

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

@@ -63,14 +63,14 @@ if((role == "" || /^[9]$/.test(role)) && (identWay == "-1" || identWay == "0")){
 var entId = {{session "entid"}};
 $("#editEntInfo,#editEntInfo a").click(function(){
 	if(identWay == 1 && entId != ""){
-		window.location.href = "/member/enterprise/show";
+		window.location.href = "/member/enterprise/edit";
 	}else{
 		window.location.href = "/member/authentication/index";
 	}
 });
 $("#releaseService,#releaseService a").click(function(){
 	if(identWay == 1 && entId != ""){
-		window.location.href = "";
+		window.location.href = "/member/service/add";
 	}else{
 		window.location.href = "/member/authentication/index";
 	}

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

@@ -78,8 +78,8 @@ body{
 {{include "/common/wsitehead.html"}}
 <!-- 中间 -->
 <div class="a-content">
-	<div class="panel panel-default">
-		<div class="panel-body">
+	<div class="panel panel-default" style="margin: 0px;padding: 0px;border-radius: 0px;">
+		<div class="panel-body" style="padding-bottom: 0px;">
 			<div class="step-1">
 				<font>一.选模板</font>
 				<div>
@@ -145,7 +145,7 @@ $(function(){
 		}else{
 			var href = null;
 			if(this.id == "editService"){
-				href = '/member/yellowpage/show/showService/{{session "entid"}}';
+				href = '/member/service/add';
 			}else{
 				href = '/member/enterprise/edit';
 			}
@@ -178,7 +178,7 @@ function afterLogin(data){
 		if(loginType == 0){
 			window.location.reload();
 		}else if(loginType == 1){
-			window.location.href = '/member/yellowpage/show/showService/'+data.entId;
+			window.location.href = '/member/service/add';
 		}else{
 			window.location.href = '/member/enterprise/edit';
 		}

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

@@ -61,7 +61,7 @@
 			</div>
 			<div class="modal-footer">
 				<button type="button" class="btn btn-primary u-btn" id="revokeReason-sure">确认</button>
-				<button type="button" class="btn btn-btn-default u-btn" data-dismiss="modal">取消</button>
+				<button type="button" class="btn btn-default u-btn" data-dismiss="modal">取消</button>
 			</div>
 		</div>
 	</div>

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

@@ -114,9 +114,13 @@
 											{{else}}
 												<span class="margin-l-15"><font class="b-disabled">法定代表人:</font><font  class="lineb " >{{index $v "LeRep"}}</font></span>
 											{{end}}
+										{{else}}
+											<span class="margin-l-15"><font class="b-disabled">法定代表人:</font><font  class="lineb " >{{index $v "LeRep"}}</font></span>
 										{{end}}
-										{{if and (index $v "RegCap") ($v.RegCapEntType)}}
-											{{if and (ne $v.RegCapEntType "9600") (ne $v.RegCapEntType "5810") (ne $v.RegCapEntType "4540") (ne $v.RegCapEntType "4533")}}
+										{{if and (index $v "RegCap")}}
+											{{if not $v.RegCapEntType}}
+												<span class="margin-l-15"><font class="b-disabled">注册资本:</font><font  class="lineb " ><script>var d1={{$v.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script>万{{if $v.RegCapCurName}}{{$v.RegCapCurName}}{{else}}元{{end}}</font></span>
+											{{else if and (ne $v.RegCapEntType "9600") (ne $v.RegCapEntType "5810") (ne $v.RegCapEntType "4540") (ne $v.RegCapEntType "4533")}}
 												<span class="margin-l-15"><font class="b-disabled">注册资本:</font><font  class="lineb " ><script>var d1={{$v.RegCap}};d1=d1?d1:0; var lenD1=(d1+"").length ;if(lenD1>4&&(d1+"").indexOf(".")>-1&&(lenD1-(d1+"").indexOf("."))>4){document.write(d1.toFixed(4))}else{document.write(d1)}</script>万{{if $v.RegCapCurName}}{{$v.RegCapCurName}}{{else}}元{{end}}</font></span>
 											{{end}}
 										{{end}}

+ 0 - 2
core/src/web/templates/service/demand.html

@@ -11,14 +11,12 @@
 	.g-demand-main{
 			float: left;
 			width: 940px;
-			margin-top: 10px;
 			background: #FFF;
 			
 	}
 	.text-primary.a-com-title{
 		border-left:0px;
 		background:#F6F8FA;
-		margin-top:9px;
 		border:1px solid #E5E6E9;
 	}
 </style>

+ 8 - 5
core/src/web/templates/service/detail.html

@@ -20,9 +20,6 @@
 	.container-fluid .a-content{
 		margin-top:10px;
 	}
-	.a-c-right{
-		margin-top:8px;
-	}
 	.text-muted a{
 		color: #aea79f;
 	}
@@ -111,7 +108,7 @@
 #sl_intro{
 	height:38px;overflow: hidden;text-overflow: ellipsis;margin-top: 10px;
 }
-#sl_intro p{
+#sl_intro,#sl_intro p{
 	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif  !important;
 	line-height:20px !important;
 	color:#999 !important; 
@@ -267,7 +264,7 @@
 			<a type="button" class="text-muted btnactive" style="margin-left:18px;border-left:1px solid #FFF;">服务详情</a>
 			<a type="button" class="text-muted">服务评价({{.T.sinfo.i_comments}})</a>
 			<a type="button" class="text-muted">预约记录({{.T.appcount}})</a>
-			<a type="button" class="text-muted">更多服务</a>
+			<a type="button" class="text-muted" id="moreservice">更多服务(0)</a>
 			{{end}}
 			
 			{{if .T.status }}
@@ -468,7 +465,9 @@ function del(id){
 var paging;
 $(function(){
 	 paging = new Paging("servicePaging","/market/service/list",{id:{{.T.sinfo.s_enterpriseid}}},5,function(r){
+		
 		var html = '';
+		$("#moreservice").html("更多服务("+paging.count+")")
 		for(var i=0; i< r.length;i++){
 			var _id = r[i]._id;
 			var jg = ""
@@ -529,6 +528,10 @@ $(function(){
 		$(".d_fwfl a").eq(1)[0].click();
 	}
 	setPrice();
+	//从企业社区的链接过来,自动显示服务列表
+	if(/\#moreservice$/.test(window.location.href)){
+		$(".d_fwfl a:last").click();
+	}
 });
 
 var limit=0;

+ 0 - 4
core/src/web/templates/service/list.html

@@ -11,7 +11,6 @@
 	.list-new-list{
 		max-width: 940px;
 		width:100%;
-       margin: 10px 0 0 0;
    	    background-color: #fff;
        float: left;
 	}
@@ -48,9 +47,6 @@
 		padding-left:0px;
 		padding-right:0px;
 	}
-	.a-c-right{
-		margin-top:9px;
-	}
 	.text-primary{
 		color:#FF5A5F !important;
 	}

+ 85 - 5
core/src/web/templates/service/viewsingledemand.html

@@ -27,12 +27,12 @@
 			}
 			.a-bg-gray-new{
 				display:inline-block;
-				height:21px;
+				height:22px;
 				width:81px;
 				background:#FFF;
 				background-image:url({{Msg "seo" "cdn"}}/images/tbn9.png);
 				position: relative;
-			  	  top: -4px;
+			  	/*top: -4px;*/
 			}
 			.d-bg-green, .d-bg-gray,.d-bg-blue{
 				width:81px;
@@ -49,8 +49,37 @@
 				white-space: nowrap;
 				line-height:21px !important;
 			}
-			.a-c-right>.a-com-title {
-				margin-top:10px !important;
+			.xq-introduction{
+				height:38px;overflow: hidden;text-overflow: ellipsis;margin-top: 10px;
+			}
+			.xq-introduction p,.xq-introduction span,.xq-introduction{
+				font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif  !important;
+				line-height:20px !important;
+				color:#999 !important; 
+			}
+			.xq-img{
+				float:left;width:15%;
+			}
+			.xq-img img{
+				width:100px;
+			}
+			.xq-intro{
+				float:left;width:84%;
+			}
+			.xq-title{
+				float:left;width: 70%;font-size: 16px;height: 45px;line-height: 20px;padding-top: 5px;overflow: hidden;text-overflow: ellipsis;
+			}
+			.xq-state{
+				float:left;padding-top:5px;margin-left:20px;
+			}
+			.xq-list {
+				height: 120px;
+				border-bottom: 1px solid #f0f0f0;
+				margin: 20px 0px;
+			}
+			.xq-endtime{
+				padding-top: 4px;
+				color:#999;
 			}
 		</style>
 		    {{include "/common/inc.html"}}
@@ -68,7 +97,7 @@
 	{{include "/common/indexhead.html"}}
     <div class="container-fluid a-content">
 		
-      <div class="a-c-left" style="background:#FFF;margin-top:10px;width:940px;">
+      <div class="a-c-left" style="background:#FFF;width:940px;">
         <div class="container" style="padding:30px 30px 30px 60px;width:100%;">
 					<div class="hidden-xs col-sm-4" >
 						<img width=250 height=250 style="background-color: #e4e4e4;" src="{{Msg "seo" "cdn"}}{{.T.demandInfo.s_image}}">
@@ -209,6 +238,7 @@
 			<div class="m-title">
 				<span class="f-d u-focus">需求描述</span>
 				<span class="f-s">服务商报价</span>
+				<span class="f-s">需求列表</span>
 			{{if eq 1 2}}	<span class="f-s">评价详情</span>{{end}}
 			</div>
 			<div class="m-content">
@@ -242,6 +272,18 @@
 				
 				</div>
 				{{end}}
+				<div class="f-s f-display">
+					<div class="table a-table margin-t-20" id="demandList">
+						<div id="tableTitle">
+							
+							
+						</div>
+						
+						<div>
+							<div class="text-center" id="demandPaging"></div>
+						</div>
+					</div>
+				</div>
 			</div>
 		</div>
       </div>
@@ -251,6 +293,44 @@
     </div>
 	{{include "/service/bid.html"}}
 	<script charset="utf-8" src="/js/paging.js"></script>
+	<script>
+	
+	var paging;
+	$(function(){
+		 paging = new Paging("demandPaging","/market/demand/list",{id:{{.T.demandInfo.s_enterpriseid}}},5,function(r){
+			var html = '';
+			var regS = new RegExp("\\/","g");
+			for(var i=0; i< r.length;i++){
+				var status = "";
+				var enttime = ""
+				if (r[i].l_enddate*1000 < Date.parse(new Date())){
+					r[i].i_status = 3
+				}
+				if (r[i].i_status == 1){
+					status = "<img src='/images/u288.png'/>"
+					enttime = '<div class="xq-endtime"><span>投标截止时间:</span>'+new Date(r[i].l_enddate*1000).toLocaleString().substr(0,10).replace(regS,'-')+'</div>' 
+				}else if(r[i].i_status == 2){
+					status = "<img src='/images/u252.png'/>"
+				}else{
+					status = "<span class='a-bg-gray-new'>任务超时</span>"
+				} 
+				html +='<div  data-id="'+r[i]._id+'" class="xq-list">'
+						+'<div class="xq-img"><img src="'+r[i].s_image+'"></div>'
+						+'<div class="xq-intro"><div>'
+						+'<div class="xq-title"><a href="/market/demandview/'+r[i]._id+'.html">'+r[i].s_name+'</a></div>'
+						+'<div class="xq-state"><div>'+status+'</div>'
+						+enttime+'</div>'
+						+'<div style="clear:both;"></div></div>'
+						+'<div class="xq-introduction">'+r[i].s_introduction+'</div></div>'
+						+'<div style="clear:both;"></div></div>';
+			}
+			$("#demandList #tableTitle").nextAll("[data-id]").remove();
+			$("#demandList #tableTitle").after(html);
+		
+		});
+	});
+
+	</script>
 	<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>
 		

+ 43 - 226
core/src/web/templates/swordfish/newindex.html

@@ -10,239 +10,25 @@ body{
 	background-color: #fff;
 	min-width:1024px;
 }
-.sf_search{
-	background: url('/images/swordfish/sf_02.png') center top no-repeat;
-	width:100%;
-	height:660px;
-	background-size: cover;
-	padding-top: 150px;
-}
-.sf_newscount{
-	background: url('/images/swordfish/sf_03.png') center top no-repeat;
-	width:100%;
-	height:500px;
-	background-size: cover;
-}
-.sf_GTwebsite{
-	background: url('/images/swordfish/sf_04.png') center top no-repeat;
-	width:100%;
-	height:500px;
-	background-size: cover;
-}
-.sf_Epwebsite{
-	background: url('/images/swordfish/sf_05.png') center top no-repeat;
-	width:100%;
-	height:500px;
-	background-size: cover;
-}
-.sf_type{
-	background: url('/images/swordfish/sf_06.png') center top no-repeat;
-	width:100%;
-	min-height:750px;
-	background-size: cover;
-}
-.sf_shm{
-    font-size: 16px;
-    line-height: 32px;
-	padding: 90px 0px 80px 10px;
-	width:100%; 
-	height:465px;
-}
-.sf_shmone{
-	float:left;
-	width:33%;
-}
-.sf_from span:first-child,.sf_lately span:first-child,.sf_today span:first-child{
-	font-size: 16px;
-    font-weight: bold;
-    color: #000;
-}
-.sf_ewm{
-	width:100%;
-	height:260px;
-	background-color:#f0f0f0;
-	padding-top:40px;
-	border:1px solid #E5E6E9;
-}
-.sf_firstewm{
-	width:100%;
-	height:260px;
-	padding-top:40px;
-}
-.sf_ewm img,.sf_firstewm img{
-	width:135px;
-	margin-bottom:20px;
-}
-.sf_ewm span,.sf_firstewm span{
-	font-size: 18px;
-    color: #000;
-}
-.sf_cp{
-	height:100px;
-	width:100%;
-	margin-bottom:100px;
-    line-height: 32px;
-    padding: 20px;
-    background-color: #f0f0f0;
-}
-.sf_cp span{
-	font-size:16px;
-	padding: 20px;
-	cursor:pointer;
-}
-.sf_ybh{
-	font-size: 14px !important;
-    color: #ccc;
-}
-.sf_geduan{
-	width:100%;
-	height:85px;
-	background-color:#fff;
-}
-.sf_collect{
-	color: #fff;
-	position: relative;
-	float:right;    
-	background-color: #24C0D7;
-    padding-top: 100px;
-	font-size: 32px;
-    width: 550px;
-    height: 300px;
-    margin-right: 10px;
-}
-.sf_collect span{
-	text-decoration: underline;
-	font-size: 36px;
-}
-.sf_GTcollect{
-	color: #fff;
-    position: relative;
-    float: left;
-    width: 551px;
-    height: 365px;
-    padding-top: 60px;
-    background-color: #316BAE;
-    margin-left: 10px;
-    font-size: 25px;
-}
-.sf_GTcollect span:first-child,.sf_Epcollect span:first-child{
-	text-decoration: underline;
-	font-size: 36px;
-}
-.sf_GTcollect span:nth-child(4),.sf_Epcollect span:nth-child(4){
-	font-size: 14px;
-    line-height: 24px;
-}
-.sf_Epcollect{
-	color: #fff;
-	position: relative;
-	float:right;    
-	width: 550px;
-    height: 309px;
-    background-color: #9A397C;
-    margin-right: 20px;
-    padding-top: 50px;
-	font-size: 32px;
-}
-.sf_jyzbdy{
-	font-size: 62px;
-    margin-bottom: 30px;
-	letter-spacing: 8px;
-}
-.sf_gxh{
-	font-size: 24px;
-    font-weight: bold;
-    margin-bottom: 40px;
-	letter-spacing: 5px;
-}
-.sf_gxh span{
-	color: #24C0D7;
-}
-.sf_form{
-	width: 30%;
-    margin-left: 31%;
-}
-.sf_form .sousuo{
-    top: 16px;
-    z-index: 99;
-    left: 12px;
-    color: #ccc;
-    font-size: 20px;
-    position: absolute;
-}
-.sf_form .sf_sousuo{
-	position: absolute;
-    display: inline-block;
-    width: 108px;
-    height: 50px;
-    background-color: #24C0D7;
-    color: #fff;
-    font-size: 20px;
-    text-align: center;
-    line-height: 50px;
-    right: -108px;
-	cursor: pointer;
-}
-.b-nav li:hover{
-	border-bottom: 3px solid #24C0D7;
-	/*cursor: pointer;*/
-}
-.b-nav li:first-child:hover{
-	border-bottom: 0px;
-}
-.b-nav-link a{
-	color:#000 !important;
-	font-weight: inherit !important;
-}
-.b-nav > ul {
-    height: 110px !important;
-    /*line-height: 110px !important;*/
-	max-width: 2250px !important;
-	padding-left: 40px;
-    padding-right: 30px;
-}
-.b-nav-main{
-	padding: 0px !important;
-    width: 80px !important;
-	background-color: #fff;
-	height: 110px;
-	line-height: 110px !important;
-}
-.b-loginStatus{
-	width:121px;
-	line-height: 110px !important;
-}
-.b-nav-logo{
-	padding-top:20px;
-}
+
 </style>
 </head>
 <body>
-<div style="display:none">{{include "/common/top.html"}}</div>
-<div class="b-head">
-	<div class="b-nav index-new-nva" style="border-top:0px;box-shadow: 0 0 10px #E5E6E9;">
-		<ul>
-			<li class="b-nav-logo"><img src="{{Msg "seo" "cdn"}}/images/swordfish/sf_01.png"></li>
-			<li class="pull-right b-loginStatus" id="b-loginStatus"></li>
-			<li class="pull-right b-nav-link b-nav-main"><a href="/front/entCommunity.html">社区</a></li>
-			<li class="pull-right b-nav-link b-nav-main" style="margin-right:0px;"><a href="/front/content_zhsk_list.html">知识库</a></li>
-			<li class="pull-right b-nav-link b-nav-main"><a  onclick="subsea()">招标搜索</a></li>
-		</ul>
-	</div>
-</div>
+<!--<div style="display:none">{{include "/common/top.html"}}</div>-->
+{{include "/common/newsfhead.html"}}
 
 <div class="sf_search text-center">
 	<div class="sf_jyzbdy">剑鱼招标订阅</div>
 	<div class="sf_gxh">是由<span>用户个性化定制</span>的全行业招标信息订阅推送服务</div>
 	<div class="sf_form">
-		<form method="post" action="/member/swordfish/searchinfolist"  name="searchsword" >
+		<form method="post" action="/front/swordfish/searchinfolist.html"  name="searchsword" >
 			<div class="input-group col-xs-12">
 				<span  class="glyphicon sousuo"></span>
-	             <input type="text" id="searchname" name="searchname" class="form-control" style="height:50px;padding-left:40px;font-size: 16px;" placeholder="招标信息">
+	             <input type="text" id="searchname" name="searchname" class="form-control" style="height:50px;padding-left:40px;font-size: 16px;" placeholder="信息检索">
 				<input name="s_type" id="sea_type" value="1" style="display:none;"/>
 				<input name="s_name" id="sea_name" value="" style="display:none;"/>
 				<span class="sf_sousuo"  onclick="subsea()">搜索</span>
-	         		</div>
+	        </div>
 		</form>
 	</div>
 	<div class="text-center sf_firstewm">
@@ -308,20 +94,51 @@ body{
 	<span onClick="window.open('/')">企明星</span>|<span onClick="window.open('/front/entCommunity.html')">企业社区</span>|<span onClick="window.open('/front/web_A_help.html')">关于我们</span>|<span onClick="window.open('/front/web_H_help.html')">帮助中心</span><br>
 	<span class="sf_ybh">©2015-2016 河南拓普 版权所有 | 豫ICP备15016539号-1</span>
 </div>
+
+<!-- 按钮触发模态框 -->
+<button class="btn hidden kfing" data-toggle="modal" 
+   data-target="#myModal">
+</button>
+
+<!-- 模态框(Modal) -->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+	<div class="modal-dialog">
+      <div class="modal-content" style="height:500px;">
+         <div class="modal-header">
+            <button type="button" class="close" 
+               data-dismiss="modal" aria-hidden="true">
+                  &times;
+            </button>
+            <h4 class="modal-title" id="myModalLabel">
+               剑鱼
+            </h4>
+         </div>
+         <div class="modal-body text-center" style="margin-top:150px;">
+            开发中,敬请期待!
+         </div>
+         
+      </div><!-- /.modal-content -->
+	</div><!-- /.modal -->
+</div>
 <script type="text/javascript">
 
 function subsea(){
-	if(isLogined){
+	//if(isLogined){
 			var searchname = $("#searchname").val();
 			searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
 			document.getElementById("sea_name").value = searchname;
 			document.forms['searchsword'].submit();
-		}else{
-			loginModalShow();
-		}
+		//}else{
+		//	loginModalShow();
+		//}
 }
-$(".sf_login").click(function(){
-	loginModalShow();
+//$(".sf_login").click(function(){
+//	loginModalShow();
+//});
+
+$(".sf_zbsq").click(function(){
+	$(".kfing").click();
 });
 </script>
 </body>

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

@@ -2,6 +2,19 @@
 <head>
 <title>信息检索</title>
 {{include "/common/inc.html"}}
+<style>
+.b-newsf{
+	background-color: rgb(255, 255, 255);
+	min-width:100%;
+    display: inline-block;
+    vertical-align: top;
+    padding: 15px;
+}
+.swordfish-page-title i {
+	padding: 2px !important;
+    font-size: 18px !important;
+}
+</style>
 </head>
 <body>
 <script type="text/javascript">
@@ -18,12 +31,16 @@ $(function(){
 	
 	var flog = {{.T.success}};
 	if (!flog){
+		$(".sf_nothing").removeClass("hidden");
+		$("#conlist").addClass("hidden");
 		if (s_words.length >0 ){
 			$("#conlist").html('<div class="text-center"><div ><img style="width:137px;margin-top:60px;" src="/images/findnull.png"></div><div style="margin-bottom:50px;">没有找到和该关键词匹配的信息</div></div>');
 		}else{
 			$("#conlist").html('<div class="text-center" style="height:300px;"></div>');
 		}
 	}else{
+		$("#conlist").removeClass("hidden");
+		$(".sf_nothing").addClass("hidden");
 		$("#searchts").removeClass("hidden");
 		var str = ""
 		var temp = {{.T.msglist}}
@@ -265,21 +282,21 @@ $(function(){
 }
 </style>
 <!-- 头部 -->
-{{include "/common/swordfishhead.html"}}
+{{include "/common/newsfhead.html"}}
 <!-- 中间 -->
 <div class="b-content container-fluid">
-	<div class="b-left">
+	<div class="b-newsf">
 		<div class="swordfish-page-title">
-			<i class="img-circle glyphicon jianyu"></i>信息查询
+			<i class="glyphicon qmx-icon-mingpian icon-large"></i>剑鱼招标结果
 		</div>
 		<!-- 关键词提示start -->
-		<div id="searchtitle" >
+		<div id="searchtitle" class="hidden" >
 		<span onClick="type(1)" id="searchzhb1" class="searchactive">招标公告</span>
 		<span onClick="type(2)" id="searchzhb2">中标公告</span>
 		<span id="searchzhb3">企业情报</span>
 		</div>
-		<div id="listform" style="padding:0px 0px 10px 40px">
-		<form action="/member/swordfish/searchinfolist" name="searchsword" method="post">
+		<div id="listform" class="hidden" style="padding:0px 0px 10px 40px">
+		<form action="/front/swordfish/searchinfolist.html" name="searchsword" method="post">
 		<div class="form-group">
 		<div class="col-sm-7">
         <input class="form-control" id="searchname" name="searchname" value="{{.T.keywords}}" style="background-color:#FFFFFF; border:1px solid #e5e6e9;" placeholder="示例:税务局 软件"/>
@@ -287,7 +304,7 @@ $(function(){
 		<div class="col-sm-2">
 		<input name="s_type" id="sea_type" value="1" style="display:none;"/>
 		<input name="s_name" id="sea_name" value="" style="display:none;"/>
-		<div class="searchbtn" onclick="subsea()"><i class="glyphicon sousuo"></i> 查询</div>
+		<div class="searchbtn"><i class="glyphicon sousuo"></i> 查询</div>
 		</div>
 		<div class="col-sm-3">
         <!--<div class="rsssetbtn" onClick="window.location.href='/member/swordfish/rssset';">进入我的信息订阅</div>-->
@@ -297,6 +314,9 @@ $(function(){
 		</div>
 		<!-- 关键词提示end -->
 		<!-- 列表start -->
+		
+		<div class="col-sm-12 text-center sf_nothing">
+		<img src="/images/swordfish/sorry.png"/><br><br>没有找到和该关键字匹配的信息</div>
 		<div class="row">
 		<div  class="col-sm-12" id="conlist">
 		</div>
@@ -318,10 +338,10 @@ $(function(){
 		</div>
 		</form>	
 	</div>
-	<div class="b-right swordfish-qrcode text-center">
+<!--	<div class="b-right swordfish-qrcode text-center">
 		<img src="/images/swordfish/qrcode.png">
 		<br>关注微信公众号:企明星
-	</div>
+	</div>-->
 </div>
 
 <!-- 按钮触发模态框 -->
@@ -340,7 +360,7 @@ $(function(){
                   &times;
             </button>
             <h4 class="modal-title" id="myModalLabel">
-               企业情报
+               剑鱼
             </h4>
          </div>
          <div class="modal-body text-center" style="margin-top:150px;">
@@ -353,15 +373,9 @@ $(function(){
 <!-- 底部 -->
 {{include "/common/bottom.html"}}
 <script type="text/javascript">
-$("#searchzhb3").click(function(){
+$(".sf_zbsq").click(function(){
 	$(".kfing").click();
 });
-function subsea(){
-	var searchname = $("#searchname").val();
-	searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
-	document.getElementById("sea_name").value = searchname;
-	document.forms['searchsword'].submit();
-}
 function type(i){
 	document.getElementById("sea_type").value = i;
 	for (j=1;j<3;j++){
@@ -372,6 +386,20 @@ function type(i){
 		}
 	}
 }
+function subsea(){
+	var searchname = $("#searchname").val();
+	searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+	document.getElementById("sea_name").value = searchname;
+	document.forms['searchsword'].submit();
+}
+$(".sf_headsousuo").click(function(){
+	
+	var headsearchname = document.getElementById("headsearchname").value;
+	headsearchname = headsearchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+	document.getElementById("sea_name").value = headsearchname;
+	document.getElementById("searchname").value = headsearchname;
+	document.forms['searchsword'].submit();
+});
 </script>
 </body>
 </html>

+ 1 - 63
push/src/config.json

@@ -1,64 +1,2 @@
-{
-    "bid": {
-        "interval": 60,
-        "lastpushtime": "2015-10-10 10:10:10"
-    },
-    "bidStartTime": "2015-12-30 17:28:48",
-    "bidTitle": "亲!剑鱼为您速报最新鲜的中标信息啦",
-    "bidViewDomain": "192.168.3.132",
-    "durationMinutes": 10,
-    "fixPush": "oJULtwzXo6EFV1Ah-XeyRBimXGM8",
-    "mail_bid": "\u003cdiv\u003e%s\u003c/div\u003e,想了解更多信息,请访问http://www.qimingxing.info。",
-    "maxPushSize": 50,
-    "mgoAddr": "192.168.3.18: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": 50,
-    "rpcPort": "8766",
-    "smtpAddr": "smtp.exmail.qq.com",
-    "smtpFromUser": "企明星",
-    "smtpPort": 465,
-    "smtpPwd": "qy123456",
-    "smtpUser": "qyfw@topnet.net.cn",
-    "tenderStartTime": "2015-12-30 17:28:48",
-    "tenderTitle": "亲!剑鱼为您速报最新鲜的招标信息啦",
-    "weixinRpcServer": "127.0.0.1:82",
-    "weixin_bid": "\u003cdiv\u003e%s最新招标信息\u003c/div\u003e\u003cdiv\u003e%s\u003c/div\u003e",
-    "wxRpcRemark": "请到网站个人中心查看详细."
-}
+{"bid":{"interval":60,"lastpushtime":"2015-10-10 10:10:10"},"bidStartTime":"2015-12-30 17:28:48","bidTitle":"亲!剑鱼为您速报最新鲜的中标信息啦","bidViewDomain":"192.168.3.132","durationMinutes":10,"fixPush":"oJULtwzXo6EFV1Ah-XeyRBimXGM8","mail_bid":"\u003cdiv\u003e%s\u003c/div\u003e,想了解更多信息,请访问http://www.qimingxing.info。","maxPushSize":50,"mgoAddr":"192.168.3.18: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":50,"rpcPort":"8766","smtpAddr":"smtp.exmail.qq.com","smtpFromUser":"企明星","smtpPort":465,"smtpPwd":"qy123456","smtpUser":"qyfw@topnet.net.cn","tenderStartTime":"2016-05-25 18:10:19","tenderTitle":"亲!剑鱼为您速报最新鲜的招标信息啦","weixinRpcServer":"127.0.0.1:82","weixin_bid":"\u003cdiv\u003e%s最新招标信息\u003c/div\u003e\u003cdiv\u003e%s\u003c/div\u003e","wxRpcRemark":"请到网站个人中心查看详细."}
 

+ 6 - 4
weixin/src/config.json

@@ -43,14 +43,16 @@
 	"dir":"/opt/mntdisk/qfw-v1.1",
 	"qmxcdn":"http://cdn.qmx.top:9000",
 	"rpcserver": "127.0.0.1:83",
-	"msgserver":"test.qmx.top:7070",
+	"msgserver":"192.168.3.14:7070",
 	"distinguishWork":{
+		"errorCount":3,
 		"title":"识别验证码",
-		"detail":"企明星",
-		"result":"您有一个待识别的验证码,点击下方“详情”查看",
+        "detail":"企明星",
+        "result":"您有一个待识别的验证码,点击下方“详情”查看",
 		"description":"请识别图中验证码并回复",
 		"in":"欢迎您进入了识别验证码工作,输入“结束识别验证码”退出本次工作。",
 		"out":"您已退出本次工作,辛苦了,再见。",
-		"reply":"已收到您的回复,谢谢。"
+		"reply":"已收到您的回复,谢谢。",
+		"msgError":"该功能暂不可用,请稍后再试!"
 	}
 }

+ 2 - 0
weixin/src/main.go

@@ -30,6 +30,8 @@ func init() {
 	log.Printf("The web server listen on %s %s:%s \n AppContext:%s \n", "http://", wf.SysConfig.Domain, wf.SysConfig.Port, wf.SysConfig.Appcontext)
 	//微信sdk配置
 	weixin.InitWeixinSdk()
+	//连接消息总线
+	go weixin.InitDgWork()
 }
 
 func main() {

+ 210 - 45
weixin/src/qfw/weixin/distinguishwork.go

@@ -2,8 +2,14 @@
 package weixin
 
 import (
+	"bytes"
 	"encoding/json"
 	"fmt"
+	"github.com/disintegration/imaging"
+	"image"
+	"image/color"
+	"io"
+	"io/ioutil"
 	"log"
 	"math/rand"
 	util "mfw/util"
@@ -21,6 +27,11 @@ const (
 	status_rest      = 0 //闲时,没有任务
 	status_working   = 1 //进入工作状态
 	status_waitReply = 2 //收到验证码,等待回复
+	//
+	white          = uint8(0xff)
+	bgImgName      = "background.jpg"
+	newsImagWidth  = 640
+	newsImagHeight = 320
 )
 
 var workLock = new(sync.Mutex)
@@ -33,7 +44,11 @@ var client *util.Client
 type DistinguishWork struct {
 }
 
-func initDgWork() {
+func init() {
+
+}
+
+func InitDgWork() {
 	client, _ = util.StartClient(processevent, wf.SysConfig.Msgserver, []int{util.SERVICE_DISTINGUISH}, 20)
 	client.ResetMyName("识别验证码")
 }
@@ -41,24 +56,29 @@ func processevent(p *util.Packet) {
 	event := int(p.Event)
 	switch event {
 	case util.SERVICE_DISTINGUISH:
-		log.Println("------从消息总线接收到了一个消息-----")
+		defer util.Catch()
 		//写数据
 		if ret := make(map[string]interface{}); json.Unmarshal(p.GetBusinessData(), &ret) == nil {
+			log.Println("验证码--接收到消息的数据msgId:", p.Msgid)
 			flag, _ := ret["flag"].(bool)
 			if flag {
+				img, _ := ret["img"]
+				if img == nil {
+					return
+				}
 				imgTmp, err := json.Marshal(ret["img"])
 				if err != nil {
 					return
 				}
-				var img []byte
-				err = json.Unmarshal(imgTmp, &img)
+				var imgbyte []byte
+				err = json.Unmarshal(imgTmp, &imgbyte)
 				if err != nil {
 					return
 				}
 				obj := map[string]interface{}{
 					"from":  p.From,
 					"msgId": p.Msgid,
-					"img":   img,
+					"img":   imgbyte,
 				}
 				if len(workers) == 0 {
 					waitWorks = append(waitWorks, obj)
@@ -66,6 +86,7 @@ func processevent(p *util.Packet) {
 					toWork(obj)
 				}
 			} else {
+				log.Println("验证码--超时处理msgId:", p.Msgid)
 				overtime(p.Msgid)
 			}
 		}
@@ -74,20 +95,26 @@ func processevent(p *util.Packet) {
 
 //开始工作,记录工作人的相关数
 func (a *DistinguishWork) Start(openId string) {
-	if client == nil {
-		initDgWork()
-	}
+	defer util.Catch()
 	for _, v := range workers {
 		if v["openId"] == openId {
+			log.Println("验证码--", openId, "已经在工作中,重复进入")
 			return
 		}
 	}
+	log.Println("验证码--", openId, "进入工作")
 	workers = append(workers, map[string]interface{}{"openId": openId, "status": status_rest})
 	toWork(nil)
 }
 
 //结束工作,删除工作人
 func (a *DistinguishWork) End(openId string) {
+	defer util.Catch()
+	log.Println("验证码--", openId, "退出本次工作")
+	end(openId)
+}
+
+func end(openId string) {
 	deleteWorker(openId)
 	for k, v := range workers {
 		if v["openId"] == openId {
@@ -99,6 +126,7 @@ func (a *DistinguishWork) End(openId string) {
 
 //判断该人是否是工作模式
 func (a *DistinguishWork) IsWorking(openId string) bool {
+	defer util.Catch()
 	for _, v := range workers {
 		if v["openId"] == openId {
 			return true
@@ -109,6 +137,7 @@ func (a *DistinguishWork) IsWorking(openId string) bool {
 
 //判断该人是否在等待回复
 func (a *DistinguishWork) IsWaitReply(openId string) bool {
+	defer util.Catch()
 	for _, v := range workers {
 		if v["openId"] == openId {
 			return v["status"] == status_waitReply
@@ -129,17 +158,22 @@ func overtime(msgId string) {
 
 //回复验证码
 func (a *DistinguishWork) Reply(openId, content string) {
+	defer util.Catch()
 	obj := workering[openId]
 	if obj == nil || len(obj) < 2 {
+		log.Println("验证码--本次回复msgId丢失")
 		return
 	}
+	log.Println("验证码--", openId, "回复内容:", content)
 	tmp := make(map[string]interface{})
 	tmp["content"] = content
 	tmp["msgId"] = obj[0]
 	client.WriteObj(obj[1], obj[0], util.EVENT_RECIVE_CALLBACK, util.SENDTO_TYPE_P2P, tmp)
 	deleteWorker(openId)
 	updateWorker(openId, status_rest)
-	toWork(nil)
+	time.AfterFunc(2*time.Second, func() {
+		toWork(nil)
+	})
 }
 
 //删除工作的人
@@ -149,59 +183,106 @@ func deleteWorker(openId string) {
 
 //进行一个任务
 func toWork(o map[string]interface{}) {
-	openId, obj, err := worked(o)
-	if err == nil {
+	openId, obj, status := worked(o)
+	if status == 0 { //成功 || 该任务无效
+		return
+	}
+	if obj == nil || status == -1 {
+		deleteWorker(openId)
+		updateWorker(openId, status_rest)
+		return
+	}
+	obj["status"] = status
+	errorCount := qfwutil.IntAll(obj["errorCount"])
+	if status == -2 {
+		errorCount++
+		if errorCount >= qfwutil.IntAll(wf.SysConfig.DistinguishWork["errorCount"]) { //没有超过失败次数
+			deleteWorker(openId)
+			updateWorker(openId, status_rest)
+			return
+		}
+		obj["errorCount"] = errorCount
+	}
+	//把该任务放入等待队列中第一个,修改这个人的状态为空闲
+	var waitWorksCopy []map[string]interface{}
+	waitWorksCopy = append(waitWorksCopy, obj)
+	for _, v := range waitWorks {
+		waitWorksCopy = append(waitWorksCopy, v)
+	}
+	waitWorks = waitWorksCopy
+	//发送模板消息失败
+	if status == -4 {
+		end(openId)
+		toWork(obj)
 		return
 	}
-	//如果任务在执行过程中出现异常,把该任务放入等待队列中,修改这个人的状态为空闲
-	obj["status"] = "-1"
-	waitWorks = append(waitWorks, obj)
 	deleteWorker(openId)
 	updateWorker(openId, status_rest)
 }
 
-func worked(o map[string]interface{}) (string, map[string]interface{}, error) {
+func worked(o map[string]interface{}) (string, map[string]interface{}, int) {
 	openId, obj := getWorker(o)
-	if openId == "" { //没有闲人
-		return openId, obj, nil
-	}
-	from := obj["from"].(string)
-	msgId := obj["msgId"].(string)
-	img := obj["img"].([]byte)
-	//生成验证码图片
-	name, err := createImg(msgId, img)
+	if openId == "" || obj == nil { //没有闲人
+		return openId, obj, 0
+	}
+	from, ok := obj["from"].(string)
+	msgId, ok := obj["msgId"].(string)
+	img, ok := obj["img"].([]byte)
+	if !ok {
+		log.Println("验证码--获取到的数据不完整:", obj)
+		return openId, obj, -1
+	}
+	var name string
+	var err error
+	if imgName := obj["imgName"]; imgName != nil {
+		name, _ = imgName.(string)
+	} else {
+		//生成验证码图片
+		name, err = createImg(msgId, img)
+		obj["imgName"] = name
+	}
 	if name == "" || err != nil {
-		log.Println("生成验证码图片出错:", err)
-		return openId, obj, err
+		return openId, obj, -2
 	}
 	workering[openId] = []string{msgId, from}
 	//发送验证码图片
-	var e error
+	var itm qrpc.News
+	itm.ToUser = openId
+
+	var als qrpc.Article
+	als.Title = wf.SysConfig.DistinguishWork["title"].(string)
+	als.Description = wf.SysConfig.DistinguishWork["description"].(string)
+	als.Url = wf.SysConfig.Qmxcdn + "/upload/spider/" + name
+	als.PicUrl = wf.SysConfig.Qmxcdn + "/upload/spider/" + name
+
+	itm.Articles = append(itm.Articles, als)
+
+	var status = 0
 	qfwutil.Try(func() {
 		client, err := rpc.DialHTTP("tcp", wf.SysConfig.Rpcserver)
 		defer client.Close()
 		if err != nil {
-			log.Println(err.Error())
-			e = err
+			log.Println("验证码--", err.Error())
+			status = -3
 			return
 		}
 		var repl qrpc.RpcResult
-		err = client.Call("WeiXinRpc.SendManagerNotifyMsg", &qrpc.NotifyMsg{
+		err = client.Call("WeiXinRpc.SendNews", itm, &repl)
+		/*err = client.Call("WeiXinRpc.SendManagerNotifyMsg", &qrpc.NotifyMsg{
 			Openid: openId,
 			Title:  wf.SysConfig.DistinguishWork["title"],
 			Detail: wf.SysConfig.DistinguishWork["detail"],
 			Result: wf.SysConfig.DistinguishWork["result"],
 			Url:    wf.SysConfig.Qmxcdn + "/upload/spider/" + name,
-		}, &repl)
+		}, &repl)*/
 		if err != nil {
-			log.Println(err.Error())
-			e = err
-			return
+			log.Println("验证码--", err.Error())
+			status = -4
 		} else {
 			updateWorker(openId, status_waitReply)
 		}
 	}, func(e interface{}) {})
-	return openId, obj, e
+	return openId, obj, status
 }
 
 //修改这个人的状态为等待回复
@@ -233,14 +314,22 @@ func getWorker(obj map[string]interface{}) (openId string, object map[string]int
 	}
 	tmp_length := len(tmp)
 	if tmp_length == 0 { //都在忙,没有闲人
-		waitWorks = append(waitWorks, obj)
+		if obj != nil {
+			waitWorks = append(waitWorks, obj)
+			log.Println("验证码--都在忙,没有闲人")
+		}
 		return
 	}
 	tmp_index := rand.New(rand.NewSource(time.Now().UnixNano())).Intn(tmp_length)
 	workers_index := tmp[tmp_index]
 	workers[workers_index]["status"] = status_working
-	openId = workers[workers_index]["openId"].(string)
+	openId, _ = workers[workers_index]["openId"].(string)
+	log.Println("验证码--获取到可以工作的人", openId)
 	if len(waitWorks) > 0 {
+		//把该任务加入等待队列
+		if obj != nil {
+			waitWorks = append(waitWorks, obj)
+		}
 		object = waitWorks[0]
 		//删除第一个
 		waitWorks = waitWorks[1:]
@@ -253,26 +342,100 @@ func getWorker(obj map[string]interface{}) (openId string, object map[string]int
 //获取一个要识别的任务
 func createImg(msgId string, img []byte) (string, error) {
 	name := msgId + "-" + fmt.Sprint(time.Now().Unix()) + ".jpg"
-	path := wf.SysConfig.Imgpath + "/upload/spider"
+	path := wf.SysConfig.Imgpath + "/upload/spider/"
 	fs, err := os.Open(path)
 	if err != nil && os.MkdirAll(path, 0700) != nil {
-		log.Println("创建文件夹出错:", err)
+		log.Println("验证码--创建文件夹出错:", err)
 		return "", err
 	}
 	defer fs.Close()
-	file, err := os.Create(path + "/" + name)
+	go delOldImg(path)
+	err = processImg(path, name, bytes.NewBuffer(img), img)
 	if err != nil {
-		log.Println("创建验证码图片出错:", err)
 		return "", err
 	}
-	_, err = file.Write(img)
+	return name, nil
+}
+
+//删除过期的图片
+func delOldImg(path string) {
+	dir, err := ioutil.ReadDir(path)
 	if err != nil {
-		log.Println("写入验证码图片出错:", err)
-		return "", err
+		log.Println("验证码--读取文件夹出错")
+		return
 	}
-	defer file.Close()
-	return name, nil
+	now := time.Now()
+	todayStart := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
+	for _, file := range dir {
+		if file.IsDir() || file.Name() == bgImgName {
+			continue
+		}
+		//删除今天之前的图片
+		if file.ModTime().Before(todayStart) {
+			os.Remove(path + file.Name())
+		}
+	}
+}
+
+func processImg(path, name string, file io.Reader, img []byte) error {
+	b_image, err := imaging.Open(path + bgImgName)
+	if err != nil {
+		b_newImg := imaging.New(newsImagWidth, newsImagHeight, color.NRGBA{white, white, white, white})
+		err = imaging.Save(b_newImg, path+bgImgName)
+		if err != nil {
+			log.Println("验证码--创建背景图片出错!", err)
+		}
+		b_image, err = imaging.Open(path + bgImgName)
+		if err != nil {
+			log.Println("验证码--重新打开背景图片出错!", err)
+		}
+	}
+	config, _, err := image.DecodeConfig(file)
+	if err != nil {
+		log.Println("验证码--获取图片config出错!", err)
+		return err
+	}
+	w := config.Width
+	h := config.Height
+	if w >= newsImagWidth {
+		return nil
+	}
+	f, err := os.Create(path + name)
+	if err != nil {
+		log.Println("验证码--创建图片出错!", err)
+		return err
+	}
+	_, err = f.Write(img)
+	if err != nil {
+		log.Println("验证码--写入图片出错!", err)
+		return err
+	}
+	f.Close()
+	_file, err := imaging.Open(path + name)
+	if err != nil {
+		log.Println("验证码--打开图片出错!", err)
+		return err
+	}
+	if h > newsImagHeight {
+		err = imaging.Save(imaging.Resize(_file, 0, newsImagHeight, imaging.Lanczos), path+name)
+		if err != nil {
+			log.Println("验证码--缩放图片出错!", err)
+			return err
+		}
+		_file, err = imaging.Open(path + name)
+		if err != nil {
+			log.Println("验证码--缩放之后重新打开图片出错!", err)
+			return err
+		}
+	}
+	err = imaging.Save(imaging.PasteCenter(b_image, _file), path+name)
+	if err != nil {
+		log.Println("验证码--合并之后创建图片出错:", err)
+		return err
+	}
+	return nil
 }
+
 func Monitor(w http.ResponseWriter, r *http.Request) {
 	var h_p, h_w, h_wa string
 	for _, v := range workers {
@@ -282,8 +445,10 @@ func Monitor(w http.ResponseWriter, r *http.Request) {
 		h_w += fmt.Sprint(k) + ":" + fmt.Sprint(v) + "<br>"
 	}
 	for _, v := range waitWorks {
+		img := v["img"]
 		delete(v, "img")
 		h_wa += fmt.Sprint(v) + "<br>"
+		v["img"] = img
 	}
 	if h_p == "" {
 		h_p = "无"

+ 19 - 12
weixin/src/qfw/weixin/msgtxtchandler.go

@@ -46,7 +46,25 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 	openid := r.FromUserName
 	//log.Println("........", r.FromUserName, r.Content)
 	//在会话中
-	if us, ok := UserSession[openid]; ok {
+	if r.Content == "开始识别验证码" { //进入人工识别验证码工作
+		if client == nil {
+			w.ReplyText(wf.SysConfig.DistinguishWork["msgError"].(string))
+			return
+		} else {
+			w.PostText(wf.SysConfig.DistinguishWork["in"].(string))
+			time.AfterFunc(2*time.Second, func() {
+				distinguishWork.Start(openid)
+			})
+		}
+	} else if distinguishWork.IsWorking(openid) { //人工识别验证码工作中。。。
+		if r.Content == "结束识别验证码" {
+			w.PostText(wf.SysConfig.DistinguishWork["out"].(string))
+			distinguishWork.End(openid)
+		} else if distinguishWork.IsWaitReply(openid) {
+			w.PostText(wf.SysConfig.DistinguishWork["reply"].(string))
+			distinguishWork.Reply(openid, r.Content)
+		}
+	} else if us, ok := UserSession[openid]; ok {
 		if r.Content == "q" || r.Content == "Q" {
 			if us.Type == "faq" {
 				w.ReplyText("您已经退出智能咨询服务。")
@@ -107,17 +125,6 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 			PicUrl:      wf.SysConfig.Qmxcdn + "/images/swordfish/jianyu_weixin.jpg",
 			Url:         "http://mp.weixin.qq.com/s?__biz=MzA5MTk0MTk5Ng==&mid=406103124&idx=1&sn=c12f1cc34899f0c3b36492885567315a#rd",
 		}})
-	} else if !distinguishWork.IsWorking(openid) && r.Content == "开始识别验证码" { //进入人工识别验证码工作
-		w.ReplyText(wf.SysConfig.DistinguishWork["in"])
-		distinguishWork.Start(openid)
-	} else if distinguishWork.IsWorking(openid) { //人工识别验证码工作中。。。
-		if r.Content == "结束识别验证码" {
-			w.ReplyText(wf.SysConfig.DistinguishWork["out"])
-			distinguishWork.End(openid)
-		} else if distinguishWork.IsWaitReply(openid) {
-			w.ReplyText(wf.SysConfig.DistinguishWork["reply"])
-			distinguishWork.Reply(openid, r.Content)
-		}
 	} else {
 		now := time.Now()
 		if now.Weekday() == 6 || now.Weekday() == 0 || (now.Hour() > 17 || now.Hour() < 9) {

+ 12 - 4
weixin/src/qfw/weixin/rpc/rpc.go

@@ -203,13 +203,21 @@ func (wxrpc *WeiXinRpc) SendOffLineMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResul
 }
 
 //发送图文消息
-func (wxrpc *WeiXinRpc) SendImgTextMsg(param *qrpc.ImgTextMsg, ret *qrpc.RpcResult) (err error) {
-	param.MsgType = "news"
-	err = wxrpc.wx.PostTextCustom(itmapi_url, param)
+func (wxrpc *WeiXinRpc) SendNews(param *qrpc.News, ret *qrpc.RpcResult) (err error) {
+	var articles []weixin.Article
+	for _, v := range param.Articles {
+		articles = append(articles, weixin.Article{
+			Title:       v.Title,
+			Description: v.Description,
+			Url:         v.Url,
+			PicUrl:      v.PicUrl,
+		})
+	}
+	err = wxrpc.wx.PostNews(param.ToUser, articles)
 	if err != nil {
 		log.Println(err.Error())
 	} else {
-		log.Println("send imgTextMsg success!")
+		log.Println("send news success!")
 	}
 	return
 }

+ 37 - 37
weixin/src/qfw/weixinconfig/weixinconfig.go

@@ -2,43 +2,43 @@ package weixinconfig
 
 //微信配置文件
 type wxconfig struct {
-	Domain                string            `json:"domain"`
-	Port                  string            `json:"port"`
-	Imgpath               string            `json:"imgpath"`
-	Redisservers          string            `json:"redisServers"`   //redis缓存服务器列表
-	Mongodbservers        string            `json:"mongodbServers"` //mongodb节点
-	MongodbPoolSize       int               `json:"mongodbPoolSize"`
-	MongodbName           string            `json:"mongodbName"`
-	Elasticsearch         string            `json:"elasticsearch"`
-	Rpcport               string            `json:"rpcport"`
-	ServiceTip            string            `json:"serviceTip"`
-	Appcontext            string            `json:"appcontext"`
-	Appid                 string            `json:"appid"`
-	Token                 string            `json:"token"`
-	Appsecret             string            `json:"appsecret"`
-	Aboutmeurl            string            `json:"aboutmeurl"`
-	Conactusurl           string            `json:"conactusurl"`
-	ElasticPoolSize       int               `json:"elasticPoolSize"`
-	Wsqurl                string            `json:"wsqurl"`
-	EntAuthTip            string            `json:"entAuthTip"`
-	PerAuthTip            string            `json:"perAuthTip"`
-	OthAuthTip            string            `json:"othAuthTip"`
-	MessageTpl            map[string]string `json:"messagetpl"` //消息模板配置
-	WelcomeTip            string            `json:"welcomeTip"`
-	OWelcomeTip           string            `json:"oWelcomeTip"`
-	LoginTip              string            `json:"loginTip"`
-	FreezeTip             string            `json:"freezeTip"`
-	Activity              map[string]string `json:"activity"` //活动配置
-	WeixinAutoRpl         string            `json:"weixinautorpl"`
-	WeixinAutoRpl2        string            `json:"weixinautorpl2"`
-	SubscribeMonitorCyc   int               `json:"subscribemonitorcyc"`
-	SubscribeMonitorTimes int               `json:"subscribemonitortimes"`
-	Mids                  []string          `json:"mids"`
-	Dir                   string            `json:"dir"`
-	DistinguishWork       map[string]string `json:"distinguishWork"`
-	Rpcserver             string            `json:"rpcserver"`
-	Msgserver             string            `json:"msgserver"`
-	Qmxcdn                string            `json:"qmxcdn"`
+	Domain                string                 `json:"domain"`
+	Port                  string                 `json:"port"`
+	Imgpath               string                 `json:"imgpath"`
+	Redisservers          string                 `json:"redisServers"`   //redis缓存服务器列表
+	Mongodbservers        string                 `json:"mongodbServers"` //mongodb节点
+	MongodbPoolSize       int                    `json:"mongodbPoolSize"`
+	MongodbName           string                 `json:"mongodbName"`
+	Elasticsearch         string                 `json:"elasticsearch"`
+	Rpcport               string                 `json:"rpcport"`
+	ServiceTip            string                 `json:"serviceTip"`
+	Appcontext            string                 `json:"appcontext"`
+	Appid                 string                 `json:"appid"`
+	Token                 string                 `json:"token"`
+	Appsecret             string                 `json:"appsecret"`
+	Aboutmeurl            string                 `json:"aboutmeurl"`
+	Conactusurl           string                 `json:"conactusurl"`
+	ElasticPoolSize       int                    `json:"elasticPoolSize"`
+	Wsqurl                string                 `json:"wsqurl"`
+	EntAuthTip            string                 `json:"entAuthTip"`
+	PerAuthTip            string                 `json:"perAuthTip"`
+	OthAuthTip            string                 `json:"othAuthTip"`
+	MessageTpl            map[string]string      `json:"messagetpl"` //消息模板配置
+	WelcomeTip            string                 `json:"welcomeTip"`
+	OWelcomeTip           string                 `json:"oWelcomeTip"`
+	LoginTip              string                 `json:"loginTip"`
+	FreezeTip             string                 `json:"freezeTip"`
+	Activity              map[string]string      `json:"activity"` //活动配置
+	WeixinAutoRpl         string                 `json:"weixinautorpl"`
+	WeixinAutoRpl2        string                 `json:"weixinautorpl2"`
+	SubscribeMonitorCyc   int                    `json:"subscribemonitorcyc"`
+	SubscribeMonitorTimes int                    `json:"subscribemonitortimes"`
+	Mids                  []string               `json:"mids"`
+	Dir                   string                 `json:"dir"`
+	DistinguishWork       map[string]interface{} `json:"distinguishWork"`
+	Rpcserver             string                 `json:"rpcserver"`
+	Msgserver             string                 `json:"msgserver"`
+	Qmxcdn                string                 `json:"qmxcdn"`
 }
 
 //系统配置

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio