master
wangning 7 years ago
parent 3429300924
commit d9a6af58bb

@ -285,6 +285,7 @@
<span class="input-group-addon">+61</span>
<input type="text" name="contact_phone" required ng-model="partner.contact_phone"
class="form-control" style="display: inline"
maxlength="15"
placeholder="Your Phone">
<button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px"
title="发送验证码" ng-click="sendVerificationCode()"

@ -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) {
@ -102,7 +102,7 @@ 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);
second=59;
@ -141,7 +141,7 @@ 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);
$interval.cancel($scope.phone_code_timer);
$scope.resError = resp.data.message;
});
};

Loading…
Cancel
Save