...
|
...
|
@@ -428,6 +428,20 @@ class SignController extends RestBaseController |
|
|
foreach ($data as $k=>$v){
|
|
|
$data[$k]['week']=ceil(($data[$k]['create_time'] - $user['register_time'])/(7*24*60*60));
|
|
|
$data[$k]['week_time']=date('m-d',strtotime('+'.$data[$k]['week'].' week',$data[$k]['create_time']));
|
|
|
if ($paramService->status($user['before_weight'],$user['height'])=='正常'){
|
|
|
if ($user['pregnant_week']+$data[$k]['week']>12){
|
|
|
$data[$k]['biaozhun']=$user['before_weight']+1.25+($user['pregnant_week']+$data[$k]['week']-12)*(0.36+0.45)/2;
|
|
|
}elseif ($user['pregnant_week']+$data[$k]['week']<=12){
|
|
|
$data[$k]['biaozhun']=$user['before_weight']+1.25;
|
|
|
}
|
|
|
}elseif ($paramService->status($user['before_weight'],$user['height'])=='偏瘦'){
|
|
|
$data[$k]['biaozhun']=$user['before_weight']+1.25+($user['pregnant_week']+$data[$k]['week']-12)*(0.45+0.59)/2;
|
|
|
}elseif ($paramService->status($user['before_weight'],$user['height'])=='肥胖'){
|
|
|
$data[$k]['biaozhun']=$user['before_weight']+1.25+($user['pregnant_week']+$data[$k]['week']-12)*(0.18+0.27)/2;
|
|
|
}elseif ($paramService->status($user['before_weight'],$user['height'])=='超重'){
|
|
|
$data[$k]['biaozhun']=$user['before_weight']+1.25+($user['pregnant_week']+$data[$k]['week']-12)*(0.23+0.32)/2;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
//返回
|
|
|
$this->success('我的体重数据',[$param,$data]);
|
...
|
...
|
|