瀏覽代碼

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

李广朋 9 年之前
父節點
當前提交
43db8ed5d0

+ 2 - 0
core/src/qfw/swordfish/swordfishmanage.go

@@ -75,6 +75,8 @@ func (s *SwordFish) RssSet() error {
 	list := getNewest()
 	s.T["list"] = list
 	s.T["msgset"] = msgset
+	s.T["searchtype"] = s.GetString("searchtype")
+	s.T["searchvalue"] = s.GetString("searchvalue")
 	return s.Render("/swordfish/rssset.html", &s.T)
 }
 

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

@@ -28,7 +28,7 @@ $(function(){
 		workCopyRight = copyright.WorkCopyRight;
 		workCopyRightFlag = typeof(workCopyRight) != "undefined" && workCopyRight != null;
 		//软件
-		computerSoftCopyRight = copyright.ComputerSoftCopyRight;
+		computerSoftCopyRight = copyright.SoftWareCopyRight;
 		computerSoftCopyRightFlag = typeof(computerSoftCopyRight) != "undefined" && computerSoftCopyRight != null;
 		//专利
 		patent = copyright.Patent;
@@ -356,9 +356,9 @@ function CopyrightEntity(){
 			if(patentFlag){
 				$("#patentList .badge").text(patent.length);
 				patent.sort(function(a,b){
-					if(a.PublicDate<b.PublicDate){
+					if(a.publicdate<b.publicdate){
 						return 1;
-					}else if(a.PublicDate==b.PublicDate){
+					}else if(a.publicdate==b.publicdate){
 						return 0;
 					}
 					return -1;
@@ -366,14 +366,14 @@ function CopyrightEntity(){
 				var frontPaging = new FrontPaging("patentListPaging",patent,5,function(r){
 					var hm = '';
 					for(var i=0;i<r.length;i++){
-						hm += '<tr><td><div class="b-com-first">'+(r[i].PatentName?r[i].PatentName:"")+'</div>'
+						hm += '<tr><td><div class="b-com-first">'+(r[i].patentname?r[i].patentname:"")+'</div>'
 							+'<div class="b-com-second"><div>'
-							+'<span>申请人:'+(r[i].ApplyPerson?r[i].ApplyPerson:"")+'</span>'
-							+'<span>申请号:'+(r[i].ApplyNo?r[i].ApplyNo:"")+'</span>'
-							+'<span>申请日期:'+(r[i].ApplyDate?r[i].ApplyDate.replace(/\./g,"-"):"")+'</span>'
-							+'</div><span>分类号:'+(r[i].IpcTypeNo?r[i].IpcTypeNo:"")+'</span>'
-							+'<span>公开号:'+(r[i].PublicNo?r[i].PublicNo:"")+'</span>'
-							+'<span>公开日期:'+(r[i].PublicDate?r[i].PublicDate.replace(/\./g,"-"):"")+'</span>'
+							+'<span>申请人:'+(r[i].applyperson?r[i].applyperson:"")+'</span>'
+							+'<span>申请号:'+(r[i].applyno?r[i].applyno:"")+'</span>'
+							+'<span>申请日期:'+(r[i].applydate?r[i].applydate.replace(/\./g,"-"):"")+'</span>'
+							+'</div><span>分类号:'+(r[i].ipctypeno?r[i].ipctypeno:"")+'</span>'
+							+'<span>公开号:'+(r[i].publicno?r[i].publicno:"")+'</span>'
+							+'<span>公开日期:'+(r[i].publicdate?r[i].publicdate.replace(/\./g,"-"):"")+'</span>'
 							+'</div></td></tr>';
 					}
 					$("#patentListPaging").parent().prevAll().remove();

+ 43 - 39
core/src/web/staticres/wxswordfish/main.js

@@ -248,7 +248,7 @@ function showAlls(){
 							alert("请稍后再试"+st)
 						}
 					})
-					window.location.reload()
+					window.location.href="/swordfish/page";
 				})
 				$("html,body").addClass("overflow-hidden");
 			})
@@ -281,7 +281,7 @@ function showAlls(){
 						alert("请稍后再试"+st)
 					}
 				})
-				window.location.reload()
+				window.location.href="/swordfish/page";
 		})
 		$("#txt_tip").text(contents+strs)
 		$(".visible").show()
@@ -464,7 +464,7 @@ $(function(){
 			liobj.next(".child-node").find("li:eq(1)").append('<div class="com-last">全国</div>');
 		}
 	}
-	var setKeyWord = function(type,keys,searchnameIsExsit){
+	var setKeyWord = function(type,keys){
 		if(typeof(keys) == "undefined" || keys.length == 0){
 			return;
 		}
@@ -472,13 +472,7 @@ $(function(){
 			keys[i] = keys[i].replace(/\+/g," ");
 			KeyWordDialog.AppendNode($("#"+type+"-keyword"),keys[i]);
 		}
-		if(!searchnameIsExsit){
-			$("#"+type+"-content li:first .com-last").remove();
-			$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
-			commonAjaxReq($("#tender-keyword"),type);
-		}else{
-			$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
-		}
+		$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
 	}
 	var setScope = function(type,scope){
 		var dialogObj = $("#"+type+"-scope");
@@ -504,6 +498,36 @@ $(function(){
 	}
 	$("body").append($("#tender-keyword").clone().removeAttr("id").attr("id","bid-keyword"))
 			.append($("#tender-scope").clone().removeAttr("id").attr("id","bid-scope"));
+	var searchnameIsExsit = false;
+	if(msgset == ""){
+		if(typeof(searchname) != "undefined" && searchname.length > 0 ){
+			msgset = {};
+			msgset[s_type] = {"a_key":[searchname],"s_scope":"A"};
+		}
+	}else{
+		if (typeof(searchname) != "undefined" && searchname.length > 0 ){
+			if(typeof(msgset[s_type]) != "undefined"){
+				var keywordes = msgset[s_type].a_key;
+				if(typeof(keywordes) != "undefined" && keywordes.length > 0){
+					for(var i=0;i<keywordes.length;i++){
+						var keywordesArr = keywordes[i].split("+");
+						for(var k=0;k<keywordesArr.length;k++){
+							if(keywordesArr[k] == searchname){
+								searchnameIsExsit = true;
+							}
+						}
+					}
+					if(!searchnameIsExsit){
+						keywordes.push(searchname);
+					}
+				}else{
+					msgset[s_type]["a_key"] = [searchname];
+				}
+			}else{
+				msgset[s_type] = {"a_key":[searchname]};
+			}
+		}
+	}
 	if(typeof(msgset.tender) != "undefined"){
 		setKeyWord("tender",msgset.tender.a_key,false);
 		setScope("tender",msgset.tender.s_scope);
@@ -540,9 +564,17 @@ $(function(){
 			turnOn($(this));
 		}
 		//判断是不是开,是开再判断是不是在有效期内,如果不在有效期内,则进行提示并存快照
-		
 		commonAjaxReq(null,$(this).attr("v"));
 	});
+	//直接订阅带过来的关键字不存在
+	if(typeof(searchname) != "undefined" && searchname.length > 0){
+		//自动打开
+		if(!$("#"+s_type +"-on-off").hasClass("open")){
+			$("#"+s_type+"-on-off").click();
+		}else if(!searchnameIsExsit){//修改关键词
+			commonAjaxReq($("#"+s_type+"-keyword"),s_type);
+		}
+	}
 	//收费规则
 	$(".rule").closest(".parent-node").click(function(){
 		$(".credit-dialog").show();
@@ -587,32 +619,4 @@ $(function(){
 			alert("请输入关键字后预览。")
 		}
 	})
-	if (typeof(searchname) != "undefined" && searchname.length > 0 ){
-		if(typeof(msgset[s_type]) != "undefined"){
-			var keywordes = msgset[s_type].a_key
-			if(keywordes && keywordes.length > 0){
-				var searchnameIsExsit = false;
-				for(var i=0;i<keywordes.length;i++){
-					var keywordesArr = keywordes[i].split("+");
-					for(var k=0;k<keywordesArr.length;k++){
-						if(keywordesArr[k] == searchname){
-							searchnameIsExsit = true;
-						}
-					}
-				}
-				if(!searchnameIsExsit){
-					keywordes.push(searchname);
-				}
-			}else{
-				keywordes.push(searchname)
-			}
-			
-		}else{
-			keywordes.push(searchname);
-		}
-		setKeyWord(s_type,keywordes,searchnameIsExsit);
-		if(!$("#"+s_type +"-on-off").hasClass("open")){
-			$("#"+s_type+"-on-off").click();
-		}
-	}
 });

+ 49 - 0
core/src/web/templates/swordfish/rssset.html

@@ -302,6 +302,15 @@
 <!-- 底部 -->
 {{include "/common/bottom.html"}}
 <script type="text/javascript">
+var searchtype = {{.T.searchtype}};
+if(searchtype == "1"){
+	searchtype = "tender";
+}else if(searchtype == "2"){
+	searchtype = "bid";
+}else{
+	searchtype = "";
+}
+var searchvalue = {{.T.searchvalue}};
 //Array.prototype.indexOf = function (val) {for (var i = 0; i < this.length; i++) {if (this[i] == val) {return i;}} return -1;};  
 //Array.prototype.removevalue = function (val){var index=this.indexOf(val);if(index > -1){this.splice(index, 1);}}; 
 var oprarr = new Array();
@@ -337,6 +346,36 @@ $(function(){
 		}
 	}
 	var msgset = {{.T.msgset}};
+	var searchvalueIsExsit = false;
+	if(msgset == ""){
+		if(typeof(searchvalue) != "undefined" && searchvalue.length > 0 ){
+			msgset = {};
+			msgset[searchtype] = {"a_key":[searchvalue],"s_scope":"A"};
+		}
+	}else{
+		if (typeof(searchvalue) != "undefined" && searchvalue.length > 0 ){
+			if(typeof(msgset[searchtype]) != "undefined"){
+				var keywordes = msgset[searchtype].a_key;
+				if(typeof(keywordes) != "undefined" && keywordes.length > 0){
+					for(var i=0;i<keywordes.length;i++){
+						var keywordesArr = keywordes[i].split("+");
+						for(var k=0;k<keywordesArr.length;k++){
+							if(keywordesArr[k] == searchvalue){
+								searchvalueIsExsit = true;
+							}
+						}
+					}
+					if(!searchvalueIsExsit){
+						keywordes.push(searchvalue);
+					}
+				}else{
+					msgset[searchtype]["a_key"] = [searchvalue];
+				}
+			}else{
+				msgset[searchtype] = {"a_key":[searchvalue]};
+			}
+		}
+	}
 	if(msgset != ""){
 		if(typeof(msgset.tender) != "undefined"){
 			selectScope("tender",msgset.tender.s_scope);
@@ -418,6 +457,16 @@ $(function(){
 		$(this).hide();
 		ajaxReq();
 	});
+	//直接订阅带过来的关键字不存在
+	
+	if(typeof(searchvalue) != "undefined" && searchvalue.length > 0){
+		//自动打开
+		if($("#"+searchtype+" .swordfish-checked").is(":hidden")){
+			$("#"+searchtype+" .swordfish-uncheck").click();
+		}else if(!searchvalueIsExsit){//修改关键词
+			ajaxReq();
+		}
+	}
 	//针对页面异常关闭
 	if(typeof(msgset.tender) != "undefined"&&typeof(msgset.tender.i_switchstatus) != "undefined"&&msgset.tender.i_switchstatus==1){
 		if(tender_i_status==0){

+ 6 - 2
core/src/web/templates/swordfish/searchinfolist.html

@@ -309,10 +309,14 @@ $(function(){
 				</div>
 			</div>
 		</div>
+		<form action="/member/swordfish/rssset" method="post" id="goToRsssetForm">
+		<input type="hidden" name="searchtype" value="{{.T.s_type}}"/>
+		<input type="hidden" name="searchvalue" value="{{.T.keywords}}"/>
 		<div id="searchts" class="text-center hidden">
-		<div class="dybtn"  onClick="window.location.href='/member/swordfish/rssset';">订阅</div>
+		<div class="dybtn" onclick="document.getElementById('goToRsssetForm').submit()">订阅</div>
 		<div>确认该关键词查询结果无误</div>
-		</div>	
+		</div>
+		</form>	
 	</div>
 	<div class="b-right swordfish-qrcode text-center">
 		<img src="/images/swordfish/qrcode.png">

+ 2 - 1
core/src/web/templates/swordfish/wxinfocontent.html

@@ -21,7 +21,6 @@ body{
 	padding:0;
 	color: #333;
 	padding-bottom: 50px;
-	font-size:14px;
 	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
 }
 pre {
@@ -29,6 +28,7 @@ pre {
 	word-wrap: break-word;
 	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
 	color:#5E6060;
+	font-size:14px;
 }
 .content{
 	padding:5px;
@@ -38,6 +38,7 @@ pre {
 }
 .abs{
 	height:35px;
+	font-size:14px;
 	line-height:35px;
 	text-overflow:ellipsis;
     white-space:nowrap;

+ 1 - 2
core/src/web/templates/swordfish/wxsearchlist.html

@@ -312,7 +312,6 @@ body{
 <div class="rescontent">
 	
 </div>
-<div style="height:80px;"></div>
 
 </div>
 <div class="resbm" >
@@ -326,7 +325,7 @@ body{
 
 <div class="nullcontent text-center  hidden">
 <div >
-<img style="width:137px;margin-top:160px;" src="{{Msg "seo" "cdn"}}/images/findnull.png">
+<img style="width:137px;margin-top:20px;" src="{{Msg "seo" "cdn"}}/images/findnull.png">
 </div>
 <div>没有找到和该关键词匹配的信息</div>
 </div>

+ 1 - 1
core/src/web/templates/swordfish/wxtoolbar.html

@@ -113,7 +113,7 @@ $(function(){
 			obj.removeClass("active");
 		},100);
 	});
-	$("body").click(function(e){
+	$("body").on("touchstart",function(e){
 		if(e.target.id != "toolbar-list"){
 			$(".toolbar-popover").hide();
 		}

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

@@ -132,7 +132,7 @@
 		<li class="ent-active"><div class="b-com-border-top"></div>{{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><div class="b-com-border-top"></div>关系网</li>
 		<li{{if not .T.res.staffinfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>主要人员<front class="badge" id="ent-tab-staffinfo">0</front></li>
-		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.ComputerSoftCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}><div class="b-com-border-top"></div>著作权<front class="badge" id="ent-tab-copyright">0</front></li>
+		<li{{if and (not .T.copyright.WorkCopyRight) (not .T.copyright.SoftWareCopyRight) (not .T.copyright.Patent)}} class="disabled"{{end}}><div class="b-com-border-top"></div>著作权<front class="badge" id="ent-tab-copyright">0</front></li>
 		<li{{if not .T.res.alterInfo}} class="disabled"{{end}}><div class="b-com-border-top"></div>变更信息<front class="badge{{if .T.res.alterInfo}}{{if eq (len .T.res.alterInfo) 0}} disabled{{end}}{{else}} disabled{{end}}">{{if .T.res.alterInfo}}{{len .T.res.alterInfo}}{{else}}0{{end}}</front></li>
 		<li{{if not .T.dishonesty.count}} class="disabled"{{end}}><div class="b-com-border-top"></div>失信信息<front class="badge" id="ent-tab-dishonesty">0</front></li>
 		<li class="{{if and (not .T.service.count) (not .T.res.s_synopsis)}}disabled {{end}}border-r-0"><div class="b-com-border-top"></div>{{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>
@@ -340,7 +340,7 @@
 		<!--著作权-->
 		<div class="ent-copyright hide">
 			<!--计算机软件著作权信息-->
-			{{if .T.copyright.ComputerSoftCopyRight}}
+			{{if .T.copyright.SoftWareCopyRight}}
 			<div class="ent-layout-down" id="computerSoftCopyRightList">
 				<div class="b-com-title">
 					<span><span class="bootstrap-glyphicon glyphicon-menu-right"></span></span>计算机软件著作权信息<front class="badge">0</front>