|
@@ -102,7 +102,7 @@
|
|
|
<div class="p_box_tit cf"><p class="fl p_box_titl">搜索结果</p></div>
|
|
|
<div class="pd10 pf_list">
|
|
|
<ul>
|
|
|
- <li v-for=" item,index in newsleisL" :key="item.newsId">
|
|
|
+ <li v-for=" item,index in newsleisL" :key="item.newsId" @click="nhueyfr(item.newsId,item)">
|
|
|
<a href="#" class="cf">
|
|
|
<div class="fl">
|
|
|
<h1 v-html="item.newsTitle"></h1>
|
|
@@ -155,25 +155,32 @@
|
|
|
nhyuese:true
|
|
|
},
|
|
|
created() {
|
|
|
- console.log(234)
|
|
|
// this.getdataTime()
|
|
|
this.gettablist()
|
|
|
// Vue.$forceUpdate();
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log(this.getQueryString("id") == '')
|
|
|
+ // console.log(this.getQueryString("id") == '')
|
|
|
let search = location.search;
|
|
|
let arrd = search.split("?");
|
|
|
- console.log(decodeURI(arrd[1]));//学历
|
|
|
+ // console.log(decodeURI(arrd[1]));//学历
|
|
|
if(arrd !== ''){
|
|
|
this.valdes.newsTitle = decodeURI(arrd[1])
|
|
|
}
|
|
|
|
|
|
// console.log(this.getQueryString("title"))
|
|
|
- console.log(this.valdes)
|
|
|
+ // console.log(this.valdes)
|
|
|
this.gettablists(this.valdes)
|
|
|
},
|
|
|
methods:{
|
|
|
+ // 跳转详情页面
|
|
|
+ nhueyfr(index,e){
|
|
|
+ if(e&&e.reprintUrl){
|
|
|
+ window.location.href=e.reprintUrl
|
|
|
+ }else if(e&&index){
|
|
|
+ window.location.href="jgjj.html?id=" + index
|
|
|
+ }
|
|
|
+ },
|
|
|
gettablists(val){
|
|
|
var that = this
|
|
|
$.ajax({
|
|
@@ -186,14 +193,14 @@
|
|
|
if(res.rows.length !== 0){
|
|
|
res.rows.filter(rou =>{
|
|
|
rou.times = rou.createTime.slice(0,10).split('-')[1]
|
|
|
- console.log(rou.createTime.slice(0,10).split('-')[1])
|
|
|
+ // console.log(rou.createTime.slice(0,10).split('-')[1])
|
|
|
if(rou.newsTitle !== null){
|
|
|
rou.newsTitle = that.hfeys(rou.newsTitle)
|
|
|
}
|
|
|
if(rou.newsContent !== null){
|
|
|
rou.newsContent = that.hfeys(rou.newsContent)
|
|
|
}
|
|
|
- console.log(rou.newsTitle)
|
|
|
+ // console.log(rou.newsTitle)
|
|
|
})
|
|
|
}else{
|
|
|
hyews=[{newsTitle:'暂无数据',newsContent:'暂无数据',createTime:'暂无数据'}]
|
|
@@ -205,11 +212,8 @@
|
|
|
if(that.total>0){
|
|
|
that.nhyuese = true
|
|
|
}else{
|
|
|
- console.log(345)
|
|
|
that.nhyuese = false
|
|
|
}
|
|
|
- console.log(that.nhyuese)
|
|
|
- console.log(that.newsleisL,765)
|
|
|
// that.hyew = true
|
|
|
}else{
|
|
|
that.$message({
|
|
@@ -217,7 +221,6 @@
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
- console.log(that.tablide,765)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -229,7 +232,6 @@
|
|
|
data:'',
|
|
|
dataType:'json',
|
|
|
success:function(res){
|
|
|
- console.log(res,765)
|
|
|
if(res.code == 200){
|
|
|
that.tablide = res.data
|
|
|
that.hyew = true
|
|
@@ -239,15 +241,12 @@
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
- console.log(that.tablide,765)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
inpubie(){
|
|
|
- console.log(this.inpute)
|
|
|
},
|
|
|
nhyesee(){
|
|
|
- console.log(this.inpute)
|
|
|
this.valdes.newsTitle = this.inpute
|
|
|
this.gettablists(this.valdes)
|
|
|
},
|
|
@@ -255,9 +254,7 @@
|
|
|
this.nue = index
|
|
|
if(val == "首页"){
|
|
|
window.location.href = "index.html?ntitel=首页"
|
|
|
- console.log(2335)
|
|
|
}
|
|
|
- console.log(index,val)
|
|
|
},
|
|
|
jeuese(index,val){
|
|
|
// console.log(index)
|
|
@@ -271,7 +268,6 @@
|
|
|
// window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr + '&openMode=' + index.openMode
|
|
|
},
|
|
|
dheyfr(val){
|
|
|
- console.log(val)
|
|
|
this.hyesfr = val
|
|
|
},
|
|
|
// 获取路由参数
|
|
@@ -279,7 +275,6 @@
|
|
|
try {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
|
|
var r = window.location.href.split('?')[1].match(reg);
|
|
|
- console.log(reg,r)
|
|
|
if(r != null) {
|
|
|
return r[2];
|
|
|
}
|
|
@@ -290,7 +285,6 @@
|
|
|
},
|
|
|
hfeys(nju){
|
|
|
var that = this
|
|
|
- console.log(nju,654)
|
|
|
if (that.valdes.newsTitle && that.valdes.newsTitle.length > 0) {
|
|
|
// 匹配关键字正则
|
|
|
let replaceReg = new RegExp(that.valdes.newsTitle, 'g');
|
|
@@ -306,7 +300,6 @@
|
|
|
|
|
|
},
|
|
|
handleCurrentChange(){
|
|
|
- console.log(val,34)
|
|
|
this.valdes.pageNum = val
|
|
|
this.gettablists(this.valdes)
|
|
|
}
|