declare namespace qh { /** 插件id */ const crx_id: string; /** appkey */ const appkey: string; /** 支付成功的全局回调 */ let paySuccessCallback: () => void; /** 判断360安全浏览器客户端是否登录 */ function isLogin(cb: (isLogin: boolean) => void): void; /** 登录并获取授权码: */ type LoginFail = { code: number; msg: string }; function login(prop: { success?: (code: string) => void; fail?: (err: LoginFail) => void; complete?: (err: LoginFail | null, data: string | null) => void }): void; /** 获取登录用户信息 */ type UserInfo = { avatarUrl: string; nickName: string; [index: string]: any }; function getUserInfo(cb: (info: UserInfo) => void): void; /** 调起收银台页面 */ function requestPayment(cb?: () => void): void; /** 获取登录用户vip状态 */ type isVip = 0 | 1; type getPaymentInfoSuccess = { isVip: isVip; expire_time: number }; type getPaymentInfoFail = { code: number; msg: string }; function getPaymentInfo(prop: { session_key: string; success?: (data: getPaymentInfoSuccess) => void; fail?: (err: getPaymentInfoFail) => void; complete?: (err: getPaymentInfoFail | null, data: getPaymentInfoSuccess | null) => void; }): void; /** 打开订单管理页面 */ function showOrderList(): void; } export default qh;