作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

个人中心接口

@@ -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 }