mirror of
https://github.com/PlayEdu/h5.git
synced 2025-06-08 10:34:10 +08:00
课程详情课件下载
This commit is contained in:
parent
dbab0780fe
commit
457fb0a067
@ -118,15 +118,14 @@ const CoursePage = () => {
|
|||||||
const downLoadFile = (cid: number, id: number) => {
|
const downLoadFile = (cid: number, id: number) => {
|
||||||
vod.downloadAttachment(cid, id).then((res: any) => {
|
vod.downloadAttachment(cid, id).then((res: any) => {
|
||||||
if (isWechat()) {
|
if (isWechat()) {
|
||||||
const input = document.createElement("input");
|
Toast.show("请点击右上角···浏览器打开下载");
|
||||||
|
var input = document.createElement("input");
|
||||||
|
input.value = res.data.download_url;
|
||||||
document.body.appendChild(input);
|
document.body.appendChild(input);
|
||||||
input.setAttribute("value", res.data.download_url);
|
|
||||||
input.select();
|
input.select();
|
||||||
if (document.execCommand("copy")) {
|
document.execCommand("Copy");
|
||||||
document.execCommand("copy");
|
|
||||||
Toast.show("请点击右上角···浏览器打开下载");
|
|
||||||
}
|
|
||||||
document.body.removeChild(input);
|
document.body.removeChild(input);
|
||||||
|
window.open(res.data.download_url);
|
||||||
} else {
|
} else {
|
||||||
window.open(res.data.download_url);
|
window.open(res.data.download_url);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user