Skip to content

Instantly share code, notes, and snippets.

@Muhammadwasi
Created April 22, 2020 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Muhammadwasi/05ea3306fd53c39fc1dd1b5e0f1231e8 to your computer and use it in GitHub Desktop.
Save Muhammadwasi/05ea3306fd53c39fc1dd1b5e0f1231e8 to your computer and use it in GitHub Desktop.
self.getBankCodes=function(url){
if(self.bankList().length===0) {
$.get(url+"/public/bank-codes.json", function (data) {
self.bankList(JSON.parse(data));
self.bankList().forEach(function (bank) {
self.bankMap[bank.BankCode] = bank;
});
});
}
}
if (Params.baseModel.cordovaDevice()) {
Platform.getInstance().then(function (platform) {
self.server_url(platform("getServerURL"));
self.getBankCodes(self.server_url());
});
}else {
// self.server_url("http://localhost:7777");
self.server_url(window.location.protocol+"//"+window.location.host)
self.getBankCodes(self.server_url());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment