|
@@ -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){
|
|
@@ -482,13 +531,13 @@ function appendKeyWord(type,value,isFocus){
|
|
|
this.getHtml = function(index,value){
|
|
|
var html='<div class="swordfish-keyword">'
|
|
|
+'<lable>关键词<font>'+index+'</font>:</lable>'
|
|
|
- +'<input type="text" class="form-control" value="'+(value?value:"")+'" placeholder="示例:综合布线 电话线 网线" maxlength="100">'
|
|
|
+ +'<input type="text" class="form-control" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100">'
|
|
|
+'<img src="{{Msg "seo" "cdn"}}/images/swordfish/delete.png">'
|
|
|
+'</div>';
|
|
|
if (index==1){
|
|
|
html='<div class="swordfish-keyword">'
|
|
|
+'<lable>关键词<font>'+index+'</font>:</lable>'
|
|
|
- +'<input type="text" class="form-control" value="'+(value?value:"")+'" placeholder="示例:综合布线 电话线 网线" maxlength="100">'
|
|
|
+ +'<input type="text" class="form-control" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100">'
|
|
|
+'</div>';
|
|
|
}
|
|
|
return html;
|
|
@@ -616,7 +665,7 @@ function swordfishpay(oprtype){
|
|
|
alert("请稍后再试"+st)
|
|
|
}
|
|
|
})
|
|
|
- window.location.reload()
|
|
|
+ window.location.href="/member/swordfish/rssset";
|
|
|
}
|
|
|
//弹窗关闭,取消
|
|
|
$('#tishiModal').on('hidden.bs.modal', function () {
|