diff --git a/src/project/police/AppMessageNotification/AppMessageNotification.vue b/src/project/police/AppMessageNotification/AppMessageNotification.vue
index d14d0741..2ac944b6 100644
--- a/src/project/police/AppMessageNotification/AppMessageNotification.vue
+++ b/src/project/police/AppMessageNotification/AppMessageNotification.vue
@@ -42,13 +42,13 @@
@@ -168,11 +168,11 @@ export default {
computed: {...mapState(['user'])},
methods: {
radioChange(e) {
- this.form.contentType = e
+ this.formDataInit()
+ this.$nextTick(() => {
+ this.form.contentType = e
+ })
},
- typeChange(e) {
- this.form.sendType = e
- },
toSelect() {
uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`})
},
@@ -196,6 +196,15 @@ export default {
if(!this.form.content) {
return this.$u.toast('请输入文本内容')
}
+ if(this.form.contentType == 'image' && !this.formData.imgList.length) {
+ return this.$u.toast('请上传图片')
+ }
+ if(this.form.contentType == 'video' && !this.formData.fileList.length) {
+ return this.$u.toast('请上传视频')
+ }
+ if(this.form.contentType == 'file' && !this.formData.fileList.length) {
+ return this.$u.toast('请上传文件')
+ }
if(this.formData.fileList.length) {
this.formData.file = this.formData.fileList[0]
}
@@ -210,10 +219,31 @@ export default {
}
this.$http.post("/app/pushmessage/addOrUpdate", params).then(res => {
if (res?.code == 0) {
-
+ this.$u.toast('发送成功')
+ this.form = {
+ content: '',
+ contentType: 'text',
+ sendType: '0',
+ sendTime: ''
+ }
+ this.areaIdList = []
+ this.tagIdList = []
+ this.formDataInit()
+ }else {
+ this.$u.toast(res.msg)
}
+ }).catch((err) => {
+ this.$u.toast(err)
})
},
+ formDataInit() {
+ for(let key in this.formData) {
+ this.formData[key] = ''
+ }
+ this.formData.imgList = []
+ this.formData.fileList = []
+ this.formData.file = {}
+ },
back() {
uni.navigateBack()
}
diff --git a/src/project/police/AppResidentFile/components/info.vue b/src/project/police/AppResidentFile/components/info.vue
index bdf68ecd..4176f495 100644
--- a/src/project/police/AppResidentFile/components/info.vue
+++ b/src/project/police/AppResidentFile/components/info.vue
@@ -66,12 +66,13 @@