<?php
namespace app\open\controller;
use app\open\BaseController;
use app\common\variable\MsgCode;
class Base extends BaseController
{
    protected $middleware = ['VerificationWeb'];
    /**
     * [ajaxReturn 返回json]
     * @param  integer $code [description]
     * @param  [type]  $data [description]
     * @return [type]        [description]
     */
    public function ajaxReturn($msg='Success',$code=0,$data=[]){
        if (!$code)$code=MsgCode::$success;
        return json(['code'=>$code,'msg'=>$msg,'data'=>$data,'time'=>date('Y-m-d H:i:s')]);
    }
}
