优化称重页面

This commit is contained in:
zc
2026-03-03 17:59:37 +08:00
parent cbd73d4312
commit 85dd8102a3
8 changed files with 235 additions and 112 deletions

View File

@@ -25,6 +25,11 @@ export function socialLogin(req: any) {
return http.post<T.LoginResp>(`${BASE_URL}/login`, req)
}
/** @desc 三方账号登录 */
export function cardLogin(req: any) {
return http.post<T.LoginResp>(`${BASE_URL}/login`, req)
}
/** @desc 三方账号登录授权 */
export function socialAuth(source: string) {
return http.get<T.SocialAuthAuthorizeResp>(`${BASE_URL}/${source}`)

View File

@@ -42,13 +42,14 @@ export interface RouteItem {
}
/** 认证类型 */
export type AuthType = 'ACCOUNT' | 'PHONE' | 'EMAIL' | 'SOCIAL'
export type AuthType = 'ACCOUNT' | 'PHONE' | 'EMAIL' | 'SOCIAL' | 'CARD'
export const AuthTypeConstants = {
ACCOUNT: 'ACCOUNT',
PHONE: 'PHONE',
EMAIL: 'EMAIL',
SOCIAL: 'SOCIAL',
CARD: 'CARD',
} as const
/** 基础认证请求接口 */
@@ -77,6 +78,16 @@ export interface EmailLoginReq extends AuthReq {
captcha: string
}
/** 刷卡登录请求参数 */
export interface CardLoginReq extends AuthReq {
cardNumber: string
}
/** 邮箱登录请求参数 */
export interface CardLoginReq extends AuthReq {
card: string
}
/** 登录响应类型 */
export interface LoginResp {
token: string
@@ -85,4 +96,4 @@ export interface LoginResp {
/** 第三方登录授权类型 */
export interface SocialAuthAuthorizeResp {
authorizeUrl: string
}
}

View File

@@ -4,21 +4,21 @@ const BASE_URL = '/weighManage/material'
export interface WeighManageResp {
id: string
materialCode: string
encoding: string
materialName: string
materialSpec: string
weight: number
imageUrl: string
unitWeight: number
photoUrl: string
matchResult: string
}
export interface WeighManageQuery {
materialCode: string
encoding: string
}
/** @desc 查询物料信息 */
export function getMaterialDetail(query: WeighManageQuery) {
return http.get<WeighManageResp>(`${BASE_URL}/detail`, query)
export function getMaterialDetail(code: string) {
return http.get<WeighManageResp>(`/admin/materialInfo/code/${code}`)
}
/** @desc 新增人员管理 */