Commit 73e6b5b7 authored by zhengke's avatar zhengke

优化生成封面图

parent ea0d3dc2
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
<!-- 生成封面图 --> <!-- 生成封面图 -->
<div style="opacity: 0;position: fixed;left: 100px;top: 0;overflow: auto;z-index: -1;" <div style="opacity: 0;position: fixed;left: 100px;top: 0;overflow: auto;z-index: -1;"
v-if="toolbarState=='elTemplateData'&&model&&model==1&&slides.length>0&&slideIndex>=0"> v-if="model==1&&slideIndex>=0">
<div class="export-img-dialog"> <div class="export-img-dialog">
<div class="thumbnails-view"> <div class="thumbnails-view">
<div class="thumbnails FeatureImgRef" ref="FeatureImgRef"> <div class="thumbnails FeatureImgRef" ref="FeatureImgRef">
...@@ -375,6 +375,7 @@ ...@@ -375,6 +375,7 @@
isCoverImgStore.setIsCoverImg(true) isCoverImgStore.setIsCoverImg(true)
let datas = await exportFeatureImg(FeatureImgRef.value, 'jpeg', 1, false,0) let datas = await exportFeatureImg(FeatureImgRef.value, 'jpeg', 1, false,0)
if(datas){ if(datas){
let t =new Date().getTime()
let name = new Date().getTime()+".jpg" let name = new Date().getTime()+".jpg"
const file = dataURLtoFile(datas, name) const file = dataURLtoFile(datas, name)
let url = '' let url = ''
...@@ -383,7 +384,7 @@ ...@@ -383,7 +384,7 @@
}else { }else {
namePath = CoverImgPath[CoverImgPath.length-1] namePath = CoverImgPath[CoverImgPath.length-1]
} }
url = await AliyunUpload.UploadAsync(file,`Feature/${namePath}`) url = await AliyunUpload.UploadAsync(file,`Feature/${namePath}?t=${t}`)
coverImgStore.setCoverImg(url) coverImgStore.setCoverImg(url)
isCoverImgStore.setIsCoverImg(false) isCoverImgStore.setIsCoverImg(false)
queryObj.value.CoverImg = CoverImg.value queryObj.value.CoverImg = CoverImg.value
......
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