mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
修正识别
This commit is contained in:
parent
100809761d
commit
c69d8fe6f8
@ -62,15 +62,15 @@ export async function userInfo(e, {
|
|||||||
export async function gclog(e) {
|
export async function gclog(e) {
|
||||||
let user = new User(e);
|
let user = new User(e);
|
||||||
await user.cookie(e)
|
await user.cookie(e)
|
||||||
if(!e.cookies){
|
if(!e.cookies||e.cookies.includes("undefined")){
|
||||||
e.reply("暂未绑定stoken\n请先绑定stoken")
|
e.reply("请先绑定stoken")
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
let miHoYoApi = new MihoYoApi(e);
|
let miHoYoApi = new MihoYoApi(e);
|
||||||
let kkbody = await miHoYoApi.getbody("原神");
|
let kkbody = await miHoYoApi.getbody("原神");
|
||||||
const objData = await miHoYoApi.getUserInfo(kkbody)
|
const objData = await miHoYoApi.getUserInfo(kkbody)
|
||||||
let data = objData.data
|
let data = objData.data
|
||||||
e.region = e.uid[0] == 5 ? "cn_qd01" : "cn_gf01"
|
e.region = e.uid[0]*1 == 5 ? "cn_qd01" : "cn_gf01"
|
||||||
let authkeyrow = await miHoYoApi.authkey(data);
|
let authkeyrow = await miHoYoApi.authkey(data);
|
||||||
if(!authkeyrow?.data){
|
if(!authkeyrow?.data){
|
||||||
e.reply("authkey获取失败:"+authkeyrow.message)
|
e.reply("authkey获取失败:"+authkeyrow.message)
|
||||||
@ -99,8 +99,7 @@ export async function gclog(e) {
|
|||||||
for (let item of Object.keys(postdata)) {
|
for (let item of Object.keys(postdata)) {
|
||||||
url += `${item}=${postdata[item]}&`
|
url += `${item}=${postdata[item]}&`
|
||||||
}
|
}
|
||||||
let plyurl = url.substring(0, url.length - 1);
|
e.msg= url.substring(0, url.length - 1);
|
||||||
e.msg=plyurl
|
|
||||||
if(isV3){
|
if(isV3){
|
||||||
let gclog= (await import(`file:///${_path}/plugins/genshin/model/gachaLog.js`)).default
|
let gclog= (await import(`file:///${_path}/plugins/genshin/model/gachaLog.js`)).default
|
||||||
await (new gclog(e)).logUrl()
|
await (new gclog(e)).logUrl()
|
||||||
|
Loading…
Reference in New Issue
Block a user