bug
This commit is contained in:
@@ -3,31 +3,10 @@
|
||||
<div class="header" v-if="tabList.length">
|
||||
<div class="header-tab">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/live/dh.png" alt="" class="more-icon" @click="toSelect()">
|
||||
<u-tabs :list="tabList" :current="currIndex" @change="changeTab" style="width:650px" is-scroll :font-size="26"></u-tabs>
|
||||
<!-- <div v-for="(item, index) in tabList" :key="index" @click="changeTab(item.id)" v-if="index < 5" :class="currId == item.id ? 'tab-item active-item' : 'tab-item'">{{item.name}}<span class="active-line" v-if="currId == item.id"></span></div> -->
|
||||
<u-tabs :list="tabList" :current="currIndex" @change="changeTab" :font-size="26"></u-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news-list" v-if="tabList.length">
|
||||
<!-- <div class="item" hover-class="bg-hover" v-for="(item, index) in newsList" :key="index" @click="toDetail(item)">
|
||||
<div class="item-wrapper solid" style="display: flex">
|
||||
<div class="item-left flex1">
|
||||
<h2 :style="{marginBottom: item.type === '1' ? '16px' : '30px'}" v-if="item.type != '1'">{{ item.title }}</h2>
|
||||
<div class="item-video" v-if="item.type === '1'">
|
||||
<p class="item-title">{{item.title}}</p>
|
||||
<image class="play-btn" src="https://cdn.cunwuyun.cn/dvcp/pay-btn.png" />
|
||||
<div class="mask"></div>
|
||||
<image class="cover" :src="item.coverFile" mode="aspectFill" />
|
||||
</div>
|
||||
<div class="item-left__bottom item-active" :class="[item.photo ? 'item-active' : '']">
|
||||
<span class="top-text" v-if="item.top == 1">置顶</span>
|
||||
<span>{{tabList[item.detailType].name || ''}}</span>
|
||||
<span>{{ item.createTime ? item.createTime.split(' ')[0] : '' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<image v-if="item.type === '0'" :src="item.coverFile" mode="aspectFill" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<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>
|
||||
@@ -64,15 +43,24 @@ export default {
|
||||
onLoad(params) {
|
||||
this.parentId = params.id
|
||||
this.parentName = params.parentName
|
||||
uni.$on('update', (tabIndex) => {
|
||||
this.currIndex = tabIndex
|
||||
// setTimeout(() => {
|
||||
// this.getListInit()
|
||||
// },600)
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = this.parentName
|
||||
this.getList().then(() => this.getListInit())
|
||||
// setTimeout(() => {
|
||||
// this.currIndex = 8
|
||||
// // this.getListInit()
|
||||
// },600)
|
||||
|
||||
uni.$on('update', (tabIndex) => {
|
||||
this.currIndex = tabIndex
|
||||
this.getListInit()
|
||||
})
|
||||
|
||||
|
||||
// })
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -21,13 +21,17 @@
|
||||
this.tabIndex = option.index,
|
||||
this.parentId = option.parentId
|
||||
this.getList()
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
uni.navigateBack({
|
||||
success: ()=>{
|
||||
uni.$emit('update',this.tabIndex)
|
||||
uni.navigateBack({delta: 1})
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$http.post('/app/apppublicitycategory/list',null,{
|
||||
|
||||
@@ -587,7 +587,7 @@ export default {
|
||||
|
||||
nextStep() {
|
||||
|
||||
if (!this.isEdit) {
|
||||
if (!this.form.id) {
|
||||
if (!this.form.objectType) {
|
||||
return this.$u.toast('请选择监测对象类型')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user