import { Controller } from "egg" ; import HttpExceptions from "../exceptions/http_exceptions" ; export default class BaseController extends Controller { author : Cookie
     *  description get user ( ) { return this . ctx . user . userToken ; } get userInfo ( ) { return this . ctx . user . userInfo ; } author : Cookie
     *  description success ( data ) { this . ctx . body = { code : 0 , data , } ; } author : Cookie
     *  description error ( { msg = "服务器异常" , code = 1 , httpCode = 400 } ) { throw new HttpExceptions ( { code , httpCode , msg , } ) ; } }