wangshan 9 жил өмнө
parent
commit
6f65daade3
52 өөрчлөгдсөн 1036 нэмэгдсэн , 368 устгасан
  1. 14 0
      common/src/qfw/util/common.go
  2. 2 1
      common/src/qfw/util/credit/credit.go
  3. 1 1
      core/src/config.json
  4. 16 15
      core/src/qfw/coreconfig/ServiceClassify.go
  5. 1 1
      core/src/qfw/member/credit/credit.go
  6. 14 1
      core/src/qfw/member/credit/creditdetail.go
  7. 1 1
      core/src/qfw/searchmarket/marketservice.go
  8. 7 1
      core/src/qfw/searchmarket/service.go
  9. 1 1
      core/src/timetask.json
  10. 184 46
      core/src/web/staticres/css/dev-qfw.css
  11. BIN
      core/src/web/staticres/images/10jf.png
  12. BIN
      core/src/web/staticres/images/10jff.png
  13. BIN
      core/src/web/staticres/images/20jf.png
  14. BIN
      core/src/web/staticres/images/20jff.png
  15. BIN
      core/src/web/staticres/images/30jf.png
  16. BIN
      core/src/web/staticres/images/30jff.png
  17. BIN
      core/src/web/staticres/images/40jf.png
  18. BIN
      core/src/web/staticres/images/40jff.png
  19. BIN
      core/src/web/staticres/images/50jf.png
  20. BIN
      core/src/web/staticres/images/50jff.png
  21. BIN
      core/src/web/staticres/images/60jf.png
  22. BIN
      core/src/web/staticres/images/60jff.png
  23. BIN
      core/src/web/staticres/images/70jf.png
  24. BIN
      core/src/web/staticres/images/70jff.png
  25. BIN
      core/src/web/staticres/images/bflower.png
  26. BIN
      core/src/web/staticres/images/lb.png
  27. BIN
      core/src/web/staticres/images/rflower.png
  28. BIN
      core/src/web/staticres/images/step1.png
  29. BIN
      core/src/web/staticres/images/testa.png
  30. BIN
      core/src/web/staticres/images/u124.png
  31. BIN
      core/src/web/staticres/images/u190.png
  32. BIN
      core/src/web/staticres/images/u405.png
  33. BIN
      core/src/web/staticres/images/u885.png
  34. BIN
      core/src/web/staticres/images/upload.png
  35. BIN
      core/src/web/staticres/images/yflower.png
  36. 9 8
      core/src/web/staticres/js/demand.js
  37. 14 3
      core/src/web/templates/common/hotdemand.html
  38. 42 1
      core/src/web/templates/common/indexhead.html
  39. 7 7
      core/src/web/templates/member/credit/creditrule.html
  40. 378 0
      core/src/web/templates/member/credit/mcreditindex.html
  41. 51 1
      core/src/web/templates/member/credit/mycredit.html
  42. 16 60
      core/src/web/templates/service/appointment.html
  43. 8 6
      core/src/web/templates/service/bid.html
  44. 51 26
      core/src/web/templates/service/demand.html
  45. 47 44
      core/src/web/templates/service/detail.html
  46. 37 6
      core/src/web/templates/service/list.html
  47. 68 62
      core/src/web/templates/service/viewsingledemand.html
  48. 1 1
      credit/src/qfw/creditrpc/creditrpc.go
  49. BIN
      etl/client/src/trsclient/trsclient
  50. 61 68
      etl/client/src/trsclient/trsclient.go
  51. BIN
      etl/server/src/trsserver/trsserver
  52. 5 7
      etl/server/src/trsserver/trsserver.go

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

