mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
调整ck查询接口调用方式
This commit is contained in:
parent
832c72da84
commit
607f6275fe
@ -30,12 +30,7 @@ export default class user {
|
|||||||
await this.cookie(this.e)
|
await this.cookie(this.e)
|
||||||
this.miHoYoApi = new MihoYoApi(this.e);
|
this.miHoYoApi = new MihoYoApi(this.e);
|
||||||
if(this.e.yuntoken){
|
if(this.e.yuntoken){
|
||||||
let yunres = await promiseRetry((retry, number) => {
|
let yunres = await this.miHoYoApi.logyunGenshen();
|
||||||
return this.miHoYoApi.logyunGenshen().catch((e) => {
|
|
||||||
return retry(e);
|
|
||||||
});
|
|
||||||
}, RETRY_OPTIONS);
|
|
||||||
|
|
||||||
let yundata = yunres.data
|
let yundata = yunres.data
|
||||||
if(yunres.retcode===0){
|
if(yunres.retcode===0){
|
||||||
sumData["云原神"]={
|
sumData["云原神"]={
|
||||||
@ -46,11 +41,7 @@ export default class user {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.e.cookies){
|
if(this.e.cookies){
|
||||||
let mysres = await promiseRetry((retry, number) => {
|
let mysres = await this.miHoYoApi.getTasksList();
|
||||||
return this.miHoYoApi.getTasksList().catch((e) => {
|
|
||||||
return retry(e);
|
|
||||||
});
|
|
||||||
}, RETRY_OPTIONS);
|
|
||||||
if(mysres.retcode===0){
|
if(mysres.retcode===0){
|
||||||
sumData["米游社"]={
|
sumData["米游社"]={
|
||||||
"米游币任务":mysres.data.can_get_points!=0?"未完成":"已完成",
|
"米游币任务":mysres.data.can_get_points!=0?"未完成":"已完成",
|
||||||
@ -62,11 +53,7 @@ export default class user {
|
|||||||
}
|
}
|
||||||
if(this.e.cookie){
|
if(this.e.cookie){
|
||||||
for(let name of nameData){
|
for(let name of nameData){
|
||||||
let resSign = await promiseRetry((retry, number) => {
|
let resSign = await this.miHoYoApi.honkai3rdSignTask(name);
|
||||||
return this.miHoYoApi.honkai3rdSignTask(name).catch((e) => {
|
|
||||||
return retry(e);
|
|
||||||
});
|
|
||||||
}, RETRY_OPTIONS);
|
|
||||||
if(resSign?.upData){
|
if(resSign?.upData){
|
||||||
// console.log(resSign?.upData)
|
// console.log(resSign?.upData)
|
||||||
for(let item of resSign?.upData){
|
for(let item of resSign?.upData){
|
||||||
|
Loading…
Reference in New Issue
Block a user