<?php

namespace app\common\service;


class BaseService
{

    /**
     * 返回成功
     */
    protected function success($msg, $data = [])
    {
        return ['code' => 1, 'msg' => $msg, 'data' => $data];
    }

    /**
     * 返回错误
     */
    protected function error($msg, $data = [])
    {
        return ['code' => 0, 'msg' => $msg, 'data' => $data];
    }

}