Created
April 22, 2020 15:14
-
-
Save Muhammadwasi/05ea3306fd53c39fc1dd1b5e0f1231e8 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
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