/**
     * 上传图片
     * @return mixed
     */
	protected function uploadImg()
    {
        $upload = new \Think\Upload();  // 实例化上传类
        $upload->maxSize   =     3145728 ;  // 设置附件上传大小
        $upload->exts      =     array('jpg', 'gif', 'png', 'jpeg');    // 设置附件上传类型
        $upload->rootPath  =     './Uploads/';  // 设置附件上传根目录
        $upload->savePath  =     'images/';    //设置附件上传(子)目录
        // 上传文件
        $info   =   $upload->upload();
        if(!$info) {// 上传错误提示错误信息

            $msg['status'] = 2;
            $msg['msg'] = $upload->getError();
        }else{// 上传成功
            $msg['status'] = 1;
            $msg['result'] = self::getImg($info,$upload->rootPath);
            $msg['msg'] = '上传成功!';
        }
        return $msg;
    }

    /**
     * @param $data 数据元
     * @param $file 文件根路径
     * @return array|string
     */
    static function getImg ( $data , $file ) {

	    $filename = substr($file,1);

        if (count($data) === 1) {
            $newarr = current($data);
            $info = $filename . $newarr['savepath'].$newarr['savename'];
            return $info;
        }else{
            $arr = array();
            foreach ($data as $key => $value){
                $arr[$key] = $filename . $value['savepath'].$value['savename'];
            }
            return $arr;
        }
    }