Commit 78628bb3 authored by Trisno's avatar Trisno

change base url

parent 1899726b
......@@ -4,7 +4,7 @@ import { Alert } from 'react-native';
export default function CheckVersion(navigation) {
let version = Constants.manifest.version
Axios.get('https://excelsocrm.ravintoladev.com/cms/v2/detail/apps-version').then(respon => {
Axios.get('https://excelsocrm2.ravintolasky.com/cms/v2/detail/apps-version').then(respon => {
let version_server = respon.data.content5
let msg_res = respon.data.content6
if (version_server !== version) {
......
......@@ -44,7 +44,7 @@ import * as Device from 'expo-device';
session_id: this.props.session_id
}
Axios.post("https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_list", params).then(res => {
Axios.post("https://excelsocrm2.ravintolasky.com/crm/v2/outlet/get_list", params).then(res => {
let dataOutlets = res.data.outlets;
for (let i = 0; i < dataOutlets.length; i++) {
dataOutlets[i]['distance'] = this.distance(dataOutlets[i]['lat'], dataOutlets[i]['long']);
......
......@@ -25,7 +25,7 @@ class ChangeProfil extends React.Component {
componentDidMount() {
Axios.get(BASE_URL_GET_ENUM).then(res => {
Axios.get(this.props.BASE_URL + 'crm/v2/auth/register_get_enum').then(res => {
// console.log('ENUM :' + JSON.stringify(res.data.gender));
let gender = res.data.gender;
let gender_list = []
......@@ -51,7 +51,7 @@ class ChangeProfil extends React.Component {
session_id: this.props.session_id
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v1/member/get_profile', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
let data = res.data
this.setState({
full_name: data.name,
......@@ -77,7 +77,7 @@ class ChangeProfil extends React.Component {
gender: this.state.gender_selected,
mobile_phone: this.state.no_tlp
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/set_profile', params1).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/member/set_profile', params1).then(res => {
this.props.navigation.goBack()
this.props.route.params.onChangeProfil({ example: 'wakwaw' })
// console.log(JSON.stringify('A : ' + JSON.stringify(this.props.route.params)))
......@@ -181,7 +181,8 @@ const mapStateToProps = (state) => {
session_id: state.session_id,
gender_display: state.gender_display,
full_name: state.full_name
full_name: state.full_name,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -18,7 +18,7 @@ class setBaseUrl extends React.Component {
if (this.state.base_url == '') {
let setUrls = {
BASE_URL:'https://excelsocrm.ravintoladev.com/'
BASE_URL:'https://excelsocrm2.ravintolasky.com/'
}
this.props.setUrlProps(setUrls);
Alert.alert('','Base Url di setting ke default');
......
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