<?php
/*
 *	www.myucms.com
 *  作者：梦雨
 *  @ QQ50361804
*/
namespace app\index\controller;
use think\Controller;
class Upload extends Controller
{
    function _initialize()
    {
        parent::_initialize();
        $this->model = model('index/up');
        
    }
    public function upimage()
    {
        if (!session('userid') || !session('username')) {
            $this->error('亲！请登录',url('bbs/login/index'));
        } else {
        return json($this->model->upfile('images'));
        }
    }
    public function upfile()
    {
        if (!session('userid') || !session('username')) {
            $this->error('亲！请登录',url('bbs/login/index'));
        } else {
        return json($this->model->upfile('files'));
        }
    }
}