From 44569ee8dd860746d6d90d8fe00260efb4b207ea Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Wed, 7 Sep 2022 00:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3V2=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user.js | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/user.js b/apps/user.js index 32da760..b880a54 100644 --- a/apps/user.js +++ b/apps/user.js @@ -18,9 +18,7 @@ import { } from "oicq"; import YAML from 'yaml' import User from "../model/user.js" -import { - checkAuth -} from "../adapter/mys.js" + export const rule = { userInfo: { reg: "^#*(ck|stoken|cookie|cookies|签到)查询$", @@ -219,8 +217,28 @@ export async function delSign(e) { export async function updCookie(e) { let user = new User(e); await user.getCookie(e) - let userCk = (await checkAuth(e, "cookie")) - e.uid = userCk.uid + if(isV3){ + let { + checkAuth + } = (await import(`file:///${_path}/plugins/xiaoyao-cvs-plugin/adapter/mys.js`)) + let userCk = (await checkAuth(e, "cookie")) + 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); if (!e.cookies || e.cookies.includes("undefined")) { e.reply("请先绑定stoken")