xiangyixiangqin/miniapp/api/config.js
2026-01-20 21:39:19 +08:00

44 lines
978 B
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 { get } from './request'
/**
* 获取小程序统一配置(启动时调用)
* 包含Banner、金刚位、默认头像、搜索页Banner、弹窗配置
*
* @returns {Promise<Object>} 统一配置
*/
export async function getAppConfig() {
const response = await get('/config/app', {}, { needAuth: false })
return response
}
/**
* 获取用户协议
*
* @returns {Promise<Object>} 用户协议内容
*/
export async function getUserAgreement() {
const response = await get('/config/userAgreement', {}, { needAuth: false })
return response
}
/**
* 获取隐私协议
*
* @returns {Promise<Object>} 隐私协议内容
*/
export async function getPrivacyPolicy() {
const response = await get('/config/privacyPolicy', {}, { needAuth: false })
return response
}
export default {
getAppConfig,
getUserAgreement,
getPrivacyPolicy
}