import http from './https.js' import tools from './tools.js' import store from '@/store' export default { // 登录 getonlogin(param) { // 登录 return http.post("/login", 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", param).then(res => { return res }) }, getRegisterPhone(param) { // 手机号快捷登录 return http.post("/wechat_quick_login", param).then(res => { return res }) }, getResetPassword(param) { // 重置密码 return http.post("/reset_password", param).then(res => { return res }) }, getloginOut(param) { // 退出登录 return http.post("/quit_account", param).then(res => { return res }) }, getdeleteAccount(param) { // 账户注销 return http.post("/delete_account", param).then(res => { return res }) }, getHomeConfig(param) { // 配置接口 return http.post("/config", 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 }) }, getUserInfo(param) { // 用户信息详情 return http.post("/get_user_data_information", 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 }) }, getEditUser(param) { // 修改成员资料 return http.post("/update_member", param).then(res => { return res }) }, getAddUser(param) { // 添加成员 return http.post("/add_member", param).then(res => { return res }) }, getDelUser(param) { // 删除成员 return http.post("/del_member", param).then(res => { return res }) }, // 身体数据接口 getUserList(param) { // 成员列表 return http.post("/get_user_list", param).then(res => { if (res.data.user_list.length) { let options = [{ text: '删除', style: { backgroundColor: '#dd524d' } }] res.data.user_list.forEach(item => { item.options = options }) } return res }) }, getinsertmeasure(param) { //手动记录 return http.post('/manual_record', param).then(res => { return res }) }, getmeasurefunit(param) { //设备记录,保存测量结果 return http.post("/device_record", param).then(res => { return res }) }, getResultDepth(param) { //深度报告 return http.post("/body_report_depth", param).then(res => { return res }) }, getResultDetail(param) { //获取测量详情报告 return http.post("/body_report_detailed", param).then(res => { return res }) }, getResultHome(param) { //获取测量报告,首页展示 return http.post("/body_report_brief", param).then(res => { return res }) }, getTargetweight(param) { //设置目标体重 return http.post("/set_target_weight", param).then(res => { return res }) }, getfirstweight(param) { //修改初始体重 return http.post("/set_initial_weight", param).then(res => { return res }) }, gethistory(param) { //历史记录 return http.post("/history_list_page", param).then(res => { return res }) }, gethistorydetail(param) { //历史记录详情 return http.post("/history_detailed", param).then(res => { return res }) }, gethistorydelete(param) { //删除历史记录 return http.post("/history_del", param).then(res => { return res }) }, getTrendList(param) { //趋势 return http.post("/curve_detailed", param).then(res => { return res }) }, // 卡片 getCardAllList(param) { // 获取所有卡片 return http.post("/card_list_all", param).then(res => { return res }) }, getCardAllOrder(param) { // 保存卡片 return http.post("/save_card_list", param).then(res => { return res }) }, // 身高预测 GetPredictheight(param) { return http.post("/genetic_height", param).then(res => { return res }) }, // BMI预测 calcbmi(param) { return http.post("/bmi_evaluation", param).then(res => { return res }) }, // 跳绳 getSkipDataResult(param) { //获取测量报告 return http.post("/skip/data_report", param).then(res => { return res }) }, getSkipResult(param) { //跳绳新增设备记录 return http.post("skip/device_record", param).then(res => { return res }) }, // 肺活量 getLungDataResult(param) { //获取测量报告 return http.post("/vitalcapacity/data_report", param).then(res => { return res }) }, getLungResult(param) { //肺活量新增设备记录 return http.post("/vitalcapacity/device_record", param).then(res => { return res }) }, getPublicRecord(param) { //手动记录内容 return http.post("/obtain_manual_record_content", param).then(res => { return res }) }, getpublicmeasure(param) { //手动记录 return http.post("/card/manual_record", param).then(res => { return res }) }, getPublicTrendList(param) { //工具曲线 return http.post("/card/curve_chart", param).then(res => { return res }) }, getresultdiff(param) { //工具记录对比 return http.post("/card/record_list_group", 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 console.log("111111", res) } return res }) }, getresultcontrast(param) { //工具对比详情 return http.post("/card/data_compare", param).then(res => { return res }) }, getPublicHistory(param) { //工具历史 return http.post("/card/record_list_page", param).then(res => { return res }) }, getPublicHistoryDetail(param) { //工具历史详情 return http.post("/card/detailed_record", param).then(res => { return res }) }, getPublicHistoryDel(param) { //工具历史删除 return http.post("/card/del_record", param).then(res => { return res }) }, // // // // // // // // // // // // 估分 getSportsListAll(param) { //获取地区所有项目列表 return http.post("/sportstesting/sportstesting_get_region_list", param).then(res => { return res }) }, getSportsData(param) { //开始估分 return http.post("/sportstesting/sportstesting_set_once_data", param).then(res => { return res }) }, // 厨房秤 getHomeUserInfo(param) { // 用户饮食信息 return http.post("/user_diet_content", param).then(res => { return res }) }, getHomeSearch(param) { // 首页搜索 return http.post("/search_column", param).then(res => { return res }) }, getFoodSearch(param) { //搜索食材 return http.post("/get_food_list", param).then(res => { return res }) }, getMenuSearchColumn(param) { //搜索菜谱 return http.post("/search_column", param).then(res => { return res }) }, getPhotoSearch(param) { //图像识别 return http.post("/search_food_barcode", param).then(res => { return res }) }, getCookListDetails(param) { // 查询菜谱详情 return http.post("/cookbook_details", param).then(res => { return res }) }, getCookLike(param) { // 点赞收藏菜谱 return http.post("/cookbook_like", param).then(res => { return res }) }, // 计食器 getAddIntakeFood(param) { // 添加每日摄入记录 return http.post("/add_intake_food", param).then(res => { return res }) }, getAddEveryMealFood(param) { // 当次食材添加的卡路里摄入记录 return http.post("/current_food_statistics", param).then(res => { return res }) }, getCountfootCon(param) { // 每日记食器板块详细内容 return http.post("/get_countfoot_content", param).then(res => { return res }) }, delCEatAction(param) { // 删除餐饮食物 return http.post("/del_user_eat_log", param).then(res => { return res }) }, delEatListAction(param) { // 删除餐饮食物列表 return http.post("/del_user_eat_list_log", param).then(res => { return res }) }, getLogList(param) { // 记食器角色饮食记录列表 return http.post("/get_log_list", param).then(res => { return res }) }, getSetUpContent(param) { // 计食器板块-设置里的内容 return http.post("/set_up_content", param).then(res => { return res }) }, getSetUserKcal(param) { // 设置用户的卡路里 return http.post("/set_user_kcal", param).then(res => { return res }) }, // 个人中心 getUserCollectList(param) { // 用户收藏点赞列表 return http.post("/get_user_collect_list", param).then(res => { return res }) }, getMyLogList(param) { // 饮食列表 return http.post("/get_log_list", param).then(res => { return res }) }, // 计食器 getAddIntakeFood(param) { // 添加每日摄入记录 return http.post("/add_intake_food", param).then(res => { return res }) }, getCountFoodInfo(param) { // 获取记食器板块详细内容 return http.post("/get_countfoot_content", param).then(res => { return res }) }, getCountSetKcal(param) { // 获取记食器设置里的内容 return http.post("/set_up_content", param).then(res => { return res }) }, getCountSetUserKcal(param) { // 设置用户的卡路里 return http.post("/set_user_kcal", param).then(res => { return res }) }, getCountSearchmsg(param) { // 猜你喜欢 return http.post("/search_default_msg", param).then(res => { return res }) }, }