|
|
|
@ -58,7 +58,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
$scope.seconds = 6;
|
|
|
|
|
$scope.canClick=false;
|
|
|
|
|
$scope.description = "Send Code";
|
|
|
|
|
$scope.partner = {};
|
|
|
|
|
$scope.partner = {nation_code:"+61"};
|
|
|
|
|
$scope.bankaccount = {};
|
|
|
|
|
$scope.rate = {};
|
|
|
|
|
|
|
|
|
@ -70,9 +70,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
$scope.loadRoyalpayindustry();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.checkUserName = function (username) {
|
|
|
|
|
if(username != null && username != ''){
|
|
|
|
|
$http.get('/register/account/' + $scope.partner.username+'/check').then(function (resp) {
|
|
|
|
|
$scope.checkUserName = function (phone,nation_code) {
|
|
|
|
|
if(phone && nation_code){
|
|
|
|
|
$http.get('/register/account/check?phone='+phone+'&nation_code='+nation_code).then(function (resp) {
|
|
|
|
|
$scope.name_exist = false;
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
if (resp.data.status == 403){
|
|
|
|
@ -83,11 +83,13 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
};
|
|
|
|
|
$scope.chooseArray = new Array(true, false, false, false, false);
|
|
|
|
|
$scope.changeChoose = function (index) {
|
|
|
|
|
angular.forEach($scope.partner, function(key, value) {
|
|
|
|
|
if(value.trim()==''){
|
|
|
|
|
$scope.partner.remove(key);
|
|
|
|
|
$scope.repartner = {};
|
|
|
|
|
angular.forEach($scope.partner, function(value, key) {
|
|
|
|
|
if((value+'').trim()!=''){
|
|
|
|
|
$scope.repartner[key] = value;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$scope.partner = $scope.repartner;
|
|
|
|
|
$scope.chooseArray = new Array(false, false, false, false, false);
|
|
|
|
|
$scope.chooseArray[index] = true;
|
|
|
|
|
};
|
|
|
|
@ -134,8 +136,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.sendVerificationCode = function () {
|
|
|
|
|
$scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code)
|
|
|
|
|
$scope.sendPhoneCodeTime();
|
|
|
|
|
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?'+'nation_code=61').then(function (resp) {
|
|
|
|
|
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.resError = resp.data.message;
|
|
|
|
|
});
|
|
|
|
|