正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -361,10 +361,10 @@ class SignController extends RestBaseController | @@ -361,10 +361,10 @@ class SignController extends RestBaseController | ||
361 | public function weekSignPost(){ | 361 | public function weekSignPost(){ |
362 | $param=$this->request->param(); | 362 | $param=$this->request->param(); |
363 | $user=Db::name('user')->where('id',$this->getUserId())->find(); | 363 | $user=Db::name('user')->where('id',$this->getUserId())->find(); |
364 | - Db::name('user')->where('id',$this->getUserId())->update(['now_weight'=>$param['weight']]); | 364 | + Db::name('user')->where('id',$user['id'])->update(['now_weight'=>$param['weight']]); |
365 | $paramService=new ParamService(); | 365 | $paramService=new ParamService(); |
366 | $param['status']=$paramService->week_status($param['weight'],$user['height']); | 366 | $param['status']=$paramService->week_status($param['weight'],$user['height']); |
367 | - Db::name('user_week_sign')->insert(['user_id'=>$this->getUserId(),'create_time'=>time(),'weight'=>$param['weight'],'status'=>$param['status']]); | 367 | + Db::name('user_week_sign')->insert(['user_id'=>$user['id'],'create_time'=>time(),'weight'=>$param['weight'],'status'=>$param['status']]); |
368 | //返回 | 368 | //返回 |
369 | $this->success('周打卡提交成功'); | 369 | $this->success('周打卡提交成功'); |
370 | } | 370 | } |
-
请 注册 或 登录 后发表评论