正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
@@ -323,6 +323,12 @@ class SignController extends RestBaseController | @@ -323,6 +323,12 @@ class SignController extends RestBaseController | ||
323 | $param['protein']=ceil($nengliang*0.2/4); | 323 | $param['protein']=ceil($nengliang*0.2/4); |
324 | $param['fat']=ceil($nengliang*0.2/9); | 324 | $param['fat']=ceil($nengliang*0.2/9); |
325 | $param['water']=ceil($nengliang*0.6/4); | 325 | $param['water']=ceil($nengliang*0.6/4); |
326 | + | ||
327 | + $data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray(); | ||
328 | + foreach ($data as $k=>$v){ | ||
329 | + $data[$k]['week']=floor(($data[$k]['create_time'] - $user['register_time']) / 7 * 24 * 60 * 60); | ||
330 | + $data[$k]['week_time']=date('Y-m-d',strtotime('+'."$data[$k][week]".' week',$data[$k]['create_time'])); | ||
331 | + } | ||
326 | //返回 | 332 | //返回 |
327 | $this->success('周打卡提交成功',$param); | 333 | $this->success('周打卡提交成功',$param); |
328 | } | 334 | } |
-
请 注册 或 登录 后发表评论