2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +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`依赖 * 重写接口文件去除`promise-retry`跟 `superagent`依赖
* 自动签到增加推送签到信息以及成功信息 * 自动签到增加推送签到信息以及成功信息
# 1.2.1 # 1.2.1

View File

@ -254,7 +254,7 @@ export async function updCookie(e) {
for(let item of Object.keys(stoken)){ for(let item of Object.keys(stoken)){
e.region = getServer(stoken[item].uid) e.region = getServer(stoken[item].uid)
e.uid=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) { if (!res?.data) {
e.reply(`uid:${stoken[item].uid},请求异常:${res.message}`) e.reply(`uid:${stoken[item].uid},请求异常:${res.message}`)
continue; continue;

View File

@ -71,6 +71,6 @@ try {
} }
const yunzaiVersion = packageJson.version const yunzaiVersion = packageJson.version
const isV3 = yunzaiVersion[0] === '3' const isV3 = yunzaiVersion[0]*1 > 2
export { currentVersion, yunzaiVersion, isV3, changelogs } export { currentVersion, yunzaiVersion, isV3, changelogs }

View File

@ -76,8 +76,10 @@ export default class user {
} }
return sumData; return sumData;
} }
async getData(type, data = {}) { async getData(type, data = {},isck=true) {
await this.cookie(this.e) if(isck){
await this.cookie(this.e)
}
this.miHoYoApi = new miHoYoApi(this.e); this.miHoYoApi = new miHoYoApi(this.e);
let res = await this.miHoYoApi.getData(type, data) let res = await this.miHoYoApi.getData(type, data)
return res return res