This commit is contained in:
yanran200730
2021-12-24 18:20:18 +08:00
parent bd4861e4c1
commit ee39c87bf7

View File

@@ -65,6 +65,20 @@
<el-button style="margin-top: 10px;">重新选择</el-button> <el-button style="margin-top: 10px;">重新选择</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="视频封面" prop="pictureUrl" style="width: 100%;">
<ai-uploader
:instance="instance"
isShowTip
v-model="form.pictureUrl"
:limit="1"
:cropOps="cropOps"
is-crop>
<template slot="tips">
<p>最多上传1张图片,单个文件最大10MB支持jpgjpegpng格式</p>
<p>图片比例1.61</p>
</template>
</ai-uploader>
</el-form-item>
</el-form> </el-form>
</template> </template>
</ai-card> </ai-card>
@@ -98,6 +112,7 @@
areaId: '', areaId: '',
files: [], files: [],
categoryId: '', categoryId: '',
pictureUrl: '',
contentType: '0', contentType: '0',
areaName: '', areaName: '',
thumbUrl: [] thumbUrl: []
@@ -136,6 +151,10 @@
this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => { this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.form = res.data this.form = res.data
this.form.pictureUrl = res.data.pictureUrl ? [{
url: res.data.pictureUrl
}] : []
} }
}) })
}, },
@@ -214,7 +233,8 @@
moduleId: this.$route.query.moduleId, moduleId: this.$route.query.moduleId,
createUserName: this.user.info.name, createUserName: this.user.info.name,
createUserId: this.user.info.id, createUserId: this.user.info.id,
categoryName: categoryName categoryName: categoryName,
pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : ''
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success('提交成功') this.$message.success('提交成功')