居民需求
This commit is contained in:
@@ -48,7 +48,15 @@
|
||||
<div class="type-content">
|
||||
<div class="flex" v-if="form.contentType == 'image'">
|
||||
<p class="label" style="width:40px;">图片</p>
|
||||
<AiUploader :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
||||
<AiUploader :def.sync="formData.fileList" :limit="1" @data="(v) => fileData = v"></AiUploader>
|
||||
</div>
|
||||
<div class="flex" v-if="form.contentType == 'video'">
|
||||
<p class="label" style="width:40px;">视频</p>
|
||||
<AiUploader type="video" :limit="1" placeholder="上传视频" :def.sync="formData.fileList" @data="(v) => fileData = v"></AiUploader>
|
||||
</div>
|
||||
<div class="flex" v-if="form.contentType == 'file'">
|
||||
<p class="label" style="width:40px;">附件</p>
|
||||
<AiUploader type="file" :limit="1" placeholder="上传附件" :def.sync="formData.fileList" @data="(v) => fileData = v"></AiUploader>
|
||||
</div>
|
||||
<div v-if="form.contentType == 'link'">
|
||||
<div class="flex border-b">
|
||||
@@ -68,14 +76,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex" v-if="form.contentType == 'video'">
|
||||
<p class="label" style="width:40px;">视频</p>
|
||||
<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 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">
|
||||
<p class="label">小程序标题</p>
|
||||
@@ -150,7 +150,8 @@ export default {
|
||||
accessTitle: '',
|
||||
accessUrl: '',
|
||||
accessAppid: '',
|
||||
file: {}
|
||||
file: {},
|
||||
mediaId: ''
|
||||
},
|
||||
areaIdList: [],
|
||||
tagIdList: [],
|
||||
@@ -162,7 +163,8 @@ export default {
|
||||
hour: true,
|
||||
minute: true,
|
||||
second: true
|
||||
}
|
||||
},
|
||||
fileData: null
|
||||
}
|
||||
},
|
||||
computed: {...mapState(['user'])},
|
||||
@@ -196,7 +198,7 @@ export default {
|
||||
if(!this.form.content) {
|
||||
return this.$u.toast('请输入文本内容')
|
||||
}
|
||||
if(this.form.contentType == 'image' && !this.formData.imgList.length) {
|
||||
if(this.form.contentType == 'image' && !this.formData.fileList.length) {
|
||||
return this.$u.toast('请上传图片')
|
||||
}
|
||||
if(this.form.contentType == 'video' && !this.formData.fileList.length) {
|
||||
@@ -208,9 +210,7 @@ export default {
|
||||
if(this.formData.fileList.length) {
|
||||
this.formData.file = this.formData.fileList[0]
|
||||
this.formData.accessUrl = this.formData.fileList[0].url
|
||||
}
|
||||
if(this.formData.imgList.length) {
|
||||
this.formData.accessUrl = this.formData.imgList[0].url
|
||||
this.formData.mediaId = this.fileData.media.mediaId
|
||||
}
|
||||
var params = {
|
||||
...this.form,
|
||||
|
||||
Reference in New Issue
Block a user