examTeamApp/tools/model.js

222 lines
5.5 KiB
JavaScript

import http from './https.js'
import tools from './tools.js'
import store from '@/store'
export default {
// 登录
getonlogin(param) { // 登录
return http.post("/login_action", param).then(res => {
return res
})
},
getSendCode(param) { // 验证码
return http.post("/send_phone_email_code", param).then(res => {
return res
})
},
getregister(param) { // 注册
return http.post("/register_action", param).then(res => {
return res
})
},
getResetPassword(param) { // 重置密码
return http.post("/reset_password", param).then(res => {
return res
})
},
getloginOut(param) { // 退出登录
return http.post("/user_quit_account", param).then(res => {
return res
})
},
getloginversion(param) { // 版本检测
return http.post("/login_invalid_version", param).then(res => {
return res
})
},
// 账户信息
getAccountNumber(param) { // 获取账号信息
return http.post("/get_my_account_msg", param).then(res => {
return res
})
},
getAccountPassword(param) { // 修改密码
return http.post("/update_my_password", param).then(res => {
return res
})
},
getAccountNickname(param) { // 修改昵称
return http.post("/update_my_nickname", param).then(res => {
return res
})
},
getAccountMsg(param) { // 邮箱/手机号绑定
return http.post("/update_my_account_msg", param).then(res => {
return res
})
},
// 首页
getUserInfo(param) { // 成员详情
return http.post("/get_user_data_information", param).then(res => {
return res
})
},
getUserList(param) { // 成员列表
return http.post("/get_user_card_list", param).then(res => {
return res
})
},
getDelUser(param) { // 删除成员
return http.post("/del_user_data", param).then(res => {
return res
})
},
getEditUser(param) { // 修改成员资料
return http.post("/update_user_data", param).then(res => {
return res
})
},
getAddUser(param) { // 添加成员
return http.post("/create_user_data", param).then(res => {
return res
})
},
getGradeList(param) { // 获取年级列表
return http.post("/get_grade_list", param).then(res => {
return res
})
},
getCardAllList(param) { // 获取所有卡片
return http.post("/get_card_all_list", param).then(res => {
return res
})
},
getCardAllOrder(param) { // 保存卡片顺序
return http.post("/save_user_card_order", param).then(res => {
return res
})
},
// 身体数据卡片
getfirstweight(param) { //修改初始体重
return http.post("/card_modify_weight", param).then(res => {
return res
})
},
getinsertmeasure(param) { //手动记录
return http.post('/card_manual_recording', param).then(res => {
return res
})
},
getResult(param) { //获取测量报告
return http.post("/card_data_detailed", param).then(res => {
return res
})
},
getTrendList(param) { //趋势
return http.post("/card_curve_chart", param).then(res => {
return res
})
},
// 跳绳
getSkipResult(param) { //获取测量报告
return http.post("/skip_today_data", param).then(res => {
return res
})
},
getskipmeasure(param) { //手动记录
return http.post('/skip_manual_recording', param).then(res => {
return res
})
},
getSkipTrendList(param) { //趋势
return http.post("/skip_curve_chart", param).then(res => {
return res
})
},
// 肺活量
getLungResult(param) { //获取测量报告
return http.post("/vitalcapacity_data_report", param).then(res => {
return res
})
},
getLungmeasure(param) { //手动记录
return http.post('/vitalcapacity_save_record_data', param).then(res => {
return res
})
},
getLungTrendList(param) { //趋势
return http.post("/vitalcapacity_curve_chart", param).then(res => {
return res
})
},
// 估分
getSportshistory(param) { //历史
return http.post("/sportstesting_get_all_list", param).then(res => {
return res
})
},
getSportshistorydetail(param) { //历史详情
return http.post("/sportstesting_get_one_details", param).then(res => {
return res
})
},
getSportsResult(param) { //报告
return http.post("/sportstesting_get_last_data", param).then(res => {
return res
})
},
getSportsListAll(param) { //获取地区所有类型项目列表
return http.post("/sportstesting_get_region_list", param).then(res => {
return res
})
},
getSportsList(param) { //获取地区单个项目列表
return http.post("/sportstesting_get_type_list", param).then(res => {
return res
})
},
getSportsData(param) { //开始估分
return http.post("/sportstesting_set_once_data", param).then(res => {
return res
})
},
// 公共
gethistory(param) { //历史记录
return http.post("/get_all_record_data_page", param).then(res => {
return res
})
},
gethistorydetail(param) { //历史记录详情
return http.post("/get_all_record_detailed_information", param).then(res => {
return res
})
},
gethistorydelete(param) { //删除历史记录
return http.post("/card_del_record_data", param).then(res => {
return res
})
},
getresultdiff(param) { //记录对比
return http.post("/get_all_record_data_group", param).then(res => {
if (res.code == 0) {
let pkList = {
list: [],
Dlist: []
}
for (var i = 0; i < res.data.length; i++) {
pkList.list.push(res.data[i])
if (!pkList.Dlist.includes(res.data[i].r_t)) { //includes 检测数组是否有某个值
pkList.Dlist.push(res.data[i].r_t);
}
}
res.pkList = pkList
}
return res
})
},
getresultcontrast(param) { //对比详情
return http.post("/get_all_card_data_contrast", param).then(res => {
return res
})
},
}