Commit 6c005ad4 authored by 黄奎's avatar 黄奎

页面修改

parent 060ae781
......@@ -185,7 +185,7 @@
rowsPerPage: 12,
},
billObj: {},
imgUrl: 'http://192.168.20.24:8300/upfile/temporary/20210805/637637591390867572.jpg',
imgUrl: '',
getBlob: '',
ProtocolNum: ''
}
......@@ -271,10 +271,8 @@
//复制生成二维码
CopyUrl(item) {
let locationName = window.location.hostname;
var domain = "http://localhost:8181/#/";
var domain = "https://edu.kookaku.com/#/";
var newUrl = 'courseRefundH5?Id=' + item.Id
domain = "https://edu.kookaku.com/#/";
let msg = {
url: domain + newUrl,
width: 430
......@@ -284,34 +282,34 @@
let address = process.env.API;
let aOne = address.split('/api')[0];
this.imgUrl = aOne + res.Data;
this.ProtocolNum = item.ProtocolNum;
this.getBlob = this.getAnyFileBlob(this.imgUrl);
setTimeout(() => {
let canvasID = document.getElementById("proToCol");
let a = document.createElement("a");
html2canvas(canvasID, {
useCORS: true, //【重要】开启跨域配置
allowTaint: true, //允许跨域图片
backgroundColor: "#FFFFFF",
scale: 1.3,
taintTest: false //是否在渲染前测试图片
}).then(canvas => {
let dom = document.body.appendChild(canvas);
dom.style.display = "none";
a.style.display = "none";
document.body.removeChild(dom);
let blob = this.dataURLToBlob(dom.toDataURL("image/png"));
a.setAttribute("href", URL.createObjectURL(blob));
var name = this.ProtocolNum;
a.setAttribute("download", name);
document.body.appendChild(a);
a.click();
URL.revokeObjectURL(blob);
document.body.removeChild(a);
});
}, 1000);
}
});
this.ProtocolNum = item.ProtocolNum;
this.getBlob = this.getAnyFileBlob(this.imgUrl);
setTimeout(() => {
let canvasID = document.getElementById("proToCol");
let a = document.createElement("a");
html2canvas(canvasID, {
useCORS: true, //【重要】开启跨域配置
allowTaint: true, //允许跨域图片
backgroundColor: "#FFFFFF",
scale: 1.3,
taintTest: false //是否在渲染前测试图片
}).then(canvas => {
let dom = document.body.appendChild(canvas);
dom.style.display = "none";
a.style.display = "none";
document.body.removeChild(dom);
let blob = this.dataURLToBlob(dom.toDataURL("image/png"));
a.setAttribute("href", URL.createObjectURL(blob));
var name = this.ProtocolNum;
a.setAttribute("download", name);
document.body.appendChild(a);
a.click();
URL.revokeObjectURL(blob);
document.body.removeChild(a);
});
}, 1000);
},
dataURLToBlob(dataurl) {
let arr = dataurl.split(",");
......
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