Commit 1d0a2d7d authored by 黄奎's avatar 黄奎

页面修改

parent 1550bf21
......@@ -363,7 +363,6 @@
item.Selected = true;
} else {
item.Selected = false;
}
})
},
......@@ -517,13 +516,23 @@
//上传视频
UploadVideo(file) {
var that = this;
this.UploadSelfFile(this.FileType().Video, file.file, res => {
// this.UploadSelfFile(this.FileType().Video, file.file, res => {
// if (res.resultCode == 1) {
// that.addpageMsg.Image = res.VideoCoverImg;
// that.addpageMsg.Path = res.FileUrl;
// that.addpageMsg.Name = res.FileName;
// that.addPageList();
// that.$forceUpdate();
// }
// })
this.UploadFileToTencent(this.FileType().Video, file.file, res => {
if (res.resultCode == 1) {
that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName;
that.addPageList();
that.$forceUpdate();
if (this.addpageMsg.Type == 2) {
this.addpageMsg.Image = res.FileUrl;
}
this.addpageMsg.Path = res.FileUrl;
this.addpageMsg.Name = res.FileName;
this.addPageList();
}
})
},
......
......@@ -40,7 +40,7 @@
</el-input>
</div>
<div class="basefix app-attachment-list">
<div class="material-item material-upload">
<div class="material-item material-upload">
<!--UploadVideo-->
<el-upload class="avatar-uploader" action="" accept="video/mp4,video/ogg,video/webm" :show-file-list="false"
:http-request="UploadImage">
......@@ -54,7 +54,8 @@
<div @click="PageSelect(item,index)" :class="selectId==item.Id ? 'selected' :''"
class="el-tooltip item material-item ">
<img :src="getIconLink(item.Image)" class="material-img" style="width: 100px; height: 100px;">
<div class="material-video-info"><i class="el-icon-video-play"></i> <span>{{Time(item.VideoTime)}}</span></div>
<div class="material-video-info"><i class="el-icon-video-play"></i> <span>{{Time(item.VideoTime)}}</span>
</div>
<div flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div>
</div>
......@@ -151,7 +152,7 @@
Image: '',
VideoTime: 0,
WithHeight: 0,
PathType:0
PathType: 0
},
selectId: -1,
emitmsg: {},
......@@ -174,7 +175,8 @@
this.GetPageList();
},
methods: {
Time(value) {
Time(value) {
var theTime = parseInt(value); // 秒
var middle = 0; // 分
var hour = 0; // 小时
......@@ -223,9 +225,10 @@
this.selectId = -1;
},
UploadImage(file) {
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => {
this.UploadFileToTencent(this.FileType().Video, file.file, res => {
if (res.resultCode == 1) {
this.addpageMsg.Path = res.FileUrl;
//this.addpageMsg.Image=res.FileUrl+"&preview=true";
this.addpageMsg.Name = res.FileName;
this.addPageList();
}
......@@ -234,8 +237,8 @@
// 新增素材信息
addPageList() {
var upInfo = JSON.parse(localStorage.uploadInfo);
if(upInfo){
this.addpageMsg.PathType=upInfo.StoreType;
if (upInfo) {
this.addpageMsg.PathType = upInfo.StoreType;
}
this.apipost("/api/product/SetGetMaterialInfo", this.addpageMsg, res => {
if (res.data.resultCode == 1) {
......@@ -245,11 +248,11 @@
},
PageSelect(item) {
this.emitmsg = {
Path:item.Path,
Path: item.Path,
Id: item.Id,
Image:item.Image,
VideoTime:item.VideoTime,
PathType:item.PathType
Image: item.Image,
VideoTime: item.VideoTime,
PathType: item.PathType
}
this.selectId = item.Id;
},
......
......@@ -39,7 +39,7 @@
<el-tooltip class="item" effect="dark" content="建议尺寸750*750" placement="top">
<el-button @click="openChangeDig(2)" size="small">选择文件</el-button>
</el-tooltip>
<div class="app-gallery-item" style="position: relative;margin-top: 10px;">
<div style="position: relative;margin-top: 10px;">
<template v-if="addMsg.CommentImgList&&addMsg.CommentImgList.length>0" >
<template v-for="(item,index) in addMsg.CommentImgList">
<img :key="index" :src="item" style="width:80px;height:80px;padding-left:10px;" alt="">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment