You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
515 B
PHP

<?php
/**
* Created by PhpStorm.
* User: xmy 280564871@qq.com
* Date: 2017/3/24
* Time: 10:57
*/
namespace Open\Model;
use Think\Model;
class BaseModel extends Model{
protected function _initialize()
{
$this->tablePrefix = "tab_";
C(api('Config/lists'));//加载配置变量
}
/**
* 页码处理
* @param $p
* @return int
* author: xmy 280564871@qq.com
*/
public function dealPage($p){
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
return $page;
}
}