<?php
/**
 * Note: *
 * User: Liu
 * Date: 2020/5/26
 * Time: 21:45
 */


function responseData($data) {
    echo json_encode([
        'code' => 0,
        'data' => $data,
        'msg' => '',
    ]);
    exit();
}

/**
 * @param $msg
 * @param int $code
 */
function responseMsg($msg, $code = 0) {
    echo json_encode([
        'code' => $code,
        'msg' => $msg,
    ]);
    exit();
}