|
@@ -4,7 +4,7 @@ import app from '../../app.json';
|
|
|
|
|
|
|
|
//config
|
|
//config
|
|
|
//const hostUrl = 'http://161.117.183.142/';
|
|
//const hostUrl = 'http://161.117.183.142/';
|
|
|
-const hostUrl = app.product ? 'https://chargeco.global/' : 'https://uat.chargeco.global/';
|
|
|
|
|
|
|
+const hostUrl = app.product ? 'https://csms.chargeco.global/' : 'https://uat.chargeco.global/';
|
|
|
const service = 'chargeco/'
|
|
const service = 'chargeco/'
|
|
|
export const host = hostUrl;
|
|
export const host = hostUrl;
|
|
|
|
|
|
|
@@ -34,6 +34,7 @@ export const get = (path, params) => {
|
|
|
params: params,
|
|
params: params,
|
|
|
method: 'GET',
|
|
method: 'GET',
|
|
|
headers: {
|
|
headers: {
|
|
|
|
|
+ 'lang': 'SG',
|
|
|
'Accept': 'application/json',
|
|
'Accept': 'application/json',
|
|
|
'accessToken': global.accessToken ?? ''
|
|
'accessToken': global.accessToken ?? ''
|
|
|
}
|
|
}
|
|
@@ -57,6 +58,7 @@ export const post = (path, params) => {
|
|
|
Axios.post(host + service + path, params, {
|
|
Axios.post(host + service + path, params, {
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
headers: {
|
|
headers: {
|
|
|
|
|
+ 'lang': 'SG',
|
|
|
'Accept': 'application/json',
|
|
'Accept': 'application/json',
|
|
|
'accessToken': global.accessToken ?? ''
|
|
'accessToken': global.accessToken ?? ''
|
|
|
}
|
|
}
|
|
@@ -80,6 +82,7 @@ export const upload = (path, params, header) => {
|
|
|
Axios.post(host + service + path, params, {
|
|
Axios.post(host + service + path, params, {
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
headers: {
|
|
headers: {
|
|
|
|
|
+ 'lang': 'SG',
|
|
|
'Accept': 'application/json',
|
|
'Accept': 'application/json',
|
|
|
'Content-Type': 'multipart/form-data',
|
|
'Content-Type': 'multipart/form-data',
|
|
|
'accessToken': global.accessToken ?? '',
|
|
'accessToken': global.accessToken ?? '',
|
|
@@ -118,6 +121,7 @@ export const GET = (url, params) => {
|
|
|
fetch(request, {
|
|
fetch(request, {
|
|
|
method: 'GET',
|
|
method: 'GET',
|
|
|
headers: {
|
|
headers: {
|
|
|
|
|
+ 'lang': 'SG',
|
|
|
'Accept': 'application/json',
|
|
'Accept': 'application/json',
|
|
|
'accessToken': global.accessToken ?? ''
|
|
'accessToken': global.accessToken ?? ''
|
|
|
}.then((response) => {
|
|
}.then((response) => {
|
|
@@ -140,6 +144,7 @@ export const POST = (url, params) => {
|
|
|
fetch(host + service + url, {
|
|
fetch(host + service + url, {
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
headers: {
|
|
headers: {
|
|
|
|
|
+ 'lang': 'SG',
|
|
|
'Accept': 'application/json',
|
|
'Accept': 'application/json',
|
|
|
'content-type': 'application/json',
|
|
'content-type': 'application/json',
|
|
|
'accessToken': global.accessToken ?? ''
|
|
'accessToken': global.accessToken ?? ''
|