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

个人中心接口

@@ -326,7 +326,7 @@ class SignController extends RestBaseController @@ -326,7 +326,7 @@ class SignController extends RestBaseController
326 326
327 $data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray(); 327 $data=Db::name('user_week_sign')->where('user_id',$this->getUserId())->select()->toArray();
328 foreach ($data as $k=>$v){ 328 foreach ($data as $k=>$v){
329 - $data[$k]['week']=floor(($data[$k]['create_time'] - $user['register_time']) / 7 * 24 * 60 * 60); 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'])); 330 $data[$k]['week_time']=date('Y-m-d',strtotime('+'.$data[$k]['week'].' week',$data[$k]['create_time']));
331 } 331 }
332 //返回 332 //返回