启动信息

优质
小牛编辑
116浏览
2023-12-01

启动信息是在调用接口前的需求,可以在应用启动的时候一次性获取全部通用配置信息。

启动信息的移动端处理方式

移动端在版本发布支出将部分配置信息的默认配置打包写入本地.应用使用过程中更新启动信息,优先使用服务器提供的最新的信息.

列出所有启动者配置

GET /bootstrappers

响应

Status: 200 OK
{
  "server:version": "1.6.0",
  "wallet:ratio": 200, // 转换显示余额的比例,百分比。(200 就表示 200%)
  "wallet:recharge-type": [ // 此配置支持全平台的支付方式,不同平台更具自身平台对应值判断是非支持该支付方式。
    "alipay", // "支付宝 APP 支付",
    "alipay_wap", // "支付宝手机网页支付",
    "alipay_pc_direct", // "支付宝电脑网站支付",
    "alipay_qr", // "支付宝扫码支付",
    "wx", // "微信 APP 支付",
    "wx_wap", // "微信 WAP 支付",
    "applepay_upacp" // "Apple Pay"
  ],
  "wallet:cash": {
    "open": true
  },
  "wallet:recharge": {
    "open": true
  },
  "wallet:transform": {
    "open": true
  },
  "currency:cash": {
    "open": true
  },
  "currency:recharge": {
    "open": true
  },
  "currency:recharge": {
    "open": true,
    "IAP_only": true,
  },
  "ad":[
    {
      "id":1,
      "title":"广告1",
      "type":"image",
      "data":{
        "image":"https://avatars0.githubusercontent.com/u/5564821?v=3&s=460",
        "link":"https://github.com/zhiyicx/thinksns-plus"
      }
    },
      {
      "id":2,
      "title":"广告2",
      "type":"markdown",
      "data":"# 广告2\n我是广告2"
    },
    {
      "id":3,
      "title":"广告3",
      "type":"html",
      "data":"<h1>广告3</h1><p>我不管我不管</p><script>alert('我是广告3')</script>"
    },
    {
      "id":4,
      "title":"广告4",
      "type":"user:id",
      "data":"1"
    }
  ],
  "site": {
    
    "reserved_nickname": "root,admin",
    "client_email": "admin@123.com",
    "gold": {
      "status": false
    },
    "reward": {
      "status": false,
      "amounts": "5,10,15"
    },
    "user_invite_template": "我发现了一个全平台社交系统ThinkSNS+,快来加入吧:http://t.cn/RpFfbbi"
  },
  "registerSettings": {
    "showTerms": false,
    "registerMode": "all",
    "completeData": true,
    "accountType": "all",
    "content": "# 服务条款及隐私政策",
    "type": "mobile-only",
    "method": "invited"
  },
  "im:helper-user": 1,
  "pay-validate-user-password": false, // 是否用户在支付时输入密码,true 为需要,false 为不需要
}

参数详解

参数名参数含义枚举备注
server:version服务端版本号string 类型
wallet钱包相关
wallet:ratio显示金额与服务端金额的转换比例显示金额 = 服务端金额 / wallet:ratio
wallet:cash钱包提现的开关选项
wallet:recharge钱包充值的开关选项
wallet:transform钱包余额转换积分的开关选项
currency:cash积分提现的开关选项
currency:recharge.open积分充值的开关选项
currency:recharge.IAP_onlyIOS端只允许IAP充值的开关选项
ad广告位相关
site系统配置相关类型:json对象
site.gold:status是否开启积分系统true:开启,false:关闭控制前端展示相应的积分模块,类型:Boolean
site.reward.status是否开启打赏true:开启,false:关闭控制平台的打赏开关, 类型:Boolean
site.reward.amounts打赏金额配置'5,10,15'...打赏金额配置,用半角逗号分隔
site.gold_name积分的展示名称积分在前端显示的名称
site.gold_name.name积分昵称金币,豆子,贝壳...
site.gold_name.unit积分昵称的单位个,枚,粒
site.reserved_nickname站点预留昵称'admin,root'...注册时不能够使用的昵称,用半角逗号分隔
site.user_invite_template邀请注册的短信模板类型:string
registerSettings注册相关
registerSettings.open是否开放注册true:开放,false:关闭
registerSettings.showTerms注册时展示服务条款及隐私政策true:展示,false:不展示类型:Boolean
registerSettings.completeData注册完成后是否需要立即完善资料true:需要,false:不需要类型:Boolean
registerSettings.content用户服务条款及隐私政策类型:string,格式:markdown
registerSettings.type用户注册方式invited: 仅邀请, all: 全部, thirdPart: 第三方注册方式控制类型:string
registerSettings.method用户注册类型mobile-only: 仅手机, mail-only: 仅邮箱,all: 邮箱或手机类型:string
im:helper-user聊天小助手用户 IDInt