const http = uni.$u.http

// 获取oss对应的图片地址
export const getImgUrlApi = (params) => http.get('/basic/v1/oss/sign_url', {
	params: params
})

// OssInit初始化
export const getOssInitApi = (params) => http.get('/basic/v1/oss/policy', {
	params: params
})

// 获取token
export const postTokenApi = (params, config = {}) => http.post('/auth/v1/login', params, config).then(res => {
	console.log(res)
	
	return res;
})

// 获取用户信息
export const getUserInfoApi = (params) => http.get('/user/v1/detail', {
	params: params
})

// 获取短信验证码
export const getSmsCodeApi = (params) => http.get('/basic/v1/sms_code/get', {
	params: params
})

// 更新用户信息
export const updateUserInfoApi = (params) => http.put('/user/v1/update', params);

//注销账户
export const delAccountApi = (params) => http.delete('/user/v1/annuluser', params);

//撤销注销账户
export const cancelDelAccountApi = (params) => http.put('/user/v1/annulusercancel', params);

// 更新老师头像
export const updateAvatarUrlApi = (params) => http.put('/user/v1/teacher/update_avatar_url', params);

// 学校列表
export const getSchoolListApi = (params) => http.get('/user/v1/schoolList', {
	params: params
})

// 切换老师身份
export const putTeacherRolesApi = (id, params) => http.put(`/user/v1/teacher/${id}/change_role`, params);

// 待办事项统计
export const getTodoListStatisticsApi = (params) => http.get('/internship/v1/index/applet/waitHandleList', {
	params: params
})

// 实习项目列表
export const getProjectListApi = (params) => http.get('/internship/v1/project/simpleList', {
	params: params
})

// 报名审核列表
export const getRegistrationReviewApi = (params) => http.get('/internship/v1/entry/list', {
	params: params
})

//报名审核详情
export const getRegistrationDetailApi = (id, params) => http.get(`/internship/v1/entry/detail/${id}`, {
	params: params
})

// 报名审核
export const putRegistrationReviewApi = (params) => http.put(`/internship/v1/entry/audit`, params);

// 学生签到列表
export const getStudentSignInListApi = (params) => http.get('/internship/v1/attendance/applet/list', {
	params: params
})

// 日志批阅列表
export const getLogReviewListApi = (params) => http.get('/internship/v1/form_log/school/list', {
	params: params
})

// 实习日志详情
export const getLogDetailApi = (id, params) => http.get(`/internship/v1/form_log/detail/${id}`, {
	params: params
})

// 日志批阅
export const putLogReviewApi = (params) => http.put(`/internship/v1/form_log/approve`, params);

// 日志回复列表
export const getLogReplyListApi = (params) => http.get('/internship/v1/form_log_review/list', {
	params: params
})

// 创建日志回复
export const postLogReplyApi = (params) => http.post(`/internship/v1/form_log_review/save`, params);

// 报告批阅列表
export const getReportReviewListApi = (params) => http.get('/internship/v1/report/list', {
	params: params
})

// 实习报告详情
export const getReportDetailApi = (id, params) => http.get(`/internship/v1/report/detail_by_student/${id}`, {
	params: params
})

//报告批阅
export const putReportReviewApi = (id, params) => http.put(`/internship/v1/report/examine/${id}`, params);

//审批记录
export const getReportApprovalListApi = (formId, params) => http.get(`/internship/v1/report/examine_list/${formId}`, {
	params: params
})

// 成绩鉴定列表
export const getAchievementAppraisalListApi = (params) => http.get('/internship/v1/form/achievementAppraisalList', {
	params: params
})

// 成绩鉴定详情
export const getAchievementDetailApi = (id, params) => http.get(
	`/internship/v1/form/achievementAppraisalDetail/${id}`, {
		params: params
	})

//成绩鉴定
export const putAchievementAppraisalApi = (params) => http.post(`/internship/v1/form/evaluate`, params);

// 班级列表
export const getClassListApi = (params) => http.get('/internship/v1/form/listByTeacherApplet', {
	params: params
})

// 学生列表
export const getStudentListApi = (params) => http.get('/internship/v1/form/traineeList', {
	params: params
})

//实习过程详情
export const getInternshipProcessDetailApi = (params) => http.get(`/internship/v1/form/internshipProcess`, {
	params: params
})

// 三方协议列表
export const getAgreementListApi = (params) => http.get('/internship/v1/treaty/list_by_school', {
	params: params
})

//三方协议详情
export const getAgreementDetailApi = (id, params) => http.get(`/internship/v1/treaty/detail/${id}`, {
	params: params
})

//签到列表
export const getsignInListApi = (params) => http.get('/internship/v1/attendance/applet/monthAttendanceList', {
	params: params
})

// 实习岗位列表
export const getInternshipJobListApi = (params) => http.get('/internship/v1/form/internshipJob', {
	params: params
})

// 实践课程列表
export const getPracticalCoursesListApi = (params) => http.get('/internship/v1/form/internshipCourse', {
	params: params
})

//实习单详情
export const getInternshipDetailApi = (id, params) => http.get(`/internship/v1/form/detail/${id}`, {
	params: params
})