正在显示
1 个修改的文件
包含
5 行增加
和
6 行删除
@@ -319,12 +319,11 @@ class SignController extends RestBaseController | @@ -319,12 +319,11 @@ class SignController extends RestBaseController | ||
319 | $user=Db::name('user')->where('id',$this->getUserId())->find(); | 319 | $user=Db::name('user')->where('id',$this->getUserId())->find(); |
320 | $paramService=new ParamService(); | 320 | $paramService=new ParamService(); |
321 | $nengliang=$paramService->nengliang($user['before_weight'],$user['height'],$user['weight_level'],$user['pregnant_week'],$user['register_time']); | 321 | $nengliang=$paramService->nengliang($user['before_weight'],$user['height'],$user['weight_level'],$user['pregnant_week'],$user['register_time']); |
322 | - $param['day_energy']=$nengliang*0.2/4; | ||
323 | - Db::name('user')->where('id',$this->getUserId())->update(['now_weight'=>$param['weight']]); | ||
324 | - $paramService=new ParamService(); | ||
325 | - $param['status']=$paramService->week_status($param['weight'],$user['height']); | ||
326 | - Db::name('user_week_sign')->insert(['user_id'=>$this->getUserId(),'create_time'=>time(),'weight'=>$param['weight'],'status'=>$param['status']]); | 322 | + $param['day_energy']=$nengliang; |
323 | + $param['protein']=$nengliang*0.2/4; | ||
324 | + $param['fat']=$nengliang*0.2/9; | ||
325 | + $param['water']=$nengliang*0.6/4; | ||
327 | //返回 | 326 | //返回 |
328 | - $this->success('周打卡提交成功'); | 327 | + $this->success('周打卡提交成功',$param); |
329 | } | 328 | } |
330 | } | 329 | } |
-
请 注册 或 登录 后发表评论