27 lines
459 B
PHP
27 lines
459 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\api\model;
|
||
|
|
|
||
|
|
use think\Db;
|
||
|
|
use think\Model;
|
||
|
|
|
||
|
|
class Page extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'fa_vs_page';
|
||
|
|
|
||
|
|
public function get_page($id)
|
||
|
|
{
|
||
|
|
$reslut = $this->where('aid', $id)->where('delete_time', 0)->find();
|
||
|
|
return $reslut;
|
||
|
|
}
|
||
|
|
|
||
|
|
/*
|
||
|
|
* 添加页面
|
||
|
|
*/
|
||
|
|
public function add_page($data){
|
||
|
|
$data['createtime'] = time();
|
||
|
|
$res = $this->insertGetId($data);
|
||
|
|
return $res;
|
||
|
|
}
|
||
|
|
}
|