中国股票配资网站-股票杠杆交易平台哪个好-【东方资本】,炒股十倍杠杆是什么意思,杠杆有风险吗,哪个股票交易app好

小程序網(wǎng)絡(luò)請(qǐng)求轉(zhuǎn)發(fā)服務(wù)

該接口用于小程序中進(jìn)行業(yè)務(wù)數(shù)據(jù)前后端交互 。

由于小程序是在宿主App中的一個(gè)模塊, 小程序中網(wǎng)絡(luò)請(qǐng)求需要經(jīng)過(guò)宿主App和宿主App后端服務(wù)進(jìn)行請(qǐng)求轉(zhuǎn)發(fā),以實(shí)現(xiàn)App對(duì)小程序管控能力。 使用該接口的必須要先在小程序管理平臺(tái)配置可訪問(wèn)的接口或者域名, 配置后才可訪問(wèn)成功,不在白名單中的域名或者api是無(wú)法通過(guò)小程序進(jìn)行業(yè)務(wù)數(shù)據(jù)請(qǐng)求。

接口說(shuō)明

接口名稱:httpProxy

Dubbo調(diào)用:msHttpProxyService

接口描述:小程序網(wǎng)絡(luò)請(qǐng)求轉(zhuǎn)發(fā)服務(wù)。

header通用參數(shù)

參考header通用參數(shù)

業(yè)務(wù)參數(shù)

字段名稱 字段類型 字段描述 是否必須
api String 轉(zhuǎn)發(fā)請(qǐng)求api, 該api必須通過(guò)進(jìn)行轉(zhuǎn)發(fā)請(qǐng)求白名單配置
data Object 請(qǐng)求參數(shù)
method String 請(qǐng)求轉(zhuǎn)發(fā)方式,POST, GET
dataType String text,只支持text方式
encrypted String 加密方式, 暫無(wú)業(yè)務(wù)需要
responseType String 返回格式, json/text, 根據(jù)請(qǐng)求網(wǎng)站返回?cái)?shù)據(jù),請(qǐng)求網(wǎng)站header中Content-Type如果是application/json, 返回?cái)?shù)據(jù)是json,其他都是string
miniAppCode String 小程序碼

出參

字段名稱 字段類型 字段描述 是否必須
response Object 返回?cái)?shù)據(jù)
code String AAAAAA, 成功,其他 錯(cuò)誤
msg String

response

字段名稱 字段類型 字段描述 是否必須
statusCode int 標(biāo)準(zhǔn)http狀態(tài)碼, 200請(qǐng)求成功
returnCode Object 后臺(tái)請(qǐng)求狀態(tài)對(duì)象
data Object 請(qǐng)求數(shù)據(jù)
header Object 請(qǐng)求header

樣例

dubbo協(xié)議接入:

請(qǐng)求url

http://localhost:9102/gw/hk_e_app/msHttpProxyService.do

請(qǐng)求數(shù)據(jù)格式:

{
  "request":{
      "header": {
          "appId": "3",
          "appVersion": "1.0",
          "ffVersion": "4.0",
          "transId": "httpProxy",
          "appExt": "1",
          "custType": "100",
          "signedMicroFlag": "0",
          "net": {
              "ip": "127.0.0.1",
              "netType": "WIFI_oa-test",
              "isp": "中國(guó)移動(dòng)",
              "ssid": "oa-test",
              "lac": "4203",
              "cid": "10732931"
          },
          "device": {
              "osType": "03",
              "osVersion": "8.0.0",
              "brand": "samsung",
              "model": "SM-G9500",
              "uuid": "2e2bc2402301ea3e1e021362dd6b7a1e",
              "imei": "357052091333047",
              "mac": "00:9D:6B:32:00:24",
              "nfc": "1",
              "isRoot": "0",
              "imsi": "8986003915187a258429"
          },
          "reqSeq": "0"
      },
      "body": {
          "api":"http://127.0.01:8080/gw/hk_e_web/ShowMainBoard.do",
          "method":"POST",
          "data":{

          },
          "header":{

          },
          "responseType":"text",
          "encrypted":"false",
          "miniAppCode": "qHwgaSkXKx6tO4jc"
      }
  }
}

http協(xié)議接入:

請(qǐng)求url: http://localhost:8080/ffpaas/miniapp/httpProxy.json

請(qǐng)求數(shù)據(jù)格式:

{
     "request":{
        "header": {
            "appId": "3",
            "appVersion": "1.0",
            "ffVersion": "4.0",
            "transId": "httpProxy",
            "appExt": "1",
            "custType": "100",
            "signedMicroFlag": "0",
            "net": {
                "ip": "127.0.0.1",
                "netType": "WIFI_oa-test",
                "isp": "中國(guó)移動(dòng)",
                "ssid": "oa-test",
                "lac": "4203",
                "cid": "10732931"
            },
            "device": {
                "osType": "03",
                "osVersion": "8.0.0",
                "brand": "samsung",
                "model": "SM-G9500",
                "uuid": "2e2bc2402301ea3e1e021362dd6b7a1e",
                "imei": "357052091333047",
                "mac": "00:9D:6B:32:00:24",
                "nfc": "1",
                "isRoot": "0",
                "imsi": "8986003915187a258429"
            },
            "reqSeq": "0"
        },
        "body": {
            "api":"http://127.0.01:8080/gw/hk_e_web/ShowMainBoard.do",
            "method":"POST",
            "data":{

            },
            "header":{

            },
            "responseType":"text",
            "encrypted":"false",
            "miniAppCode": "qHwgaSkXKx6tO4jc"
        }
    }
}

dsdl配置

節(jié)點(diǎn)配置

msHttpProxyService$applicationName,true

說(shuō)明:

applicationName修改為應(yīng)用

xml參數(shù)配置

  • 創(chuàng)建節(jié)點(diǎn),節(jié)點(diǎn)名稱為interface-mapping
  • 添加配置參數(shù)信息,如下
<?xml version="1.0" encoding="UTF-8"?>

<interface name="msHttpProxyService" description="http代理服務(wù)" auth="false">
    <configs>
        <config key="accessLog" value="false"/>
        <config key="transDataRecordMode" value="on"/>
        <config key="productId" value="ECommon"/>
    </configs>
    <input>
        <param name="api" description="請(qǐng)求地址" type="String" optional="false"/>
        <param name="method" description="請(qǐng)求方式" type="String" optional="false"/>
        <param name="data" description="數(shù)據(jù)" type="Map" optional="true"/>
        <param name="header" description="header" type="Map" optional="true"/>
        <param name="responseType" description="響應(yīng)數(shù)據(jù)類型" type="String" optional="true"/>
        <param name="encrypted" description="是否加密" type="String" optional="true"/>
        <param name="miniAppCode" description="miniAppCode" type="String" optional="true"/>
    </input>
    <output>
        <param name="returnCode" description="處理結(jié)果" type="Map" optional="false">
            <param name="code" description="返回碼" type="String" optional="false"/>
            <param name="message" description="返回信息" type="String"/>
            <param name="type" description="處理結(jié)果類型" type="String" optional="false"/>
        </param>
        <param name="data" type="Object"/>
        <param name="statusCode" type="int"/>
        <param name="header" type="Map"/>
    </output>
</interface>