index.js 892 Bytes
/*
 * @Date: 2026-05-07 13:40:53
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2026-05-09 17:46:20
 * @FilePath: /jls_weapp/src/api/index.js
 * @Description: 文件描述
 */
import { fn, fetch } from './fn'

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

/**
 * @description 获取首页内容
 * - 当前先按 Apifox 首页接口结构联调
 * - client_id 直接走请求层全局默认参数,该默认值已作为正式值使用
 */
export const getHomeContentAPI = () => fn(fetch.get(Api.HOME_CONTENT))

/**
 * @description 获取微信支付参数(order_id 主支付链路)
 * @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))