添加文章评论功能

deploy
DESKTOP-4RNDQIC\29019 2020-04-12 21:43:39 +08:00
parent f1078a4e15
commit 78cf379dd1
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<?php
namespace App\Controllers;
use App\Models;
use Core\Controller;
use Core\View;
use Parsedown;
use App\Config;
class DocComment extends Controller
{
public function insertAction(){
$user = new Models\User();
date_default_timezone_set("Asia/Shanghai");
//var_dump($this->input);
$userdate = date("Y-m-d H:i:s",time());
$this->input->created_date = $userdate;
$this->input->update_date = $userdate;
if( strlen($this->input->user_pwd ) < 6){
$this->JsonResp(201,null,"password empty");
return;
}
if(!$this->is_password($this->input->user_pwd)){
$this->JsonResp(201,null,"password illegal");
return;
}
$all = $user->InsertObject($this->input);
$this->JsonResp(200,$all,"OK");
}
}

12
App/Models/DocComment.php Normal file
View File

@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Core\Model;
use PDO;
class DocComment extends Model
{
}