初始化代码
This commit is contained in:
26
application/api/model/Suggest.php
Normal file
26
application/api/model/Suggest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
|
||||
use think\Db;
|
||||
use think\Model;
|
||||
|
||||
class Suggest extends Model
|
||||
{
|
||||
public function create_suggest($uid, $image, $content)
|
||||
{
|
||||
$data = [];
|
||||
$data['uid'] = $uid;
|
||||
$data['image'] = $image;
|
||||
$data['content'] = $content;
|
||||
$data['is_deal'] = 1;
|
||||
$data['add_time'] = time();
|
||||
$data['update_time'] = time();
|
||||
$reslut = db::name('suggest')->insert($data);
|
||||
if ($reslut) {
|
||||
return ['code' => 200, 'msg' => '反馈成 功', 'data' => null];
|
||||
} else {
|
||||
return ['code' => 201, 'msg' => '反馈失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user