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

个人中心接口

... ... @@ -38,7 +38,7 @@ class SignController extends RestBaseController
$endToday=mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
$user_sign=Db::name('user_sign')->where(['user_id'=>$this->getUserId(),'create_time'=>[ 'between time', [$beginToday,$endToday]]])->find();
if ($time>$data['morning_sign_time']&&$time<$data['morning_sign_end_time']){
if (!empty($user_sign)&&$user_sign['morning']!=null) {
if ($user_sign['morning']!=null) {
$data['sign'] = 0;
}else{
$data['sign'] = 1;
... ... @@ -46,7 +46,7 @@ class SignController extends RestBaseController
$data['start_time']=$data['morning_sign_time'];
$data['end_time']=$data['morning_sign_end_time'];
}else if ($time>$data['noon_sign_time']&&$time<$data['noon_sign_end_time']){
if (!empty($user_sign)&&$user_sign['noon']!=null) {
if ($user_sign['noon']!=null) {
$data['sign'] = 0;
}else{
$data['sign'] = 2;
... ... @@ -54,7 +54,7 @@ class SignController extends RestBaseController
$data['start_time']=$data['noon_sign_time'];
$data['end_time']=$data['noon_sign_end_time'];
}else if ($time>$data['night_sign_time']&&$time<$data['night_sign_end_time']){
if (!empty($user_sign)&&$user_sign['night']!=null) {
if ($user_sign['night']!=null) {
$data['sign'] = 0;
}else{
$data['sign'] = 3;
... ... @@ -62,7 +62,7 @@ class SignController extends RestBaseController
$data['start_time']=$data['night_sign_time'];
$data['end_time']=$data['night_sign_end_time'];
}else if ($time>$data['sleep_sign_time']&&$time<$data['sleep_sign_end_time']){
if (!empty($user_sign)&&$user_sign['sleep']!=null) {
if ($user_sign['sleep']!=null) {
$data['sign'] = 0;
}else{
$data['sign'] = 4;
... ...