修改登录,绑定学生相关界面
This commit is contained in:
+5
-2
@@ -268,14 +268,17 @@ export type VerifyAccountParams = {
|
||||
* 验证学生二维码
|
||||
*/
|
||||
export function apiVerifyStudentQRCode(params: VerifyQRCodeParams): Promise<ApiResponse<StudentInfo> | null> {
|
||||
return post<StudentInfo>('/api/student/verify-qrcode', params)
|
||||
return apiVerifyStudentAccount({ account: params.account, name: params.name })
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证学生账号
|
||||
*/
|
||||
export function apiVerifyStudentAccount(params: VerifyAccountParams): Promise<ApiResponse<StudentInfo> | null> {
|
||||
return post<StudentInfo>('/api/student/verify-account', params)
|
||||
return get<any>('/api/v1/Parents/VerifyStudent', { RealName: params.name, Account: params.account }).then((res) => {
|
||||
if (!res || !res.data) return null
|
||||
return { code: res.code, message: res.message, data: { id: String(res.data.userId), name: res.data.name, account: res.data.account, avatar: res.data.avatar || '', grade: res.data.gradeLevel || '', class: res.data.className || '' } }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user