const http = uni.$u.http

// 获取oss对应的图片地址
export const getImgUrlApi = (params) => http.get('/basic/v1/oss/signUrl', {
	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/smsCode/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/updateAvatarUrl', params);

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

// 切换老师身份
export const putTeacherRolesApi = (id, params) => http.put(`/user/v1/teacher/${id}/changeRole`, 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/formLog/school/list', {
	params: params
})

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

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

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

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

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

// 实习报告详情
export const getReportDetailApi = (id, params) => http.get(`/internship/v1/report/detailByStudent/${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/examineList/${formId}`, {
	params: params
})

// 成绩鉴定列表
export const getAchievementAppraisalListApi = (params) => http.get('/internship/v1/score/list', {
	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/listBySchool', {
	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
})

// 请假申请列表
export const getleaveRecordlistListApi = (params) => http.get('/internship/v1/leaveRecord/list', {
	params: params
})

// 请假详情
export const getleaveRecorddetailApi = (id,params) => http.get('/internship/v1/leaveRecord/detail/'+id, {
	params: params
})

// 请假审批
export const putleaveRecorddetailApi = (id,params) => http.put(`/internship/v1/leaveRecord/${id}/approve`, params)

// 变更列表
export const getformChangeApplyListApi = (params) => http.get('/internship/v1/formChangeApply/list', {
	params: params
})

// 变更详情
export const formChangeApplydetailUrl = (id,params) => http.get('/internship/v1/formChangeApply/detail/'+id, {
	params: params
})

// 变更审批
export const putformChangeApplyapprovalUrl = (id,params) => http.put('/internship/v1/formChangeApply/approval/'+id,params) 

// 鉴定详情1
export const scoredetailUrl = (id,params) => http.get('/internship/v1/score/detail/'+id,params) 

// 成绩鉴定---实习信息
export const scoreinternshipInfoUrl = (params) => http.get('/internship/v1/score/internshipInfo',{
	params: params
})

// 鉴定成绩鉴定
export const putscoreappraisalApi = (params) => http.put('/internship/v1/score/appraisal', params)

// 实习生详情-实习课程-实习信息
export const getforminternshipInfoApi = (params) => http.get('/internship/v1/form/internshipInfo', {
	params: params
})

// 实习申请-列表
export const getformApplyschoollistApi = (params) => http.get('/internship/v1/formApply/school/list', {
	params: params
})

// 实习申请-详情
export const getformApplyschooldetailApi = (id,params) => http.get('/internship/v1/formApply/'+id, {
	params: params
})

// 实习申请-审核
export const putformApplyApi = (id,params) => http.put('/internship/v1/formApply/audit/'+id, params)