<?php
/**
 * @Copyright (c) 2019  XIGU Inc. All rights reserved.
 * @Link https://www.vlcms.com
 * @License江苏溪谷网络科技有限公司版权所有
 */

namespace app\home\controller;

use think\Controller;
use app\common\model\Notic as mNotic;

class Notic extends Controller
{

    public function detail()
    {
        $id = input('id',0,'intval');
        $mNotic = new mNotic();
        $where = [];
        $where[] = ['id', '=', $id];
        $where[] = ['status', '=', '1'];
        $where[] = ['start_time', ['lt', time()], ['=', 0], 'or'];
        $where[] = ['end_time', ['gt', time()], ['=', 0], 'or'];
        $info = $mNotic -> where($where) -> find();
        $this->assign('info',$info);
        return $this->fetch();
    }


}