...
|
...
|
@@ -310,14 +310,11 @@ class SignController extends RestBaseController |
|
|
$param['status']=$paramService->status($user['before_weight'],$user['height']);
|
|
|
$param['increase']=$user['now_weight']-$user['before_weight'];
|
|
|
$param['overplus']=$paramService->overplus($user['before_weight'],$user['height'])-($user['now_weight']-$user['before_weight']);
|
|
|
$param['bashBoard']=[$param['overplus']*0.2+$param['weight'],$param['overplus']*0.4+$param['weight'],$param['overplus']*0.6+$param['weight'],$param['overplus']*0.8+$param['weight']];
|
|
|
$record=['day'=>ceil((time()-$user['register_time'])/(60*60*24)),'weight'=> $param['weight'],'status'=>$param['status']];
|
|
|
}else{
|
|
|
$param['weight']=$re['weight'];
|
|
|
$param['increase']=$re['weight']-$user['before_weight'];
|
|
|
$param['overplus']=$paramService->overplus($user['before_weight'],$user['height'])-($re['weight']-$user['before_weight']);
|
|
|
|
|
|
$param['bashBoard']=[$param['overplus']*0.2+$user['weight'],$param['overplus']*0.4+$user['weight'],$param['overplus']*0.6+$user['weight'],$param['overplus']*0.8+$user['weight']];
|
|
|
$record=Db::name('user_week_sign')->where('user_id',$user['id'])->select()->each(function ($item) {
|
|
|
if ($item['status']==1){
|
|
|
$item['status']='消瘦';
|
...
|
...
|
@@ -333,6 +330,7 @@ class SignController extends RestBaseController |
|
|
return $item;
|
|
|
});
|
|
|
}
|
|
|
$param['bashBoard']=[$param['overplus']*0.2+$user['before_weight'],$param['overplus']*0.4+$user['before_weight'],$param['overplus']*0.6+$user['before_weight'],$param['overplus']*0.8+$user['before_weight']];
|
|
|
$param['day']=ceil((time()-$user['register_time'])/(60*60*24));
|
|
|
$param['pregnant_week']=$user['pregnant_week'];
|
|
|
//返回
|
...
|
...
|
|