Explorar el Código

优化接口调用流程

java110 hace 5 años
padre
commit
c4839131f2
Se han modificado 2 ficheros con 63 adiciones y 0 borrados
  1. 63 0
      docs/document/api/apiStart.md
  2. BIN
      docs/document/images/api/004.png

+ 63 - 0
docs/document/api/apiStart.md

@@ -18,3 +18,66 @@
 ![image](../images/api/002.png)
 ![image](../images/api/003.png)
 
+## 如何调用接口
+
+#### 调用地址拼接
+
+接口地址拼接方式为 https://您的IP:您的端口(service-front的端口8012)/app/服务编码  或者为
+https://您的IP:您的端口(service-api的端口8008)/api/服务编码
+
+第一个地址为只有在登录获取token后才能调用,第二个地址不需要过去token可以直接调用,service-front 的作用为校验 调用方是否登录
+
+
+#### 调用固定传参介绍
+
+接口调用基本需要传一下4个参数到http header
+
+|参数名称|约束|类型|长度|描述|取值说明|
+| :-: | :-: | :-: | :-: | :-: | :-:|
+|app-id|1|String|30|应用ID|通过添加应用生成|
+|transaction-id|1|String|30|请求流水号|建议为uuid|
+|sign|1|String|-|签名|请参考签名说明|
+|req-time|1|String|-|请求时间|YYYYMMDDhhmmss|
+
+
+#### 举例
+
+
+###### 举例
+> 地址:[http://api.java110.com:8008/api/owner.queryOwnerMembers?memberId=772019091360360003&communityId=7020181217000001](http://api.java110.com:8008/api/owner.queryOwnerMembers?memberId=772019091360360003&communityId=7020181217000001)
+
+``` javascript
+请求头信息:
+Content-Type:application/json
+USER_ID:1234
+APP_ID:8000418002
+TRANSACTION_ID:10029082726
+REQ_TIME:20181113225612
+SIGN:aabdncdhdbd878sbdudn898
+请求报文:
+
+无
+
+返回报文:
+{
+	"machines": [{
+		"age": "1",
+		"machineId": "123",
+		"machineCode": "Acc009",
+		"machineVersion": "v1.0",
+		"machineName": "门禁大门位置测试",
+		"locationTypeCd": "1000",
+		"locationObjName": "东大门",
+		"locationObjId": "7020181217000001"
+	}],
+	"page": 0,
+	"records": 1,
+	"rows": 0,
+	"total": 1
+}
+
+```
+
+![image](../images/api/004.png)
+
+

BIN
docs/document/images/api/004.png