Before switching to preprod
This commit is contained in:
parent
9363fc3f1d
commit
7c35fce031
|
@ -1653,7 +1653,7 @@ class Home extends BaseScreen {
|
||||||
translucent={true}
|
translucent={true}
|
||||||
/>
|
/>
|
||||||
{/* Start here to comment */}
|
{/* Start here to comment */}
|
||||||
{
|
{/*{
|
||||||
(this.state.loadingDialog || this.props.loading) ?
|
(this.state.loadingDialog || this.props.loading) ?
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -1705,7 +1705,7 @@ class Home extends BaseScreen {
|
||||||
}
|
}
|
||||||
}])
|
}])
|
||||||
}}
|
}}
|
||||||
/>
|
/>*/}
|
||||||
{this.makeCardSearch()}
|
{this.makeCardSearch()}
|
||||||
{this.makeSlidingUp()}
|
{this.makeSlidingUp()}
|
||||||
{this.makeDialogLoader()}
|
{this.makeDialogLoader()}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {getPositionInformation} from "../../webservice/MapService";
|
||||||
import isEqual from 'lodash/isEqual'
|
import isEqual from 'lodash/isEqual'
|
||||||
let country=require('./../../utils/country_code.json');
|
let country=require('./../../utils/country_code.json');
|
||||||
import Icon from 'react-native-vector-icons/MaterialIcons';
|
import Icon from 'react-native-vector-icons/MaterialIcons';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
const GEOLOCATION_OPTIONS= { enableHighAccuracy: true, timeout: 20000 }
|
const GEOLOCATION_OPTIONS= { enableHighAccuracy: true, timeout: 20000 }
|
||||||
|
|
||||||
|
@ -30,7 +31,8 @@ export default class ForgottenPassword extends Component{
|
||||||
|
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props);
|
super(props);
|
||||||
console.log(this.props);
|
console.log("RESET PASSWORD PROPS",this.props);
|
||||||
|
console.warn("USER TYPE", this.props.navigation.state.params.type, typeof this.props.navigation.state.params.type);
|
||||||
this.state=this.initState();
|
this.state=this.initState();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -196,22 +198,22 @@ export default class ForgottenPassword extends Component{
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
return <View style={{
|
return <View style={{
|
||||||
backgroundColor:this.props.type===0?theme.primary:theme.primaryDarkAdvanced,
|
backgroundColor:this.props.navigation.state.params.type===0?theme.primary:theme.primaryDarkAdvanced,
|
||||||
flex:1,
|
flex:1,
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<View style={{flexDirection:'row',flex:1}}>
|
<View style={{flexDirection:'row',flex:1}}>
|
||||||
<Icon.Button name={"keyboard-backspace"}
|
<Icon.Button name={"keyboard-backspace"}
|
||||||
color={"white"}
|
color={"white"}
|
||||||
size={24}
|
size={24}
|
||||||
backgroundColor={this.props.type===0?theme.primary:theme.primaryDarkAdvanced}
|
backgroundColor={this.props.navigation.state.params.type===0?theme.primary:theme.primaryDarkAdvanced}
|
||||||
onPress={()=>this.props.navigation.pop()}
|
onPress={()=>this.props.navigation.pop()}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex:4, justifyContent:'center',
|
<View style={{ flex:4, justifyContent:'center',
|
||||||
alignItems:'center'}} >
|
alignItems:'center'}} >
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={styles.TitlePassword}
|
style={styles.TitlePassword}
|
||||||
>
|
>
|
||||||
|
@ -248,13 +250,14 @@ export default class ForgottenPassword extends Component{
|
||||||
|
|
||||||
onRenitPassword() {
|
onRenitPassword() {
|
||||||
if(this.state.phone.length>0){
|
if(this.state.phone.length>0){
|
||||||
if(this.props.type!==null){
|
if(this.props.navigation.state.params.type!==null){
|
||||||
let type=this.props.type===0?'user':'agent';
|
let type= this.props.navigation.state.params.type === 0 ? 'user' : 'agent';
|
||||||
this.setState({isSending:true})
|
console.log("Type user send", this.props.navigation.state.params.type);
|
||||||
|
this.setState({isSending:true});
|
||||||
reinitpassword(this.state.indicatif+this.state.phone,type).then((data)=>{
|
reinitpassword(this.state.indicatif+this.state.phone,type).then((data)=>{
|
||||||
|
|
||||||
this.setState({isSending:false})
|
this.setState({isSending:false})
|
||||||
|
|
||||||
if(data.error){
|
if(data.error){
|
||||||
this.state.passRef.shake(1200);
|
this.state.passRef.shake(1200);
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ function queryAuth(data) {
|
||||||
return timeout(50000, queryData(data, adhesionUrl))
|
return timeout(50000, queryData(data, adhesionUrl))
|
||||||
}
|
}
|
||||||
async function queryData(data, url) {
|
async function queryData(data, url) {
|
||||||
|
console.warn("REQUEST BODY", JSON.stringify(data));
|
||||||
data["lang"] = I18n.currentLocale()
|
data["lang"] = I18n.currentLocale();
|
||||||
data["isTest"] = isDebugMode
|
data["isTest"] = isDebugMode
|
||||||
let response = await fetch(url, {
|
let response = await fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -49,9 +49,10 @@ async function queryData(data, url) {
|
||||||
let responseJson = null;
|
let responseJson = null;
|
||||||
let responseText = await response.text()
|
let responseText = await response.text()
|
||||||
try {
|
try {
|
||||||
|
console.warn("SERVER RESPONSE SUCCESS",responseText);
|
||||||
responseJson = JSON.parse(responseText)
|
responseJson = JSON.parse(responseText)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(responseText)
|
console.warn("SERVER RESPONSE ERROR",responseText);
|
||||||
return { "error": "error", "error_msg": responseText }
|
return { "error": "error", "error_msg": responseText }
|
||||||
}
|
}
|
||||||
return responseJson;
|
return responseJson;
|
||||||
|
|
|
@ -7,8 +7,8 @@ export const isDebugMode = false
|
||||||
//export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest";
|
//export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest";
|
||||||
//const baseUrl = "https://ilink-app.com/mobilebackendtest2"
|
//const baseUrl = "https://ilink-app.com/mobilebackendtest2"
|
||||||
|
|
||||||
export const baseUrl = "http://test.ilink-app.com:8080/mobilebackend";
|
export const baseUrl = " http://ilink-app.com:8082/mobilebackend";
|
||||||
export const testBaseUrl = "https://test.ilink-app.com";
|
export const testBaseUrl = "http://ilink-app.com:8080";
|
||||||
|
|
||||||
/* export const baseUrl = "https://preprod.ilink-app.com:8080/mobilebackend";
|
/* export const baseUrl = "https://preprod.ilink-app.com:8080/mobilebackend";
|
||||||
export const testBaseUrl = "https://preprod.ilink-app.com"; */
|
export const testBaseUrl = "https://preprod.ilink-app.com"; */
|
||||||
|
|
Loading…
Reference in New Issue