正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -319,10 +319,10 @@ class SignController extends RestBaseController | @@ -319,10 +319,10 @@ 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; | ||
323 | - $param['protein']=$nengliang*0.2/4; | ||
324 | - $param['fat']=$nengliang*0.2/9; | ||
325 | - $param['water']=$nengliang*0.6/4; | 322 | + $param['day_energy']=ceil($nengliang); |
323 | + $param['protein']=ceil($nengliang*0.2/4); | ||
324 | + $param['fat']=ceil($nengliang*0.2/9); | ||
325 | + $param['water']=ceil($nengliang*0.6/4); | ||
326 | //返回 | 326 | //返回 |
327 | $this->success('周打卡提交成功',$param); | 327 | $this->success('周打卡提交成功',$param); |
328 | } | 328 | } |
-
请 注册 或 登录 后发表评论