import request from '@/utils/request' const v = "1.0"; /** 获取账号绑定基础信息(页面初始化用) */ export const getBindInfo = () => { return request({ url: '/system', method: 'post', params: { method: 'account.getBindInfo', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } /** * 获取微信绑定二维码及轮询状态 * 支持轮询,优先命中缓存,不重复查库 * 返回: { status: 'waiting'|'scanned'|'bound'|'expired', bindCode, qrUrl, nickname, openid } */ export const getBindWechatCode = () => { return request({ url: '/system', method: 'post', params: { method: 'user.getBindWechatCode', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) } /** * 解绑微信 * 删除 ye4s 数据库中的绑定关联记录,并清除缓存 */ export const unbindWechat = () => { return request({ url: '/system', method: 'post', params: { method: 'user.unbindWechat', v, timestamp: new Date().getTime() }, data: {}, isSystemApi: true } as any) }