mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2025-01-22 13:51:10 +08:00
获取authkey补充uid显示
This commit is contained in:
parent
b66750b84f
commit
0f8b38338b
@ -184,10 +184,13 @@ export async function gclog(e) {
|
||||
return true;
|
||||
}
|
||||
async function getAuthKey(e, user) {
|
||||
if(!e.uid){
|
||||
e.uid=e?.runtime?.user?._regUid
|
||||
}
|
||||
e.region = getServer(e.uid)
|
||||
let authkeyrow = await user.getData("authKey");
|
||||
let authkeyrow = await user.getData("authKey",{});
|
||||
if (!authkeyrow?.data) {
|
||||
e.reply("authkey获取失败:" + (authkeyrow.message.includes("登录失效") ? "请重新绑定stoken" : authkeyrow.message))
|
||||
e.reply(`uid:${e.uid},authkey获取失败:` + (authkeyrow.message.includes("登录失效") ? "请重新绑定stoken" : authkeyrow.message))
|
||||
return false;
|
||||
}
|
||||
return authkeyrow.data["authkey"];
|
||||
|
@ -222,14 +222,16 @@ export default class user {
|
||||
return res
|
||||
}
|
||||
async cloudSeach() {
|
||||
let res = await this.getData("cloudGet") //这样会算签到?具体待测试
|
||||
let res = await this.getData("cloudGet")
|
||||
if (res?.retcode == -100) {
|
||||
res.message = "云原神token失效/防沉迷"
|
||||
res.isOk = false;
|
||||
} else {
|
||||
res.isOk = true;
|
||||
if (res?.data?.total_time) {
|
||||
res.message =
|
||||
`米云币:${res?.data?.coin?.coin_num},免费时长:${res?.data?.free_time?.free_time}分钟,总时长:${res?.data.total_time}分钟`;
|
||||
`米云币:${res?.data?.coin?.coin_num},免费时长:${res?.data?.free_time?.free_time}分钟,总时长:${res?.data?.total_time}分钟`;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -688,6 +690,9 @@ export default class user {
|
||||
skuid = BotConfig.NoteCookie[e.user_id];
|
||||
}
|
||||
}
|
||||
if (!uid) {
|
||||
uid = e.runtime?.user?._regUid
|
||||
}
|
||||
this.e.uid = uid;
|
||||
this.e.cookie = cookie;
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user