|
|
@ -103,7 +103,7 @@ export default { |
|
|
|
getAccessToken(path, ress) { |
|
|
|
let self = this |
|
|
|
uni.request({ |
|
|
|
url: 'https://aip.baidubce.com/oauth/2.0/token',//生产https://aip.baidubce.com/oauth/2.0/token 测试 /api/oauth/2.0/token |
|
|
|
url: '/api-proxy/oauth/2.0/token',//生产https://aip.baidubce.com/oauth/2.0/token 测试 /api/oauth/2.0/token |
|
|
|
data: { |
|
|
|
grant_type: 'client_credentials', |
|
|
|
client_id: self.dataObj.client_id, |
|
|
@ -126,7 +126,7 @@ export default { |
|
|
|
uploadImage(path, token, ress) { |
|
|
|
let self = this |
|
|
|
uni.request({ |
|
|
|
url: 'https://aip.baidubce.com/rest/2.0/ocr/v1/idcard',//生产https://aip.baidubce.com/rest/2.0/ocr/v1/idcard 测试 /api/rest/2.0/ocr/v1/idcard |
|
|
|
url: '/api-proxy/rest/2.0/ocr/v1/idcard',//生产https://aip.baidubce.com/rest/2.0/ocr/v1/idcard 测试 /api/rest/2.0/ocr/v1/idcard |
|
|
|
data: { |
|
|
|
image: path, |
|
|
|
access_token: token, |
|
|
|