2025-03-19 13:15:34 +08:00
|
|
|
import { http } from '@/utils/request';
|
|
|
|
|
2025-05-14 20:54:01 +08:00
|
|
|
|
|
|
|
// 获取访问时间段
|
|
|
|
export async function getAccessTime() {
|
|
|
|
const response = await http.get('/h5/cees/ceesUser/getH5Time');
|
|
|
|
return response;
|
|
|
|
}
|
2025-03-19 13:15:34 +08:00
|
|
|
/**
|
|
|
|
* 账号密码登录
|
|
|
|
* @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;
|
|
|
|
}
|
|
|
|
|
2025-04-24 19:32:41 +08:00
|
|
|
// 根据dormitoryId获取分组名
|
|
|
|
export async function getDormitoryName(dormitoryId) {
|
|
|
|
const response = await http.get('/h5/cees/ceesWaiTeacher/getDormitoryName', {
|
|
|
|
params: {
|
|
|
|
dormitoryId: dormitoryId,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
|
2025-03-19 13:15:34 +08:00
|
|
|
// 本校老师保存数据
|
|
|
|
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) {
|
2025-04-24 19:32:41 +08:00
|
|
|
if (data.sex == '男') {
|
|
|
|
data.sex = 0;
|
|
|
|
}
|
|
|
|
if (data.sex == '女') {
|
|
|
|
data.sex = 1;
|
|
|
|
}
|
2025-03-19 13:15:34 +08:00
|
|
|
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,
|
|
|
|
});
|
|
|
|
}
|