每周五更新
This commit is contained in:
@@ -938,27 +938,17 @@ export default {
|
||||
*/
|
||||
handleDownloadClient(types) {
|
||||
// 走后端接口下载客户端程序
|
||||
|
||||
let userEmail = JSON.parse(localStorage.getItem("leasEmail"));
|
||||
if (!userEmail) {
|
||||
// 弹出确认框,用户确认后跳转到外部网站
|
||||
this.$confirm("获取用户信息失败,请重新进入网站?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
// 用户点击确认,跳转到外部网站
|
||||
window.open("https://test.m2pool.com/", "_blank");
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户点击取消,不执行任何操作
|
||||
});
|
||||
return;
|
||||
let userEmail = "";
|
||||
try {
|
||||
const email = localStorage.getItem("leasEmail");
|
||||
if (email) {
|
||||
userEmail = JSON.parse(email);
|
||||
}
|
||||
} catch (e) {
|
||||
// 忽略解析错误,userEmail 保持为空字符串
|
||||
}
|
||||
console.log(userEmail, "userEmail");
|
||||
|
||||
this.downloadUrl = ` ${request.defaults.baseURL}/lease/user/downloadClient?userEmail=${userEmail}&type=${types}`;
|
||||
this.downloadUrl = `${request.defaults.baseURL}/lease/user/downloadClient?userEmail=${userEmail || ""}&type=${types}`;
|
||||
let a = document.createElement(`a`);
|
||||
a.href = this.downloadUrl;
|
||||
a.click();
|
||||
|
||||
Reference in New Issue
Block a user