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

接口

... ... @@ -126,10 +126,11 @@ class SignController extends RestBaseController
public function daySign(){
$beginToday=mktime(0,0,0,date('m'),date('d'),date('Y'));
//判断是否需要进行周打卡
if (!Db::name('user_week_sign')->where(['user_id'=>$this->getUserId()])->find()){
$re=Db::name('user_week_sign')->where(['user_id'=>$this->getUserId()])->order('create_time','desc')->find();
if (!$re){
$is_week=1;
}
else if (Db::name('user_week_sign')->where(['user_id'=>$this->getUserId(),'create_time'=>[ '<', $beginToday-(7*24*60*60)]])->find()){
else if ($re['create_time']<$beginToday-(7*24*60*60)){
$is_week=1;
}else{
$is_week=0;
... ...
... ... @@ -5,6 +5,7 @@
<ul class="nav nav-tabs">
<li class="active"><a>{:lang('USER_INDEXADMIN_INDEX')}</a></li>
<li ><a href="{:url('user/adminIndex/cookBook')}">生成菜谱</a></li>
<li><a href="{:url('user/adminIndex/editCook')}">编辑菜谱</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}">
微信名:
... ...