first commit
This commit is contained in:
33
application/mobile/controller/Suggest.php
Normal file
33
application/mobile/controller/Suggest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// +------------------------------------------------+
|
||||
// |http://www.cjango.com |
|
||||
// +------------------------------------------------+
|
||||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||||
// +------------------------------------------------+
|
||||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||||
// +------------------------------------------------+
|
||||
namespace app\mobile\controller;
|
||||
|
||||
use app\common\model\Suggest as SuggestModel;
|
||||
|
||||
class Suggest extends Center
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (IS_POST) {
|
||||
$content = $this->request->post('content');
|
||||
$data = [
|
||||
'uid' => UID,
|
||||
'content' => $content,
|
||||
];
|
||||
if (SuggestModel::create($data)) {
|
||||
return $this->success('提交成功', 'center/index');
|
||||
} else {
|
||||
return $this->error();
|
||||
}
|
||||
} else {
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user