2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 11:00:51 +08:00
This commit is contained in:
Ctrlcvs 2022-10-13 16:19:09 +08:00
parent c7184dae78
commit c7485b887b
4 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# 1.2.1
# 1.2.2
* 重写接口文件去除`promise-retry`跟 `superagent`依赖
* 自动签到增加推送签到信息以及成功信息
# 1.2.1

View File

@ -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;

View File

@ -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 }

View File

@ -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