mahjong_group/common/server/interface/common.js
2025-12-06 13:57:23 +08:00

74 lines
1.6 KiB
JavaScript

import request from '@/common/system/request';
/**
* 获取层级分配后的区域信息
* @returns {Promise<any>}
*/
export const getAreas = async () => {
const res = await request.post("Common/GetAreas");
if (res.code == 0) {
return res.data;
}
return null;
}
/**
* 返回配置数据文件V2.0
* @returns {Promise<any>}
*/
export const getConfig = async () => {
const res = await request.get("Common/GetConfig");
if (res.code == 0) {
return res.data;
}
return null;
}
/**
* 接口测试反馈
* @returns {Promise<any>}
*/
export const interFaceTest = async () => {
const res = await request.post("Common/h");
if (res.code == 0) {
return res.data;
}
return null;
}
/**
* 获取服务与说明数据
* @returns {Promise<any>}
*/
export const getServiceDescription = async () => {
const res = await request.post("Common/GetServiceDescription");
if (res.code == 0) {
return res.data;
}
return null;
}
/**
* 上传附件通用接口
* @param {FormData} formData 上传的表单数据
* @returns {Promise<any>}
*/
export const uploadImages = async (formData) => {
const res = await request.post("Common/UploadImages", formData);
if (res.code == 0) {
return res.data;
}
return null;
}
/**
* 获取营业时间配置
* @returns {Promise<any>} 返回营业时间信息 {open_time, close_time, is_24_hours, description}
*/
export const getBusinessHours = async () => {
const res = await request.get("Common/GetBusinessHours");
if (res.code == 0) {
return res.data;
}
return null;
}