master
wangning 7 years ago
parent f502ac2f80
commit d51a174b7e

@ -144,8 +144,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
try {
ssender.sendWithParam(nationCode, phoneNumber, REGISTER_CLIENT_TEMPLID, param, "RoyalPay", "", ""); //
} catch (Exception e) {
e.printStackTrace();
throw new ServerErrorException("System Error");
throw new ServerErrorException("Phone number is wrong Please try again");
}
stringRedisTemplate.boundValueOps(getRegisterClientRedisKey(phoneNumber)).set(registerClientCode, Long.parseLong(expireMin), TimeUnit.MINUTES);
return registerClientCode;

@ -1,4 +1,4 @@
angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', ['$scope', '$http','$interval', function ($scope, $http,$interval) {
angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', ['$scope', '$http','$interval','$timeout', function ($scope, $http,$interval,$timeout) {
var countryMap = [{
"label": "AUS",
"value": "AUS"
@ -61,6 +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.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
@ -101,8 +102,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
};
$scope.sendPhoneCodeTime = function(){
var second=59;
var timerHandler;
timerHandler =$interval(function(){
$scope.phone_code_timer = $timeout(function () {
if(second<=0){
$interval.cancel(timerHandler);
second=59;
@ -113,7 +113,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
second--;
$scope.canClick=true;
}
},1000)
}, 1000);
};
$scope.goToLogin = function () {
@ -136,10 +136,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}
};
$scope.sendVerificationCode = function () {
$scope.initErrorMsg();
$scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code)
$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);
$scope.resError = resp.data.message;
});
};
@ -148,6 +150,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.industryLable = industry.label;
};
$scope.searchBankInfo = function (bsb_no) {
$scope.initErrorMsg();
if (bsb_no != null && bsb_no != "") {
$scope.showBankInfo = false;
$http.get('/register/info/bank/' + bsb_no).then(function (resp) {
@ -205,6 +208,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
};
$scope.saveStep1 = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
@ -219,11 +223,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.changeChoose(index);
$scope.partner.codeKey = resp.data.codeKey;
}, function (resp) {
$scope.resError = "请稍后重试";
$scope.resError = resp.data.message;
});
};
$scope.saveApplyInfo = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
@ -241,7 +246,6 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.goToLogin();
}
$scope.changeChoose(index);
$scope.resError = '';
}, function (resp) {
$scope.resError = resp.data.message;
});
@ -290,4 +294,8 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}
$scope.initErrorMsg = function () {
$scope.resError = '';
}
}]);
Loading…
Cancel
Save