接口对接
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
<div class="AppCircle-list">
|
<div class="AppCircle-list">
|
||||||
<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" v-for="(item, index) in list" :key="index" @click="$linkTo('./Detail?id=' + item.id + '&name=' + item.topicName + '&themeId=' + item.themeId)">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image :src="item.createUserAvatar" />
|
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ item.createUserName }}</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<span>{{ item.publishDepartName }}</span>
|
<span>{{ item.publishDepartName }}</span>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="Detail" v-if="isShow">
|
<div class="Detail" v-if="isShow">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image :src="info.createUserAvatar" />
|
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ info.createUserName }}</h3>
|
<h3>{{ info.createUserName }}</h3>
|
||||||
<span>{{ info.publishDepartName }}</span>
|
<span>{{ info.publishDepartName }}</span>
|
||||||
|
|||||||
@@ -3,100 +3,96 @@
|
|||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fangwuchuzu.png" />
|
<image :src="user.avatarUrl || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<h2>李在天</h2>
|
<h2>{{ user.nickName }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-btn" hover-class="text-hover" @click="$linkTo('./Add')">发贴</div>
|
<div class="add-btn" hover-class="text-hover" @click="$linkTo('./Add')">发贴</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="bottom-item" @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">
|
<div class="bottom-item" @click="changeTab(0)" :class="[currIndex === 0 ? 'active' : '']">
|
||||||
<span>发贴</span>
|
<span>发贴</span>
|
||||||
<h2>23</h2>
|
<h2>{{ totalInfo['发帖'] }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-item" @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">
|
<div class="bottom-item" @click="changeTab(1)" :class="[currIndex === 1 ? 'active' : '']">
|
||||||
<span>点赞</span>
|
<span>点赞</span>
|
||||||
<h2>23</h2>
|
<h2>{{ totalInfo['点赞'] }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-item" @click="changeTab(2)" :class="[currIndex === 2 ? 'active' : '']">
|
<div class="bottom-item" @click="changeTab(2)" :class="[currIndex === 2 ? 'active' : '']">
|
||||||
<span>评论</span>
|
<span>评论</span>
|
||||||
<h2>23</h2>
|
<h2>{{ totalInfo['评论'] }}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="body-list" v-if="currIndex === 0">
|
<div class="body-list" v-if="currIndex === 0">
|
||||||
<div class="item" v-for="(item, index) in 10" :key="index">
|
<div class="item" v-for="(item, index) in list" :key="index">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image class="avatar" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fangwuchuzu.png" />
|
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>李在地</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<span>清风街道</span>
|
<span>{{ item.publishDepartName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<image class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
|
<image @click="remove(item.id)" class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<span @click="$linkTo('./TopicDetail')">#【闲置物品交易】</span>
|
<span v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||||
<text>社家用闲置柜子自用,原价212,现价80要的联系</text>
|
<text>{{ item.content }}</text>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-imgs">
|
<div class="item-imgs" v-if="item.files.length">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
<image mode="aspectFill" v-for="(item, index) in item.files" :key="index" :src="item.url" />
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
|
||||||
</div>
|
</div>
|
||||||
<p>2020-12-11 10:10</p>
|
<p>{{ item.createTime }}</p>
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
||||||
<i>10</i>
|
<i>{{ item.sharedCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" />
|
||||||
<i>10</i>
|
<i>{{ item.appreciateCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
||||||
<i>10</i>
|
<i>{{ item.commentCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-list" v-if="currIndex === 1">
|
<div class="body-list" v-if="currIndex === 1">
|
||||||
<div class="item" v-for="(item, index) in 10" :key="index">
|
<div class="item" v-for="(item, index) in list" :key="index">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image class="avatar" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fangwuchuzu.png" />
|
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>李在地</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<span>清风街道</span>
|
<span>{{ item.publishDepartName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<span @click="$linkTo('./TopicDetail')">#【闲置物品交易】</span>
|
<span v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#【{{ item.topicName }}】</span>
|
||||||
<text>社家用闲置柜子自用,原价212,现价80要的联系</text>
|
<text>{{ item.content }}</text>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-imgs">
|
<div class="item-imgs" v-if="item.files.length">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
<image mode="aspectFill" v-for="(item, index) in item.files" :key="index" :src="item.url" />
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" />
|
|
||||||
</div>
|
</div>
|
||||||
<p>2020-12-11 10:10</p>
|
<p>{{ item.createTime }}</p>
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
||||||
<i>10</i>
|
<i>{{ item.sharedCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" />
|
||||||
<i>10</i>
|
<i>{{ item.appreciateCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
||||||
<i>10</i>
|
<i>{{ item.commentCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="comment" v-if="currIndex === 2">
|
<div class="comment" v-if="currIndex === 2">
|
||||||
<div class="comment-item" v-for="(item, index) in 10" :key="index">
|
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
||||||
<div class="comment-top">
|
<div class="comment-top">
|
||||||
<span>2020-12-11 10:10</span>
|
<span>2020-12-11 10:10</span>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
|
||||||
@@ -117,6 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -129,8 +126,11 @@
|
|||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
currIndex: 2,
|
currIndex: 0,
|
||||||
totalInfo: {}
|
totalInfo: {},
|
||||||
|
list: [],
|
||||||
|
isMore: false,
|
||||||
|
current: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -140,6 +140,7 @@
|
|||||||
|
|
||||||
onLoad () {
|
onLoad () {
|
||||||
this.getTopicList()
|
this.getTopicList()
|
||||||
|
this.getInfo()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -158,6 +159,29 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInfo () {
|
||||||
|
this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.totalInfo = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove (id) {
|
||||||
|
this.$dialog.confirm({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '您确定删除该帖子吗?'
|
||||||
|
}).then(() => {
|
||||||
|
this.$instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$toast('删除成功!')
|
||||||
|
this.getInfo()
|
||||||
|
this.changeTab(this.currIndex)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
changeTab (index) {
|
changeTab (index) {
|
||||||
this.currIndex = index
|
this.currIndex = index
|
||||||
this.isMore = false
|
this.isMore = false
|
||||||
@@ -180,10 +204,10 @@
|
|||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
withoutToken: this.token ? false : true,
|
|
||||||
current: this.current,
|
current: this.current,
|
||||||
size: 10,
|
size: 10,
|
||||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
listType: 1,
|
||||||
|
createUserId: this.user.id
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -225,10 +249,9 @@
|
|||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
withoutToken: this.token ? false : true,
|
|
||||||
current: this.current,
|
current: this.current,
|
||||||
size: 10,
|
size: 10,
|
||||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
listType: 2
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -270,10 +293,9 @@
|
|||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
withoutToken: this.token ? false : true,
|
|
||||||
current: this.current,
|
current: this.current,
|
||||||
size: 10,
|
size: 10,
|
||||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
listType: 1
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="$linkTo('./Detail?isFrom=topic&id=' + item.id + '&name=' + name + '&themeId=' + themeId)">
|
@click="$linkTo('./Detail?isFrom=topic&id=' + item.id + '&name=' + name + '&themeId=' + themeId)">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image :src="item.createUserAvatar" />
|
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ item.createUserName }}</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<span>{{ item.publishDepartName }}</span>
|
<span>{{ item.publishDepartName }}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user