diff --git a/src/mods/AppVillager/AppVillager.vue b/src/mods/AppVillager/AppVillager.vue index b0c8078..599eaac 100644 --- a/src/mods/AppVillager/AppVillager.vue +++ b/src/mods/AppVillager/AppVillager.vue @@ -35,11 +35,12 @@
{{ $dict.getLabel('auditStatus', item.status) }}
-
+ +
--> + +
@@ -91,12 +92,16 @@ - -
发起审核
+ + + +
+
编辑
+
删除
+
+
@@ -160,6 +165,8 @@ export default { TopicValue: '0', TopicName: '美丽庭院', flag: false, + delAndEdit: false, + editId: '', } }, computed: { ...mapState(['user']) }, @@ -225,9 +232,10 @@ export default { this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`) }, - toAdd(item) { - if (item) { - this.$linkTo(`./add?id=${item.id}`) + toAdd(index) { + this.delAndEdit = false + if (index == 0) { + this.$linkTo(`./add?id=${this.editId}`) } else { this.$linkTo(`./add`) } @@ -235,17 +243,20 @@ export default { confirmDel() { this.$instance - .post(`/app/appvillagercircleinfo/delete?ids=${this.deleId}`) + .post(this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '/app/appvillagercirclecomment/delete' : '/app/appvillagercircleinfo/delete', null, { + params: { + ids: this.deleId, + }, + }) .then((res) => { - if (res?.data) { + if (res.code == 0) { this.deleShow = false this.modalShow = false this.deleId = '' - this.getDetail() + this.init() } }) .catch((e) => { - this.$hideLoading() this.$u.toast(e) }) }, @@ -285,6 +296,8 @@ export default { this.flag = false }) }, + + toDel() {}, }, onReachBottom() { this.current = this.current + 1 @@ -318,10 +331,12 @@ export default { } .top { - padding: 0 0 32px 16px; + padding: 0 16px 32px 16px; background: #fff; border-radius: 32px 32px 0px 0px; margin-top: -30px; + overflow: hidden; + .tabIndex012 { padding-top: 32px; display: flex; @@ -414,9 +429,10 @@ export default { flex-direction: column; align-items: center; .dels { + position: relative; margin-left: 20px; - // width: 68px; - // height: 68px; + width: 68px; + height: 68px; } } } @@ -537,5 +553,27 @@ export default { border-radius: 50%; box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); } + + ::v-deep .u-mask { + .warp { + position: absolute; + top: 251px; + right: 70px; + display: flex; + flex-direction: column; + align-items: center; + width: 45%; + height: 22%; + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); + border-radius: 5%; + .rect { + height: 50%; + width: 100%; + text-align: center; + line-height: 4; + background: #fff; + } + } + } } diff --git a/src/mods/AppVillager/add.vue b/src/mods/AppVillager/add.vue index 3831875..7d34f86 100644 --- a/src/mods/AppVillager/add.vue +++ b/src/mods/AppVillager/add.vue @@ -2,8 +2,8 @@
- - + + @@ -60,6 +60,7 @@ export default { onLoad(o) { this.$dict.load('villagerCircleTopic').then(() => { this.id = o.id + this.getDetail() }) }, onShow() {}, @@ -89,14 +90,15 @@ export default { this.flag = true this.$instance .post(`/app/appvillagercircleinfo/addOrUpdate`, { - topic: this.forms.topicValue, + topic: this.forms.topic, content: this.forms.content, pictures: imgs || [], createUserResidentId: this.user.id, areaId: this.$areaId, - gpsDesc: this.gpsDesc, + gpsDesc: this.forms.gpsDesc, lat: this.forms.lat, lng: this.forms.lng, + id: this.id, }) .then((res) => { if (res.code == 0) { @@ -122,22 +124,24 @@ export default { if (this.id) { this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => { if (res.code == 0) { - // this.forms = res.data + this.forms = res.data + console.log(this.form) + this.forms.topicValue = this.$dict.getLabel('villagerCircleTopic', this.forms.topic) } }) } }, selectStatus(e) { - this.forms.topic = e[0].label - this.forms.topicValue = e[0].value + this.forms.topic = e[0].value + this.forms.topicValue = e[0].label }, chooseAddress() { uni.chooseLocation({ success: (res) => { console.log(res) - this.forms.gpsDesc = res.gpsDesc + this.forms.gpsDesc = res.name this.forms.lat = res.latitude this.forms.lng = res.longitude }, diff --git a/src/mods/AppVillager/detail.vue b/src/mods/AppVillager/detail.vue index 8e6927f..1cf6b2f 100644 --- a/src/mods/AppVillager/detail.vue +++ b/src/mods/AppVillager/detail.vue @@ -10,9 +10,12 @@
- {{ detail.createUserName }} + {{ detail.createUserName || detail.replyUserName }} - {{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.createTime }} + + {{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | + {{ detail.createTime }} +
@@ -125,6 +128,7 @@ export default { deleId: '', flagLike: false, tabCurrent1: '', + delAndEdit: '', } }, computed: { ...mapState(['user']) }, @@ -280,6 +284,9 @@ export default { font-size: 26px; color: #6e727a; margin-top: 6px; + .topics { + margin-right: 8px; + } } }