fix(Base): this绑定错乱

This commit is contained in:
shanmite 2021-03-29 19:28:05 +08:00
parent ed300fe140
commit fb51b0c36d
2 changed files with 11 additions and 3 deletions

View File

@ -125,6 +125,8 @@ Chrome浏览器:
3. 将 令牌 复制(注意,先复制,一旦关闭网页就不能查看了),再新建`Secrets`,键名 填入 `PAT`
注: 填好此处后脚本将会与主仓库自动同步, 可手动关闭
↓↓
### 检测中奖
@ -311,6 +313,11 @@ lottery_*:
```
将以上的三处星号(`*`)改为数字并依次复制粘贴以清理更多的账号
**注意**: 由于脚本会强制同步同名文件, 任何在原文件上的修改都会无效
解决办法
- 取消自动同步
- 重命名`/.github/workflows/`下的`.yml`文件以及修改内部的`name`值并禁用之前的`name`对应的工作流
### 如何关闭
![关闭工作流](.github/close.png)
@ -382,5 +389,6 @@ lottery_*:
> "model":"00"
> }
> ```
- [自定义设置模板](https://github.com/shanmite/LotteryAutoScript/issues/62#issuecomment-808882833)
---

View File

@ -20,11 +20,11 @@ const Base = {
const obj = JSON.parse(str);
return typeof obj === 'object' ? obj : false
} catch (_) {
this.tooltip.log(str);
console.log(str);
return false;
}
} else {
this.tooltip.log(`${str}\nIt is not a string!`);
console.log(`${str}\nIt is not a string!`);
return false;
}
})(params);
@ -189,7 +189,7 @@ const Base = {
}
},
failure: err => {
this.tooltip.log('获取远程设置错误: ' + err);
console.log('获取远程设置错误: ' + err);
resolve(JSON.parse('{}'));
}
})