diff --git a/src/mods/AppVillager/AppVillager.vue b/src/mods/AppVillager/AppVillager.vue index cae8bb9..138f8d0 100644 --- a/src/mods/AppVillager/AppVillager.vue +++ b/src/mods/AppVillager/AppVillager.vue @@ -1,20 +1,16 @@ @@ -108,7 +111,7 @@ export default { name: '我参与的', }, ], - tabIndex: 0, + tabIndex1: 3, tabList: [ { name: '我的话题', @@ -117,32 +120,38 @@ export default { name: '我的评论', }, ], - tabCurrent: 0, + tabCurrent2: 0, data: [{ value: 0, title: '弃捐勿复道,努力加餐饭' }], itemList: [ { name: '全部', - indexTab: 0, + indexTab3: 0, }, { name: '已通过', - indexTab: 1, + indexTab3: 1, }, { name: '未通过', - indexTab: 2, + indexTab3: 2, }, { name: '审核中', - indexTab: 3, + indexTab3: 3, }, ], - indexTab: 0, + indexTab3: 0, + delShow: false, } }, computed: {}, watch: {}, - onLoad() {}, + onLoad() { + this.$dict.load('villagerCircleTopic').then(() => { + // this.getList() + console.log(this.$dict.getDict('villagerCircleTopic')) + }) + }, onShow() { uni.$on('updateList', () => { this.getList() @@ -151,17 +160,17 @@ export default { methods: { change(index) { // this.data = [] - this.tabIndex = index + this.tabIndex1 = index this.current = 1 // this.getList() }, changetabIndex(e) { - this.tabCurrent = e + this.tabCurrent2 = e }, hander(i) { - this.indexTab = i + this.indexTab3 = i }, toDetail(item) { @@ -169,8 +178,26 @@ export default { }, toAdd() { + console.log(1) this.$linkTo(`./add`) }, + + confirmDel() { + this.$instance + .post(`/app/appvillagercircleinfo/delete?ids=${this.deleId}`) + .then((res) => { + if (res?.data) { + this.deleShow = false + this.modalShow = false + this.deleId = '' + this.getDetail() + } + }) + .catch((e) => { + this.$hideLoading() + this.$u.toast(e) + }) + }, }, } @@ -205,6 +232,7 @@ export default { .tabIndex012 { padding-top: 32px; display: flex; + flex-wrap: wrap; .tags { padding: 8px 32px; background: #ffffff; @@ -212,9 +240,12 @@ export default { margin-left: 16px; border: 1px solid #4181ff; } + .tags:nth-child(n + 4) { + margin-top: 10px; + } } - .indexTab { + .indexTab3 { padding-top: 32px; display: flex; .tags { @@ -266,17 +297,27 @@ export default { margin-top: 6px; } } - .status { - font-size: 28px; - } - .status0 { - color: #42d784; - } - .status1 { - color: #ff4466; - } - .status2 { - color: #ff883c; + + .statusDele { + display: flex; + align-items: center; + .status { + font-size: 28px; + } + .status0 { + color: #42d784; + } + .status1 { + color: #ff4466; + } + .status2 { + color: #ff883c; + } + .dels { + margin-left: 20px; + width: 68px; + height: 68px; + } } } } @@ -381,5 +422,19 @@ export default { } } } + + .addBtn { + position: fixed; + right: 5%; + bottom: 15%; + width: 96px; + height: 96px; + line-height: 96px; + text-align: center; + font-size: 24px; + color: #1365dd; + border-radius: 50%; + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); + } } diff --git a/src/mods/AppVillager/add.vue b/src/mods/AppVillager/add.vue index 4cdb32c..918ac1e 100644 --- a/src/mods/AppVillager/add.vue +++ b/src/mods/AppVillager/add.vue @@ -2,26 +2,30 @@
- - + + - +
- - + + -
{{ forms.description.length }}/500
+
{{ forms.content.length }}/500
- - + +
+ + + +
@@ -39,10 +43,13 @@ export default { data() { return { forms: { - applyIntegralType: '', - applyIntegralTypeValue: '', - description: '', - applyFiles: [], + topic: '', + topicValue: '', + content: '', + pictures: [], + gpsDesc: '', + lat: '', + lng: '', }, showStstus: false, flag: false, @@ -50,7 +57,7 @@ export default { }, computed: { ...mapState(['user']) }, onLoad() { - this.$dict.load('atWillReportType').then(() => {}) + this.$dict.load('villagerCircleTopic').then(() => {}) }, onShow() {}, methods: { @@ -59,27 +66,34 @@ export default { this.$refs.uForm.validate((valid) => { if (valid) { - if (!this.forms.applyIntegralType) { + if (!this.forms.topicValue) { return this.$u.toast('请选择话题类型') } - if (!this.forms.description) { + if (!this.forms.content) { return this.$u.toast('请输入内容') } + if (!this.forms.lat && !this.forms.lng) { + return this.$u.toast('请选择所在位置') + } const imgs = [] - if (this.forms.applyFiles) { - this.forms.applyFiles.map((e) => { + if (this.forms.pictures) { + this.forms.pictures.map((e) => { imgs.push({ url: e.url, id: e.id }) }) } this.flag = true this.$instance - .post(`/app/appvillagerintegraldeclare/addOrUpdate`, { - applyIntegralType: this.forms.applyIntegralTypeValue, - description: this.forms.description, - applyFiles: imgs || [], - residentId: this.user.residentId, + .post(`/app/appvillagercircleinfo/addOrUpdate`, { + topic: this.forms.topicValue, + content: this.forms.content, + pictures: imgs || [], + createUserResidentId: this.user.id, + areaId: this.$areaId, + gpsDesc: this.gpsDesc, + lat: this.forms.lat, + lng: this.forms.lng, }) .then((res) => { if (res.code == 0) { @@ -102,8 +116,19 @@ export default { }, selectStatus(e) { - this.forms.applyIntegralType = e[0].label - this.forms.applyIntegralTypeValue = e[0].value + this.forms.topic = e[0].label + this.forms.topicValue = e[0].value + }, + + chooseAddress() { + uni.chooseLocation({ + success: (res) => { + console.log(res) + this.forms.gpsDesc = res.gpsDesc + this.forms.lat = res.latitude + this.forms.lng = res.longitude + }, + }) }, }, } @@ -118,7 +143,7 @@ export default { ::v-deep .u-form { background: #fff; .u-form-item { - padding: 0 45px !important; + padding: 0 32px !important; .u-form-item__body { .u-form-item--right__content__slot { padding-bottom: 0; @@ -130,7 +155,13 @@ export default { } .u-form-item:last-child { - margin-bottom: 40px; + margin-bottom: 0; + } + + .topics { + .u-form-item__body { + padding: 30px 0 !important; + } } .contents { diff --git a/src/mods/AppVillager/detail.vue b/src/mods/AppVillager/detail.vue index 81658c3..5ddc215 100644 --- a/src/mods/AppVillager/detail.vue +++ b/src/mods/AppVillager/detail.vue @@ -16,6 +16,7 @@
+
审核中
@@ -74,6 +75,15 @@ + + +
删除评论
+
删除
+
+
取消
+
+ + @@ -84,23 +94,35 @@ export default { props: {}, data() { return { - id: '', + id: '888', data: {}, poupShow: false, content: '', flag: false, pageShow: false, + deleShow: false, + modalShow: false, + deleId: '', } }, computed: {}, watch: {}, onLoad(o) { this.$dict.load('atWillReportType').then(() => { - this.id = o.id + // this.id = o.id + this.getDetail() }) }, onShow() {}, methods: { + getDetail() { + this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => { + if (res.code == 0) { + this.detail = res.data + } + }) + }, + send() { if (this.flag) return if (!this.content) { @@ -108,25 +130,25 @@ export default { } this.$instance - .post(`/app/appvillagediscussmessage/addOrUpdate`, { + .post(`/app/appvillagercirclecomment/addOrUpdate`, { content: this.content, - avatar: this.user.avatar, - createUserId: this.user.id, - createUserName: this.user.name, - discussId: this.id, + replyUserResidentId: this.user.id, + replyUserName: this.user.name, + id: this.id, }) .then((res) => { if (res?.code == 0) { this.$u.toast('留言成功') this.flag = false this.content = '' - this.showBottomInput = false - this.getDetail() + this.poupShow = false + // this.getDetail() } }) }, - like(id) { + like() { + var id = '88' this.$instance .post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`) .then((res) => { @@ -140,6 +162,23 @@ export default { this.$u.toast(err) }) }, + + confirmDelete() { + this.$instance + .post(`/app/appvillagercirclecomment/delete?ids=${this.deleId}`) + .then((res) => { + if (res?.data) { + this.deleShow = false + this.modalShow = false + this.deleId = '' + this.getDetail() + } + }) + .catch((e) => { + this.$hideLoading() + this.$u.toast(e) + }) + }, }, } @@ -188,8 +227,10 @@ export default { margin-top: 6px; } } + .status { font-size: 28px; + margin-right: 10px; } .status0 { color: #42d784; diff --git a/src/static/AppVillager/4.png b/src/static/AppVillager/4.png new file mode 100644 index 0000000..7236bdc Binary files /dev/null and b/src/static/AppVillager/4.png differ