门店信息

This commit is contained in:
liu
2026-08-10 10:09:30 +08:00
parent 0203c84357
commit b288502e0e
19 changed files with 1001 additions and 748 deletions
+11 -7
View File
@@ -7,26 +7,30 @@ export interface WxLoginParams {
code: string
}
/** 绑定手机号参数 */
export interface BindPhoneParams {
/** 微信注册参数 */
export interface RegisterParams {
/** wx.login 的临时凭证 */
code: string
/** wx.getPhoneNumber 授权得到的 code */
phoneCode: string
/** 门店编码(后台门店管理维护) */
storeCode: string
}
/** 登录 / 绑定手机号返回 */
/** 登录 / 注册返回 */
export interface AuthResult {
token: string
user: User
}
/** 微信登录(自动注册):POST /mini/auth/login */
/** 微信登录(仅已注册用户可登录):POST /mini/auth/login */
export function wxLoginApi(params: WxLoginParams) {
return post<AuthResult>('/mini/auth/login', params)
}
/** 绑定手机号(自动匹配门店/供应商):POST /mini/auth/phone */
export function bindPhoneApi(params: BindPhoneParams) {
return post<AuthResult>('/mini/auth/phone', params)
/** 微信注册(code 换 openid + phoneCode 换手机号 + storeCode 绑定门店):POST /mini/auth/register */
export function registerApi(params: RegisterParams) {
return post<AuthResult>('/mini/auth/register', params)
}
/** 当前用户信息(含门店客户等级):GET /mini/auth/info */