...
|
...
|
@@ -22,7 +22,7 @@ class IndexController extends PluginBaseController |
|
|
$user_id = cmf_get_current_user_id();
|
|
|
dump($user_id);
|
|
|
$User=new UserModel();
|
|
|
$user=$User->getUserInfo($user_id);
|
|
|
$user=$User->getUserInfo();
|
|
|
if(empty($user)) $this->error('未登录!');
|
|
|
$admin = Db::name("comment")->where('user_id', $user['id'])->field("create_time")->order(["create_time" => "DESC"])->find();
|
|
|
if(time()-$admin['create_time']<60) $this->error('1分钟内只能留言一次!');
|
...
|
...
|
|