change app icon

parent f8f966b3
export default {
apiEndpoint: 'https://meu.anawork.com/api/',
//apiEndpoint: 'https://gateway.dev.meu-solutions.com/techport/api/',
imageEndPoint: 'https://techmart.meu-solutions.com',
siteURL: 'https://saigon-business.erp.meu-solutions.com',
ONE_SIGNAL_KEY: '6f4f8bd1-9b43-4067-8175-c0052140e891',
axiosTimeout: 10000,
};
...@@ -8,9 +8,7 @@ import {ToastMessage} from '../utils/MessageUtil'; ...@@ -8,9 +8,7 @@ import {ToastMessage} from '../utils/MessageUtil';
import api from './axios'; import api from './axios';
const createAPI = () => { const createAPI = () => {
// const APIInstant = require('axios').default.create()
const APIInstant = require('axios').default.create(); const APIInstant = require('axios').default.create();
//console.log('createAPI', api.getBaseURL());
APIInstant.defaults.baseURL = api.getBaseURL(); APIInstant.defaults.baseURL = api.getBaseURL();
APIInstant.defaults.timeout = 40000; APIInstant.defaults.timeout = 40000;
APIInstant.defaults.headers = {'Content-Type': 'application/json'}; APIInstant.defaults.headers = {'Content-Type': 'application/json'};
......
import {create, isCancel} from 'apisauce'; import {create} from 'apisauce';
import {Platform} from 'react-native'; import {Platform} from 'react-native';
import SInfo from 'react-native-sensitive-info'; import config from '../config';
const rax = require('retry-axios');
const api = create({ const api = create({
baseURL: '', baseURL: config.apiEndpoint,
timeout: Platform.OS === 'ios' ? 6000 : 2500, timeout: Platform.OS === 'ios' ? 6000 : 2500,
}); });
SInfo.getItem('token', {
sharedPreferencesName: 'token',
keychainService: 'myToken',
}).then(value => {
api.setHeader('Authorization', `Bearer ${value}`);
});
SInfo.getItem('domain', {
sharedPreferencesName: 'domain',
keychainService: 'myDomain',
}).then(value => {
api.setBaseURL(value);
});
export default api; export default api;
...@@ -44,7 +44,7 @@ const IntroductionContainer = props => { ...@@ -44,7 +44,7 @@ const IntroductionContainer = props => {
} }
}; };
const navigateToDomain = () => { const navigateToDomain = () => {
RootNavigation.navigate(APP_NAVIGATE_SCREEN.SERVER) RootNavigation.navigate(APP_NAVIGATE_SCREEN.LOGIN)
} }
const introProps = { const introProps = {
indexSwiper, indexSwiper,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment