简要描述
请求url
- https://www.商城域名.com/index.php?s=/api/recharge/center
请求方式
是否需授权登录
请求header
| 参数名 | 类型 | 是否必须 | 示例值 | 说明 | 
| storeId | int | 必填 | 10001 | 商城ID | 
| platform | string | 必填 | H5 | 当前请求的客户端(APP、小程序、H5等) | 
| Access-Token | string | 选填 | - | 当前登录用户的 Token | 
请求参数
| 参数名 | 类型 | 是否必须 | 示例值 | 说明 | 
| client | string | 必填 | H5 | 当前客户端(APP、小程序、H5等) | 
返回示例
{
  "status": 200,
  "message": "success",
  "data": {
    "setting": {
      "is_entrance": 1,
      "is_custom": 1,
      "lowest_money": 0.01,
      "is_match_plan": 1,
      "describe": "1. 账户充值仅限微信在线方式支付,充值金额实时到账;\n2. 账户充值套餐赠送的金额即时到账;\n3. 账户余额有效期:自充值日起至用完即止;\n4. 若有其它疑问,可拨打客服电话400-000-1234"
    },
    "personal": {
      "user_id": 10125,
      "mobile": "130****0000",
      "nick_name": "chenx",
      "avatar_id": 10738,
      "gender": "未知",
      "address_id": 10052,
      "balance": "91656.64",
      "points": 64,
      "pay_money": "142623.37",
      "expend_money": "1437.80",
      "grade_id": 10001,
      "platform": "MP-WEIXIN",
      "last_login_time": 1645635730
    },
    "planList": [
      {
        "plan_id": 10001,
        "plan_name": "套餐A",
        "money": "500.00",
        "gift_money": "50.00"
      },
      {
        "plan_id": 10002,
        "plan_name": "套餐B",
        "money": "1000.00",
        "gift_money": "150.00"
      }
    ],
    "paymentMethods": [
      {
        "key": 1,
        "method": "wechat",
        "is_must_template": true,
        "template_id": 10001,
        "is_enable": true,
        "is_default": true,
        "others": [],
        "client": "H5"
      },
      {
        "key": 2,
        "method": "alipay",
        "is_must_template": true,
        "template_id": 10003,
        "is_enable": true,
        "is_default": false,
        "others": [],
        "client": "H5"
      }
    ]
  }
}
返回参数
| 参数名 | 类型 | 示例值 | 说明 | 
| status | int | 200 | 请求状态(200:请求成功;500:请求错误/失败) | 
| message | string | success | 请求结果的信息,默认为 success | 
| data | object | - | 返回的业务数据 | 
data 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| setting | object | - | - | 
| personal | object | - | 当前用户信息 | 
| planList | array | - | 充值套餐列表 | 
| paymentMethods | array | - | 支付方式 | 
data.setting 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| is_entrance | int | 1 | 是否允许用户充值 | 
| is_custom | int | 1 | 是否允许自定义金额 | 
| lowest_money | number | 0.01 | 最低充值金额 | 
| is_match_plan | int | 1 | 自定义金额是否自动匹配合适的套餐 | 
| describe | string | - | 充值说明 | 
data.setting.planList 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| plan_id | int | 10001 | 套餐ID | 
| plan_name | string | 套餐A | 套餐名称 | 
| money | string | 500.00 | 充值金额 | 
| gift_money | string | 50.00 | 赠送金额 | 
data.setting.planList.paymentMethods 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| key | int | 1 | 键值 | 
| method | string | wechat | 支付方式(微信、支付宝) | 
| is_must_template | boolean | true | 是否存在支付模板 | 
| template_id | int | 10001 | 支付模板ID | 
| is_enable | boolean | true | 是否启用 | 
| is_default | boolean | true | 是否默认 | 
| others | array | - | 其他配置 | 
| client | string | H5 | 该支付方式适用的客户端 |