chore: join project

This commit is contained in:
xiaojunnuo
2026-02-28 00:49:02 +08:00
parent e17f381b1f
commit 6163c3f08e
14 changed files with 379 additions and 146 deletions
+9 -9
View File
@@ -19,30 +19,30 @@ export function parse(jsonString = "{}", defaultValue = {}) {
/**
* @description 接口请求返回
* @param {Any} data 返回值
* @param {String} msg 状态信息
* @param {String} message 状态信息
* @param {Number} code 状态码
*/
export function response(data = {}, msg = "", code = 0) {
return [200, { code, msg, data }];
export function response(data = {}, message = "", code = 0) {
return [200, { code, message, data }];
}
/**
* @description 接口请求返回 正确返回
* @param {Any} data 返回值
* @param {String} msg 状态信息
* @param {String} message 状态信息
*/
export function responseSuccess(data = {}, msg = "成功") {
return response(data, msg);
export function responseSuccess(data = {}, message = "成功") {
return response(data, message);
}
/**
* @description 接口请求返回 错误返回
* @param {Any} data 返回值
* @param {String} msg 状态信息
* @param {String} message 状态信息
* @param {Number} code 状态码
*/
export function responseError(data = {}, msg = "请求失败", code = 500) {
return response(data, msg, code);
export function responseError(data = {}, message = "请求失败", code = 500) {
return response(data, message, code);
}
/**