Skip to content

Commit

Permalink
fix: 修改下载方式
Browse files Browse the repository at this point in the history
  • Loading branch information
wu529778790 committed May 15, 2024
1 parent 6a3cab3 commit 03e354d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/client/views/index/components/Wallpaper/imgBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ const handleDownload = (item) => {
: item.split("x")[1],
quality: 100,
});
const a = document.createElement("a");
a.href = `http://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=${url}`;
a.style = "display: none";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
window.open(`http://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=${url}`);
// const a = document.createElement("a");
// a.href = `http://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=${url}`;
// a.style = "display: none";
// document.body.appendChild(a);
// a.click();
// document.body.removeChild(a);
};
const fullscreenSrc = ref("");
Expand Down

0 comments on commit 03e354d

Please sign in to comment.