92 lines
2.1 KiB
TypeScript
92 lines
2.1 KiB
TypeScript
|
import { http } from '@/utils/request';
|
||
|
|
||
|
/**
|
||
|
* 账号密码登录
|
||
|
* @returns UseAxiosReturn
|
||
|
*/
|
||
|
export function loginPassword() {
|
||
|
return http.post(`/api/login`, {
|
||
|
data: { name: '123' },
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//获取专业
|
||
|
export async function getMajor(code) {
|
||
|
const response = await http.post('/h5/cees/ceesUser/getMajor', {
|
||
|
userId: code,
|
||
|
});
|
||
|
// 如果响应成功,返回专业信息
|
||
|
return response;
|
||
|
}
|
||
|
//检查用户身份
|
||
|
export async function checkUser(code) {
|
||
|
const response = await http.post('/h5/cees/ceesUser/checkUser', {
|
||
|
userId: code,
|
||
|
});
|
||
|
return response;
|
||
|
}
|
||
|
|
||
|
// 研究生保存数据
|
||
|
export function save(data) {
|
||
|
return http.post('/h5/cees/ceesStudent/save', {
|
||
|
userName: data.userName,
|
||
|
studentId: data.studentId,
|
||
|
phone: data.phone,
|
||
|
checked: data.checked,
|
||
|
userId: data.userId,
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// 获取用户身份
|
||
|
export async function getUser(userId) {
|
||
|
const response = await http.get('/h5/cees/ceesUser/getUser', {
|
||
|
params: {
|
||
|
userId: userId,
|
||
|
},
|
||
|
});
|
||
|
return response;
|
||
|
}
|
||
|
// 根据groupId获取分组名
|
||
|
export async function getGroupName(groupId) {
|
||
|
const response = await http.get('/h5/cees/ceesUser/getGroupName', {
|
||
|
params: {
|
||
|
groupId: groupId,
|
||
|
},
|
||
|
});
|
||
|
return response;
|
||
|
}
|
||
|
|
||
|
// 本校老师保存数据
|
||
|
export function localTeacherSave(data) {
|
||
|
return http.post('/h5/cees/ceesLocalTeacher/save', {
|
||
|
userName: data.userName,
|
||
|
teacherId: data.teacherId,
|
||
|
phone: data.phone,
|
||
|
checked: data.checked,
|
||
|
userId: data.userId,
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// 外校老师保存数据
|
||
|
export function waiTeacherSave(data) {
|
||
|
return http.post('/h5/cees/ceesWaiTeacher/save', {
|
||
|
age: data.age,
|
||
|
bankAddress: data.bankAddress,
|
||
|
bankName: data.bankName,
|
||
|
carNumber: data.carNumber,
|
||
|
carStatus: data.carStatus,
|
||
|
dormitoryStatus: data.dormitoryStatus,
|
||
|
identityId: data.identityId,
|
||
|
jobTitle: data.jobTitle,
|
||
|
office: data.office,
|
||
|
pyCard: data.pyCard,
|
||
|
sex: data.sex,
|
||
|
userCardId: data.userCardId,
|
||
|
workName: data.workName,
|
||
|
workPhone: data.workPhone,
|
||
|
userName: data.userName,
|
||
|
phone: data.phone,
|
||
|
userId: data.userId,
|
||
|
});
|
||
|
}
|