index.js 697 Bytes
import { fn, fetch } from './fn'

const Api = {
    HOME_CONTENT: '/srv/?a=app_list&t=volunteer&f=customize',
    PAY_TEST: '/srv/?a=pay',
}

/**
 * @description 获取首页内容
 * - 当前先按 Apifox 首页接口结构联调
 * - client_id 继续走全局默认参数,正式值待后端确认
 */
export const getHomeContentAPI = () => fn(fetch.get(Api.HOME_CONTENT))

/**
 * @description 获取微信支付参数(对齐 meihuaApp 的支付接口)
 * @param {Object} params 请求参数
 * @param {string} params.order_id 测试订单 ID
 * @returns {Promise<{code:number,data:any,msg:string}>}
 */
export const getWechatPayParamsAPI = (params) => fn(fetch.post(Api.PAY_TEST, params))