Created
August 23, 2018 09:55
-
-
Save skylying/94f22c4cc8232aa1aac4aa6ac939d8eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applyPromo = (promoId, category, action, application, type, afterAction) => { | |
const { navigate } = this.props.navigation; | |
var redirection = ""; | |
switch (type) { | |
case "bonusbutton": | |
switch (action.pageType.page.toLowerCase()) { | |
case "transfer": | |
var bonusInfo = action.bonus; | |
navigate("Transfer", { bonusInfo }); | |
break; | |
case "deposit": | |
var msg = "您的主账户余额不足"; | |
if (this.state.preferWallet == "MAIN") { | |
NativeAlert.info(msg, undefined, "去充值", () => { | |
this.props.navigation.navigate("Deposit"); | |
}); | |
} | |
else { | |
NativeAlert.info(msg + "\n" + "您的首选不是主账户建议您存进主账户哟"); | |
} | |
break; | |
default: | |
break; | |
} | |
break; | |
case "applyform": | |
navigate("PromoApplication", { promoId, category }); | |
break; | |
default: | |
break; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment