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

接口

... ... @@ -361,10 +361,10 @@ class SignController extends RestBaseController
public function weekSignPost(){
$param=$this->request->param();
$user=Db::name('user')->where('id',$this->getUserId())->find();
Db::name('user')->where('id',$this->getUserId())->update(['now_weight'=>$param['weight']]);
Db::name('user')->where('id',$user['id'])->update(['now_weight'=>$param['weight']]);
$paramService=new ParamService();
$param['status']=$paramService->week_status($param['weight'],$user['height']);
Db::name('user_week_sign')->insert(['user_id'=>$this->getUserId(),'create_time'=>time(),'weight'=>$param['weight'],'status'=>$param['status']]);
Db::name('user_week_sign')->insert(['user_id'=>$user['id'],'create_time'=>time(),'weight'=>$param['weight'],'status'=>$param['status']]);
//返回
$this->success('周打卡提交成功');
}
... ...