Invitation.php 1.1 KB
<?php


namespace app\index\controller;


use app\common\controller\Frontend;
use think\Request;

class Invitation extends Frontend
{
    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';
    public function index()
    {
        $param=Request::instance()->param();
        $menu=self::$model::menu(9);
        $list=self::$model::invitation($param['pid'],10);
        $this->assign("left",$menu);
        $this->assign("list",$list);
        return $this->view->fetch();
    }
    public function detail()
    {
        $param=Request::instance()->param();
        $news=\app\admin\model\Invitation::where($param)->where("status",1)->find();
        $this->assign("news",$news);
        return $this->view->fetch();
    }
    public function release()
    {
        $param=Request::instance()->param();
        if(Request::instance()->isPost()){
            $res=\app\admin\model\Invitation::create($param);
            return self::$model::js("提交成功",200);
        }
        $style=\app\index\service\Index::menu(9);
        $this->assign("style",$style);
        return $this->view->fetch();
    }
}