數(shù)據驗真
## 接口名稱
數(shù)據驗真
## 接口描述
驗證二維碼內(nèi)容的真實性。
## 接口地址
https://idr.gdsinsing.com/v2/verify-data
## 調用方式
|方法|數(shù)據類型|
|-|-|
|[ ] GET|[X] form-data|
|[X] POST|[ ] x-www-form-urlencoded|
|[ ] PUT|[ ] raw|
|[ ] DELETE||
## 參數(shù)說明(míng)
|參數(shù)名|位置|類型|必填|說明(míng)|
|-|-|-|-|-|
|url|body|String|是|二維碼url內(nèi)容|
|location|body|String|否|位置信息,Json字符串"{'longitude':'經度','latitude':'緯度'}"|
## 返回結果
|參數(shù)名|位置|類型|說明(míng)|
|-|-|-|-|
|success||Boolean|調用結果(true:失敗,false:成功)|
|data||String|二維碼信息詳情|
|>url|data|String|二維碼url|
|>handle|data|String|标識碼|
|>stamp|data|String|時(shí)間(jiān)戳|
|msg||String|描述信息|
|ex||String|異常信息|
|>code|ex|String|錯誤碼|
|>reson|ex|String|錯誤原因|
|>resolve|ex|String|解決辦法|
#### 成功返回
```json
{
"success": true,
"data": {
"verifyResult": "true",
"verifiedTimes": 35,
"verifyTime": "2023-04-27 02:27:17",
"verifyLocation": "雲南省楚雄彜族自治州"
},
"msg": "success",
"ex": null
}
```
#### 失敗返回
```json
{
"success": false,
"data": null,
"msg": "二維碼內(nèi)容不合法",
"ex": {
"code": "00300016",
"reason": "二維碼內(nèi)容不合法",
"resolve": "請(qǐng)檢查傳入內(nèi)容"
}
}
```
## 調用例子
``` JavaScript
var form = new FormData();
form.append("url", "二維碼url內(nèi)容");
form.append("location", "{'longitude':'100.82694','latitude':'25.02776'}");
var settings = {
"url": "https://test-idr.gdsinsing.com/v2/verify-data",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
```