|
window.api.download(
{
url: api + id,
// savePath: "fs://test" + id,
report: true,
cache: true,
allowResume: true,
},
function (ret, err) {
if (ret.state == 1) {
alert(JSON.stringify(ret.savePath))
var office = window.api.require("officePreview");
office.open({
rect: { x: _this.x, y: _this.y, w: _this.w, h: _this.h },
fixedOn: window.api.frameName,
fixed: true,
url: ret.savePath,
fileType: this.fileType,
});
toast1.clear();
} else {
toast1.clear();
}
}
); |
|