@@ -317,6 +317,13 @@ func SubString(str string, begin, length int) (substr string) {
 func Try(fun func(), handler func(interface{})) {
 	defer func() {
 		if err := recover(); err != nil {
+			for skip := 1; ; skip++ {
+				_, file, line, ok := runtime.Caller(skip)
+				if !ok {
+					break
+				}
+				go log.Printf("%v,%v\n", file, line)
+			}
 			handler(err)
 		}
 	}()
@@ -356,3 +363,10 @@ func InterfaceArrTointArr(arr []interface{}) []int {
 	}
 	return tmp
 }
+func InterfaceArrToint64Arr(arr []interface{}) []int64 {
+	tmp := make([]int64, 0)
+	for _, v := range arr {
+		tmp = append(tmp, int64(v.(float64)))
+	}
+	return tmp
+}

+ 2 - 1
common/src/qfw/util/credit/credit.go

@@ -107,7 +107,8 @@ func InCreditB(userId, code string, param map[string]interface{}) (bool, int, er
 	err := Rc.InCreadit(&rpc.CreditData{Code: code, Uid: userId, Num: 0, OtherParam: param}, &Replay)
 	if err == nil && Replay != 0 {
 		b = true
-	} else {
+	}
+	if err != nil {
 		log.Println("调用rpc出错", err)
 	}
 	return b, Replay, err

+ 1 - 1
core/src/config.json

@@ -1,6 +1,6 @@
 {
     "webServerPort": "80",
-    "redisServers": "enterprise=192.168.3.14:1379,service=192.168.3.14:2379,other=192.168.3.14:3379,sso=192.168.3.14:1379",
+    "redisServers": "enterprise=192.168.3.14:1379,service=192.168.3.14:2379,other=192.168.3.14:3379,sso=192.168.3.14:1379,credit=192.168.3.14:3379",
     "useRedis": false,
     "mongodbServers": "192.168.3.18:27080",
     "elasticsearch": "http://192.168.3.18:9800",

+ 16 - 15
core/src/qfw/coreconfig/ServiceClassify.go

@@ -38,22 +38,23 @@ func GetServiceTypeLength() int {
 	}
 	return count
 }
-func GetServiceName(code string) string {
-	for _, v := range ServiceClassify {
-		if v["code"] == code[0:2] {
-			c1 := v["children"].([]interface{})
-			for _, v1 := range c1 {
-				v1s := v1.(map[string]interface{})
-				if v1s["code"].(string) == code[0:4] {
-					c2 := v1s["children"].([]interface{})
-					for _, v2 := range c2 {
-						v2s := v2.(map[string]interface{})
-						if v2s["code"].(string) == code {
-							return v2s["name"].(string)
-						}
-					}
-				}
+func GetServiceName(code string, objs ...[]map[string]interface{}) string {
+	obj := ServiceClassify
+	if len(objs) > 0 {
+		obj = objs[0]
+	}
+	for _, v := range obj {
+		code1 := v["code"].(string)
+		len1 := len(code1)
+		len2 := len(code)
+		if code1 == code {
+			return v["name"].(string)
+		} else if len1 < len2 && code1 == code[0:len1] {
+			temp := make([]map[string]interface{}, 0)
+			for _, inter := range v["children"].([]interface{}) {
+				temp = append(temp, inter.(map[string]interface{}))
 			}
+			return GetServiceName(code, temp)
 		}
 	}
 	return ""

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

@@ -11,6 +11,6 @@ import (
 var RedisDB string
 
 func init() {
-	RedisDB = "other"
+	RedisDB = "credit"
 	xweb.AddAction(&credit{})
 }

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

@@ -10,6 +10,7 @@ import (
 	cd "qfw/util/credit"
 	"qfw/util/mongodb"
 	"qfw/util/redis"
+	"strings"
 	"time"
 )
 
@@ -19,6 +20,7 @@ type credit struct {
 	creditRule   xweb.Mapper `xweb:"/member/credit/creditRule"`   //积分规则
 	inCreditAjx  xweb.Mapper `xweb:"/member/credit/inCreditAjx"`  //ajx调用
 	sessionQdAjx xweb.Mapper `xweb:"/member/credit/sessionQdAjx"` //查看签到
+	bookInfo     xweb.Mapper `xweb:"/member/credit/bookinfo"`     //查看连续签到信息
 	creditList   xweb.Mapper `xweb:"/member/credit/creditList"`   //查询积分明细
 }
 
@@ -29,6 +31,10 @@ func (c *credit) MyCredit() error {
 		c.T["user"] = user
 		credit_a := util.IntAll(user["credit_a"])
 		b := cd.AAllIsHasDo(credit_a)
+		u := c.Header("User-Agent")
+		if strings.Index(u, "Mobile") > -1 {
+			return c.Render("/member/credit/mcreditindex.html", &c.T)
+		}
 		if b {
 			c.T["AAll"] = true
 		} else {
@@ -105,7 +111,7 @@ func (c *credit) InCreditAjx() error {
 			}
 		}
 		if param == "qd" {
-			b := cd.UpuserCreditSession(userId, cd.B_QD, "A", nil, c.Action)
+			b := cd.UpuserCreditSession(userId, cd.B_QD, "B", nil, c.Action)
 			if b {
 				c.Session().UpdateByCustomField("id", userId, "credit_qd", "y")
 				result["result"] = "y"
@@ -115,6 +121,13 @@ func (c *credit) InCreditAjx() error {
 	c.ServeJson(result)
 	return nil
 }
+func (c *credit) BookInfo() {
+	userId := util.ObjToString(c.GetSession("userId"))
+	if ret := redis.Get(RedisDB, cd.B_QD+"_"+userId); ret != nil {
+		c.ServeJson(ret)
+	}
+	return
+}
 
 //会员中心更新session签到信息
 func (c *credit) SessionQdAjx() error {

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

@@ -196,7 +196,7 @@ func searhService(querymap map[string]string, n *Market) (*[]map[string]interfac
             "s_name":{"force_source": true},
 			"s_introduction":{"force_source": true}
         }
-    },"_source":["_id","s_name","s_images","i_comments","i_hits","i_sales","i_status","i_bids","s_enterprisename","s_enterpriseid","s_nickname","s_introduction","l_createdate","i_identType","f_price","i_identtype","i_comauthenttype"]
+    },"_source":["_id","s_opLocDistrict","s_name","s_images","i_comments","i_hits","i_sales","i_status","i_bids","s_enterprisename","s_enterpriseid","s_nickname","s_introduction","l_createdate","i_identType","f_price","i_identtype","i_comauthenttype"]
 	,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
 	"size":` + fmt.Sprintf("%v", perPage) +
 		`,"sort":[` + sort + `] }`

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

@@ -8,6 +8,7 @@ import (
 	. "gopkg.in/mgo.v2/bson"
 	"html/template"
 	"log"
+	"qfw/coreconfig"
 	webcentent "qfw/front"
 	"qfw/util"
 	"qfw/util/credit"
@@ -58,6 +59,12 @@ func (s *Service) ServiceInfo(params string) error {
 			//如果有记录,增加点击量
 			mongo.Update("service", `{"_id": "`+id+`"}`, M{"$inc": M{"i_hits": 1}}, false, false)
 			sinfo := sinfos
+			servicecode := sinfo["s_servicecode"].(string)
+			serviceTypeName := coreconfig.GetServiceName(servicecode[0:2]) + " - "
+			if len(servicecode) > 2 {
+				serviceTypeName = serviceTypeName + coreconfig.GetServiceName(servicecode)
+			}
+			sinfo["servicetypename"] = serviceTypeName
 			if sinfo["s_enterpriseid"] != nil {
 				_id := sinfo["s_enterpriseid"].(string)
 				var s_images = make([]string, 0)
@@ -252,7 +259,6 @@ func (s *Service) Comment() error {
 					rs := mongo.Save("comment", params)
 					if rs != "" {
 						if s_demand == "1" {
-
 							mongo.Update("demandbid", `{"_id":"`+s_orderid+`"}`, M{"$set": M{"i_status": 5}}, false, false)
 						} else {
 							serviceone := *mongo.FindOne("service", `{"_id":"`+s_serviceid+`"}`)

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

+ 184 - 46
core/src/web/staticres/css/dev-qfw.css

@@ -1110,6 +1110,51 @@ a{
 }
 /*首页css-end*/
 /*服务预约原型css-start*/
+ .b-menu{
+	display: none;
+	z-index: 5;
+	line-height: 34px;
+	position: absolute;
+	top: 45px;
+	left: 0px;
+	background: #FFF;
+	width: 105px;
+	border: 1px solid #e5e6e9;
+	height: 70px;
+	border-radius: 4px;
+}
+ .b-menu div{
+	height:35px;
+	width:103px;
+	text-align:center;
+	cursor:pointer;
+}
+.b-bubble{
+	display:none;
+	position: absolute;
+	top: 35px;
+	z-index: 6;
+	left: 68px;
+	width: 0;
+	height: 0;
+	border-width: 5px;
+	border-style: solid;
+	border-color: transparent  transparent  #e5e6e9;
+	font-size: 0;
+	line-height: 0;
+}
+.b-bubble-outer{
+	display:none;
+	border-color: transparent  transparent  #FFF;
+	top: 36px;
+}
+.typename span{
+	background:none !important;
+}
+.b-menu div:hover{
+	color:#FFF;
+	background:#FF5A5F;
+}
 .a-servicedetail {
 	margin-top:10px;
 }
@@ -1362,12 +1407,14 @@ a{
 
 .a-servicedetail .d_pjlb {
 	font-size: 12px;
-	line-height: 28px;
 	border-bottom: 1px solid #f7f6f4;
-	padding: 20px;
+	padding: 20px 0px 20px 10px;
+	height: 100px;
 	word-wrap: break-word;
 }
-
+.a-servicedetail .d_pjlb div.first {
+	float: left;
+}
 .a-servicedetail textarea {
 	width: 90%;
 }
@@ -1407,7 +1454,7 @@ a{
 	font-size: 14px;
 	color: #999999;
 	padding: 10px;
-	padding-left:15px;
+	padding-left:20px;
 }
 
 .a-servicedetail .d_tck_fw {
@@ -1415,8 +1462,11 @@ a{
 	color: #1E1E1E;
 	padding: 10px;
 	padding-top: 0px;
-	padding-left: 15px;
+	padding-left: 12px;
 	border-bottom: 1px solid #CCCCCC;
+	float: left;
+	width: 100%;
+	margin-bottom:30px;
 }
 
 .a-servicedetail .d_tck_fw span {
@@ -1451,6 +1501,10 @@ style="color:#D03102;margin-right:5px;"
 }
 /*服务预约原型css-end*/
 /*服务市场列表css-start*/
+.s-notfound{
+	font-size:13px;
+	color:#666;
+}
 .a-servicelist{
 	margin:0px auto;
 	padding:20px 0 0 0;
@@ -1623,10 +1677,22 @@ style="color:#D03102;margin-right:5px;"
 }
 /*服务市场列表css-end*/
 /*发布需求、查看单个需求css-start*/
-.g-process p.u-title {
+.g-process div.u-title {
 	display: block;
+	height: 45px;
 	font-weight: 700;
 	font-size: 18px;
+	background: #F6F8FA;
+}
+.g-process div.u-title div{
+	border-top: 3px solid #FF5A5F;
+	width: 120px;
+	height: 45px;
+	line-height: 42px;
+	margin-left: 40px;
+	text-align: center;
+	background: #FFF;
+	font-size: 13px;
 }
 /*服务市场列表 进度条*/
 .g-process {
@@ -1634,9 +1700,11 @@ style="color:#D03102;margin-right:5px;"
 	height: 145px;
 }
 .g-process .m-process{
-	position: absolute;
     height: 60px;
     overflow: hidden;
+    z-index: 999;
+    position: absolute;
+    margin-left:25px;
 }
 .g-brace {
 	height: 25px;
@@ -1646,11 +1714,11 @@ style="color:#D03102;margin-right:5px;"
 	display: block;
 	width: 219px;
 	line-height: 30px;
-	background: url('/images/process_line_uncheck.png') repeat-x 0 15px;
+	
 }
 
-.g-process .m-process li.check {
-	background: url('/images/process_line.png') repeat-x 0 15px;
+.m-process li.check .u-icon {
+	background:#FF5A5F;
 }
 
 .u-text, .u-icon {
@@ -1660,7 +1728,24 @@ style="color:#D03102;margin-right:5px;"
 }
 
 .u-icon {
-	background: url('/images/p_uncheck.png') no-repeat 94px 0px;
+	display: block;
+	width: 30px;
+	height: 30px;
+	background: #E1E4E9;
+	color: #FFF;
+	border-radius: 30px;
+	text-align: center;
+	margin-left: 94px;
+}
+
+.u-processbar{
+	height: 13px;
+	width: 650px;
+	background: #E1E4E9;
+	position: relative;
+	z-index: 998;
+	top: 9px;
+	left: 142px;
 }
 
 .u-icon-check {
@@ -1674,9 +1759,14 @@ style="color:#D03102;margin-right:5px;"
 	margin-bottom: 0;
 	padding-left: 20px;
 	color: #fff;
-	background-color: #DC4715;
+	margin: 20px 45px 20px 45px;
+	background-color: #FAF5DF;
+	color: #4E5051;
+	text-align: center;
+	border: 1px solid #F5DC99;
 }
 .m-detailintroduction{
+	width:925px;
 	background:#FFF;
 	padding:15px;
 }
@@ -1690,9 +1780,10 @@ style="color:#D03102;margin-right:5px;"
 }
 
 .g-typelist {
-	width: 100%;
+	width: 95%;
 	height: 543px;
-	border: 1px solid #CBCBCB;
+	margin-left: 45px;
+	max-width: 850px;
 }
 
 .g-typelist  .m-typelist {
@@ -1705,14 +1796,20 @@ style="color:#D03102;margin-right:5px;"
     overflow-y: hidden;	
 	height: 38px;
 	line-height: 38px;
-	border-right: 1px solid #CBCBCB;
+	border-right: 2px solid #FF5A5F;
+	border-left: 1px solid #E5E6E9;
 	text-indent: 20.0pt;
 	color: #666;
 	float:none;
 }
 
 .m-typelist li.u-zw {
-	height: 10px;
+	border-top:1px solid #E5E6E9;
+	background:#F7F8FA;
+	height: 45px;
+	line-height:45px;
+	padding-left:35px;
+	font-weight:600;
 }
 
 .m-typelist li span {
@@ -1725,9 +1822,8 @@ style="color:#D03102;margin-right:5px;"
 }
 
 .m-typelist .focus {
-	border-top: 1px solid #CBCBCB;
+	border:2px solid #FF5A5F;
 	border-right: none;
-	border-bottom: 1px solid #CBCBCB;
 }
 
 .m-logintips {
@@ -1743,24 +1839,23 @@ style="color:#D03102;margin-right:5px;"
 	text-decoration:underline;
 }
 .m-uploadimg{
-	background-color: #eee;
-    width: 200px;
-    text-align: center;
-    height: 200px;
-    border: 1px dashed #000;
+	width:84px;
+	height:84px;
+	background:url("/images/upload.png");
 }
 .m-uploadbtn{
-	text-align: center;
-    cursor: pointer;
-    border: 1px solid rgb(221, 221, 221);
-    padding: 8px;
-	margin-top:-18px;
-    color: #FFFFFF;
-    font-size: 20px;
-    background-color: rgb(128, 128, 128);
+	width: 84px !important;
+	height: 84px !important;
+	padding: 8px;
+	margin-top: -84px;
+	line-height: 60px !important;
 }
 .m-uploadbtn:hover{
 	color: #FFFFFF;
+	background:#000;
+	filter:alpha(opacity=20);  /* ie 有效*/
+	-moz-opacity:0.2; /* Firefox  有效*/
+	opacity: 0.2; /* 通用,其他浏览器  有效*/
 }
 /*服务样式编辑*/
 .f-content table {
@@ -1769,8 +1864,11 @@ style="color:#D03102;margin-right:5px;"
 /*服务市场列表 详细分类*/
 .g-detail{
 	display: none;
-	float:right;
-	width:72%;
+	float:left;
+	width:75%;
+	height:539px;
+	border:2px solid #FF5A5F;
+	border-left:none;
 }
 
 .z-show {
@@ -1778,12 +1876,16 @@ style="color:#D03102;margin-right:5px;"
 }
 
 .g-detail .m-detail {
-		width: 100%;
-	    clear: both;
-		border-bottom:1px solid #CBCBCB;
-		padding:0 0 10px 0;
+	width: 100%;
+	clear: both;
+	padding: 0 20 9px 30px;
+}
+.g-detail .m-detail .line {
+	height: 17px;
+	clear: both;
+	border-bottom: 1px dashed #A0A0A0;
+	width: 95%;
 }
-
 
 .m-detail a{
 	display:block;
@@ -1805,8 +1907,7 @@ style="color:#D03102;margin-right:5px;"
 /*描述需求*/
 .g-demand {
 	width: 100%;
-	padding: 15 0 0 40px;
-	border: 1px solid #CBCBCB;
+	padding: 15 0 0 125px;
 }
 
 .g-demand form label {
@@ -1815,6 +1916,23 @@ style="color:#D03102;margin-right:5px;"
 	font-size: 13px;
 }
 
+/*新热门需求*/
+#hotDemand ul.a-com-ul-block{
+	margin-left:1px;
+	height:371px;
+}
+#hotDemand li.a-com-second ul{
+	height:141px;
+	background:#fff;
+	
+}
+#hotDemand li.a-com-first{
+	margin-bottom:0px;
+}
+#hotDemand li.a-com-title a{
+	color:#3B4453;
+	font-size:16px;
+}
 /*看单个需求页面*/
 .g-detailhead {
 	height: 38px;
@@ -1887,7 +2005,7 @@ style="color:#D03102;margin-right:5px;"
 .g-tbform {
 	margin: 20px -20px 0 -20px;
 	border-top: 1px solid #e5e5e5;
-	padding: 20px 20px 0px 20px;
+	padding: 40px 20px 0px 40px;
 }
 
 .m-tbform label {
@@ -1902,10 +2020,9 @@ style="color:#D03102;margin-right:5px;"
 .g-tasktab {
 	width:100%;
 	margin-bottom:15px;
-	border:1px solid #ddd;
-	border-top:none;
 }
 .g-tasktab .m-title{
+	padding-left:20px;
 	height:40px;
 	line-height:40px;
 	border-bottom:1px solid #ddd;
@@ -1913,8 +2030,9 @@ style="color:#D03102;margin-right:5px;"
 }
 .g-tasktab .m-title span{
 	display:block;
-	width:90px;
-	border-right:1px solid #ddd;
+	width:112px;
+	border-right:1px solid #FFF;
+	border-left:1px solid #FFF;
 	float:left;
 	text-align:center;
 	cursor:pointer;
@@ -1923,10 +2041,21 @@ style="color:#D03102;margin-right:5px;"
 	color: #dd4814;
 }
 .g-tasktab .m-title span.u-focus{
+	border-top:3px solid #FF5A5F;
 	background:#fff;
 	height:39px;
+	line-height:34px;
 	color: #dd4814;
 }
+.btn-new{
+	width: 55px;
+	height: 24px;
+	line-height: 20px;
+	border: 1px solid #E5E6E9;
+	background: #FFF;
+	margin-right:5px;
+	margin-left:5px;
+}
 .g-tasktab .m-content>div{
 	padding:30px 30px 0px 30px;
 }
@@ -1960,7 +2089,6 @@ style="color:#D03102;margin-right:5px;"
 }
 .u-btn {
 	width: 112px;
-	height: 38px;
 }
 
 .f-display {
@@ -2603,6 +2731,16 @@ style="color:#D03102;margin-right:5px;"
 		padding: 0 !important;
 	}
 }
+.radius{
+	border-radius: 34px;
+	display: inline-block;
+	overflow: hidden;
+	font-size: 12px;
+	line-height: 30px;
+	text-align: center;
+	vertical-align: middle;
+	color: #fff;
+}
 /*图标*/
 .jhtb{color:#FF5A5F; font-size:18px;top:4px;}
 .jhtbtype{color:#FF5A5F; font-size:18px; top:7px;}

BIN
core/src/web/staticres/images/10jf.png


BIN
core/src/web/staticres/images/10jff.png


BIN
core/src/web/staticres/images/20jf.png


BIN
core/src/web/staticres/images/20jff.png


BIN
core/src/web/staticres/images/30jf.png


BIN
core/src/web/staticres/images/30jff.png


BIN
core/src/web/staticres/images/40jf.png


BIN
core/src/web/staticres/images/40jff.png


BIN
core/src/web/staticres/images/50jf.png


BIN
core/src/web/staticres/images/50jff.png


BIN
core/src/web/staticres/images/60jf.png


BIN
core/src/web/staticres/images/60jff.png


BIN
core/src/web/staticres/images/70jf.png


BIN
core/src/web/staticres/images/70jff.png


BIN
core/src/web/staticres/images/bflower.png


BIN
core/src/web/staticres/images/lb.png


BIN
core/src/web/staticres/images/rflower.png


BIN
core/src/web/staticres/images/step1.png


BIN
core/src/web/staticres/images/testa.png


BIN
core/src/web/staticres/images/u124.png


BIN
core/src/web/staticres/images/u190.png


BIN
core/src/web/staticres/images/u405.png


BIN
core/src/web/staticres/images/u885.png


BIN
core/src/web/staticres/images/upload.png


BIN
core/src/web/staticres/images/yflower.png


+ 9 - 8
core/src/web/staticres/js/demand.js

@@ -63,7 +63,7 @@ function getList(){
 				for(k=0;k<o["children"].length;k++){
 						target+="<a "+ " dataset="+o.children[k]["code"]+">"+o.children[k]["name"]+"</a>"
 				}
-				target+="</li>"
+				target+="<div class='line'></div></li>"
 			}
 			target+="</ul>";
 			
@@ -74,15 +74,16 @@ function getList(){
 
 function addFileButton(){
 	var option={
-		btnname:"上传图片",//按钮名
+		btnname:"",//按钮名
 		btnClass:"m-uploadbtn",
 		btnId:"505",
-		btnCss:{"width":"199px","height":"40px","line-height":"20px","cursor":"pointer"},
-		action:"/filemanage/upload?resize=120",
+		btnCss:{"cursor":"pointer"},
+		action:"/filemanage/upload?resize=220",
 		afterUpload:function(data){ //此处可以重写,上传后的处理
 			if(data.error!==1){
 					$("#u-uploadimg").attr("src",data.url);
 					$("#s_images").attr("value",data.url);
+					$(".m-uploadbtn").prepend("更换图片");
 			}
 		}
 	};	
@@ -110,14 +111,14 @@ function rechoose(t){
 		if(t==0){
 			$(".g-typelist").removeClass("f-display");
 			$(".g-demand").addClass("f-display");
-			$(".u-icon.f-step1").addClass("u-icon-check");
-			$(".u-icon.f-step2").removeClass("u-icon-check");
+			$(".u-icon.f-step1").parent().addClass("check");
+			$(".u-icon.f-step2").parent().removeClass("check");
 			window.scrollTo( 0, 0 );
 		}else{
 			$(".g-typelist").addClass("f-display");
 			$(".g-demand").removeClass("f-display");
-			$(".u-icon.f-step1").removeClass("u-icon-check");
-			$(".u-icon.f-step2").addClass("u-icon-check");
+			$(".u-icon.f-step1").parent().removeClass("check");
+			$(".u-icon.f-step2").parent().addClass("check");
 			
 		}
 }

+ 14 - 3
core/src/web/templates/common/hotdemand.html

@@ -6,9 +6,15 @@
 		<li class="a-com-second">
 			<div>
 				<ul>
-					<li class="a-com-first"><a href="{{$v.s_link}}"><img{{if $v.s_picalt}} alt="{{$v.s_picalt}}"{{end}} src="{{if $v.s_pic}}{{$v.s_pic}}{{else}}null{{end}}" width=250  onerror="this.src='/images/u166.png'"></a></li>
-					<li class="a-com-title"><div><a href="{{$v.s_link}}">{{$v.s_remark}}</a></div></li>
-					<li class="a-com-name"><div>{{$v.o_extend.entName}}</div></li>
+					<li class="a-com-first"><a href="{{$v.s_link}}"><img{{if $v.s_picalt}} alt="{{$v.s_picalt}}"{{end}} src="{{if $v.s_pic}}{{$v.s_pic}}{{else}}null{{end}}" width=250  height=230 onerror="this.src='/images/testa.png'"></a></li>
+					<li class="a-com-second">
+						<ul style="    padding: 15px 0 20 10px;">
+							<li class="a-com-title" style="height:26px;"><div><a href="{{$v.s_link}}">{{$v.s_remark}}</a></div></li>
+							<li style="height:26px;color:#FF5A5F;font-size:14px;font-weight:600;overflow: hidden;" class="a-com-type">{{$v.o_extend.type}}</li>
+							<li style="height:26px;">{{if eq $v.o_extend.status "1"}}<img src="/images/u252.png">{{else}}<img src="/images/u288.png">{{end}}</li>
+							<li class="a-com-name" style="height:26px;"><div>{{$v.o_extend.entName}}</div></li>
+						</ul>
+					</li>
 				</ul>
 			</div>
 		</li>
@@ -19,4 +25,9 @@
 $(function(){
 	advertAjaxRqe("hotDemand");
 });
+$(function(){
+	$("#hotDemand .a-com-type").each(function(i,n){
+		$(n).text($(n).text().replace("."," - "));
+	});
+});
 </script>

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

@@ -14,7 +14,48 @@
 			        </div> <!--/btn-group -->
 					<form method="post" id="searchForm" action="/market/0/list.html">
 						<span id="searchFormBtn"><i class="glyphicon sousuo"></i></span>
-				        <input type="text" name="words" class="form-control" id="header-searchInput" placeholder="找服务" value="{{if .T.querymap}}{{index .T.querymap "query"}}{{end}}">
+				       <input type="text" name="words" class="form-control" id="header-searchInput" placeholder="" value="{{if .T.querymap}}{{index .T.querymap "query"}}{{end}}" style="padding-left:90px;">
+						<div class="b-btngroup" style="position:absolute;top:-14px;left:23px;z-index:2;">
+							<a class="typename" style="color:#A0A0A0;" data="expand"><span class="b-showname">找服务 </span><span class="b-btnsign" style="font-size:11px;background:none;">▼</span></a>
+						</div>
+						<div>
+							<div class="b-bubble"></div>
+							<div class="b-bubble b-bubble-outer"></div>
+							<div class="b-menu">
+								<div data-id="service" id="b-menu-service" style="	border-radius: 4px 4px 0 0;">服务</div>
+								<div data-id="demand" style="	border-radius: 0 0 4px 4px;">需求</div>
+							</div>	
+						</div>
+						<script>
+							$(function(){
+								$("#b-menu-service").bind("mousemove",function(){
+									$(".b-bubble-outer").css("border-color","transparent  transparent  #FF5A5F");
+								});
+								$("#b-menu-service").bind("mouseout",function(){
+									$(".b-bubble-outer").css("border-color","transparent  transparent  #FFF");
+								});
+								$(".typename").click(function(){
+									if ($(".typename").attr("data")!="expand"){
+										$(".typename span.b-btnsign").text("▼");
+										$(".b-menu").hide();
+										$(".b-bubble").hide();
+										$(".typename").attr("data","expand");
+									}else{
+										$(".typename span.b-btnsign").text("▲");
+										$(".b-menu").show();
+										$(".b-bubble").show();
+										$(".typename").attr("data","close");
+									}
+								});
+								$(".b-menu>div").bind("click",function(n,b){
+									$("#c_searchtype").val($(n.target).attr("data-id"));
+									$(".b-menu").trigger("changecontent");
+									$(".b-showname").text("找"+$(n.target).text());
+									$(".typename").trigger("click");
+									return false;
+								});
+							});
+						</script>
 						<input type="hidden" name="city" id="city" value="">
 						<input type="hidden" name="cityNo" id="cityNo" value="">
 						<!-- 服务市场 -->

+ 7 - 7
core/src/web/templates/member/credit/creditrule.html

@@ -76,17 +76,17 @@
 					<div style="padding-left:30px">
 						<span class="sptext">1、做任务赚积分</span>
 						<p class="ptext">
-						企明星为你准备了简单操作的新手任务,引导你对网站功能快速上手的同
+						企明星为你准备了简单操作的新手任务,引导你对网站功能快速上手的同
 						还能获取相应的积分。全部完成更能一次额外获得1001积分哦~
 						</p>
 						<span class="sptext">2、日常任务</span>
-						<p class="ptext">完成5次企业查询,得50积分(每天上限50经验值)</p>
-						<p class="ptext">发布3条服务信息,得60积分(每天上限60经验值)</p>
-						<p class="ptext">发布3条需求信息,得60积分(每天上限60经验值)</p>
-						<p class="ptext">分享2条服务信息/交易信息,得40积分(每天上限40经验值)</p>
+						<p class="ptext">完成5次企业查询,得50积分(每天上限50积分)</p>
+						<p class="ptext">发布3条服务信息,得60积分(每天上限60积分)</p>
+						<p class="ptext">发布3条需求信息,得60积分(每天上限60积分)</p>
+						<p class="ptext">分享2条服务信息/交易信息,得40积分(每天上限40积分)</p>
 						<span class="sptext">3、连续登录(签到)</span>
 						<table class="dataintable">
-						<tbody><tr><th style="">连续签到天数</th><th style="">会员奖励经验值</th></tr>
+						<tbody><tr><th style="">连续签到天数</th><th style="">会员奖励积分</th></tr>
 						<tr><td>1</td><td>10</td></tr>
 						<tr><td>2</td><td>20</td></tr>
 						<tr><td>3</td><td>30</td></tr>
@@ -100,7 +100,7 @@
 						<span class="sptext">5、充值</span>
 						<p class="ptext">充值可以快速获得积分,充值1元兑换100积分。充值积分不可用于会员升级,只可用于功能使用。</p>
 						<span class="sptext">6、活动增送</span>
-						<p class="ptext">企明星不定期开放各种任务,为活跃用户提供更多获取经验值得方式,加速成长,获得积分。所以,常来看看哦~</p>
+						<p class="ptext">企明星不定期开放各种任务,为活跃用户提供更多获取积分得方式,加速成长,获得积分。所以,常来看看哦~</p>
 					</div>
 				</div>
 			</div>

+ 378 - 0
core/src/web/templates/member/credit/mcreditindex.html

@@ -0,0 +1,378 @@
+<!DOCTYPE HTML>
+<html>
+	<title>我的积分</title>
+	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+	{{include "/common/inc.html"}}
+	<style>
+		body{
+			    color: #464645;
+		}
+		.g-index-top{
+			border:1px solid #F5DC99;
+			background:#FAF5DF;
+		}
+		.m-photo div.outer{	
+			border-radius:29px;
+			width:58px;
+			height:58px;
+			margin: 20px auto;
+			-webkit-box-shadow:0 0 2px #F5DC99;  
+			-moz-box-shadow:0 0 2px #F5DC99;  
+			box-shadow:0 0 2px #F5DC99;  
+			text-align:center;
+			background:#FFF;
+		}
+		.m-photo img.inner{
+			border-radius: 27px;
+    		margin: 2px;  
+		}
+		.m-index-user {
+			text-align:center;
+		}
+		.m-index-user div.nickname{
+				max-width:400px;
+				margin:0px auto;
+				font-size:20px;
+		}
+		.m-index-user button.bookin{
+			width:90px;
+			height:30px;
+			margin:15px 0;
+			font-weight:200px;
+			font-size:13px;
+		}
+		.m-detailinfo{
+			margin-bottom:15px;
+		}
+		.m-detailinfo span.split{
+			color:#666;
+			float:left;
+			margin-right:25px;
+		}
+		div.title{
+			border-bottom:1px solid #B2B2B2;
+			height:40px;
+			line-height:42px;
+			padding-left:20px;
+			font-size:13px;
+			color:#000;
+			background:#F6F7F8;
+			
+		}
+		.m-rules div.title:hover{
+			background:#F6F9F4;
+		}
+		.m-rules div.title 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;
+		}
+		.m-rules img{
+			width:22px;
+			margin:-5px 5px 0 0 ;
+		}
+		.padding0{
+			padding-right:0px;
+		}
+		.modal-dialog{
+			width:100%;
+		}
+		.creditrules ,.bookinfo{
+			display:none;
+			position: absolute;
+			width: 100%;
+			background: #FFF;
+			top: 60px;
+		}
+		.creditrules div.content{
+			min-height:170px;
+			padding:20px 20px;
+		}
+		.creditrules div.content p.h5{
+			font-weight:bold;
+		}
+		.creditrules div.content p.para, p{
+		    text-indent: 2em;
+		}
+		.creditlist{
+			margin-left:20px;
+		}
+		.creditrules .creditlist td{
+			width:10%;
+			border:1px solid #7F7F7F;
+			text-align:center;
+		}
+		.bookinfo{
+			top:226px;
+		}
+		.bookinfo div.content{
+			padding:20px 0;
+			background:#FFF;
+			text-align:center;
+		}
+		.bookinfo div.content table.credittop{
+			width:320px;
+		}
+		table.credittop td,table.creditbottom td{
+			width:75px;
+		}
+		table.credittop td div,table.creditbottom td div{
+			margin-top:5px;
+		}
+		.bookinfo div.content table.creditbottom{
+			padding-top:10px;
+			max-width:240px;
+		}
+		.bookinfo div.content img{
+			width:57px;
+		}
+	</style>
+</head>
+<body>
+<div class="modal-backdrop fade in" style="display:none;"></div>
+	<div class="g-index-top col-xs-12 padding0" >
+		<div class="m-index-user  col-xs-12 padding0" >
+			<div class="m-photo">
+				<div class="outer">
+					{{session "headImg"}}
+					{{if session "headImg"}}
+						<img width=54 height=54 src="{{session "headImg"}}" class="inner"/>
+					{{else}}
+						<img width=54 height=54 src="/images/swordfish/headimg.png" class="inner"/>
+					{{end}}
+				</div>
+			</div>
+			<div class="nickname">
+				{{session "nickName"}}
+			</div>
+			<div>
+
+				{{if session "credit_qd"}}
+					{{if eq (session "credit_qd") "y"}}
+					<button class="btn  btn-default bookin"  id="indexbookinbtn" target="bookinfo">查看签到</button>
+					{{else}}
+					<button class="btn btn-primary bookin"  id="indexbookinbtn" target="bookinfo">签到</button>
+					{{end}}
+				{{else}}
+					<button class="btn btn-primary bookin" id="indexbookinbtn" target="bookinfo">签到</button>
+				{{end}}
+				
+			</div>
+			<div class="m-detailinfo col-xs-12">
+				<div class="col-xs-6 text-right" style="padding-right:22px;"><span class="text-primary" style="margin-top:-3px;"><i class="glyphicon jinbi" ></i><span class="gold">{{$.T.user.i_credit}}</span></span>&nbsp;积分</div>
+				<div class="col-xs-6">
+				<span class="split">|</span>
+					{{$identWay := session "identWay"}}
+						{{if session "identType"}}
+							{{$identType := session "identType"}}
+							{{if eq 1 $identType}}
+								{{if eq 1 $identWay}}
+								<span  style="float:left;margin:0px 7px 0 0;font-size:17px;">
+									<i class="glyphicon qyrz f-floatf text-primary"></i>
+								</span>
+								<div style="float:left;">
+									已认证企业
+								</div>
+								{{end}}
+							{{else if eq 2 $identType}}
+								{{if eq 1 $identWay}}
+								<span  style="float:left;margin:0px 7px 0 0;font-size:17px;">
+									<i class="glyphicon grrz f-floatf text-primary"></i>
+								</span>
+								<div style="float:left;margin-left:-9px;">
+									已认证个人
+								</div>
+								{{end}}
+							{{else if eq 3 $identType}}
+								{{if eq 1 $identWay}}
+								<span  style="float:left;margin:0px 7px 0 0;font-size:17px;">
+									<i class="glyphicon jgrz f-floatf text-primary"></i>
+								</span>
+								<div style="float:left;">
+									已认证机构
+								</div>
+								{{end}}
+							{{end}}
+						{{else}}
+						<span  style="float:left;margin:0px 7px 0 0;font-size:17px;">
+							<i class="glyphicon grrz"></i>
+						</span>
+						<div style="float:left;">
+								未认证
+						</div>
+						{{end}}
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="g-index-bottom" style="clear:both;">
+		<div class="m-rules" target="creditrules">
+			<div class="title"><img src="/images/lb.png" />积分规则<span class="glyphicon xiayibu"></span>
+			</div>
+		</div>
+	</div>
+			<div style="position: absolute;width:100%;z-index:4410;background:#FFF;" class="creditrules">
+		<div class="title">
+			积分规则
+			<button class="btn btn-link text-primary f-floatr f-close" >确定</button>
+		</div>
+		<div class="content">
+			<p class="h5">一、积分说明</p>
+				<p class="para">会员总积分由操作积分、充值积分组成,其中操作积分是由会员的日常操作得分, 充值积分是因为充值产生的,因为违规操作引起的扣分行为将影响会员积分 (发布无意义和重复信息扣除200积分,发布违反国家相关法规信息永久封号)。</p>
+			<p class="h5">二、积分获得方法</p>
+			<p class="para">1、做任务赚积分</p>
+					<p class="para">企明星为你准备了简单操作的新手任务,引导你对网站功能快速上手的同时, 还能获取相应的积分。全部完成更能一次额外获得1001积分哦~</p>
+			<p class="para">2、日常任务</p>
+					<p >完成5次企业查询,得50积分(每天上限50积分)</p>
+					<p>发布3条服务信息,得60积分(每天上限60积分)</p>
+					<p>发布3条需求信息,得60积分(每天上限60积分)</p>
+					<p>分享2条服务信息/交易信息,得40积分(每天上限40积分)</p>
+				<p class="para">3、连续签到任务(签到)</p>
+				<table class="creditlist">
+					<tr>
+						<td>连续签到<br/>天数</td>
+						<td>1</td>
+						<td>2</td>
+						<td>3</td>
+						<td>4</td>
+						<td>5</td>
+						<td>6</td>
+						<td>7</td>
+					</tr>
+					<tr>
+						<td>会员奖励<br/>积分</td>
+						<td>10</td>
+						<td>20</td>
+						<td>30</td>
+						<td>40</td>
+						<td>50</td>
+						<td>60</td>
+						<td>70</td>
+					</tr>
+				</table>
+			<p class="para">4、增送</p>
+			<p>邀请新用户加入,邀请成功后,每人次可获得积分。</p>
+			<p class="para">5、充值</p>
+			<p class="para">充值可以快速获得积分,充值1元兑换100积分。充值积分不可用于会员升级,只可用于功能使用。</p>
+			<p class="para">6、活动增送</p>
+			<p class="para">企明星不定期开放各种任务,为活跃用户提供更多获取积分得方式,加速成长,获得积分。所以,常来看看哦~</p>
+			<p class="para">备注:会员积分可能有延迟,若超过24小时未加上,请于企明星客服联系。</p>
+		</div>
+	</div>
+	<div style="position: absolute;width:100%;z-index:4411;background:#FFF;" class="bookinfo">
+		<div class="title">
+			签到
+			<button class="btn btn-link text-primary f-floatr f-close" >确定</button>
+		</div>
+		<div class="content">
+			<div>
+					<table width="100%;" style="margin:15px auto;" class="credittop">
+					<tr>
+						<td><img src="/images/10jf.png"><div>第一天</div></td>
+						<td><img src="/images/20jf.png"><div>第二天</div></td>
+						<td><img src="/images/30jf.png"><div>第三天</div></td>
+						<td><img src="/images/40jf.png"><div>第四天</div></td>
+					</tr>
+				</table>
+				<table width="100%;" style="margin:0px auto;" class="creditbottom">
+					<tr>
+						<td style="margin-left:10px;"><img src="/images/50jf.png"><div>第五天</div></td>
+						<td><img src="/images/60jf.png"><div>第六天</div></td>
+						<td><img src="/images/70jf.png"><div>第七天</div></td>
+					</tr>
+				</table>
+				<div>
+				{{if session "credit_qd"}}
+					{{if eq (session "credit_qd") "y"}}
+						<button class="btn   " style="width:180px;margin-top:10px;" id="bookinbtn" disabled="disabled">已签到</button>
+					{{else}}
+						<button class="btn btn-primary " style="width:180px;margin-top:10px;" id="bookinbtn">签到</button>
+					{{end}}
+				{{else}}
+					<button class="btn btn-primary " style="width:180px;margin-top:10px;" id="bookinbtn">签到</button>
+				{{end}}
+				</div>
+				<div><small>(已连续签到<span class="days"></span>天)</small></div>
+			</div>
+		</div>
+	</div>
+			
+	<script>
+		$(function(){
+			$(".m-rules").bind("click",show);
+			$(".bookin").bind("click",show);
+			$(".f-close").bind("click",hide);
+			$("#bookinbtn").bind("click",qd);
+			bookinfo();
+		});
+		function bookinfo(){
+			
+			$.ajax({
+				url:"/member/credit/bookinfo",
+				method:"POST",
+				type:"json",
+				success:function(r){
+					if (r){
+						var d={"1":"一","2":"二","3":"三","4":"四","5":"五","6":"六","7":"七","8":"八","9":"九","0":"零"}
+						$(".days").text(d[""+r[1]]);
+						$(".days").attr("data",r[1]);
+						var images=$(".bookinfo img");
+						if(r[1]>7){
+							r[1]=1;
+						}
+						for(var i=0;i<r[1];i++){
+							var src=images.eq(i).attr("src");
+							if (src.indexOf("ff")==-1){
+								src=src.replace("f","ff");
+								images.eq(i).attr("src",src);
+							}
+							
+						}
+					}else{
+						$(".days").text("0");
+						$(".days").attr("data",0);
+					}
+				}
+			});
+		}
+		function hide(n){
+				n=$(n.target);
+				n.parent().parent().hide();
+				$(".modal-backdrop.fade.in").hide();
+				return false;
+		}
+		function show(n){
+			$(".modal-backdrop.fade.in").show();
+			var node=$(n.target);
+			while(true){
+				if(node.attr("target")){
+					$("."+node.attr("target")).fadeIn() ;
+					break;
+				}else{
+					node=node.parent();
+				}
+			}
+			return false;
+		}
+		function qd(){
+			$.post("/member/credit/inCreditAjx",{"param":"qd"},function(r){
+				bookinfo();
+				if (r.result=="y"){
+					$("#indexbookinbtn").attr("class","btn  btn-default bookin");
+					$("#bookinbtn").attr("class","btn   bookin");
+					$("#bookinbtn").attr("disabled","disabled");
+					$(".gold").text(parseInt($(".gold").text())+parseInt($(".days").attr("data")*10));
+				}
+			});
+			return false;
+		}
+	</script>
+</body>
+</html>

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

@@ -3,6 +3,7 @@
 <title>我的积分</title>
 {{include "/common/inc.html"}}
 <script charset="utf-8" src="/js/paging.js"></script>
+<script src="/js/validform-min.js"></script>
 <style>
 .credit-explain {
     background-color: #FCF8E3;
@@ -281,7 +282,7 @@
 							<tr class="rowtwo">
 								<td width="60%" style="text-indent: 7em;">邀请一个新用户(微信剑鱼分享邀请新用户),得150积分</td>
 								<td width="10%" align="center"></td>
-								<td width="30%" style="padding:110px"></td>
+								<td width="30%" style="padding:110px">去<span class="mx" onclick="$('#yaoqingModal').modal('show')">邀请</span></td>
 							</tr>
 						</table>
 						</div>
@@ -308,11 +309,54 @@
 		</div>
 	</div>
 </div>
+
+<!-- 邮箱邀请Modal -->
+<div class="modal fade b-modal" id="yaoqingModal" tabindex="-1" role="dialog" aria-labelledby="yaoqingModalLabel">
+  	<div class="modal-dialog" role="document">
+		<div class="modal-content">
+		  	<div class="modal-header">
+				<span data-dismiss="modal" aria-label="Close" class="close glyphicon guanbi1"></span>
+				<span class="modal-title" id="yaoqingModalLabel">邀请</span>
+			</div>
+			<div class="modal-body">
+				<form class="validForm form-horizontal" role="form" method="post">
+				<div class="form-group">
+					<span id="col-sm-3" class="col-sm-3 control-label" for="name"><span>*</span>邀请人邮箱 </span>
+					<div class="col-sm-6">
+						<input type="text" name="s_email" class="form-control" maxlength="50"  datatype="*"z  nullmsg="请输入邮箱地址" errormsg="请输入邮箱地址" >
+					</div>
+					<div class="col-sm-3">
+					   <span class="Validform_checktip checkCodeIdValid Validform_error"></span>
+					</div>
+				</div> 
+				<div class="form-group">
+					<span class="col-sm-3 control-label"><span>*</span>验证码 </span>
+					<div class="input-group col-sm-6 checkCodeId">
+						<input type="text" name="checkCodeId" class="form-control inputxt" maxlength="4" id="chedkcode" datatype="*"  nullmsg="请输入验证码" errormsg="请输入验证码" >
+						<span class="input-group-addon " id="phone-checkCodeId">
+							<img id="yaoqing_captcha" src="/tool/captcha" onClick="reLoadCaptcha('yaoqing_captcha');">
+							<a onClick="reLoadCaptcha('yaoqing_captcha');" class="text-primary">刷新</a>
+						</span>
+					</div>
+					<div class="col-sm-3">
+					<span class="Validform_checktip">请输入验证码</span>
+					</div>
+			  	</div>
+				<div class="form-group" style="padding:0px 100px 20px 150px">
+					<button type="button" class="btn btn-primary" onclick="yaoqing()">发送邀请</button>
+				</div>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>
+
 <!-- 底部 -->
 {{include "/common/bottom.html"}}
 
 <script type="text/javascript">
 $(function(){
+	bindValidForm({})
 	$("#c_0,#c_1").click(function(){
 		var _v=$(this).attr("value")
 		checkContent("list_"+_v)
@@ -366,6 +410,12 @@ function outoClick(id){
 function toUrl(url){
 	window.location.href=url
 }
+function yaoqing(){
+	alert();
+}
+function reLoadCaptcha(id){
+	document.getElementById(id).src='/tool/captcha?rnd='+Math.random()
+}
 </script>
 </body>
 </html>

+ 16 - 60
core/src/web/templates/service/appointment.html

@@ -2,15 +2,15 @@
 <!-- Modal -->
 <div class="modal fade b-modal" id="appointmentModal" tabindex="-1" role="dialog" aria-labelledby="appointmentModalLabel">
   	<div class="modal-dialog" role="document">
-		<div class="modal-content">
+		<div class="modal-content" style="width:540px;">
 		  	<div class="modal-header">
 				<span data-dismiss="modal" aria-label="Close" onClick="qxdx()" class="close glyphicon guanbi1"></span>
 				<span class="modal-title" id="appointmentModalLabel">免费预约</span>
 			</div>
 			<div id="reg_b">
-		  	<div class="text-muted d_tck_n">{{.T.sinfo.s_enterprisename}}</div>
-			<div class="d_tck_fw">{{.T.sinfo.s_name}}
-				<span class="dspan" ><a href="#"  class="text-primary">{{.T.appcount}}</a> 人预约</span>
+		  	<div class="text-muted d_tck_n">发布人:{{.T.sinfo.s_enterprisename}}</div>
+			<div class="d_tck_fw"><div style="border-left:3px solid #FF5A5F;height:15px;float:left;margin-right:5px;"></div><div style="float:left;line-height: 15px;">{{.T.sinfo.s_name}}</div>
+				<span class="dspan" style="float:right;margin-right:20px;" >已有<a href="#"  class="text-primary">{{.T.appcount}}</a> 人预约</span>
 			</div>
 	  		<div class="modal-body d_tck_fat">
 				<form class="validForm form-horizontal registerform" role="form" id="service" method="post">
@@ -23,27 +23,19 @@
 				  
 				  
 					<div class="form-group">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>联系人 </span>
-						<div class="col-sm-6">
+						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>联&nbsp;&nbsp;人 </span>
+						<div class="col-sm-5">
 							<input type="text" name="s_linkman" class="form-control" maxlength="16" id="user" datatype="*" nullmsg="请输入联系人" errormsg="请输入联系人">
 						</div>
 						<div class="col-sm-3">
-						    <span class="Validform_checktip">请输入联系人</span>
-						</div>
-					</div>
-					<div class="form-group" style="margin-top:-10px;">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name"></span>
-						<div class="col-sm-6">
 							<span class="checkbox-inline"  style=" padding-left:10px;"><input type="radio" name="i_sex" id="man" value="1" checked="checked" >先生</span>
 							<span class="checkbox-inline"  style=" padding-left:10px;">
 					 		<input type="radio" name="i_sex" id="woman" value="0" > 女士</span>
 						</div>
-						<div class="col-sm-3">
-						</div>
 					</div>
 					<div class="form-group">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>手机号 </span>
-						<div class="col-sm-6">
+						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>联系方式 </span>
+						<div class="col-sm-5">
 							<input type="text" name="s_phone" class="form-control" maxlength="11" id="phone"  datatype="m" nullmsg="请输入手机号码" errormsg="手机号码格式错误" >
 						</div>
 						<div class="col-sm-3">
@@ -52,54 +44,18 @@
 					</div>
 					<div class="form-group">
 						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>服务日期 </span>
-						<div class="col-sm-6">		
+						<div class="col-sm-5">		
 							<input style="background:#fff url(/images/datePicker.gif) no-repeat right;"  id="servicedate"  datatype="*" onFocus="WdatePicker({minDate:'%y-%M-%d'})" type="text" name="servicedate" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="ture" nullmsg="请输入服务日期" errormsg="请输入服务日期" />
 						</div>
 						<div class="col-sm-3">
 						<span class="Validform_checktip">请输入服务日期</span>
 						</div>
-					</div>
-					<div class="form-group">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name">服务时间 </span>
-						<div class="col-sm-6">
-							<input type="text" name="s_servicetime" class="form-control" maxlength="20" id="servicetime" >
-						</div>
-						<div class="col-sm-3 text-muted padding-t-10">例如:8:00到16:30
-						</div>
-					</div>
-					<div class="form-group ">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name">是否上门服务 </span>
-						<div class="col-sm-6">
-							<div>
-								<div class="margin-t-10 pull-left">
-									<input type="radio" name="i_dtd" id="ydtd" value="1" checked="checked" > 是
-								</div>
-								<div class="margin-t-10 pull-left padding-l-20">
-									<input type="radio" name="i_dtd" id="ndtd" value="0" > 否
-								</div>
-								<div class="clearfix"></div>
-							</div>
-							
-						</div>
-						<div class="col-sm-2">
-							
-						</div>
-					</div>
-					
-					<div class="form-group address">
-						<span id="col-sm-2" class="col-sm-3 control-label" for="name"><span>*</span>详细地址 </span>
-						<div class="col-sm-6 xxdz">
-							<input type="text" name="s_address" class="form-control" id="address" maxlength="50"  datatype="*"  nullmsg="请输入详细地址" errormsg="请输入详细地址" >
-						</div>
-						<div class="col-sm-2">
-						    <span class="Validform_checktip">请输入详细地址</span>
-						</div>
-					</div>
+					</div>			
 					<div class="form-group margin-t-15">
 						<span id="col-sm-2" class="col-sm-3 control-label" for="name">备注 </span>
-						<div class="col-sm-6">
-							<textarea style=" width:100%;padding:10px 8px; max-width:279px; min-height:120px; max-height:210px; position:relative;"  name="s_remark" class="form-control" id="remark" maxlength="150" ></textarea>
-							<span style="color:rgb(151, 49, 14); font-weight:normal; font-size:9px; position:absolute; bottom:3px; right:20px;" id="zishu">0/150字</span>
+						<div class="col-sm-5">
+							<textarea style=" width:372px;;padding:10px 8px; min-height:97px; max-width:372px; max-height:210px; position:relative;"  name="s_remark" class="form-control" id="remark" maxlength="150" ></textarea>
+							<span style="color:rgb(151, 49, 14); font-weight:normal; font-size:9px; position:absolute; bottom:3px; right:-122px;" id="zishu">0/150字</span>
 						</div>
 						<div class="col-sm-3">
 						</div>
@@ -119,9 +75,9 @@
 				  	</div>
 					
 					<div class="form-group margin-t-15">
-						<div class=" modal-footer">
-						<button type="submit" class="btn btn-primary" >  确 定  </button>
-						<button type="button" class="btn "  data-dismiss="modal">  取 消  </button>
+						<div class=" modal-footer" style="border-top:0px;">
+							<button type="button" class="btn btn-default "  data-dismiss="modal">  取 消  </button>
+							<button type="submit" class="btn btn-primary" >  确 定  </button>
 						</div>
 					</div>
 					</div>

+ 8 - 6
core/src/web/templates/service/bid.html

@@ -1,24 +1,25 @@
-<div class="modal fade" id="bidModal" tabindex="-1" role="dialog" aria-labelledby="bidModalLabel" aria-hidden="true">
+<div class="modal fade b-modal in" id="bidModal" tabindex="-1" role="dialog" aria-labelledby="bidModalLabel" aria-hidden="true">
 	<div class="modal-dialog">
 		<div class="modal-content">
 			<form class="form-horizontal m-tbform" role="form">
 				<input type="hidden" value="{{.T.demandInfo._id}}" name="id">
 				<div class="modal-header">
 					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-					<h4 class="modal-title text-muted" id="bidModalLabel"><b>参与投标</b></h4>
+					<h4 class="modal-title" id="bidModalLabel"><b>参与投标</b></h4>
 				</div>
 				<div class="modal-body g-modal-body">
 					<p class="text-muted u-font">{{.T.demandInfo.s_name}}</p>
 					<p class="text-muted">
 						<span id="bid-publishPerson">发布人:</span>
 						<span class="pull-right">
+							已有
 							<span class="text-primary">{{if .T.demandInfo.i_bids}}{{.T.demandInfo.i_bids}}{{else}}0{{end}}</span>
 							个服务商已参与投标
 						</span>
 					</p>
 					<div class="g-tbform">
 						<div class="form-group">
-							<label class="col-sm-2 control-label text-muted">服务商联系人</label>
+							<label class="col-sm-2 control-label text-muted">联系人</label>
 							<div class="col-sm-7">
 								<input type="text" class="form-control" name="s_person" datatype="*" nullmsg="请输入联系人" maxlength="10"/>
 							</div>
@@ -27,7 +28,7 @@
 							</div>
 						</div>
 						<div class="form-group">
-							<label class="col-sm-2 control-label text-muted">手机号</label>
+							<label class="col-sm-2 control-label text-muted">联系方式</label>
 							<div class="col-sm-7">
 								<input type="text" class="form-control" name="s_phone" maxlength="11" onKeyUp="rePlaceUnDigital(this)" datatype="m" nullmsg="请输入电话" errormsg="手机号码格式错误"/>
 							</div>
@@ -65,8 +66,9 @@
 					</div>
 				</div>
 				<div class="modal-footer">
+				<button type="button" class="btn btn-default u-btn" data-dismiss="modal">取消</button>
 					<button type="submit" class="btn btn-primary u-btn">确认</button>
-					<button type="button" class="btn btn-btn-default u-btn" data-dismiss="modal">取消</button>
+					
 				</div>
 			</form>
 		</div>
@@ -90,7 +92,7 @@ $(function(){
 			alert("投标前请先进行认证!");
 			window.location.href = "/member/authentication/index";
 		}else if(isLogined){
-			$("#bid-publishPerson").text($("#publishPerson").text());
+			$("#bid-publishPerson").text($("#publishPerson a").text());
 			$('#bidModal').modal('show');
 		}else{
 			loginModalShow();

+ 51 - 26
core/src/web/templates/service/demand.html

@@ -6,18 +6,36 @@
 <!-- extra CSS -->
 <link rel="stylesheet" href="/js/My97DatePicker/WdatePicker.css" />
 <link rel="stylesheet" href="/js/kindeditor/themes/default/default.css" />
-
+<link href="/css/index-new.css" rel="stylesheet">
+<style>
+	.g-demand-main{
+			float: left;
+			width: 940px;
+			margin-top: 10px;
+			background: #FFF;
+			
+	}
+	.text-primary.a-com-title{
+		border-left:0px;
+		background:#F6F8FA;
+		border:1px solid #E5E6E9;
+	}
+</style>
 <head>
 <body>
-	{{include "/common/head.html"}}
+	{{include "/common/login.html"}}
+	{{include "/common/indexhead.html"}}
 	<div class="container-fluid a-content">
-		<div class="a-c-left">
+		<div class="g-demand-main">
 			<div class="g-process">
-				<p class="u-title text-primary">发布需求</p>
+				<div class="u-title text-primary">
+					<div style="float:left;">发布需求</div>
+				</div>
 				<div class="g-brace"></div>
+				
 				<ul class="m-process">
 					<li class="check">
-					  <span class="u-icon f-step1 u-icon-check">1</span>
+					  <span class="u-icon f-step1 ">1</span>
 					  <span class="u-text ">选择服务分类</span>
 					</li>
 					<li>
@@ -33,6 +51,7 @@
 					  <span class="u-text">服务达成,评价服务</span>
 					</li>
 				</ul>
+				<div class="u-processbar"></div>
 			</div>
 			<p class="u-notice">
 				企明星郑重承诺:不收取您的任何费用,请放心发布。
@@ -40,7 +59,7 @@
 			<!-- 服务分类 -->
 			<div class="g-typelist {{if eq .T.Isinit 0}}f-display{{end}}">
 				<ul class="m-typelist">
-					<li class="u-zw"></li>
+					<li class="u-zw">全部服务分类</li>
 				</ul>
 			
 			</div>
@@ -53,11 +72,13 @@
 					<input type="hidden" name="_id" value="{{.T.demandinfo._id}}"/>
 				{{end}}
 					<div class="form-group">
-						<label class="col-sm-1 control-label text-left">您选择了:</label>
-    					<input name="s_servicename" id="typeTitle" value="{{.T.demandinfo.s_servicename}}" readOnly="readOnly" style="border:none;width:190px;"/>	
-						<button type="button" onclick="rechoose(0)" class="btn btn-link">修改</button>
+						<label class="col-sm-2 control-label text-left">您选择了:</label>
 					</div>
 					<div class="form-group">
+						<input name="s_servicename"  class="f-floatl form-control" id="typeTitle" value="{{.T.demandinfo.s_servicename}}" readOnly="readOnly" style="width:190px;"/>	
+						<button type="button" onclick="rechoose(0)" class=" f-floatl u-75 btn btn-primary" style="margin:2px 0 0 10px;">修改</button>
+					</div>
+					<div class="form-group" style="clear:both;">
 					    <label class="col-sm-2 control-label text-left" >简单描述您的需求:</label>
 					</div>
 					<div class="form-group ">
@@ -65,19 +86,19 @@
 					    <input type="text" class="form-control" name="s_title" value="{{.T.demandinfo.s_name}}" maxlength=30 placeholder="一句话描述您的需求,例如:xx科技公司Logo设计 " datatype="*1-30" nullmsg="请描述您的需求" errormsg="一定要填写需求标题哦">	
 					  </div>
 						<div class="col-sm-2">
-							<span class="Validform_checktip checkCodeIdValid"></span>
+							<span class="Validform_checktip checkCodeIdValid text-primary"></span>
 						</div>
 					</div>
 					<div class="form-group">
 					    <label class="col-sm-2 control-label text-left" >预算金额:</label>
 					</div>
 					<div class="form-group">
-						<div class="col-sm-2">
+						<div class="col-sm-4">
 							<input onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" type="text" class="form-control" name="f_price" value="{{.T.demandinfo.f_price}}" placeholder="预算价格" maxlength=8 >	
 						</div>
 						<div class="checkbox col-sm-2 text-left"  >
 			          <label style="vertical-align:sub;">
-			            <input type="checkbox" name="i_isftf" value=1 {{if .T.demandinfo.i_isftf}}{{if eq 1 .T.demandinfo.i_isftf}}checked="checked" {{end}}{{end}}> 面议
+			            <input type="radio" name="i_isftf" value=1 {{if .T.demandinfo.i_isftf}}{{if eq 1 .T.demandinfo.i_isftf}}checked="checked" {{end}}{{end}}> 面议
 			          </label>
 			      </div>
 					</div>
@@ -85,7 +106,7 @@
 					    <label class="col-sm-2 control-label text-left" >结束日期:</label>
 					</div>
 					<div class="form-group ">
-					  <div class="col-sm-3 ">
+					  <div class="col-sm-4 ">
 					    <input type="text" class="Wdate form-control"  name="l_enddate" value="{{.T.demandinfo.l_enddate}}" placeholder="选择截止日期" onFocus="WdatePicker({lang:'zh-cn',readOnly:true,minDate:'%y-%M-{%d+1}'})" datatype="*" nullmsg="请选择截止日期">
 					  </div>
 						<div class="col-sm-2">
@@ -97,7 +118,7 @@
 						    <label class="col-sm-6 control-label text-left" >请确认您的联系方式,方便服务商联系您哦:</label>
 						</div>
 						<div class="form-group">
-							    <div class="input-group col-sm-3"  style="margin-right: 10px;float: left;">
+							    <div class="input-group col-sm-4"  style="margin-right: 10px;float: left;    max-width: 267px;">
 							      <input type="text" name="s_phone" class="form-control inputxt" value="{{.T.demandinfo.s_phone}}" placeholder="请输入手机号" datatype="m" nullmsg="请输入手机号码" errormsg="手机号码格式错误" maxlength="11">
 							    </div>
 									<div class="col-sm-2">
@@ -117,12 +138,12 @@
 					 	
 				  </div>
 					 <div class="form-group">
-					    <label class="col-sm-1 control-label text-left" >示例图片:</label>
-							<label class="control-label" style="font-weight:normal;font-size:11px;    line-height: 19px;margin: 0 -10px;">上传1张大小不超过10M图片,支持jpg/png格式。建议尺寸200*200像素</label>
+					    <label class="col-sm-2 control-label text-left" >示例图片:</label>
+							<label class="control-label" style="font-weight:normal;font-size:11px;   color:#B3B4B5; line-height: 19px;margin: 0 -10px;margin-left: -80px;">上传1张大小不超过10M图片,支持jpg/png格式。建议尺寸200*200像素</label>
 				 		 </div>
 				   <div class="form-group">
 						 <div class="m-uploadimg">
-							<img id="u-uploadimg" style="width:190px; height:176px;" src="/images/services/default.png"/>
+							<img id="u-uploadimg" style="width:84px; height:84px;" src="/images/upload.png"/>
 					  	<div id="f-filebutton" style="float:left;">
 						 </div>
 					   
@@ -131,19 +152,23 @@
 				   </div>	
 				   <div class="form-group">
 					  <label class="col-sm-1 control-label text-left" >验证码:</label>
-						<div class="col-sm-4 input-group" style="float: left;margin-left:-20px;">
-					      <input type="text" class="form-control inputxt" maxlength="4" datatype="n4"  name="s_capttext" nullmsg="请输入验证码" errormsg="验证码格式错误">
-						  	<span class="input-group-addon" style="padding:0 0 0 5px;">
-									<img id="captchaImg" src="/tool/captcha?rnd=" width=70 />
-						    	<button type="button"  id="f-refresh" class="btn-link" >刷新</button>
-						 		</span>
-					  </div>
 						<div class="col-sm-2">
 							<span class="Validform_checktip checkCodeIdValid Validform_error" style="margin-left:10px;"></span>
 						</div>
 				  </div>
-						  <div class="form-group">
-						   <a class="btn-link col-sm-2 u-btn" onclick="rechoose(0)" style="line-height:35px;text-align:center;margin-left:27px;">上一步</a>
+					<div class="form-group">
+						<div class="col-sm-4 input-group" style="float: left;">
+					      <input type="text" class="form-control inputxt" maxlength="4" datatype="n4"  name="s_capttext" nullmsg="请输入验证码" errormsg="验证码格式错误">
+					  </div>
+						<div style="    margin-top: 5px;">
+							<span class="" style="padding:0 0 0 5px;">
+								<img id="captchaImg" style="margin-top:-5px;" src="/tool/captcha?rnd=" width=75 />
+					    		<button type="button"  id="f-refresh" class="btn-link" style="color:#FF5A5F;font-weight:600;" >刷新</button>
+						 	</span>
+						</div>
+					</div>
+						  <div class="form-group" style="padding:50px 0px 50px 110px;max-width: 400px;">
+						   <a class="btn btn-default u-btn" onclick="rechoose(0)" style="margin-right:25px;">上一步</a>
 						   <button type="submit" id="releasebtn" class="btn btn-large btn-primary u-btn" onclick="isPic=0;" type="submit">下一步</button>
 				  </div>
 				</form>

+ 47 - 44
core/src/web/templates/service/detail.html

@@ -31,6 +31,17 @@
 		border-top:3px solid #FF5A5F;
 		line-height: 30px !important;
 	}
+	.m-linkman span.glyphicon{
+		font-size:18px;
+		margin-right:5px;
+	}
+	.m-linkman span{
+		    margin-bottom: 10px;
+	}
+	.form-horizontal .form-group{
+		    margin-left: -47px;
+   		 margin-right: -15px;
+	}
 	</style>
 <link href="/css/index-new.css" rel="stylesheet">
 </head>
@@ -64,18 +75,18 @@
    						</div>
     				</div>
 						<div class="a-twostage-toolbar text-muted">
-											<a class="pull-left" onclick="$('#share').show('normal')"><img src="/images/u141.png"/><small>分享</small></a>
-											<div class="bdsharebuttonbox " style="margin:6px 0 0 15px;" id="share">
-												<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
-												<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
-												<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
-												<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
-												<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人"></a>
-											</div>
+							<a class="pull-left" onclick="$('#share').show('normal')"><span class="glyphicon fenxiang " style="font-size:12px;margin:20px 0 0 5px;"></span><span style="color:#666;">分享</span></a>
+							<div class="bdsharebuttonbox " style="margin:3px 0 0 0px;" id="share">
+								<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
+								<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
+								<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
+								<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
+								<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人"></a>
+							</div>
 						</div>
 					</div>
 		 			<div class="col-xs-12 col-sm-8 d_service_main">
-			 			<div class="a-twostage-title u-overflow">{{.T.sinfo.s_name}}</div>
+			 			<div class="a-twostage-title u-overflow">{{.T.sinfo.s_name}}<small style="font-size:12px;font-weight:normal;" class="text-primary">&nbsp;&nbsp;&nbsp;{{.T.sinfo.servicetypename}}</small></div>
 						<div><span class="text-muted margin-r-10"><a href="/enterprise/{{.T.sinfo.s_enterpriseid}}.html" target="_blank">{{.T.sinfo.s_enterprisename}}</a></span></div>
 			 			<div class="d-service-price">
 							<div>
@@ -113,37 +124,21 @@
 						<button type="submit" class="btn btn-primary after_submit hide" data-toggle="modal" data-target="#appointmentModal">免费预约</button>
 				        {{end}}
 						</div>
-		 				<div class="margin-b-5">
-							{{if .T.einfo.s_persion}}
-							{{if ne .T.einfo.s_persion ""}}
-						 	<span class="glyphicon lianxiren icon_gray margin-r-10 text-muted"  ></span><span class="text-muted">联 系 人:{{.T.einfo.s_persion}}</span><br/>
-						  {{end}}
-							{{end}}
-							{{if .T.sinfo.s_phone}}
-							{{if ne .T.sinfo.s_phone ""}}
-							<span class="glyphicon lianxidianhua icon_gray margin-r-10 text-muted"  ></span><span class="text-muted">联系电话:{{.T.sinfo.s_phone}}</span><br/>
-							{{end}}
-							{{end}}
-							{{if .T.einfo.s_weixin}}
-							{{if ne .T.einfo.s_weixin ""}}
-							<span class="glyphicon weixinhao icon_gray margin-r-10 text-muted"  ></span><span class="text-muted">微信:{{.T.einfo.s_weixin}}</span><br/>
-						 	{{end}}
-							{{end}}
+		 				<div class="margin-b-5 m-linkman">
+							<span class="glyphicon ren2 icon_gray text-muted"  ></span><span class="margin-r-10 text-muted">{{.T.einfo.s_persion}}</span>
+							{{if .T.sinfo.s_phone}}	
+								<span class="glyphicon shouji icon_gray text-muted"  ></span><span class="margin-r-10 text-muted">{{.T.einfo.s_mobile}}</span>
+							{{end}}	
+							<br/>
 							{{if .T.einfo.s_enturl}}
-							{{if ne .T.einfo.s_enturl ""}}
-							<span class="glyphicon wangzhi icon_gray margin-r-10 text-muted"  ></span><span class="text-muted">公司网址:{{.T.einfo.s_enturl}}</span><br/>
-						  {{end}}
-							{{end }}
-							{{if .T.einfo.i_province}}
-							{{if ne .T.einfo.i_province -1}}
-							<span class="glyphicon lianxidizhi icon_gray margin-r-10 text-muted"  ></span><span class="text-muted">详细地址:<span id="de-address"></span> </span><br/>
-				 			{{end}}
+							<span class="glyphicon wangzhi1 icon_gray  text-muted"  ></span><span class=" margin-r-10 text-muted">{{.T.einfo.s_enturl}}</span>
 							{{end}}
+							{{if .T.einfo.s_qq}}
+							<span class="glyphicon qq1 icon_gray  text-muted"  ></span><span class="text-muted"><a href="tencent://message/?uin={{.T.einfo.s_qq}}&Site=hexun.com/ngdao&Menu=yes" class="margin-r-10"><img src="/images/u124.png" style="margin-top:-10px;cursor:pointer;" /></a></span>
+							{{end}}
+							<br/><span class="glyphicon dizhi icon_gray  text-muted"  ></span><span class="text-muted"><span id="de-address"></span> </span><br/>
 						</div>
 		 			</div>
-		 
-		 
-		 
 		 </div>
 		 </div>
 		<div class="clearfix"></div>
@@ -250,7 +245,7 @@
 		<div class="margin-15">
 			<div class="d_pjlb">
 				<div>
-				<span class="dspan">{{.T.commentm.s_nickname}}</span>
+					<span class="dspan">{{.T.commentm.s_nickname}}</span>
 				</div>
 				<div>
 					<span>{{.T.commentm.s_comment}}</span>&nbsp;&nbsp;
@@ -414,13 +409,14 @@ function getComment(n,start){
 		success:function(s){
 			for(var i=0;i<s.length;i++){
 				var str="<div class='d_pjlb'>";
-				str+="<div><span  class=\"dspan\">"+s[i]["s_nickname"].substring(0,2)+"***</span></div>";
-				str+="<div><span>"+s[i]["s_comment"]+"</span>&nbsp;&nbsp;"
+				str+="<div class='first' style='margin-right:20px;'><img style='margin-top:13px;' src='/images/rflower.png'  /></div>"
+				str+="<div class='first'><div><img src='/images/u885.png'/></div><div><span  class=\"dspan\">"+s[i]["s_nickname"].substring(0,2)+"***</span></div></div>";
+				str+="<div class='first' style='width:722px;padding:5px 0 0 30px;'><div style='margin-bottom:10px;'>星星</div><div><span style='font-size:13px;'>"+s[i]["s_comment"]+"</span></div>&nbsp;&nbsp;"
 				if(isSelf==1 && s[i]["s_reply"]==""){
 					str+="<a style=\"color:#3a87ad;\" class=\"f-reply\" onclick=\"sreply(this)\">回复</a>";
 				}
 				str+="</div>";
-				str+="<div><span class=\"dspan\">信息:"+{{.T.sinfo.s_name}}+"&nbsp;&nbsp;--"+getLocalTime(s[i]["l_timestamp"])+"</span>&nbsp;&nbsp;";
+				str+="<div class='first' ><div><span class=\"dspan\">"+getLocalTime(s[i]["l_timestamp"])+"</span></div><div style='margin-bottom:10px;'>&nbsp;</div>";
 				str+="</div>";
 				if(s[i]["s_reply"]&&s[i]["s_reply"]!=""){
 					str+="<div class=\"d_pjlb_zj\"> <span class=\"dspan margin-l-15\">&nbsp;&nbsp;服务商回复:</span>";
@@ -494,7 +490,7 @@ function sreply(n){
 	
 }
 function getLocalTime(nS) {     
-		return new Date(parseInt(nS) * 1000).Format("yyyy-MM-dd hh:mm:ss");      
+		return new Date(parseInt(nS) * 1000).Format("yyyy-MM-dd");      
 }    
  
 function comment(){
@@ -550,11 +546,15 @@ function comment(){
 			new Paging("appRecordPaging","/market/appinfo",{id:"{{.T.sinfo._id}}"},10,function(r){
 				var html = '';
 				for(var i=0;i<r.length;i++){
-					var s_linkman = r[i].s_linkman;
+					var s_linkman = "<span style='margin-left:50px;'>"+r[i].s_linkman+"******</span>";
 					var s_servicename = r[i].s_servicename;
 					var l_createdate = r[i].l_createdate;
-					
-					html+= '<tr class="fonttwo a-border-b"><td>'+s_linkman+'******</td><td>'+s_servicename+'</td><td>'+l_createdate+'</td></tr>'
+					var src="/images/u885.png";
+					if(r[i].s_img && r[i].s_img==""){
+						src=r[i].s_img;
+					}
+					var tx="<div style='margin-right:50px;'><img height=34 class='radius' style='margin-bottom:10px;margin-right:-15px;'  src="+src+"  /></div>"
+					html+= '<tr class="fonttwo a-border-b"><td>'+tx+s_linkman+'</td><td>'+s_servicename+'</td><td>'+l_createdate+'</td></tr>'
 					
 				}
 				$("#appRecord #tableTitle").nextAll(".fonttwo").remove();
@@ -598,6 +598,9 @@ function comment(){
 						}
 				}
 			}
+			if ($("#de-address").text()==""){
+				$(".glyphicon.dizhi.icon_gray.text-muted").remove();
+			}
 		});
 	</script>
 	

+ 37 - 6
core/src/web/templates/service/list.html

@@ -61,6 +61,8 @@
 <body >
 {{include "/common/login.html"}}
 {{include "/common/indexhead.html"}}
+
+								
 <div class="a-content container-fluid" style="width:1200px;">
 	<div class="list-new-list">
 		<div class="a-servicelist" >
@@ -203,18 +205,18 @@
 				{{end}}
 				</div>
 					<div style="padding-top:10px;padding-bottom:10px;">
-						<span class="d_service_span text-muted" style="margin-top:10px;">{{if $v.s_enterprisename}}<a style="color:#aea79f;" href="/enterprise/{{$v.s_enterpriseid}}.html" target="_blank">{{$v.s_enterprisename}}</a>{{else}}{{$v.s_nickname}}{{end}}</span>
+						<span class="d_service_span text-muted">{{if $v.s_enterprisename}}<a style="color:#aea79f;" href="/enterprise/{{$v.s_enterpriseid}}.html" target="_blank">{{$v.s_enterprisename}}</a>{{else}}{{$v.s_nickname}}{{end}}</span>
+						<span class="d_service_span text-muted f-code">{{$v.s_opLocDistrict}}</span>
 					</div>
 				</div>
-				
 				{{if eq "service" $.T.querymap.c_searchtype}}
 				<div class="col-sm-2 col-xs-4" style="margin-top: 5px;">
-					价格:<span class="text-primary text-bold">5000</span>元
+					价格:{{if eq $v.f_price 0.0}}<span class="text-primary text-bold">面议</span>{{else}}<span class="text-primary text-bold">{{$v.f_price}}</span>元{{end}}
 				</div>
 				<div class="col-sm-4 col-xs-4 text-center hidden-xs" style="margin-top:5px;padding-right:0px;margin-left:30px;">
 					<div class="col-sm-8 " style="float:right;text-align:right;">
-						<div style="float:right;"><span class="d_col_span" style="font-size:14px;">成交量:<span style="color:#FF5A5F;font-weight:600;">{{$v.i_sales}}</span></span></div>
-						<div style="float:right;" ><span class="d_col_span" style="font-size:14px;">评价数:<span style="color:#FF5A5F;font-weight:600;">{{$v.i_comments}}</span></span>&nbsp;&nbsp;|&nbsp;&nbsp;</div>
+						<div style="float:right;"><span class="d_col_span" style="font-size:14px;">成交量:<span style="color:#FF5A5F;font-weight:600;">{{if $v.i_sales}}{{$v.i_sales}}{{else}}0{{end}}</span></span></div>
+						<div style="float:right;" ><span class="d_col_span" style="font-size:14px;">评价数:<span style="color:#FF5A5F;font-weight:600;">{{if $v.i_comments}}{{$v.i_comments}}{{else}}0{{end}}</span></span>&nbsp;&nbsp;|&nbsp;&nbsp;</div>
 					</div>
 				</div>
 				{{else}}
@@ -248,7 +250,8 @@
 					{{if eq "demand" $.T.querymap.c_searchtype}}
 						<!--抱歉!没有找到您所需要的需求。-->
 					{{else}}
-						<img src="/images/404"><h4><span class="glyphicon biaojidizhi icon_default text-primary"></span>&nbsp;<strong class="text-muted">
+						<img src="/images/u190.png"><h4><img src="/images/u405.png" />&nbsp;
+						<strong class="s-notfound">
 						抱歉!没有找到您所需要的服务信息。您也可以直接发布需求,等服务商家与您联系。<br><br>
 						<button style="width:260px" class="btn btn-primary" onclick="window.location.href='/market/demand/add.html'"><b>发 需 求</b></button>
 					{{end}}
@@ -286,6 +289,12 @@
 	var c_searchtype={{.T.querymap.c_searchtype}}
 	var fwlb = {{.T.serviceStr}}
 	$(function(){
+		$(".b-menu").bind("changecontent",function(){$("#searchForm").submit();});
+		if ($("#c_searchtype").val()=="demand"){
+			$(".b-showname").text("找需求");
+		}else{
+			$(".b-showname").text("找服务");
+		}
 		$(window).bind("resize",function(){
 			if(document.body.clientWidth<1209){
 					$(".a-content.container-fluid").css("width","");
@@ -310,7 +319,29 @@
 				$(n).text(parseFloat(text)+"元");
 			}
 		});
+		$(".f-code").each(function(i,n){
+			var $n=$(n);
+			$n.text(getToponym($n.text()));
+		});
 	});
+	function getToponym(code,obj){
+		if (!obj){
+			 obj=$.cxSelect.defaults.url;
+		}
+		if (code.length<2){
+			return "";
+		}
+		for(var i=0;i<obj.length;i++){
+			var k=obj[i].k+"";
+			if(k==code.substr(0,k.length)){
+				if(k==code){
+					return obj[i].n
+				}else{
+					return getToponym(code,obj[i].s)
+				}
+			}
+		}
+	}
 </script>
 </body>
 </html>

+ 68 - 62
core/src/web/templates/service/viewsingledemand.html

@@ -7,27 +7,47 @@
 		    height: 330px !important;
 			}
 		</style>
-  </head>
-  <body>
-<img src="{{.T.demandInfo.s_shareimg}}" style="width:0px;height:0px;"/>
-    {{include "/common/inc.html"}}
+		    {{include "/common/inc.html"}}
     <!-- extra CSS -->
     <link rel="stylesheet" href="/js/My97DatePicker/WdatePicker.css" />
     <!-- extra JS -->
     </script>
     <script src="/js/My97DatePicker/WdatePicker.js">
     </script>
-    {{include "/common/head.html"}}
+		<link href="/css/index-new.css" rel="stylesheet">
+  </head>
+  <body>
+<img src="{{.T.demandInfo.s_shareimg}}" style="width:0px;height:0px;"/>
+
+    {{include "/common/login.html"}}
+	{{include "/common/indexhead.html"}}
     <div class="container-fluid a-content">
-      <div class="a-c-left">
-        <div class="container" style="padding:30px 30px 30px 30px;width:100%;    border: 1px solid #ddd;">
+      <div class="a-c-left" style="background:#FFF;margin-top:10px;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="{{.T.demandInfo.s_image}}">
+						<a class="pull-left glyphicon fenxiang " onclick="$('#share').show('normal')" style="font-size:10px;color:#A0A0A0;margin-top:10px;margin-left:5px;"><small>分享</small></a>
+						<div class="bdsharebuttonbox" id="share" style="margin:5px 0 0 15px;">
+							<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
+							<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
+							<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
+							<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
+							<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人"></a>
+						</div>
 					</div>
 					<div class="col-sm-8">
 						<div class="a-twostage-title col-sm-12">
 							<!--需求标题-->
 							{{.T.demandInfo.s_name}}
+							{{if eq .T.demandInfo.i_status 1}}
+							<img src="/images/u288.png"/>
+							{{else if eq .T.demandInfo.i_status 2}}
+							<img src="/images/u252.png"/>
+							{{else if eq .T.demandInfo.i_status 3}}
+							<span class="a-bg-gray">任务超时</span>
+							{{else if eq .T.demandInfo.i_status 4}}
+							<span class="a-bg-gray">已撤销</span>
+							{{end}}
 				 			{{if .T.edit}}
 							<span>
 								<a style="font-size:14px;color:#3a87ad;font-weight:400;" href="/market/demand/{{.T.demandInfo._id}}.html">编辑</a>
@@ -72,6 +92,31 @@
 		         		</small>
 							</p>
 						</div>
+						<div style="height:60px;line-height:60px;background:#FBF0F1;">
+								<div style="float:left;padding-left:20px;"><span style="color:#A0A0A0;font-weight:600;">报价:</span><span class="var">
+								<span class="text-primary text-bold;">
+								{{if .T.demandInfo.i_isftf}}
+										{{if eq 1 .T.demandInfo.i_isftf}}
+											面议
+										{{else}}
+											¥{{.T.demandInfo.f_price}}
+										{{end}}
+									{{else}}
+										{{if eq .T.demandInfo.f_price "0.00"}}
+											面议
+										{{else}}
+											¥{{.T.demandInfo.f_price}}
+										{{end}}
+									{{end}}
+									</span>
+								</span></div>
+								<div style="float:left;"><img style="margin-top:0px;" src="/images/marketnew/cut.png"></div>
+								<div style="float:left;">
+									<span  style="color:#A0A0A0;font-weight:600;">已有</span>
+									<span class="text-primary">{{if .T.demandInfo.i_bids}}{{.T.demandInfo.i_bids}}{{else}}0{{end}}</span>
+									<span style="color:#A0A0A0;font-weight:600;">位服务商报价</span>
+								</div>
+						</div>
 						<div class="col-sm-12" style="">
 							<p class="col-sm-12">
 								{{if .T.bidFlag}}
@@ -89,62 +134,24 @@
 								{{end}}
 							</p>
 						</div>
-						<div style="clear:both;col-sm-8">
-							<table class="m-demanddetail text-muted">
-								<tr>
-									<th class="u-w1">预算价格:</th>
-									<td>
-									{{if .T.demandInfo.i_isftf}}
-										{{if eq 1 .T.demandInfo.i_isftf}}
-											面议
-										{{else}}
-											¥{{.T.demandInfo.f_price}}
-										{{end}}
-									{{else}}
-										{{if eq .T.demandInfo.f_price "0.00"}}
-											面议
-										{{else}}
-											¥{{.T.demandInfo.f_price}}
-										{{end}}
-									{{end}}
-									</td>
-									<th style="text-align:left;" colspan=2>联系电话:<span id="s_formatphone" style="font-weight: normal;">{{.T.demandInfo.s_phone}}</span></th>
-								</tr>
-								<tr>
-									<th >任务状态:</th>
-									<td>
-										{{if eq .T.demandInfo.i_status 1}}
-										<span class="a-bg-blue">等待选标</span>
-										{{else if eq .T.demandInfo.i_status 2}}
-										<span class="a-bg-red">圆满结束</span>
-										{{else if eq .T.demandInfo.i_status 3}}
-										<span class="a-bg-gray">任务超时</span>
-										{{else if eq .T.demandInfo.i_status 4}}
-										<span class="a-bg-gray">已撤销</span>
-										{{end}}
-									</td>
-									<th style="text-align:left;width:100px;">投标开始时间:</th>
-									<td >{{.T.demandInfo.l_createdate}}</td>
-								</tr>
-								<tr>
-									<th>投标状态:</th>
-									<td class="text-primary">{{if .T.demandInfo.i_bids}}{{.T.demandInfo.i_bids}}{{else}}0{{end}}位服务商报价</td>
-									<th style="text-align:left;">投标结束时间:</th>
-									<td >{{.T.demandInfo.l_enddate}}</td>
-								</tr>
-							</table>
+						<div style="clear:both;color:#A0A0A0;">
+							<div>
+								<span class="glyphicon shouji icon_gray text-muted"></span>
+								<span id="s_formatphone" style="font-weight: normal;">{{.T.demandInfo.s_phone}}</span>
+							</div>
+							<div>
+								<span class="glyphicon bofangjilu"></span>
+								<span>投标开始时间:{{.T.demandInfo.l_createdate}}</span>
+							</div>
+							<div>
+								<span class="glyphicon bofangjilu"></span>
+								<span>投标结束时间:{{.T.demandInfo.l_enddate}}</span>
+							</div>
 						</div>
 					</div>
 					<div class="clearfix">
 					</br>
-						<a class="pull-left" onclick="$('#share').show('normal')"><img src="/images/u141.png"/><small>分享</small></a>
-						<div class="bdsharebuttonbox" id="share">
-							<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
-							<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
-							<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
-							<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
-							<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人"></a>
-					</div>
+						
 
 					</div>
 		</div>
@@ -199,7 +206,6 @@
 	<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(){alert(1);$.post("/member/credit/inCreditAjx",{"param":"fx"},function(r){})}},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
 	<script>
 		loginBackType = -1;
-		setNavbarActive(0,2);
 		$(function(){
 			$(".m-title span").click(function(e){
 					node=$(e.target);
@@ -275,12 +281,12 @@
 						switch(i_status){
 							case 1:
 								if("{{.T.demandInfo.i_status}}" == 1){
-									html += '<button class="btn btn-success btn-sm a-table-recive">接受</button><button class="btn btn-warning btn-sm a-table-refuse margin-l-10">拒绝</button>';
+									html += '<button class="btn-new a-table-recive">接受</button><button class="btn-new a-table-refuse">拒绝</button>';
 								}
 								break;
 							case 3:
 								html += '&nbsp';
-								//html += '<button class="btn btn-primary btn-sm a-evaluate" onclick="sreply(this,0)">评价</button>';
+								//html += '<button class="btn-new a-evaluate" onclick="sreply(this,0)">评价</button>';
 								break;
 							case 5:
 								html += '&nbsp';

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

@@ -104,7 +104,7 @@ func (c *CreditRpc) InCreadit(param *qrpc.CreditData, replay *int) error {
 					obj := redis.Get(consts.RedisDB, key)
 					bcon := true
 					if obj != nil {
-						newobj := obj.([]int64)
+						newobj := util.InterfaceArrToint64Arr(obj.([]interface{}))
 						//比较日期是不是连续签到,并且在有效次数内
 						if newobj[1] < newobj[2] && time.Unix(newobj[0], 0).AddDate(0, 0, 1).Day() == now.Day() {
 							newobj[0] = now.Unix()

BIN
etl/client/src/trsclient/trsclient


+ 61 - 68
etl/client/src/trsclient/trsclient.go

@@ -40,20 +40,16 @@ func main() {
 
 //定时上传文件
 func transferTime() {
-	if bcon {
-		bcon = false
-		hour := time.Now().Hour()
-		if hour > startHour && hour < endHour {
-			_, err := rpc.DialHTTP("tcp", rpcaddr)
-			if err != nil {
-				log.Println(err.Error())
-			} else {
+	util.Try(func() {
+		if bcon {
+			bcon = false
+			hour := time.Now().Hour()
+			if hour > startHour && hour < endHour {
 				FileTransfer()
 			}
+			bcon = true
 		}
-		bcon = true
-	}
-
+	}, func(e interface{}) {})
 	time.AfterFunc(uploadduration*time.Minute, transferTime)
 }
 
@@ -64,77 +60,74 @@ type TrsDataParam struct {
 }
 
 func FileTransfer() {
-	fi, err := os.Stat(jsonpath)
-	if err != nil {
-		log.Println(err.Error())
-		return
-	}
-	if !fi.IsDir() {
-		log.Println(jsonpath, "不是一个目录")
-		return
-	}
-	filepath.Walk(jsonpath, func(path string, info os.FileInfo, err error) error {
-		if info.IsDir() || strings.LastIndex(info.Name(), "sync") > 0 {
-			return nil
+	util.Try(func() {
+		fi, err := os.Stat(jsonpath)
+		if err != nil {
+			log.Println(err.Error())
+			return
 		}
-		filename := info.Name()
-		fi, _ := os.Open(path)
-		bs, _ := ioutil.ReadAll(fi)
-		fi.Close()
-		go transfer(path, filename, bs)
-		//TODO 删除本地文件
-		return nil
-	})
+		if !fi.IsDir() {
+			log.Println(jsonpath, "不是一个目录")
+			return
+		}
+		filepath.Walk(jsonpath, func(path string, info os.FileInfo, err error) error {
+			if info.IsDir() || strings.LastIndex(info.Name(), "sync") > 0 {
+				return nil
+			}
+			filename := info.Name()
+			fi, _ := os.Open(path)
+			bs, _ := ioutil.ReadAll(fi)
+			fi.Close()
+			go transfer(path, filename, bs)
+			//TODO 删除本地文件
+			return nil
+		})
+	}, func(e interface{}) {})
 }
 
 //发文件,失败后并尝试重试发送
 func transfer(path string, filename string, data []byte) {
-	pool <- true
-	defer func() {
-		<-pool
-	}()
-	i := 0
-	for i < 2 {
-		i++
+	util.Try(func() {
+		pool <- true
+		defer func() {
+			<-pool
+		}()
 		client, err := rpc.DialHTTP("tcp", rpcaddr)
 		defer client.Close()
-		if err != nil {
-			log.Println(err.Error())
-			time.Sleep(2 * time.Minute)
-			continue
-		}
-		param := &TrsDataParam{FileName: filename, FileData: data}
-		reply := 0
-		err = client.Call("TrsDataTransfer.TransferFile", param, &reply)
-		if err != nil {
-			log.Println(err.Error())
-			time.Sleep(2 * time.Minute)
-			continue
-		} else {
-			if reply == 1 {
-				move(path, jsonpath+"_back/"+filename)
+		if err == nil {
+			param := &TrsDataParam{FileName: filename, FileData: data}
+			reply := 0
+			err = client.Call("TrsDataTransfer.TransferFile", param, &reply)
+			if err != nil {
+				log.Println(err.Error())
+			} else {
+				if reply == 1 {
+					move(path, jsonpath+"_back/"+filename)
+				}
 			}
 		}
-		break
-	}
+	}, func(e interface{}) {})
 }
 
 func delFile() {
-	client, err := rpc.DialHTTP("tcp", rpcaddr)
-	defer client.Close()
-	if err == nil {
-		param := &TrsDataParam{}
-		reply := make([]string, 10)
-		err := client.Call("TrsDataTransfer.DelFileList", param, &reply)
-		if err != nil {
-			log.Println(err.Error())
-			time.Sleep(1 * time.Minute)
-		} else {
-			for _, v := range reply {
-				del(jsonpath + "_back/" + v)
+	util.Try(func() {
+		client, err := rpc.DialHTTP("tcp", rpcaddr)
+		defer client.Close()
+		if err == nil {
+			param := &TrsDataParam{}
+			reply := make([]string, 10)
+			err := client.Call("TrsDataTransfer.DelFileList", param, &reply)
+			if err != nil {
+				log.Println(err.Error())
+				time.Sleep(1 * time.Minute)
+			} else {
+				for _, v := range reply {
+					del(jsonpath + "_back/" + v)
+				}
 			}
 		}
-	}
+	}, func(e interface{}) {})
+
 	time.AfterFunc(delduration*time.Minute, delFile)
 }
 

BIN
etl/server/src/trsserver/trsserver


+ 5 - 7
etl/server/src/trsserver/trsserver.go

@@ -31,8 +31,7 @@ func (i *TrsDataTransfer) TransferFile(param *TrsDataParam, reply *int) error {
 	log.Println(param.FileName)
 	tmp := []interface{}{}
 	err := json.Unmarshal([]byte(param.FileData), &tmp)
-	if err == nil {
-		c <- true
+	if err == nil && len(tmp) > 0 {
 		go TrsZtbSave(param.FileName, tmp)
 		*reply = 1
 	} else {
@@ -54,6 +53,7 @@ func (i *TrsDataTransfer) DelFileList(param *TrsDataParam, replys *[]string) err
 
 func TrsZtbSave(filename string, tmp []interface{}) {
 	util.Try(func() {
+		c <- true
 		session := mongodb.GetMgoConn()
 		defer mongodb.DestoryMongoConn(session)
 		defer func() {
@@ -79,11 +79,9 @@ func TrsZtbSave(filename string, tmp []interface{}) {
 	}, func(e interface{}) {
 		log.Println(e)
 	})
-	go func() {
-		Lock.Lock()
-		delStrings = append(delStrings, filename)
-		Lock.Unlock()
-	}()
+	Lock.Lock()
+	delStrings = append(delStrings, filename)
+	Lock.Unlock()
 }
 
 func main() {