master
wangning 6 years ago
parent f502ac2f80
commit d51a174b7e

@ -144,8 +144,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
try { try {
ssender.sendWithParam(nationCode, phoneNumber, REGISTER_CLIENT_TEMPLID, param, "RoyalPay", "", ""); // ssender.sendWithParam(nationCode, phoneNumber, REGISTER_CLIENT_TEMPLID, param, "RoyalPay", "", ""); //
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); throw new ServerErrorException("Phone number is wrong Please try again");
throw new ServerErrorException("System Error");
} }
stringRedisTemplate.boundValueOps(getRegisterClientRedisKey(phoneNumber)).set(registerClientCode, Long.parseLong(expireMin), TimeUnit.MINUTES); stringRedisTemplate.boundValueOps(getRegisterClientRedisKey(phoneNumber)).set(registerClientCode, Long.parseLong(expireMin), TimeUnit.MINUTES);
return registerClientCode; 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 = [{ var countryMap = [{
"label": "AUS", "label": "AUS",
"value": "AUS" "value": "AUS"
@ -61,6 +61,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.partner = {nation_code:"+61"}; $scope.partner = {nation_code:"+61"};
$scope.bankaccount = {}; $scope.bankaccount = {};
$scope.rate = {}; $scope.rate = {};
$scope.phone_code_timer=$timeout(function () {}, 0);
$scope.loadRoyalpayindustry = function () { $scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) { $http.get('/static/data/royalpayindustry.json').then(function (resp) {
@ -101,8 +102,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}; };
$scope.sendPhoneCodeTime = function(){ $scope.sendPhoneCodeTime = function(){
var second=59; var second=59;
var timerHandler; $scope.phone_code_timer = $timeout(function () {
timerHandler =$interval(function(){
if(second<=0){ if(second<=0){
$interval.cancel(timerHandler); $interval.cancel(timerHandler);
second=59; second=59;
@ -113,7 +113,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
second--; second--;
$scope.canClick=true; $scope.canClick=true;
} }
},1000) }, 1000);
}; };
$scope.goToLogin = function () { $scope.goToLogin = function () {
@ -136,10 +136,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
} }
}; };
$scope.sendVerificationCode = function () { $scope.sendVerificationCode = function () {
$scope.initErrorMsg();
$scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code) $scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code)
$scope.sendPhoneCodeTime(); $scope.sendPhoneCodeTime();
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) { $http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) {
}, function (resp) { }, function (resp) {
$timeout.cancel($scope.phone_code_timer);
$scope.resError = resp.data.message; $scope.resError = resp.data.message;
}); });
}; };
@ -148,6 +150,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.industryLable = industry.label; $scope.industryLable = industry.label;
}; };
$scope.searchBankInfo = function (bsb_no) { $scope.searchBankInfo = function (bsb_no) {
$scope.initErrorMsg();
if (bsb_no != null && bsb_no != "") { if (bsb_no != null && bsb_no != "") {
$scope.showBankInfo = false; $scope.showBankInfo = false;
$http.get('/register/info/bank/' + bsb_no).then(function (resp) { $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.saveStep1 = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) { if (form.$invalid) {
angular.forEach(form, function (item, key) { angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) { if (key.indexOf('$') < 0) {
@ -219,11 +223,12 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.changeChoose(index); $scope.changeChoose(index);
$scope.partner.codeKey = resp.data.codeKey; $scope.partner.codeKey = resp.data.codeKey;
}, function (resp) { }, function (resp) {
$scope.resError = "请稍后重试"; $scope.resError = resp.data.message;
}); });
}; };
$scope.saveApplyInfo = function (form,index) { $scope.saveApplyInfo = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) { if (form.$invalid) {
angular.forEach(form, function (item, key) { angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) { if (key.indexOf('$') < 0) {
@ -241,7 +246,6 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.goToLogin(); $scope.goToLogin();
} }
$scope.changeChoose(index); $scope.changeChoose(index);
$scope.resError = '';
}, function (resp) { }, function (resp) {
$scope.resError = resp.data.message; $scope.resError = resp.data.message;
}); });
@ -290,4 +294,8 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
} }
$scope.initErrorMsg = function () {
$scope.resError = '';
}
}]); }]);
Loading…
Cancel
Save