功能:完善多店铺登录与首次部署SQL
This commit is contained in:
@@ -8,20 +8,20 @@ export interface LoginRequest {
|
||||
account: string
|
||||
password: string
|
||||
rememberMe?: boolean
|
||||
shopId?: number
|
||||
shopId?: string | number
|
||||
}
|
||||
|
||||
export interface PhoneLoginRequest {
|
||||
phone: string
|
||||
verificationCode: string
|
||||
shopId?: number
|
||||
shopId?: string | number
|
||||
}
|
||||
|
||||
export interface RegisterRequest {
|
||||
account: string
|
||||
password: string
|
||||
nickname: string
|
||||
shopId?: number
|
||||
shopId?: string | number
|
||||
phone?: string
|
||||
verificationCode?: string
|
||||
}
|
||||
@@ -38,7 +38,11 @@ export interface UserInfo {
|
||||
nickname: string
|
||||
avatar?: string
|
||||
signature?: string
|
||||
type?: number
|
||||
shopId?: number | string
|
||||
shopName?: string
|
||||
shopIds?: Array<number | string>
|
||||
shopNames?: string[]
|
||||
createTime: string
|
||||
updateTime?: string
|
||||
}
|
||||
@@ -58,6 +62,10 @@ export interface ResetPasswordRequest {
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
export interface SwitchShopRequest {
|
||||
shopId?: string | number
|
||||
}
|
||||
|
||||
export const authApi = {
|
||||
sendVerificationCode: (data: SendVerificationCodeRequest) => {
|
||||
return api.post('/user/send-verification-code', data)
|
||||
@@ -87,6 +95,10 @@ export const authApi = {
|
||||
return api.post('/user/logout')
|
||||
},
|
||||
|
||||
switchShop: (data: SwitchShopRequest) => {
|
||||
return api.post<LoginResponse>('/user/switch-shop', data)
|
||||
},
|
||||
|
||||
getUserInfo: () => {
|
||||
return api.get<UserInfo>('/user/info')
|
||||
},
|
||||
@@ -94,4 +106,4 @@ export const authApi = {
|
||||
resetPasswordByPhone: (data: ResetPasswordRequest) => {
|
||||
return api.post('/user/reset-password-by-phone', data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user