NEED_LOGIN code add

This commit is contained in:
knowpia
2022-09-08 17:23:45 +08:00
parent 5f982d62ce
commit 4f6026dbff
5 changed files with 23 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ class Article
$post = $GLOBALS['data']['data'];
$userid = $GLOBALS['data']['userid'];
if(empty($userid)){
return show("请登录后再发布!");
return show("请登录后再发布!",NEED_LOGIN);
}
if(empty($post['content'])){
return show("内容不能为空!");
@@ -34,7 +34,7 @@ class Article
public function delete(){
$userid = $GLOBALS['data']['userid'];
if(empty($userid)){
return show("请登录后操作!");
return show("请登录后操作!",NEED_LOGIN);
}
$article_id = $GLOBALS['data']['data']["article_id"];
if(empty($article_id)){
@@ -52,7 +52,7 @@ class Article
public function lists(){
$userid = $GLOBALS['data']['userid'];
if(empty($userid)){
return show("请登录后操作!");
return show("请登录后操作!",NEED_LOGIN);
}
$lastIndex = empty($GLOBALS['data']['data']["lastindex"])?0:$GLOBALS['data']['data']["lastindex"];
if($lastIndex == 0){