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