查看附件
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="item" v-for="(item,index) in newsList" :key="index" v-if="newsList.length">
|
||||
<div class="item" v-for="(item,index) in newsList" :key="index" v-if="newsList.length" @click="toDetail(item.id)">
|
||||
<div class="left">
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p><span>通知公告</span>{{ item.createTime }}</p>
|
||||
@@ -63,7 +63,6 @@
|
||||
},
|
||||
|
||||
onLoad (params) {
|
||||
this.areaId = params.areaId
|
||||
this.getNewsList()
|
||||
this.parentId = params.id
|
||||
this.parentName = params.parentName
|
||||
@@ -75,9 +74,6 @@
|
||||
this.currIndex = uni.getStorageSync('newTypeIndex')
|
||||
this.getListInit()
|
||||
}
|
||||
// uni.$on('update',()=>{
|
||||
// this.getListInit()
|
||||
// })
|
||||
this.getListInit()
|
||||
},
|
||||
|
||||
@@ -110,7 +106,6 @@
|
||||
categoryType: '2',
|
||||
}
|
||||
}).then((res)=>{
|
||||
// console.log(res,'新闻分类');
|
||||
var array = []
|
||||
res.data.records.map(item=>{
|
||||
array.push({
|
||||
@@ -120,7 +115,7 @@
|
||||
})
|
||||
})
|
||||
this.tabList = array
|
||||
console.log(this.tabList[this.currIndex].parentId,'parentId');
|
||||
// console.log(this.tabList[this.currIndex].parentId,'parentId');
|
||||
})
|
||||
},
|
||||
|
||||
@@ -138,24 +133,16 @@
|
||||
moduleId: this.tabList[this.currIndex].parentId,
|
||||
categoryId: this.tabList[this.currIndex].id,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
const data = res.data.records
|
||||
this.newsList.push(...data)
|
||||
this.current = this.current
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
toDetail(item) {
|
||||
if(item.detailType == 6 || item.detailType == 5) { //特色农产品 旅游故事
|
||||
uni.navigateTo(`/subPages/live/products?id=${item.id}&detailType=${item.detailType}`)
|
||||
}else {
|
||||
uni.navigateTo(`/subPages/live/newsDetail?id=${item.id}&areaId=${this.areaId}&type=${this.currIndex}`)
|
||||
}
|
||||
toDetail(id) {
|
||||
uni.navigateTo({url: `./newsDetail?id=${id}`})
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user