mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
修正V2初始化报错问题
This commit is contained in:
parent
bd35367007
commit
44569ee8dd
24
apps/user.js
24
apps/user.js
@ -18,9 +18,7 @@ import {
|
|||||||
} from "oicq";
|
} from "oicq";
|
||||||
import YAML from 'yaml'
|
import YAML from 'yaml'
|
||||||
import User from "../model/user.js"
|
import User from "../model/user.js"
|
||||||
import {
|
|
||||||
checkAuth
|
|
||||||
} from "../adapter/mys.js"
|
|
||||||
export const rule = {
|
export const rule = {
|
||||||
userInfo: {
|
userInfo: {
|
||||||
reg: "^#*(ck|stoken|cookie|cookies|签到)查询$",
|
reg: "^#*(ck|stoken|cookie|cookies|签到)查询$",
|
||||||
@ -219,8 +217,28 @@ export async function delSign(e) {
|
|||||||
export async function updCookie(e) {
|
export async function updCookie(e) {
|
||||||
let user = new User(e);
|
let user = new User(e);
|
||||||
await user.getCookie(e)
|
await user.getCookie(e)
|
||||||
|
if(isV3){
|
||||||
|
let {
|
||||||
|
checkAuth
|
||||||
|
} = (await import(`file:///${_path}/plugins/xiaoyao-cvs-plugin/adapter/mys.js`))
|
||||||
let userCk = (await checkAuth(e, "cookie"))
|
let userCk = (await checkAuth(e, "cookie"))
|
||||||
e.uid = userCk.uid
|
e.uid = userCk.uid
|
||||||
|
}else{
|
||||||
|
// let {
|
||||||
|
// MysUser
|
||||||
|
// } = (await import(`file:///${_path}/lib/components/Models.js`))
|
||||||
|
// console.log(MysUser)
|
||||||
|
// let uid =await MysUser.getUidByCookie();
|
||||||
|
// console.log(uid)
|
||||||
|
|
||||||
|
// let {
|
||||||
|
// bing
|
||||||
|
// } = (await import(`file:///${_path}/lib/app/gachaLog.js`))
|
||||||
|
// let userCk = (await checkAuth(e, "cookie"))
|
||||||
|
// e.uid = userCk.uid
|
||||||
|
e.reply("暂不支持V2")
|
||||||
|
return true;
|
||||||
|
}
|
||||||
let miHoYoApi = new MihoYoApi(e);
|
let miHoYoApi = new MihoYoApi(e);
|
||||||
if (!e.cookies || e.cookies.includes("undefined")) {
|
if (!e.cookies || e.cookies.includes("undefined")) {
|
||||||
e.reply("请先绑定stoken")
|
e.reply("请先绑定stoken")
|
||||||
|
Loading…
Reference in New Issue
Block a user