Example #1
0
        }).then(response=> {
            GLOBAL_USER = EMPTY_USER;
            AsyncStorage.removeItem(GH_USER_KEY);

            cb && cb();

            DeviceEventEmitter.emit('didLogout');
        })
Example #2
0
 onUpdatedProfile(data){
     if(data.spinnerLoading!==undefined){
         this.setState({'spinnerLoading':data.spinnerLoading});
     }
     if(data.memberObject!==undefined){
         //this.refreshInfo(this);
         DeviceEventEmitter.emit('changeMemberInfo',data.memberObject);
     }
 };
Example #3
0
 return (state, action) => {
   if (action.type === ActionConst.FOCUS && action.scene && action.scene.initial) {
     isMainScreen = true;
   } else {
     isMainScreen = false;
   }
   if (action.type === ActionConst.BACK_ACTION || action.type === ActionConst.BACK) {
     DeviceEventEmitter.emit('navigatorBack');
   }
   return defaultReducer(state, action);
 };
Example #4
0
 .then((data) => {
     this.props.navigator.push({
         component: List,
         title: '为我推荐',
         //leftButtonTitle: '返回,关闭',
         leftButtonIcon: {uri:icons.back,scale: 5},
         onLeftButtonPress: () => {
             this.props.navigator.pop()
         },
         passProps: {
             url: 'http://api.jinrongsudi.com/index.php/Api/Product/get_product_recommend',
             user: JSON.parse(user),
             up: this.props.up
         }
     })
     DeviceEventEmitter.emit('changeUser')
 })
Example #5
0
 resetRoute() {
   const { navigator } = this.props;
   DeviceEventEmitter.emit('changeCategory', this.state.typeIds);
   navigator.pop();
 }
import { DeviceEventEmitter } from 'react-native';

const loaderHandler = {
  hideLoader () {
    DeviceEventEmitter.emit('changeLoadingEffect', {isVisible: false});
  },
  showLoader (title) {
    DeviceEventEmitter.emit('changeLoadingEffect', {title, isVisible: true});
  }
};

module.exports = loaderHandler;
		this.getInfo(() => React.DeviceEventEmitter.emit('orientationchange'));
	/**
	 *
	 */
	onResume() {
		React.DeviceEventEmitter.emit('resume');
	}
	/**
	 *
	 */
	onSuspend() {
		React.DeviceEventEmitter.emit('suspend');
	}
		this.getInfo(() => React.DeviceEventEmitter.emit('deviceready'));
Example #11
0
 resetRoute() {
   const { routes } = this.context;
   DeviceEventEmitter.emit('changeCategory', this.state.typeIds);
   routes.main();
 }