Before switching to preprod

This commit is contained in:
bricezele 2020-12-07 14:47:35 +01:00
parent 9363fc3f1d
commit 7c35fce031
4 changed files with 20 additions and 16 deletions

View File

@ -1653,7 +1653,7 @@ class Home extends BaseScreen {
translucent={true}
/>
{/* Start here to comment */}
{
{/*{
(this.state.loadingDialog || this.props.loading) ?
<View
style={{
@ -1705,7 +1705,7 @@ class Home extends BaseScreen {
}
}])
}}
/>
/>*/}
{this.makeCardSearch()}
{this.makeSlidingUp()}
{this.makeDialogLoader()}

View File

@ -13,6 +13,7 @@ import {getPositionInformation} from "../../webservice/MapService";
import isEqual from 'lodash/isEqual'
let country=require('./../../utils/country_code.json');
import Icon from 'react-native-vector-icons/MaterialIcons';
import _ from 'lodash';
const GEOLOCATION_OPTIONS= { enableHighAccuracy: true, timeout: 20000 }
@ -30,7 +31,8 @@ export default class ForgottenPassword extends Component{
constructor(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();
};
@ -196,7 +198,7 @@ export default class ForgottenPassword extends Component{
render(){
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,
}}>
@ -204,7 +206,7 @@ export default class ForgottenPassword extends Component{
<Icon.Button name={"keyboard-backspace"}
color={"white"}
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()}
/>
@ -248,9 +250,10 @@ export default class ForgottenPassword extends Component{
onRenitPassword() {
if(this.state.phone.length>0){
if(this.props.type!==null){
let type=this.props.type===0?'user':'agent';
this.setState({isSending:true})
if(this.props.navigation.state.params.type!==null){
let type= this.props.navigation.state.params.type === 0 ? 'user' : 'agent';
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)=>{
this.setState({isSending:false})

View File

@ -35,8 +35,8 @@ function queryAuth(data) {
return timeout(50000, queryData(data, adhesionUrl))
}
async function queryData(data, url) {
data["lang"] = I18n.currentLocale()
console.warn("REQUEST BODY", JSON.stringify(data));
data["lang"] = I18n.currentLocale();
data["isTest"] = isDebugMode
let response = await fetch(url, {
method: 'POST',
@ -49,9 +49,10 @@ async function queryData(data, url) {
let responseJson = null;
let responseText = await response.text()
try {
console.warn("SERVER RESPONSE SUCCESS",responseText);
responseJson = JSON.parse(responseText)
} catch (e) {
console.log(responseText)
console.warn("SERVER RESPONSE ERROR",responseText);
return { "error": "error", "error_msg": responseText }
}
return responseJson;

View File

@ -7,8 +7,8 @@ export const isDebugMode = false
//export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest";
//const baseUrl = "https://ilink-app.com/mobilebackendtest2"
export const baseUrl = "http://test.ilink-app.com:8080/mobilebackend";
export const testBaseUrl = "https://test.ilink-app.com";
export const baseUrl = " http://ilink-app.com:8082/mobilebackend";
export const testBaseUrl = "http://ilink-app.com:8080";
/* export const baseUrl = "https://preprod.ilink-app.com:8080/mobilebackend";
export const testBaseUrl = "https://preprod.ilink-app.com"; */