wangchuanjin 9 vuotta sitten
vanhempi
commit
20e1637aec

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

@@ -231,6 +231,7 @@ func (yp *Yellowpage) Dosave() error {
 	flag := mongodb.Update(ESTYPE, "{'_id':'"+entid+"'}", &dataSet, false, false)
 	redis.Del("enterprise", "enterpriseInfo_"+entid)
 	redis.Del("enterprise", "enterpriseInfo_user_"+entid)
+	redis.DelByCodePattern("enterprise", "ipcity_*")
 	if !flag {
 		status = "n"
 		info = "保存信息失败"
@@ -639,6 +640,7 @@ func (yp *Yellowpage) UpdateEntLogo() error {
 	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.DelByCodePattern("enterprise", "ipcity_*")
 	if bol {
 		elastic.UpdateEntDoc(entid)
 		return yp.Write("y")

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

@@ -289,8 +289,8 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 			case "河南", "广西", "黑龙江", "青海", "西藏", "安徽", "山西":
 				ipcity = consts.Scode[tn.Region]
 				if len(ipcity) > 0 {
-					tmp_res := redis.Get("enterprise", ipcity+"_1")
-					tmp_pag := redis.Get("enterprise", ipcity+"_2")
+					tmp_res := redis.Get("enterprise", "ipcity_"+ipcity+"_1")
+					tmp_pag := redis.Get("enterprise", "ipcity_"+ipcity+"_2")
 					if nil != tmp_res && nil != tmp_pag {
 						tmp_res1, oks1 := tmp_res.([]interface{})
 						tmp_pag1, oks2 := tmp_pag.([]interface{})
@@ -580,8 +580,8 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 	pagination := front.MakePagination(perPage, currentPage, int(total), querymap, "/search/enterprise/"+reqType+"ent_%s.html")
 
 	if tempBisOne && len(ipcity) > 0 {
-		redis.Put("enterprise", ipcity+"_1", res, 5*86400)
-		redis.Put("enterprise", ipcity+"_2", pagination, 5*86400)
+		redis.Put("enterprise", "ipcity_"+ipcity+"_1", res, 5*86400)
+		redis.Put("enterprise", "ipcity_"+ipcity+"_2", pagination, 5*86400)
 	}
 	return &res, &pagination
 

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

@@ -105,7 +105,7 @@ var entType="企业"
 						<div class="two"><script>document.write(entType)</script>LOGO:</div> 
 						<div class="three" id="logoArea">
 							{{if .T.entinfo.s_avatar}}
-							<img class='ent-LOGO' src='{{.T.entinfo.s_avatar}}' onerror="$(this).next().removeClass('hide');$(this).remove();">
+							<img class='ent-LOGO cursor-pointer' src='{{.T.entinfo.s_avatar}}' onerror="$(this).next().removeClass('hide');$(this).remove();" onclick="document.getElementById('upload').click();">
 							{{end}}
 							<div{{if .T.entinfo.s_avatar}} class="hide"{{end}}>
 								<img src="/images/services/default.png" style="width: 90px; height: 90px;cursor: pointer;" onclick="document.getElementById('upload').click();">