2024-05-02 15:59:36 +08:00
|
|
|
import http from './https.js'
|
|
|
|
|
import tools from './tools.js'
|
|
|
|
|
import store from '@/store'
|
|
|
|
|
export default {
|
2024-05-29 16:35:45 +08:00
|
|
|
// 登录
|
|
|
|
|
getonlogin(param) { // 登录
|
|
|
|
|
return http.post("/login_action", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getSendCode(param) { // 验证码
|
2024-05-29 16:35:45 +08:00
|
|
|
return http.post("/send_phone_email_code", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getregister(param) { // 注册
|
|
|
|
|
return http.post("/register_action", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2025-03-25 09:18:11 +08:00
|
|
|
getRegisterPhone(param) { // 手机号快捷登录
|
|
|
|
|
return http.post("/wechat_quick_login", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-08-26 14:57:10 +08:00
|
|
|
getdeleteAccount(param) { // 删除用户
|
|
|
|
|
return http.post("/delete_account", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getResetPassword(param) { // 重置密码
|
|
|
|
|
return http.post("/reset_password", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getloginOut(param) { // 退出登录
|
|
|
|
|
return http.post("/user_quit_account", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-06-13 18:03:50 +08:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2024-05-29 16:35:45 +08:00
|
|
|
// 首页
|
|
|
|
|
getUserInfo(param) { // 成员详情
|
|
|
|
|
return http.post("/get_user_data_information", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getUserList(param) { // 成员列表
|
|
|
|
|
return http.post("/get_user_card_list", param).then(res => {
|
2024-07-25 16:55:39 +08:00
|
|
|
if (res.data.length) {
|
|
|
|
|
let options = [{
|
|
|
|
|
text: '删除',
|
|
|
|
|
style: {
|
|
|
|
|
backgroundColor: '#dd524d'
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
item.options = options
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getDelUser(param) { // 删除成员
|
|
|
|
|
return http.post("/del_user_data", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getEditUser(param) { // 修改成员资料
|
|
|
|
|
return http.post("/update_user_data", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getAddUser(param) { // 添加成员
|
|
|
|
|
return http.post("/create_user_data", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-10-11 10:04:19 +08:00
|
|
|
getGradeList(param) { // 获取年级、身份、地区列表
|
2024-05-29 16:35:45 +08:00
|
|
|
return http.post("/get_grade_list", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getCardAllList(param) { // 获取所有卡片
|
|
|
|
|
return http.post("/get_card_all_list", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getCardAllOrder(param) { // 保存卡片顺序
|
|
|
|
|
return http.post("/save_user_card_order", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
// 身体数据卡片
|
|
|
|
|
getfirstweight(param) { //修改初始体重
|
|
|
|
|
return http.post("/card_modify_weight", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getinsertmeasure(param) { //手动记录
|
|
|
|
|
return http.post('/card_manual_recording', param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getResult(param) { //获取测量报告
|
|
|
|
|
return http.post("/card_data_detailed", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getTrendList(param) { //趋势
|
|
|
|
|
return http.post("/card_curve_chart", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-08 10:50:07 +08:00
|
|
|
getmeasurefunit(param) { //保存测量结果
|
|
|
|
|
return http.post("/card_manual_recording_device", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
// 跳绳
|
|
|
|
|
getSkipResult(param) { //获取测量报告
|
|
|
|
|
return http.post("/skip_today_data", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getskipmeasure(param) { //手动记录
|
|
|
|
|
return http.post('/skip_manual_recording', param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-22 14:13:19 +08:00
|
|
|
getskipResult(param) { //测量报告
|
|
|
|
|
return http.post('/skip_manual_recording_device', param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getSkipTrendList(param) { //趋势
|
|
|
|
|
return http.post("/skip_curve_chart", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
// 肺活量
|
|
|
|
|
getLungResult(param) { //获取测量报告
|
|
|
|
|
return http.post("/vitalcapacity_data_report", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getLungmeasure(param) { //手动记录
|
|
|
|
|
return http.post('/vitalcapacity_save_record_data', param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-22 14:13:19 +08:00
|
|
|
getMeasureLung(param) { //添加测量记录
|
|
|
|
|
return http.post('/vitalcapacity_save_record_data_device', param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getLungTrendList(param) { //趋势
|
|
|
|
|
return http.post("/vitalcapacity_curve_chart", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-06-13 18:03:50 +08:00
|
|
|
// 估分
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-22 14:13:19 +08:00
|
|
|
getSportsListAll(param) { //获取地区所有项目列表
|
2024-06-13 18:03:50 +08:00
|
|
|
return http.post("/sportstesting_get_region_list", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-22 14:13:19 +08:00
|
|
|
getSportsList(param) { //获取单个项目列表
|
2024-06-13 18:03:50 +08:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-22 14:13:19 +08:00
|
|
|
getCityList(param) { //获取地区
|
|
|
|
|
return http.post("/sportstesting_get_city_list", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-07-08 10:50:07 +08:00
|
|
|
// 设备管理
|
|
|
|
|
getDeviceList(param) { //获取系统设备列表
|
|
|
|
|
return http.post("/device_data_list", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getBinding(param) { //绑定系统设备
|
|
|
|
|
return http.post("/device_binding", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getUserDeviceList(param) { //获取用户设备列表
|
|
|
|
|
return http.post("/device_user_data_list", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getUnbinding(param) { //解绑系统设备
|
|
|
|
|
return http.post("/device_unbinding", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getdevdetail(param) { //根据Mac地址获取设备详情
|
|
|
|
|
return http.post("/device_mac_get_content", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
// 公共
|
|
|
|
|
gethistory(param) { //历史记录
|
|
|
|
|
return http.post("/get_all_record_data_page", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
gethistorydetail(param) { //历史记录详情
|
|
|
|
|
return http.post("/get_all_record_detailed_information", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
gethistorydelete(param) { //删除历史记录
|
|
|
|
|
return http.post("/card_del_record_data", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getresultdiff(param) { //记录对比
|
|
|
|
|
return http.post("/get_all_record_data_group", param).then(res => {
|
|
|
|
|
if (res.code == 0) {
|
2024-07-22 14:13:19 +08:00
|
|
|
let Dlist = []
|
2024-05-29 16:35:45 +08:00
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
2024-07-22 14:13:19 +08:00
|
|
|
if (!Dlist.includes(res.data[i].r_t)) { //includes 检测数组是否有某个值
|
|
|
|
|
Dlist.push(res.data[i].r_t);
|
2024-05-29 16:35:45 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-07-22 14:13:19 +08:00
|
|
|
res.Dlist = Dlist
|
|
|
|
|
console.log("111111", res)
|
2024-05-29 16:35:45 +08:00
|
|
|
}
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-29 16:35:45 +08:00
|
|
|
getresultcontrast(param) { //对比详情
|
|
|
|
|
return http.post("/get_all_card_data_contrast", param).then(res => {
|
2024-05-02 15:59:36 +08:00
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-09-26 09:18:27 +08:00
|
|
|
// 通用卡片
|
|
|
|
|
getPublicRecord(param) { //手动记录内容
|
|
|
|
|
return http.post("/obtain_manual_record_content", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getpublicmeasure(param) { //手动记录
|
|
|
|
|
return http.post("/public_data_save", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getpublicContent(param) { //卡片内容详情
|
|
|
|
|
return http.post("/get_card_content", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getLabelList(param) { //卡片内标签项目信息
|
|
|
|
|
return http.post("/get_label_list", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPublicTrendList(param) { //公共曲线
|
|
|
|
|
return http.post("/card_motion_curve", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPublicHistory(param) { //公共历史
|
|
|
|
|
return http.post("/obtain_history_record", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPublicHistoryDel(param) { //公共历史删除
|
|
|
|
|
return http.post("/history_record_del", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPublicResultdiff(param) { //公共对比
|
|
|
|
|
return http.post("/data_contrast_obtain_data", param).then(res => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
let Dlist = []
|
|
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
|
|
if (!Dlist.includes(res.data[i].r_t)) { //includes 检测数组是否有某个值
|
|
|
|
|
Dlist.push(res.data[i].r_t);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
res.Dlist = Dlist
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-11-12 15:38:28 +08:00
|
|
|
// 身高预测
|
|
|
|
|
GetPredictheight(param) { //公共历史删除
|
|
|
|
|
return http.post("/card_height_prediction", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// BMI预测
|
|
|
|
|
calcbmi(param) { //公共历史删除
|
|
|
|
|
return http.post("/card_bmi_evaluation", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 资讯
|
|
|
|
|
getContentMsg(param) { //获取资讯信息
|
|
|
|
|
return http.post("/get_sector_content_msg", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getContentLabel(param) { //资讯标签类别信息
|
|
|
|
|
return http.post("/get_sector_label_msg", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getContentLike(param) { //点赞
|
|
|
|
|
return http.post("/user_like_it", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getContentDetail(param) { //资讯详情
|
|
|
|
|
return http.get("/model_content", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-12-07 10:41:48 +08:00
|
|
|
getBannerList(param) { //banner
|
|
|
|
|
return http.post("/get_recommend_information", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getCooperationUrl(param) { //合作服务
|
|
|
|
|
return http.post("/get_business_cooperation_url", param).then(res => {
|
|
|
|
|
return res
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-05-02 15:59:36 +08:00
|
|
|
}
|