bug
This commit is contained in:
@@ -42,13 +42,13 @@
|
||||
<div class="type">
|
||||
<p class="color-666">其它类型</p>
|
||||
<u-radio-group v-model="form.contentType">
|
||||
<u-radio v-for="(item, index) in typeList" :key="index" :name="item.type"> {{item.name}}</u-radio>
|
||||
<u-radio v-for="(item, index) in typeList" :key="index" :name="item.type" @change="radioChange" > {{item.name}}</u-radio>
|
||||
</u-radio-group>
|
||||
</div>
|
||||
<div class="type-content">
|
||||
<div class="flex" v-if="form.contentType == 'image'">
|
||||
<p class="label" style="width:40px;">图片</p>
|
||||
<ai-uploader multiple @data="formData.fileList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
||||
<AiUploader :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||
</div>
|
||||
<div v-if="form.contentType == 'link'">
|
||||
<div class="flex border-b">
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="flex border-b">
|
||||
<p class="label">链接图片</p>
|
||||
<ai-uploader multiple @data="formData.imgList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
||||
<AiUploader multiple :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<p class="label">链接标题</p>
|
||||
@@ -70,11 +70,11 @@
|
||||
</div>
|
||||
<div class="flex" v-if="form.contentType == 'video'">
|
||||
<p class="label" style="width:40px;">视频</p>
|
||||
<AiUploader :multiple="true" type="file" :limit="1" placeholder="上传视频" @list="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||
<AiUploader type="video" :limit="1" placeholder="上传视频" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||
</div>
|
||||
<div class="flex" v-if="form.contentType == 'file'">
|
||||
<p class="label" style="width:40px;">视频</p>
|
||||
<AiUploader :multiple="true" type="file" :limit="1" placeholder="上传附件" @list="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||
<p class="label" style="width:40px;">附件</p>
|
||||
<AiUploader type="file" :limit="1" placeholder="上传附件" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
||||
</div>
|
||||
<div v-if="form.contentType == 'miniapp'" class="flex-label">
|
||||
<div class="flex border-b">
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<div class="flex">
|
||||
<p class="label" style="width:80px;">小程序图片</p>
|
||||
<ai-uploader multiple @data="formData.imgList" :limit="1" action="/admin/file/add2"></ai-uploader>
|
||||
<AiUploader multiple :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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}`})
|
||||
},
|
||||
@@ -210,10 +210,27 @@ 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()
|
||||
}
|
||||
})
|
||||
},
|
||||
formDataInit() {
|
||||
for(let key in this.formData) {
|
||||
this.formData[key] = ''
|
||||
}
|
||||
this.formData.imgList = []
|
||||
this.formData.fileList = []
|
||||
this.formData.file = {}
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user