Bläddra i källkod

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

wangshan 9 år sedan
förälder
incheckning
040fdf7c94

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
common/src/qfw/util/encrypt_test.go


+ 11 - 11
core/src/web/staticres/js/entportrait.js

@@ -66,7 +66,7 @@ $(function(){
 					}
 				}
 				verticalFlag = true;
-				hm+='<div><img src="/images/entcommunity/mainperson'+index+'.png">'
+				hm+='<div><img src="'+cdn+'/images/entcommunity/mainperson'+index+'.png">'
 					+'<span><font class="b-com-name">'+obj[i].Name+'</font><font class="ent-positionName">'+positionName+'</font></span></div>';
 				//竖线
 				if(tmp == maxCout && i != obj.length-1){
@@ -96,7 +96,7 @@ $(function(){
 	}
 	//联系地址
 	if($address){
-		loadJS("/js/jquery.cxselect.js",function(){
+		loadJS(cdn+"/js/jquery.cxselect.js",function(){
 			$('#city_china').cxSelect({
 				selects: ['province', 'city', 'area'],
 				required:0
@@ -158,7 +158,7 @@ $(function(){
 function initMap(){
 	//获取地图的经纬度
 	loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){
-		loadJS("/js/geocoder.js",function(){
+		loadJS(cdn+"/js/geocoder.js",function(){
 			doOptions();
 		});
 	});
@@ -208,10 +208,10 @@ function initRelation(){
 			}else{
 				$("#entrelation-limit,#entrelation-nologin").addClass("hide");
 				$(".entrelation").height($(".ent-tab-content").height());
-				loadJS("/js/d3.v3.min.js",function(){
-					loadJS("/js/geometry.js",function(){
-						loadJS("/js/provinceData.min.js",function(){
-							loadJS("/js/relation.js",function(){
+				loadJS(cdn+"/js/d3.v3.min.js",function(){
+					loadJS(cdn+"/js/geometry.js",function(){
+						loadJS(cdn+"/js/provinceData.min.js",function(){
+							loadJS(cdn+"/js/relation.js",function(){
 								relationEntity = new Relation(legcerNo,regNo,regCapCurName,relation);
 								relationEntity.init();
 							});
@@ -261,7 +261,7 @@ function initRelation(){
 function CopyrightEntity(){
 	//著作权
 	if(typeof(copyright) != "undefined" && copyright != null){
-		loadJS("/js/frontpaging.js",function(){
+		loadJS(cdn+"/js/frontpaging.js",function(){
 			var workCopyRight = copyright.WorkCopyRight;
 			if(typeof(workCopyRight) != "undefined" && workCopyRight != null){
 				workCopyRight.sort(function(a,b){
@@ -373,7 +373,7 @@ function ServicePaging(){
 				}
 				var flag = typeof(r[i].s_isshow) != "undefined" && r[i].s_isshow != null && r[i].s_isshow.indexOf("3")>-1;
 				html += '<tr>'
-						+'<td rowspan="2" width="130"><img src="'+(r[i].s_images==""?"null":r[i].s_images)+'" onerror="this.src=\'/images/services/default.png\'"></td>'
+						+'<td rowspan="2" width="130"><img src="'+(r[i].s_images==""?"null":(cdn+r[i].s_images))+'" onerror="this.src=\''+cdn+'/images/services/default.png\'"></td>'
 						+'<td class="b-com-name">';
 				if(flag){
 					html += '<a href="/market/detail/'+r[i]._id+'.html">';
@@ -409,7 +409,7 @@ function ServicePaging(){
 		this.initServiceList();
 	}else{
 		var thisClass = this;
-		loadJS("/js/paging.js",function(){
+		loadJS(cdn+"/js/paging.js",function(){
 			hasLoadPagingJs = true;
 			thisClass.initServiceList();
 		});
@@ -445,7 +445,7 @@ function DishonestyPaging(){
 		this.initDishonesty();
 	}else{
 		var thisClass = this;
-		loadJS("/js/paging.js",function(){
+		loadJS(cdn+"/js/paging.js",function(){
 			hasLoadPagingJs = true;
 			thisClass.initDishonesty();
 		});

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

@@ -204,7 +204,7 @@ $(function(){
 
 function makeData(d,_this,b){
 	var nodeId = "immediately";
-	if(_this.attr("name") == "entIndexSearch"){
+	if(_this.attr("id") == "entIndexSearch"){
 		nodeId += "_main";
 	}
 	var s=$("#"+nodeId);

+ 2 - 1
core/src/web/staticres/wxswordfish/style.css

@@ -131,11 +131,12 @@ img{
 	float: right;
 }
 .operation .child-node li>div:first-child{
-	color: #999;
+	
 }
 .operation .child-node .com-last{
 	font-size: 14px;
 	padding-top: 10px;
+	color: #999;
 }
 /*弹出框*/
 .dialog{

+ 2 - 2
core/src/web/templates/common/enthead.html

@@ -48,7 +48,7 @@ $(function (){
 	$("form#searchForm").submit(function(){
 		var input_val = $(this).children("[type='text']").val().replace(/^\s+|\s+$/g,"");
 		if (keyCode==13){
-	 		$("input[name='words']").val(input_val);
+	 		$(this).find("input[name='words']").val(input_val);
 			keyCode=0;
 			return true;
 		}
@@ -98,7 +98,7 @@ function scrollUp(id){
 function immediatelyInitCallBack(obj){
 	if(obj.attr("id") == "header-searchInput"){
 		$("#immediately").css({width:$("#immediately").width()-30,"left":"15px","top":"38px"});
-	}else if(obj.attr("name") == "entIndexSearch"){
+	}else if(obj.attr("id") == "entIndexSearch"){
 		$("#immediately_main").css("top","45");
 	}
 }

+ 5 - 6
core/src/web/templates/search/entcommunity.html

@@ -11,17 +11,17 @@
 {{include "/common/enthead.html"}}
 <div class="b-content container-fluid">
 	<div class="b-left">
-		<div class="ent-index-search">
+		<form class="ent-index-search" id="entIndexSearchForm" method="post" action="/search/enterprise/ent.html">
 			<div class="b-com-first">一个企业社区,就够了</div>
 			<div class="b-com-second">查企业,查企业失信信息,查企业变更,查你所想,无所不能...</div>
 			<div class="b-com-third input-group">
-				<input type="text" name="entIndexSearch" class="form-control" aria-describedby="search-btn">
+				<input type="text" name="words" id="entIndexSearch" class="form-control" aria-describedby="search-btn">
 				<span class="input-group-addon" id="search-btn"><span class="glyphicon sousuo"></span>查询</span>
 			</div>
 			<div class="b-com-fourth" id="hotsearchwords">
 				热搜词:{{$s:=(Ad "ent-hotsearchwords" 15)}}{{range $k,$v := $s}}<a href="/enterprise/{{$v.s_id}}.html">{{$v.s_remark}}</a>{{end}}
 			</div>
-		</div>
+		</form>
 		<div class="ent-index-recommend">
 			<div class="b-com-title">
 				<span class="glyphicon jianzhu"></span>推荐企业
@@ -54,7 +54,7 @@
 <script>
 $(function(){
 	//设置即时下拉
-	$("input[name='entIndexSearch']").attr("autocomplete","off").keyup(function(){
+	$("input[id='entIndexSearch']").attr("autocomplete","off").keyup(function(){
 		imFind(this)
 	}).focus(function(){
 		imFind(this)
@@ -64,8 +64,7 @@ $(function(){
 		},500);
 	});
 	$("#search-btn").click(function(){
-		$("input[name='words']").val($("input[name='entIndexSearch']").val());
-		$("form#searchForm").submit();
+		$("form#entIndexSearchForm").submit();
 	});
 	var ents = {{Ad "ent-recommend" 48}};
 	if(typeof(ents) != "undefined" && ents != null && ents.length > 0){

+ 8 - 32
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -13,7 +13,7 @@
 <div class="b-content container-fluid">
 	<!--企业名片-->
 	<div class="b-com-head">
-		<img src="{{if .T.res.s_avatar}}{{Msg "seo" "cdn"}}{{.T.res.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+		<img src="{{if .T.res.s_avatar}}{{Msg "seo" "cdn"}}{{.T.res.s_avatar}}{{else}}null{{end}}" onerror="this.src='{{Msg "seo" "cdn"}}/images/ent-logo.png'">
 		<div class="entinfo-cart">
 			<div class="b-com-first">
 				<font class="b-com-title">{{if .T.res.EntName}}{{.T.res.EntName}}{{end}}</font>
@@ -320,33 +320,6 @@
 		</div>
 		<div class="hide ent-mainperson">
 			<div class="ent-findnull hide">
-				<img src="/images/findnull.png" class="b-findnull">
-			</div>
-		</div>
-		<div class="hide">
-		{{if or .T.res.OpScope .T.res.s_synopsis}}
-			<div class="ent-layout-up">
-				<div class="b-com-title">
-					<span class="glyphicon jianzhu"></span>公司简介
-				</div>
-				<div class="b-com-content margin-0"></div>
-			</div>
-			<div class="ent-layout-down">
-				{{if .T.res.OpScope}}
-				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>经营范围
-				</div>
-				<div class="b-com-content">{{.T.res.OpScope}}</div>
-				{{end}}
-				{{if .T.res.s_synopsis}}
-				<div class="b-com-title">
-					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>公司介绍
-				</div>
-				<div class="b-com-content">{{.T.res.s_synopsis}}</div>
-				{{end}}
-			</div>
-			{{else}}
-			<div class="ent-findnull">
 				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
@@ -392,7 +365,7 @@
 			</div>
 			{{end}}
 			<div class="ent-findnull hide">
-				<img src="/images/findnull.png" class="b-findnull">
+				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
@@ -459,7 +432,7 @@
 				</div>
 			</div>
 			<div class="ent-findnull hide">
-				<img src="/images/findnull.png" class="b-findnull">
+				<img src="{{Msg "seo" "cdn"}}/images/findnull.png" class="b-findnull">
 				<h4>抱歉,未找到相关数据!</h4>
 			</div>
 		</div>
@@ -490,6 +463,7 @@
 			</div>
 		</div>
 	</div>
+	{{if or .T.relevantEnts .T.relevantNews}}
 	<div class="b-right">
 		{{if .T.relevantEnts}}
 		<div class="b-adver b-scroll-list">
@@ -499,7 +473,7 @@
 				{{range $k,$v := .T.relevantEnts}}
 					<li class="cursor-pointer{{if eq $k 0}} margin-0 border-t-0{{end}}" onclick="window.location.href='/enterprise/{{$v._id}}.html'">
 						<div>
-							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='/images/ent-logo.png'">
+							<img src="{{if $v.s_avatar}}{{$v.s_avatar}}{{else}}null{{end}}" onerror="this.src='{{Msg "seo" "cdn"}}/images/ent-logo.png'">
 							<a href="/enterprise/{{$v._id}}.html">{{$v.EntName}}</a>
 						</div>
 					</li>
@@ -523,7 +497,7 @@
 							if(!s_link.startWith("http://") && !s_link.startWith("https://")){
 								s_link = "http://"+s_link;
 							}
-							document.write('<span><img src="/images/swordfish/circle.png">'+l_comeintime+'</span><br><a href="'+s_link+'" target="_bank">{{$v.s_title}}</a></li>');
+							document.write('<span><img src="{{Msg "seo" "cdn"}}/images/swordfish/circle.png">'+l_comeintime+'</span><br><a href="'+s_link+'" target="_bank">{{$v.s_title}}</a></li>');
 						</script>
 					</li>
 				{{end}}
@@ -533,6 +507,7 @@
 		</div>
 		{{end}}
 	</div>
+	{{end}}
 </div>
 <!--显示地图信息-->
 <div id="mapshowdiv" class="white_content"></div>
@@ -541,6 +516,7 @@
 {{include "/common/bottom.html"}}
 </body>
 <script type="text/javascript">
+var cdn = {{Msg "seo" "cdn"}};
 var entId = {{.T.res._id}};
 var regNo = {{.T.res.RegNo}};
 var regCapCurName = {{.T.res.RegCapCurName}};

+ 8 - 8
credit/src/config.json

@@ -44,12 +44,12 @@
         "A2": -1000
     },
     "message": {
-        "swordfish_dueTitle": "剑鱼服务提醒",
-        "swordfish_due": "您的剑鱼服务%d天后到期,请及时续费。",
-        "swordfish_closeTitle": "剑鱼服务暂停提醒",
-        "swordfish_close": "您的剑鱼服务已经到期,已经暂停,请及时续费。",
-        "swordfish_payTitle": "剑鱼服务订单提醒",
-        "swordfish_pay": "您已成功订阅剑鱼,扣除%d积分,剩余%d积分,剑鱼服务时长到:%s",
+        "swordfish_dueTitle": "剑鱼%s信息服务提醒",
+        "swordfish_due": "您的剑鱼%s信息服务将于%d天后到期。您的积分余额为%d,如果继续使用,到期后系统将会自动扣除1000积分,如果积分余额不足服务将会中止。电脑登录qmx.top查看用户中心-积分,了解如何通过做任务赚取积分。",
+        "swordfish_closeTitle": "剑鱼%s信息服务暂停提醒",
+        "swordfish_close": "您的剑鱼%s信息服务已到期,由于积分余额不足,系统已停止推送。电脑登录qmx.top查看用户中心-积分,了解如何通过做任务赚取积分。",
+        "swordfish_payTitle": "剑鱼%s信息服务订单提醒",
+        "swordfish_pay": "您已成功订阅剑鱼%s信息服务,扣除%d积分,剩余%d积分,服务时间至:%s",
         "give": "转赠提醒",
         "give_pay": "转赠扣除提醒",
         "recharge": "充值成功提醒",
@@ -81,8 +81,8 @@
         "txt_c3": "邀请用户",
         "txt_d1": "微信充值",
         "txt_e1": "二维码转入",
-        "txt_A1": "剑鱼招标",
-        "txt_A2": "剑鱼中标",
+        "txt_A1": "招标",
+        "txt_A2": "中标",
         "txt_B1": "转赠"
     },
     "smtp": {

+ 3 - 3
credit/src/main.go

@@ -235,7 +235,7 @@ func TimerSwordFishFromUser() {
 									//提示
 									for _, v := range swordfish_tipBeforeDays {
 										if v == sub64 {
-											creditrpc.SendMsgWebAndWx(swordfish_dueTitle+"["+creditrpc.Message["txt_"+code]+"]", fmt.Sprintf(swordfish_due, v), util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string))
+											creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_dueTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_due, creditrpc.Message["txt_"+code], v, tmp["i_credit"]), util.BsonIdToSId(tmp["_id"]), tmp["s_m_openid"].(string))
 										}
 									}
 								}
@@ -283,7 +283,7 @@ func doSubCreditByUser(userId, umid, typeName, code string, next *time.Time, use
 			}
 			if creditlog.Save(creditDoc) {
 				//发送微信通知扣积分成功
-				creditrpc.SendMsgWebAndWx(swordfish_payTitle+"["+creditrpc.Message["txt_"+code]+"]", fmt.Sprintf(swordfish_pay, -codeNum, restNum, util.FormatDate(&newDate, util.Date_Full_Layout)), userId, umid)
+				creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_payTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_pay, creditrpc.Message["txt_"+code], -codeNum, restNum, util.FormatDate(&newDate, util.Date_Full_Layout)), userId, umid)
 			}
 		} else { //暂停操作
 			//更新操作
@@ -294,7 +294,7 @@ func doSubCreditByUser(userId, umid, typeName, code string, next *time.Time, use
 				},
 			}, false, false) {
 				//暂停通知,因积分不够
-				creditrpc.SendMsgWebAndWx(swordfish_closeTitle+"["+creditrpc.Message["txt_"+code]+"]", swordfish_close, userId, umid)
+				creditrpc.SendMsgWebAndWx(fmt.Sprintf(swordfish_closeTitle, creditrpc.Message["txt_"+code]), fmt.Sprintf(swordfish_close, creditrpc.Message["txt_"+code]), userId, umid)
 			}
 		}
 	}, func(e interface{}) {

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

@@ -305,7 +305,7 @@ func (c *CreditRpc) OutCreadit(param *qrpc.CreditData, replay *int) error {
 			*replay = creditDoc["i_score"].(int)
 			//发送微信通知扣积分成功
 			if first == "A" {
-				go SendMsgWebAndWx(Message["swordfish_payTitle"]+"["+txt+"]", fmt.Sprintf(Message["swordfish_pay"], creditDoc["i_score"], creditDoc["i_scorenow"], util.FormatDate(&newDate, util.Date_Full_Layout)), param.Uid, param.Umid)
+				go SendMsgWebAndWx(fmt.Sprintf(Message["swordfish_payTitle"], txt), fmt.Sprintf(Message["swordfish_pay"], txt, creditDoc["i_score"], creditDoc["i_scorenow"], util.FormatDate(&newDate, util.Date_Full_Layout)), param.Uid, param.Umid)
 			}
 		}
 	}

Vissa filer visades inte eftersom för många filer har ändrats