|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', ['$scope', '$http','$interval','$timeout', function ($scope, $http,$interval,$timeout) {
|
|
|
|
|
angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', ['$scope', '$http','$interval', function ($scope, $http,$interval) {
|
|
|
|
|
var countryMap = [{
|
|
|
|
|
"label": "AUS",
|
|
|
|
|
"value": "AUS"
|
|
|
|
@ -61,7 +61,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
$scope.partner = {nation_code:"+61"};
|
|
|
|
|
$scope.bankaccount = {};
|
|
|
|
|
$scope.rate = {};
|
|
|
|
|
$scope.phone_code_timer=$timeout(function () {}, 0);
|
|
|
|
|
$scope.phone_code_timer=$interval(function () {}, 1000);
|
|
|
|
|
|
|
|
|
|
$scope.loadRoyalpayindustry = function () {
|
|
|
|
|
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
|
|
|
|
@ -121,9 +121,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
};
|
|
|
|
|
$scope.sendPhoneCodeTime = function(){
|
|
|
|
|
var second=59;
|
|
|
|
|
$scope.phone_code_timer = $timeout(function () {
|
|
|
|
|
$scope.phone_code_timer = $interval(function () {
|
|
|
|
|
if(second<=0){
|
|
|
|
|
$interval.cancel(timerHandler);
|
|
|
|
|
$interval.cancel($scope.phone_code_timer);
|
|
|
|
|
second=59;
|
|
|
|
|
$scope.description="Send Code";
|
|
|
|
|
$scope.canClick=false;
|
|
|
|
@ -160,7 +160,10 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
$scope.sendPhoneCodeTime();
|
|
|
|
|
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$timeout.cancel($scope.phone_code_timer);
|
|
|
|
|
if(resp.data.status+0 ==500) {
|
|
|
|
|
$interval.cancel($scope.phone_code_timer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.resError = resp.data.message;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|