master
wangning 7 years ago
parent 3429300924
commit d9a6af58bb

@ -285,6 +285,7 @@
<span class="input-group-addon">+61</span> <span class="input-group-addon">+61</span>
<input type="text" name="contact_phone" required ng-model="partner.contact_phone" <input type="text" name="contact_phone" required ng-model="partner.contact_phone"
class="form-control" style="display: inline" class="form-control" style="display: inline"
maxlength="15"
placeholder="Your Phone"> placeholder="Your Phone">
<button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px" <button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px"
title="发送验证码" ng-click="sendVerificationCode()" 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 = [{ var countryMap = [{
"label": "AUS", "label": "AUS",
"value": "AUS" "value": "AUS"
@ -61,7 +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.phone_code_timer=$interval(function () {}, 1000);
$scope.loadRoyalpayindustry = function () { $scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) { $http.get('/static/data/royalpayindustry.json').then(function (resp) {
@ -102,7 +102,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}; };
$scope.sendPhoneCodeTime = function(){ $scope.sendPhoneCodeTime = function(){
var second=59; var second=59;
$scope.phone_code_timer = $timeout(function () { $scope.phone_code_timer = $interval(function () {
if(second<=0){ if(second<=0){
$interval.cancel(timerHandler); $interval.cancel(timerHandler);
second=59; second=59;
@ -141,7 +141,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$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); $interval.cancel($scope.phone_code_timer);
$scope.resError = resp.data.message; $scope.resError = resp.data.message;
}); });
}; };

Loading…
Cancel
Save