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

接口

@@ -305,10 +305,10 @@ class SignController extends RestBaseController @@ -305,10 +305,10 @@ class SignController extends RestBaseController
305 //判断是否是第一次周打卡 305 //判断是否是第一次周打卡
306 $re=Db::name('user_week_sign')->where('user_id',$user['id'])->order('create_time','desc')->find(); 306 $re=Db::name('user_week_sign')->where('user_id',$user['id'])->order('create_time','desc')->find();
307 if (!$re){ 307 if (!$re){
308 - $param['weight']=$user['before_weight']; 308 + $param['weight']=$user['now_weight'];
309 $paramService=new ParamService(); 309 $paramService=new ParamService();
310 $param['status']=$paramService->status($user['before_weight'],$user['height']); 310 $param['status']=$paramService->status($user['before_weight'],$user['height']);
311 - $param['increase']=0; 311 + $param['increase']=$user['now_weight']-$user['before_weight'];
312 $param['overplus']=$paramService->overplus($user['before_weight'],$user['height']); 312 $param['overplus']=$paramService->overplus($user['before_weight'],$user['height']);
313 $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']]; 313 $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']];
314 $record=['day'=>ceil((time()-$user['register_time'])/(60*60*21)),'weight'=> $param['weight'],'status'=>$param['status']]; 314 $record=['day'=>ceil((time()-$user['register_time'])/(60*60*21)),'weight'=> $param['weight'],'status'=>$param['status']];