村民圈
This commit is contained in:
@@ -20,30 +20,35 @@
|
|||||||
<div class="datas" v-if="data.length">
|
<div class="datas" v-if="data.length">
|
||||||
<div class="card" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
|
<div class="card" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
|
||||||
<div class="cardTop">
|
<div class="cardTop">
|
||||||
<img :src="item.avatarUrl" alt="" />
|
<img :src="item.avatarUrl || user.avatarUrl" alt="" />
|
||||||
|
|
||||||
<div class="rightTop">
|
<div class="rightTop">
|
||||||
<div class="leftStaus">
|
<div class="leftStaus">
|
||||||
<span class="names">{{ item.createUserName }}</span>
|
<span class="names">{{ item.createUserName || user.realName }}</span>
|
||||||
|
|
||||||
<span class="titless">{{ $dict.getLabel('villagerCircleTopic', item.topic) }} | {{ item.createTime }}</span>
|
<span class="titless">
|
||||||
|
<span v-if="item.topic" class="topics"> {{ $dict.getLabel('villagerCircleTopic', item.topic) }} |</span>
|
||||||
|
<span> {{ item.createTime }}</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statusDele">
|
<div class="statusDele">
|
||||||
<div class="status status0" :class="item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2'" v-if="tabIndex0 == 3">{{ $dict.getLabel('auditStatus', item.status) }}</div>
|
<div class="status status0" :class="item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2'" v-if="tabIndex0 == 3">{{ $dict.getLabel('auditStatus', item.status) }}</div>
|
||||||
|
|
||||||
|
<div class="statusRight">
|
||||||
<div class="dels" @click.stop="toAdd(item)">编辑</div>
|
<div class="dels" @click.stop="toAdd(item)">编辑</div>
|
||||||
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
|
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
|
||||||
<!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
|
</div>
|
||||||
|
<!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabCurrent0" v-if="tabIndex0 != 3">
|
<div class="tabCurrent0" v-if="tabCurrent1 != 1">
|
||||||
<div class="cardConts">{{ item.content }}</div>
|
<div class="cardConts">{{ item.content }}</div>
|
||||||
|
|
||||||
<div class="cardImg" v-if="item.pictures">
|
<div class="cardImg" v-if="item.pictures">
|
||||||
<img :src="item.url" alt="" v-for="(items, i) in item.pictures" :key="i" @click.stop="previewImage(item.pictures, item.url)" />
|
<img :src="items.url" alt="" v-for="(items, i) in item.pictures" :key="i" @click.stop="previewImage(item.pictures, items.url)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cardBot">
|
<div class="cardBot">
|
||||||
@@ -54,28 +59,30 @@
|
|||||||
|
|
||||||
<div class="icones" v-if="tabIndex0 != 3">
|
<div class="icones" v-if="tabIndex0 != 3">
|
||||||
<div class="img1">
|
<div class="img1">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager1.png" alt="" class="img11" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/1.png" alt="" class="img11" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rightFlex">
|
<div class="rightFlex">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager2.png" alt="" class="img2" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/2.png" alt="" class="img2" />
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" class="img3" />
|
|
||||||
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click.stop="like(item)" v-if="item.upFlag == 0" />
|
||||||
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/33.png" alt="" class="img3" @click.stop="like(item)" v-if="item.upFlag == 1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabCurrent11" v-if="tabIndex0 == 3 && tabCurrent1 == 1">
|
<div class="tabCurrent11" v-if="tabIndex0 == 3 && tabCurrent1 == 1">
|
||||||
<div class="cardsConts">针不戳!</div>
|
<div class="cardsConts">{{ item.content }}</div>
|
||||||
|
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="toReply">回复的话</span>
|
<span class="toReply">回复的话题 :</span>
|
||||||
<span class="contens"></span>
|
<span class="contens">{{ item.villagerCircleInfo.content }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="nopass">
|
<div class="nopass" v-if="item.status == 2">
|
||||||
<span>未通过理由:</span>
|
<span>未通过理由:</span>
|
||||||
<span>请勿带情绪进行评论</span>
|
<span>{{ item.auditOpinion }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,6 +159,7 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
TopicValue: '0',
|
TopicValue: '0',
|
||||||
TopicName: '美丽庭院',
|
TopicName: '美丽庭院',
|
||||||
|
flag: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -174,8 +182,9 @@ export default {
|
|||||||
size: 6,
|
size: 6,
|
||||||
current: this.current,
|
current: this.current,
|
||||||
topic: this.tabIndex0 != 3 ? this.TopicValue : '',
|
topic: this.tabIndex0 != 3 ? this.TopicValue : '',
|
||||||
|
status: this.tabIndex0 == 3 && this.indexTab2 == 0 ? '' : this.tabIndex0 == 3 && this.indexTab2 == 1 ? 1 : this.tabIndex0 == 3 && this.indexTab2 == 2 ? 2 : this.tabIndex0 == 3 && this.indexTab2 == 3 ? 0 : '',
|
||||||
|
|
||||||
areaId: this.tabIndex0 != 3 ? this.user.areaId : '',
|
areaId: this.tabIndex0 != 3 ? this.user.areaId : '',
|
||||||
residentId: this.tabIndex0 != 3 ? this.user.residentId : '',
|
|
||||||
listType: this.tabIndex0 == 3 && this.tabCurrent1 == 0 ? '0' : this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '1' : this.tabIndex0 == 0 ? '0' : this.tabIndex0 == 1 ? '1' : this.tabIndex0 == 2 ? '2' : '',
|
listType: this.tabIndex0 == 3 && this.tabCurrent1 == 0 ? '0' : this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '1' : this.tabIndex0 == 0 ? '0' : this.tabIndex0 == 1 ? '1' : this.tabIndex0 == 2 ? '2' : '',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -186,23 +195,34 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
change(index) {
|
init() {
|
||||||
this.data = []
|
this.data = []
|
||||||
this.tabIndex0 = index
|
|
||||||
this.current = 1
|
this.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
change(index) {
|
||||||
|
this.tabIndex0 = index
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
|
||||||
changetabIndex(e) {
|
changetabIndex(e) {
|
||||||
this.tabCurrent1 = e
|
this.tabCurrent1 = e
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.indexTab2 = 0
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
hander(i) {
|
hander(i) {
|
||||||
this.indexTab2 = i
|
this.indexTab2 = i
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl}`)
|
this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`)
|
||||||
},
|
},
|
||||||
|
|
||||||
toAdd(item) {
|
toAdd(item) {
|
||||||
@@ -233,6 +253,9 @@ export default {
|
|||||||
conTopic(e) {
|
conTopic(e) {
|
||||||
this.TopicValue = e[0].value
|
this.TopicValue = e[0].value
|
||||||
this.TopicName = e[0].label
|
this.TopicName = e[0].label
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
previewImage(images, img) {
|
previewImage(images, img) {
|
||||||
@@ -241,6 +264,27 @@ export default {
|
|||||||
current: img,
|
current: img,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
like(item) {
|
||||||
|
if (this.flag) return
|
||||||
|
|
||||||
|
this.flag = true
|
||||||
|
this.$instance
|
||||||
|
.post(`/app/appvillagercircleinfo/up?id=${item.id}`)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$u.toast(item.upFlag == 0 ? '点赞成功' : '取消点赞成功')
|
||||||
|
this.init()
|
||||||
|
setTimeout(() => {
|
||||||
|
this.flag = false
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$u.toast(err)
|
||||||
|
this.flag = false
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current = this.current + 1
|
this.current = this.current + 1
|
||||||
@@ -344,6 +388,9 @@ export default {
|
|||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: #6e727a;
|
color: #6e727a;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
.topics {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,10 +409,15 @@ export default {
|
|||||||
.status2 {
|
.status2 {
|
||||||
color: #ff883c;
|
color: #ff883c;
|
||||||
}
|
}
|
||||||
|
.statusRight {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
.dels {
|
.dels {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
width: 68px;
|
// width: 68px;
|
||||||
height: 68px;
|
// height: 68px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,20 +6,20 @@
|
|||||||
|
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<div class="cardTop">
|
<div class="cardTop">
|
||||||
<img :src="avatarUrl" alt="" />
|
<img :src="avatarUrl || user.avatarUrl" alt="" />
|
||||||
|
|
||||||
<div class="rightTop">
|
<div class="rightTop">
|
||||||
<div class="leftStaus">
|
<div class="leftStaus">
|
||||||
<span class="names">{{ detail.createUserName }}</span>
|
<span class="names">{{ detail.createUserName }}</span>
|
||||||
|
|
||||||
<span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.status }}</span>
|
<span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.createTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statusDele">
|
<div class="statusDele">
|
||||||
<div class="status status0" :class="detail.auditStatus == 0 ? 'status0' : detail.auditStatus == 1 ? 'status1' : 'status2'">{{ $dict.getLabel('auditStatus', detail.status) }}</div>
|
<div class="status status0" :class="detail.auditStatus == 0 ? 'status0' : detail.auditStatus == 1 ? 'status1' : 'status2'">{{ $dict.getLabel('auditStatus', detail.status) }}</div>
|
||||||
|
|
||||||
<div class="dels" @click.stop=";(modalShow = true), (deleId = detail.id)">删除</div>
|
<div class="dels" @click.stop=";(modalShow = true), (deleId = detail.id)">删除</div>
|
||||||
<!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
|
<!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,30 +38,28 @@
|
|||||||
|
|
||||||
<div class="icones">
|
<div class="icones">
|
||||||
<div class="img1">
|
<div class="img1">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager1.png" alt="" class="img11" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/1.png" alt="" class="img11" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rightFlex">
|
<div class="rightFlex">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager2.png" alt="" class="img2" @click="poupShow = true" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/2.png" alt="" class="img2" @click="poupShow = true" />
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" class="img3" @click="like" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click="like" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<div class="replyTop" @click="deleShowBtn(item)">
|
<div class="replyTop" @click="deleShowBtn(item)">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" />
|
||||||
<span class="people">张三、李四、陶白白等12人</span>
|
<span class="people">
|
||||||
|
<span v-for="(items, index) in detail.comments || detail.villagerCircleInfo.comments" :key="index" v-if="index < 3">{{ items.replyUserName }}</span>
|
||||||
|
等{{ detail.villagerCircleInfo ? detail.villagerCircleInfo.comments.length : detail.comments.length }}人</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="replyCont" @click="deleShowBtn(item)">
|
<div class="replyCont" @click="deleShowBtn(item)" v-for="(item, i) in detail.comments || detail.villagerCircleInfo.comments" :key="i">
|
||||||
<span class="nameLeft">张三:</span>
|
<span class="nameLeft">{{ item.replyUserName }} : </span>
|
||||||
<span class="contRight">非常不错!</span>
|
<span class="contRight"> {{ item.content }}</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="replyCont" @click="deleShowBtn(item)">
|
|
||||||
<span class="nameLeft">张三:</span>
|
|
||||||
<span class="contRight">为什么不带上我呢!为什么不带上我呢!为什么不带上我呢!</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +99,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
avatarUrl: '',
|
avatarUrl: '',
|
||||||
data: {},
|
detail: {},
|
||||||
poupShow: false,
|
poupShow: false,
|
||||||
content: '',
|
content: '',
|
||||||
flag: false,
|
flag: false,
|
||||||
@@ -109,32 +107,33 @@ export default {
|
|||||||
deleShow: false,
|
deleShow: false,
|
||||||
modalShow: false,
|
modalShow: false,
|
||||||
deleId: '',
|
deleId: '',
|
||||||
|
flagLike: false,
|
||||||
|
tabCurrent1: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
watch: {},
|
watch: {},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.$dict.load('villagerCircleTopic').then(() => {
|
this.$dict.load('villagerCircleTopic').then(() => {
|
||||||
|
console.log(o)
|
||||||
this.id = o.id
|
this.id = o.id
|
||||||
this.avatarUrl = o.avatarUrl
|
this.avatarUrl = o.avatarUrl
|
||||||
|
this.tabCurrent1 = o.tabCurrent1
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
|
this.$instance
|
||||||
|
.post(this.tabCurrent1 == 0 ? '/app/appvillagercircleinfo/queryDetailById' : '/app/appvillagercirclecomment/queryDetailById', null, {
|
||||||
|
params: {
|
||||||
|
id: this.id,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.detail = res.data
|
this.detail = res.data
|
||||||
this.getReplyList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getReplyList() {
|
|
||||||
this.$instance.post(`/app/appvillagercirclecomment/list?id=${detail.id}&size=999`).then((res) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.replylist = res.data.records
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -151,7 +150,7 @@ export default {
|
|||||||
replyUserResidentId: this.user.id,
|
replyUserResidentId: this.user.id,
|
||||||
replyUserName: this.user.name,
|
replyUserName: this.user.name,
|
||||||
areaId: this.$areaId,
|
areaId: this.$areaId,
|
||||||
id: '888',
|
vcId: this.detail.id,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
@@ -159,24 +158,30 @@ export default {
|
|||||||
this.flag = false
|
this.flag = false
|
||||||
this.content = ''
|
this.content = ''
|
||||||
this.poupShow = false
|
this.poupShow = false
|
||||||
// this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
like() {
|
like() {
|
||||||
var id = '88'
|
if (this.flagLike) return
|
||||||
|
|
||||||
|
this.flagLike = true
|
||||||
this.$instance
|
this.$instance
|
||||||
.post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`)
|
.post(`/app/appvillagercircleinfo/up?id=${this.detail.id}&userId=${this.user.id}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$u.toast('点赞成功')
|
this.$u.toast(detail.upFlag == 0 ? '点赞成功' : '取消点赞成功')
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
|
setTimeout(() => {
|
||||||
|
this.flagLike = false
|
||||||
|
}, 600)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.$u.toast(err)
|
this.$u.toast(err)
|
||||||
|
this.flagLike = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -235,10 +240,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.middle {
|
.middle {
|
||||||
padding-bottom: 48px;
|
padding: 32px 0 48px 0;
|
||||||
.cardTop {
|
.cardTop {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 32px;
|
|
||||||
img {
|
img {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
@@ -282,7 +286,7 @@ export default {
|
|||||||
.dels {
|
.dels {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
width: 68px;
|
width: 68px;
|
||||||
height: 68px;
|
// height: 68px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,6 +367,7 @@ export default {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
.nameLeft {
|
.nameLeft {
|
||||||
color: #485d87;
|
color: #485d87;
|
||||||
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
.contRight {
|
.contRight {
|
||||||
color: #485d87;
|
color: #485d87;
|
||||||
|
|||||||
Reference in New Issue
Block a user