mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 11:36:45 +08:00
更换贺报下载的方法16
This commit is contained in:
@@ -45,9 +45,6 @@ export default {
|
||||
downLoadJin: false,
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
this.$refs.xingdownLoad = null;
|
||||
},
|
||||
created() {
|
||||
// this.isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
// if(this.isIOS) {
|
||||
@@ -59,7 +56,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
beforeDestroy(){
|
||||
this.$refs.xingdownLoad = null;
|
||||
this.$refs.xingdownLoad.parentNode.removeChild(this.$refs.xingdownLoad);
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
@@ -134,12 +131,13 @@ export default {
|
||||
scale: 1,
|
||||
dpi: 300
|
||||
});
|
||||
|
||||
domElement = null
|
||||
// 将画布转换为 Blob,并等待其完成
|
||||
const blob = await new Promise((resolve, reject) => {
|
||||
canvas.toBlob(resolve, 'image/png');
|
||||
console.log(3333);
|
||||
});
|
||||
|
||||
// let arr = false
|
||||
// // 将 Blob 转换为 Base64 字符串,并等待其完成
|
||||
// if(arr == false) {
|
||||
@@ -156,7 +154,6 @@ export default {
|
||||
|
||||
// 调用 base64Excel 函数,并等待其完成
|
||||
const res = await base64Excel({ base64Img: base64String });
|
||||
|
||||
// 检查结果,并处理下载逻辑
|
||||
if (res.result === '0') {
|
||||
console.log(5555);
|
||||
@@ -200,8 +197,9 @@ export default {
|
||||
|
||||
},
|
||||
close() {
|
||||
this.$emit('child-colse', '1')
|
||||
this.$refs.xingdownLoad.parentNode.removeChild(this.$refs.xingdownLoad);
|
||||
this.$emit('child-colse', '1')
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user