<?php
/**
 * @desc: Created by PhpStorm.
 * @Author: Dr.Xing <ezfwork@foxmail.com>
 * @Since: 2018/2/1 16:44
 */

namespace app\common\model;


use think\Model;

class Page extends Model
{
    protected $name = 'page';

    protected function base(&$query){
        if(\think\Session::has("user_site_id")) {
            $query->where(['status' => 'normal', 'site_id' =>\think\Session::get("user_site_id")]);
        }else{
            $query->where('status', 'normal');
        }
    }
}