diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a4d33d..ec717df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.2.1 +# 1.2.2 * 重写接口文件去除`promise-retry`跟 `superagent`依赖 * 自动签到增加推送签到信息以及成功信息 # 1.2.1 diff --git a/apps/user.js b/apps/user.js index fac8dfc..bb48f1a 100644 --- a/apps/user.js +++ b/apps/user.js @@ -254,7 +254,7 @@ export async function updCookie(e) { for(let item of Object.keys(stoken)){ e.region = getServer(stoken[item].uid) e.uid=stoken[item].uid - let res= await user.getData("bbsGetCookie",{cookies:`uid=${stoken[item].stuid}&stoken=${stoken[item].stoken}`}) + let res= await user.getData("bbsGetCookie",{cookies:`uid=${stoken[item].stuid}&stoken=${stoken[item].stoken}`},false) if (!res?.data) { e.reply(`uid:${stoken[item].uid},请求异常:${res.message}`) continue; diff --git a/components/Changelog.js b/components/Changelog.js index c69f934..4dbf6b5 100644 --- a/components/Changelog.js +++ b/components/Changelog.js @@ -71,6 +71,6 @@ try { } const yunzaiVersion = packageJson.version -const isV3 = yunzaiVersion[0] === '3' +const isV3 = yunzaiVersion[0]*1 > 2 export { currentVersion, yunzaiVersion, isV3, changelogs } diff --git a/model/user.js b/model/user.js index 2f3e7ea..34c6b40 100644 --- a/model/user.js +++ b/model/user.js @@ -76,8 +76,10 @@ export default class user { } return sumData; } - async getData(type, data = {}) { - await this.cookie(this.e) + async getData(type, data = {},isck=true) { + if(isck){ + await this.cookie(this.e) + } this.miHoYoApi = new miHoYoApi(this.e); let res = await this.miHoYoApi.getData(type, data) return res