Browse Source

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

李广朋 9 years ago
parent
commit
e3c3159d51

+ 1 - 1
core/src/qfw/manage/feedback.go

@@ -122,7 +122,7 @@ func (s *SystemManage) Updateback() error {
 		_id := s.GetString("id")
 		s_submitid := s.GetString("s_submitid")
 		opinion := s.GetString("s_opinion")
-		title := s.GetString("s_record")
+		title := s.GetString("s_remark")
 		if len(title) > 40 {
 			title = front.SubstrByByte(title, 40)
 		}

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

@@ -640,7 +640,7 @@ func (yp *Yellowpage) UpdateEntLogo() error {
 	//更新企业logo
 	entid := yp.GetSession("entid").(string)
 	bol := mongodb.Update("enterprise", "{'_id':'"+entid+"'}", map[string]interface{}{"$set": map[string]interface{}{"s_avatar": yp.GetString("url")}}, false, false)
-	redis.Del("enterprise", "enterpriseInfo_"+entid)
+	redis.Del("enterprise", "enterpriseInfo_"+entid, "newIndentEnts")
 	redis.DelByCodePattern("enterprise", "ipcity_*")
 	if bol {
 		elastic.UpdateEntDoc(entid)

+ 8 - 6
core/src/qfw/yellowpage/yellowpagemanager.go

@@ -293,6 +293,7 @@ func (yp *Yellowpage) EnterpriseInfo(id string) error {
 			yp.T["dishonesty"] = getDishonesty(util.If(info["LegCerNO"] != nil, info["LegCerNO"], "").(string), 1)
 			//服务列表第一页数据
 			yp.T["service"] = findServiceByEntId(id, 1, yp.Session())
+			log.Println(yp.T["service"])
 			//关系网数据
 			yp.T["relation"] = relation
 			contentuser, erruser := yp.Render4Cache("/yellowpage/enterpriseinfo.html", &yp.T)
@@ -560,18 +561,19 @@ func (yp *Yellowpage) GetDishonesty() error {
 	return nil
 }
 func getDishonesty(legcerNo string, currentPage int) map[string]interface{} {
-	var res map[string]interface{}
+	var limit int = 10
+	if strings.Trim(legcerNo, " ") == "" {
+		return map[string]interface{}{"list": []map[string]interface{}{}, "count": 0, "pageSize": limit}
+	}
 	if ret := redis.Get("enterprise", "dishonesty-"+legcerNo+"-"+fmt.Sprint(currentPage)); ret != nil {
-		res = ret.(map[string]interface{})
+		return ret.(map[string]interface{})
 	} else {
-		limit := 10
 		start := (currentPage - 1) * limit
 		count := Count("laolai", `{"s_cardnum":"`+legcerNo+`"}`)
 		r := Find("laolai", `{"s_cardnum":"`+legcerNo+`"}`, `{"l_date":-1}`, `{"l_date":1,"iname":1,"court_name":1,"case_code":1,"performance":1}`, false, start, limit)
-		res = map[string]interface{}{"list": r, "count": count, "pageSize": limit}
-		redis.Put("enterprise", "dishonesty-"+legcerNo+"-"+fmt.Sprint(currentPage), res, 7*24*60*60)
+		redis.Put("enterprise", "dishonesty-"+legcerNo+"-"+fmt.Sprint(currentPage), r, 7*24*60*60)
+		return map[string]interface{}{"list": r, "count": count, "pageSize": limit}
 	}
-	return res
 }
 func (yp *Yellowpage) FindServiceByEntId() error {
 	if yp.Method() == "POST" {

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-10 10:08:18"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-10 10:08:18"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-15 10:42:53"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-15 10:42:53"}},"marketisstart":true,"marketrate":300}

+ 9 - 5
core/src/web/staticres/js/qfw.js

@@ -271,12 +271,16 @@ function makeImmediately(data,b){
 	if(data&&data.length>0&&!(typeof data == "string")){
 		for(var i=0;i<data.length;i++){
 			var ds=data[i].split("_")
-			//res+="<div onclick='iq(this)'>"+ds[0]+"</div>"
-			if($("#loginStatus").length == 1){
-				res+="<div onclick='window.open(\"/wx/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
-			}else{
-				res+="<div onclick='window.open(\"/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
+			//res+="<div onclick=''>"+ds[0]+"</div>"
+			var clickVal = "iq(this)";
+			if(!b){
+				if($("#loginStatus").length == 1){
+					clickVal = "window.open('/wx/enterprise/"+ds[1]+".html')";
+				}else{
+					clickVal = "window.open('/enterprise/"+ds[1]+".html')";
+				}
 			}
+			res+='<div onclick="'+clickVal+'">'+ds[0]+'</div>';
 		}
 		if(b){
 			res+=delLog

+ 1 - 0
core/src/web/templates/manage/feedbackcontent.html

@@ -42,6 +42,7 @@ background-color:#FFFFFF;
 		<form class="registerform form-horizontal" role="form" id="updateback" method="post">
 		<input name="s_submitid" id="s_submitid" class="form-control" value="{{.T.s_submitid}}" style="display:none;"/>
 		<input name="s_submitname" id="s_submitname" class="form-control"  value="{{.T.s_submitname}}" style="display:none;"/>
+		<input name="s_remark" id="s_remark" class="form-control" value="{{.T.s_remark}}" style="display:none;"/>
 		<div class="form-group">
         <label id="col-sm-2" class="col-sm-2 control-label" for="name">问题类型:</label>
 	    <div class="col-sm-2">

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

@@ -188,7 +188,7 @@ font-weight:normal;
 		<div style="margin:15px 0px 0px 3px;"><a target="_blank" href="/front/webcontent/{{index $v "_id"}}.html" style="font-weight: bold; font-size: 16px;">{{index $v "s_title"}}</a></div>
 		<div class="form-group" style="margin-top:10px;height: 90px;" >
         <div class="col-sm-3 control-label" for="name">
-		<img class="newListImg" style="width:150px;height:90px; padding:2px;" src="{{if (index $v "s_pic1")}}{{index $v "s_pic1"}}{{else}}{{index $v "s_pic"}}{{end}}"/>
+		<img class="newListImg" style="width:150px;height:90px; padding:2px;" src="{{if (index $v "s_pic1")}}{{index $v "s_pic1"}}{{else}}/images/services/default.png{{end}}"/>
 		</div>
 	    <div class="col-sm-9 control-label" for="name" id="newsdiv">
 		<div class="newsdiv1">{{if eq (index $v "s_content") ""}}{{index $v "s_description"}}{{else}}{{index $v "s_content"}}{{end}}</div>

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

@@ -227,7 +227,7 @@ var option={
 			 	dataType: "text",
 			  	success: function(result){
 					if (result == "y"){
-						$("#logoArea").html("<img class='ent-LOGO' src='"+data.url+"'>");
+						$("#logoArea").html('<img class="ent-LOGO cursor-pointer" src="'+data.url+'" onclick="document.getElementById(\'upload\').click();">');
 					}else{
 						alert("上传LOGO失败,请重新上传。");
 					}

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

@@ -114,8 +114,8 @@
 												<span class="margin-l-15"><font class="b-disabled">法定代表人:</font><font  class="lineb " >{{index $v "LeRep"}}</font></span>
 											{{end}}
 										{{end}}
-										{{if index $v "RegCap"}}
-											{{if and (ne $v.RegCapEntType "9600") (ne $v.RegCapEntType "5810")}}
+										{{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")}}
 												<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}}

+ 4 - 4
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -122,8 +122,8 @@
 		<li>关系网</li>
 		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}>主要人员</li>
 		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}>变更信息</li>
-		<li{{if eq .T.dishonesty.count 0}} class="disabled"{{end}}>失信信息</li>
-		<li class="{{if and (not .T.res.s_synopsis) (eq .T.service.count 0)}}disabled {{end}}border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
+		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}>失信信息</li>
+		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0">{{if eq .T.res.s_action "01"}}企业{{else if eq .T.res.s_action "02"}}商家{{else if eq .T.res.s_action "03"}}机构{{else}}企业{{end}}黄页</li>
 	</ul>
 	<div class="ent-tab-content b-left">
 		<div>
@@ -184,8 +184,8 @@
 						<!--注册资本-->
 						<div class="entinfo-regcap">
 							<div>
-							{{if .T.res.RegCap}}
-								{{if and (ne .T.res.EntType "9600") (ne .T.res.EntType "5810")}}
+							{{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")}}
 									<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}}

+ 7 - 3
weixin/src/qfw/weixin/voicehandler.go

@@ -29,11 +29,11 @@ func MsgVoiceHandler(w ResponseWriter, r *Request) {
 			arts := []Article{}
 			for _, item := range ret {
 				url := fmt.Sprintf("http://%s/enterprise/%s.html", wf.SysConfig.Domain, item["_id"])
-				arts = append(arts, Article{Title: item["EntName"], Url: url})
+				arts = append(arts, Article{Title: item["EntName"], Url: url, PicUrl: item["s_avatar"]})
 			}
 			w.ReplyNews(arts)
 		}
-	}  
+	}
 }
 
 //查询企业
@@ -55,7 +55,7 @@ func findEntprise(keyword string) (ret []ItemMap, err error) {
 		  },
 		  "from": 0,
 		  "size": 5,
-		  "_source":["_id","EntName","EntTypeName","OpLocDistrictName"]
+		  "_source":["_id","EntName","EntTypeName","OpLocDistrictName","s_avatar"]
 		}`
 	client := elastic.GetEsConn()
 	defer elastic.DestoryEsConn(client)
@@ -77,6 +77,10 @@ func findEntprise(keyword string) (ret []ItemMap, err error) {
 			tmp["EntName"] = res["EntName"].(string)
 			tmp["EntTypeName"] = res["EntTypeName"].(string)
 			tmp["OpLocDistrictName"] = res["OpLocDistrictName"].(string)
+			s_avatar := res["s_avatar"]
+			if s_avatar != nil && s_avatar != "" {
+				tmp["s_avatar"] = s_avatar.(string)
+			}
 			ret = append(ret, tmp)
 		}
 	}