diff --git a/src/apps/AppVillageDiscuss/Detail.vue b/src/apps/AppVillageDiscuss/Detail.vue
index 9bceba74..d57cc97c 100644
--- a/src/apps/AppVillageDiscuss/Detail.vue
+++ b/src/apps/AppVillageDiscuss/Detail.vue
@@ -2,13 +2,12 @@
-
![]()
+
-
@@ -52,27 +54,28 @@ export default {
return {
data: {},
id: '',
+ timestamp: '',
}
},
computed: {
commentCount() {
return this.data.messages?.length || 0
- }
+ },
},
watch: {},
onLoad(o) {
this.id = o.id
this.getDetail()
- this.$dict.load("discussStatus")
+ this.$dict.load('discussStatus')
},
onShow() {
- document.title = "议事详情"
+ document.title = '议事详情'
},
methods: {
previewImage(images, img) {
uni.previewImage({
- urls: images.map(v => v.url),
- current: img
+ urls: images.map((v) => v.url),
+ current: img,
})
},
getDetail() {
@@ -80,39 +83,45 @@ export default {
if (res?.data) {
this.data = {
...res.data,
- avatar: res.data.createUserName?.substr(0, 2) || "游客",
+ avatar: res.data.createUserName?.substr(0, 2) || '游客',
images: JSON.parse(res.data.images),
- messages: res.data.messages || []
+ messages: res.data.messages || [],
}
+ this.timestamp = new Date(res.data.discussDeadline).getTime()
}
})
},
handleSubmitComment(content) {
if (!!content) {
- let {id} = this
- this.$http.post("/app/appvillagediscussmessage/addOrUpdate", {
- id, content
- }).then(res => {
- if (res?.code == 0) {
- this.$u.toast("提交成功!")
- this.getDetail()
- }
- })
+ let { id } = this
+ this.$http
+ .post('/app/appvillagediscussmessage/addOrUpdate', {
+ id,
+ content,
+ })
+ .then((res) => {
+ if (res?.code == 0) {
+ this.$u.toast('提交成功!')
+ this.getDetail()
+ }
+ })
} else {
- this.$u.toast("不能提交空评论!")
+ this.$u.toast('不能提交空评论!')
}
},
handleComplete() {
- this.$confirm("是否要结束公示").then(() => {
- let {id} = this
- this.$http.post("/app/appvillagediscuss/finishPublic", {id}).then(res => {
- if (res?.code == 0) {
- this.$u.toast("已结束公示!")
- this.getDetail()
- }
+ this.$confirm('是否要结束公示')
+ .then(() => {
+ let { id } = this
+ this.$http.post('/app/appvillagediscuss/finishPublic', { id }).then((res) => {
+ if (res?.code == 0) {
+ this.$u.toast('已结束公示!')
+ this.getDetail()
+ }
+ })
})
- }).catch(() => 0)
- }
+ .catch(() => 0)
+ },
},
}
@@ -124,7 +133,7 @@ export default {
padding-bottom: 112px;
::v-deep.AiTopFixed {
- border-bottom: 16px solid #F6F7F9;
+ border-bottom: 16px solid #f6f7f9;
.avatar {
height: 64px;
@@ -153,8 +162,8 @@ export default {
.statusTag {
padding: 0 12px;
line-height: 30px;
- border: 1px solid #2573FF;
- color: #2573FF;
+ border: 1px solid #2573ff;
+ color: #2573ff;
font-size: 22px;
&.over {
@@ -193,7 +202,7 @@ export default {
.title {
width: 100%;
line-height: 112px;
- background: #FFF;
+ background: #fff;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
@@ -208,13 +217,16 @@ export default {
.comments {
padding: 0 32px;
font-size: 28px;
-
- .total {
- display: block;
- font-size: 30px;
- height: 120px;
+ .totalCount {
+ display: flex;
+ justify-content: space-between;
padding-top: 44px;
- box-sizing: border-box;
+ .total {
+ display: block;
+ font-size: 30px;
+ height: 120px;
+ box-sizing: border-box;
+ }
}
.u-avatar {