接口对接
This commit is contained in:
@@ -2,16 +2,19 @@
|
||||
<div class="AppCircle">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">广场</span>
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">社区</span>
|
||||
<span @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">广场</span>
|
||||
<span @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">社区</span>
|
||||
</div>
|
||||
<div class="right" @click="$linkTo('./MyPostList')">
|
||||
<span>我的贴子</span>
|
||||
<i>1</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<div class="nav-item" hover-class="text-hover" v-for="(item, index) in topic" :key="index" @click="$linkTo('./TopicDetail')">
|
||||
<div class="nav" v-if="topic.length">
|
||||
<div
|
||||
class="nav-item"
|
||||
hover-class="text-hover"
|
||||
v-for="(item, index) in topic" :key="index" @click="$linkTo('./TopicDetail?themeId=' + item.id + '&name=' + item.title)">
|
||||
<image :src="item.picUrl" mode="aspectFill" />
|
||||
<h2>{{ item.title }}</h2>
|
||||
</div>
|
||||
@@ -21,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="AppCircle-list">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="$linkTo('./Detail')" hover-class="bg-hover">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||
<div class="item-top">
|
||||
<image :src="item.createUserAvatar" />
|
||||
<div class="right">
|
||||
@@ -30,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span v-if="item.themeId" @click="$linkTo('./TopicDetail')">#【{{ item.topicName }}】</span>
|
||||
<span v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||
<text>{{ item.content }}</text>
|
||||
</div>
|
||||
<div class="item-imgs" v-if="item.files.length">
|
||||
@@ -52,6 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
<div class="add" hover-class="text-hover" @click="$linkTo('./Add')">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fatie.png" />
|
||||
@@ -70,7 +74,9 @@
|
||||
return {
|
||||
currIndex: 0,
|
||||
topicList: [],
|
||||
list: []
|
||||
list: [],
|
||||
isMore: false,
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
|
||||
@@ -102,6 +108,16 @@
|
||||
})
|
||||
},
|
||||
|
||||
changeTab (index) {
|
||||
this.currIndex = index
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
|
||||
@@ -199,9 +215,10 @@
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 32px;
|
||||
margin-top: 8px;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user