HaniBlindBox/honey_box/common/server/config.js
2026-02-02 20:25:31 +08:00

58 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import RequestManager from '../request';
/**
* 获取系统配置
* @returns
*/
export const getConfig = () => {
return RequestManager.get("config", {});
}
/**
* 获取平台配置
* @returns
*/
export const getPlatform = async () => {
const res = await RequestManager.get("getPlatformConfig", {});
return res.data;
}
/**
* 获取轮播图
* @param {number} type_id 类型
* @returns
*/
export const getAdvert = async (type_id) => {
const res = await RequestManager.getCache("getAdvert", { type_id });
return res.data;
}
/**
* 获取单页规则
* @param {number} type 类型
* @returns
*/
export const getDanYe = async (type) => {
const res = await RequestManager.getCache("getDanye", { type });
return res.data;
}
/**
* 获取单页内容POST方式
* @param {number} type 类型
* @returns
*/
export const getDanYeContent = async (type) => {
return await RequestManager.getCache('/danye', { type });
}
/**
* 获取悬浮球配置列表
* @returns {Promise} 悬浮球配置列表
*/
export const getFloatBall = async () => {
const res = await RequestManager.get("getFloatBall", {});
return res.data || [];
}