@@ -3,100 +3,96 @@
< div class = "userinfo" >
< div class = "top" >
< div class = "left" >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fangwuchuzu .png" / >
< h2 > 李在天 < / h2 >
< image : src = "user.avatarUrl || ' https://cdn.cunwuyun.cn/wxmp/fengdu/avatar .png' " / >
< h2 > { { user . nickName } } < / h2 >
< / div >
< div class = "add-btn" hover -class = " text -hover " @click ="$linkTo('./Add')" > 发贴 < / div >
< / div >
< div class = "bottom" >
< div class = "bottom-item" @click ="changeTab(0)" : class = "[currIndex === 0 ? 'active' : '']" >
< span > 发贴 < / span >
< h2 > 23 < / h2 >
< h2 > { { totalInfo [ '发帖' ] } } < / h2 >
< / div >
< div class = "bottom-item" @click ="changeTab(1)" : class = "[currIndex === 1 ? 'active' : '']" >
< span > 点赞 < / span >
< h2 > 23 < / h2 >
< h2 > { { totalInfo [ '点赞' ] } } < / h2 >
< / div >
< div class = "bottom-item" @click ="changeTab(2)" : class = "[currIndex === 2 ? 'active' : '']" >
< span > 评论 < / span >
< h2 > 23 < / h2 >
< h2 > { { totalInfo [ '评论' ] } } < / h2 >
< / div >
< / div >
< / div >
< div class = "body" >
< 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" >
< 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" >
< h3 > 李在地 < / h3 >
< span > 清风街道 < / span >
< h3 > { { item . createUserName } } < / h3 >
< span > { { item . publishDepartName } } < / span >
< / 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 class = "item-content" >
< span @click ="$linkTo('./TopicDetail')" > # 【 闲置物品交易 】 < / span >
< text > 社家用闲置柜子自用 , 原价212 , 现价80要的联系 < / text >
< 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" >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< div class = "item-imgs" v-if = "item.files.length" >
< image mode = "aspectFill" v-for = "(item, index) in item.files" :key="index" :src="item.url" / >
< / div >
< p > 2020 - 12 - 11 10 : 10 < / p >
< p > { { item . createTime } } < / p >
< div class = "item-bottom" >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" / >
< i > 10 < / i >
< i > { { item . sharedCount } } < / i >
< / div >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" / >
< i > 10 < / i >
< i > { { item . appreciateCount } } < / i >
< / div >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" / >
< i > 10 < / i >
< i > { { item . commentCount } } < / i >
< / div >
< / div >
< / div >
< / div >
< 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" >
< 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" >
< h3 > 李在地 < / h3 >
< span > 清风街道 < / span >
< h3 > { { item . createUserName } } < / h3 >
< span > { { item . publishDepartName } } < / span >
< / div >
< / div >
< div class = "item-content" >
< span @click ="$linkTo('./TopicDetail')" > # 【 闲置物品交易 】 < / span >
< text > 社家用闲置柜子自用 , 原价212 , 现价80要的联系 < / text >
< 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" >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< image src = "https://cdn.cunwuyun.cn/wxmp/tianfuxing/home-bg.png" / >
< div class = "item-imgs" v-if = "item.files.length" >
< image mode = "aspectFill" v-for = "(item, index) in item.files" :key="index" :src="item.url" / >
< / div >
< p > 2020 - 12 - 11 10 : 10 < / p >
< p > { { item . createTime } } < / p >
< div class = "item-bottom" >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" / >
< i > 10 < / i >
< i > { { item . sharedCount } } < / i >
< / div >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png" / >
< i > 10 < / i >
< i > { { item . appreciateCount } } < / i >
< / div >
< div >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" / >
< i > 10 < / i >
< i > { { item . commentCount } } < / i >
< / div >
< / div >
< / div >
< / div >
< 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" >
< span > 2020 - 12 - 11 10 : 10 < / span >
< image src = "https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" / >
@@ -117,6 +113,7 @@
< / div >
< / div >
< / div >
< AiEmpty v-if = "!list.length && isMore" > < / AiEmpty >
< / div >
< / div >
< / template >
@@ -129,8 +126,11 @@
data ( ) {
return {
currIndex : 2 ,
totalInfo : { }
currIndex : 0 ,
totalInfo : { } ,
list : [ ] ,
isMore : false ,
current : 1
}
} ,
@@ -140,6 +140,7 @@
onLoad ( ) {
this . getTopicList ( )
this . getInfo ( )
} ,
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 ) {
this . currIndex = index
this . isMore = false
@@ -180,10 +204,10 @@
this . $loading ( )
this . $instance . post ( ` /app/appneighborhoodassistance/list ` , null , {
params : {
withoutToken : this . token ? false : true ,
current : this . current ,
size : 10 ,
visibleRange : this . currIndex === 0 ? 1 : 0
listType : 1 ,
createUserId : this . user . id
}
} ) . then ( res => {
if ( res . code === 0 ) {
@@ -225,10 +249,9 @@
this . $loading ( )
this . $instance . post ( ` /app/appneighborhoodassistance/list ` , null , {
params : {
withoutToken : this . token ? false : true ,
current : this . current ,
size : 10 ,
v isibleRange : this . currIndex === 0 ? 1 : 0
l istType : 2
}
} ) . then ( res => {
if ( res . code === 0 ) {
@@ -270,10 +293,9 @@
this . $loading ( )
this . $instance . post ( ` /app/appneighborhoodassistance/list ` , null , {
params : {
withoutToken : this . token ? false : true ,
current : this . current ,
size : 10 ,
v isibleRange : this . currIndex === 0 ? 1 : 0
l istType : 1
}
} ) . then ( res => {
if ( res . code === 0 ) {