Browse Source

发布通知内容新增可以发布视频

feature/syp_points
liuchuang 5 years ago
parent
commit
797cedea93
  1. 10
      src/views/modules/news/notice-add-or-update.vue

10
src/views/modules/news/notice-add-or-update.vue

@ -74,15 +74,15 @@
</el-form-item> </el-form-item>
<el-form-item label="banner视频" <el-form-item label="banner视频"
v-loading="videoLoading" v-loading="videoLoading"
prop="videoUrl"> prop="noticeVideoUrl">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader"
:action="this.uploadUrl" :action="this.uploadUrl"
:show-file-list="false" :show-file-list="false"
:on-success="handleVideoSuccess" :on-success="handleVideoSuccess"
:on-error="handelError" :on-error="handelError"
:before-upload="beforeVideoUpload"> :before-upload="beforeVideoUpload">
<video class="video" v-if="dataForm.videoUrl" <video class="video" v-if="dataForm.noticeVideoUrl"
:src="dataForm.videoUrl" controls="controls" height="178px" width="378px"></video> :src="dataForm.noticeVideoUrl" controls="controls" height="178px" width="378px"></video>
<i v-else <i v-else
class="el-icon-plus avatar-uploader-icon"></i> class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
@ -118,7 +118,7 @@ export default {
mobile: '', mobile: '',
noticeContent: '', noticeContent: '',
allDeptIdsShow: [], allDeptIdsShow: [],
videoUrl: '' noticeVideoUrl: ''
}, },
value: '', value: '',
// //
@ -355,7 +355,7 @@ export default {
this.dataForm.noticeImageUrl = res.data.url this.dataForm.noticeImageUrl = res.data.url
}, },
handleVideoSuccess (res, file) { handleVideoSuccess (res, file) {
this.dataForm.videoUrl = res.data.url this.dataForm.noticeVideoUrl = res.data.url
this.videoLoading = false this.videoLoading = false
}, },
beforeAvatarUpload (file) { beforeAvatarUpload (file) {

Loading…
Cancel
Save