|
|
|
@ -40,62 +40,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
"value": "WA"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
var industryMap = [
|
|
|
|
|
{
|
|
|
|
|
"label": "综合商城 Integrated Store",
|
|
|
|
|
"value": 336
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "食品 Food",
|
|
|
|
|
"value": 335
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "化妆品 Cosmetics",
|
|
|
|
|
"value": 334
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "鞋包服饰 Clothes",
|
|
|
|
|
"value": 327
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "酒店行业 Hospitality industry",
|
|
|
|
|
"value": 328
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "数码电器 Electric appliances",
|
|
|
|
|
"value": 332
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "母婴 Baby and maternal products",
|
|
|
|
|
"value": 333
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "文具/办公用品 Office supplies",
|
|
|
|
|
"value": 337
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "机票行业 Airline tickets industry",
|
|
|
|
|
"value": 339
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "国际物流 International logistics",
|
|
|
|
|
"value": 330
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "教育行业 Education section",
|
|
|
|
|
"value": 329
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "其它服务行业 Other services industry",
|
|
|
|
|
"value": 331
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "其它货物贸易行业 Other goods trade industry",
|
|
|
|
|
"value": 338
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
$scope.name_exist = false;
|
|
|
|
|
$scope.industries = angular.copy(industryMap);
|
|
|
|
|
$scope.states = angular.copy(stateMap);
|
|
|
|
|
$scope.countries = angular.copy(countryMap);
|
|
|
|
|
$scope.seconds = 6;
|
|
|
|
@ -105,6 +50,14 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
$scope.bankaccount = {};
|
|
|
|
|
$scope.rate = {};
|
|
|
|
|
|
|
|
|
|
$scope.loadRoyalpayindustry = function () {
|
|
|
|
|
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
|
|
|
|
|
$scope.royalpayindustry = resp.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.loadRoyalpayindustry();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.checkUserName = function (username) {
|
|
|
|
|
if(username != null && username != ''){
|
|
|
|
|
$http.get('/register/account/' + $scope.partner.username+'/check').then(function (resp) {
|
|
|
|
@ -154,9 +107,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
}
|
|
|
|
|
},1000)
|
|
|
|
|
};
|
|
|
|
|
$scope.sendVerificationCode = function (phone_number) {
|
|
|
|
|
$scope.sendVerificationCode = function () {
|
|
|
|
|
$scope.sendPhoneCodeTime();
|
|
|
|
|
$http.post('/register/get/code/{number}').then(function (resp) {
|
|
|
|
|
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify').then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.resError = resp.data.message;
|
|
|
|
|
});
|
|
|
|
@ -207,7 +160,8 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.saveApplyInfo = function (form,index) {
|
|
|
|
|
|
|
|
|
|
$scope.saveStep1 = function (form,index) {
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
@ -216,31 +170,14 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(index == 1){
|
|
|
|
|
$scope.partner.codeKey = Math.random().toString(16).substring(2);
|
|
|
|
|
}
|
|
|
|
|
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
|
|
|
|
|
if (index == 3) {
|
|
|
|
|
$scope.getRateConfig();
|
|
|
|
|
}
|
|
|
|
|
if (index == 4) {
|
|
|
|
|
$scope.goToLogin();
|
|
|
|
|
}
|
|
|
|
|
$http.post('/register/info/update/' + $scope.partner.username +'/step1', $scope.partner).then(function (resp) {
|
|
|
|
|
$scope.changeChoose(index);
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.resError = resp.data.message;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--/partners/application/captcha-image-->
|
|
|
|
|
/* $scope.captchaImage = '/partners/application/captcha-image';
|
|
|
|
|
$scope.changeCaptchaImage = function () {
|
|
|
|
|
$scope.captchaImage = '/partners/application/captcha-image?' + Math.floor(Math.random() * 100);
|
|
|
|
|
};
|
|
|
|
|
$scope.save = function (form) {
|
|
|
|
|
$scope.saveApplyInfo = function (form,index) {
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
@ -249,17 +186,19 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.company_name = $scope.partner.short_name;
|
|
|
|
|
$('#login-btn').attr('disabled', true);
|
|
|
|
|
$http.post('partners/application', $scope.partner).then(function (resp) {
|
|
|
|
|
alert("Registered merchant application has been submitted successfully");
|
|
|
|
|
location.href = 'partner_register_success.html';
|
|
|
|
|
//commonDialog.alert({title: 'Success', content: 'Registered merchant application has been submitted successfully', type: 'success'});
|
|
|
|
|
if(index == 1){
|
|
|
|
|
$scope.partner.codeKey = Math.random().toString(16).substring(2);
|
|
|
|
|
}
|
|
|
|
|
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
|
|
|
|
|
if (index == 3) {
|
|
|
|
|
$scope.getRateConfig();
|
|
|
|
|
}
|
|
|
|
|
if (index == 4) {
|
|
|
|
|
$scope.goToLogin();
|
|
|
|
|
}
|
|
|
|
|
$scope.changeChoose(index);
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
alert(resp.data.message);
|
|
|
|
|
$scope.resError = resp.data.message;
|
|
|
|
|
$scope.changeCaptchaImage();
|
|
|
|
|
$('#login-btn').attr('disabled', false);
|
|
|
|
|
});
|
|
|
|
|
};*/
|
|
|
|
|
};
|
|
|
|
|
}]);
|