批量开账号提示
This commit is contained in:
@@ -226,7 +226,7 @@
|
||||
</div>
|
||||
<div class="conPi">
|
||||
<p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p>
|
||||
<p class="shuoming">如:注册账号前缀为【user】开始数为【6】个数为【10】,则注册的账号为:user06,user07,user08,....user14</p>
|
||||
<p class="shuoming">如:注册账号前缀为【user】开始数为【2】个数为【10】,则注册的账号为:user2,user3,user4,....user11</p>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
IP账号前缀:
|
||||
@@ -240,7 +240,7 @@
|
||||
IP开始号:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="number" v-model="MoreBuyModel.MinPostfix" />
|
||||
<input type="number" v-on:input="changeAccountCount()" v-model="MoreBuyModel.MinPostfix" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -248,7 +248,15 @@
|
||||
IP注册个数:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="number" v-model="MoreBuyModel.MaxPostfix" />
|
||||
<input type="number" v-on:input="changeAccountCount()" v-model="MoreBuyModel.MaxPostfix" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
即将生成的账号:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<p class="jinggao">{{acount_list}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -369,6 +377,7 @@
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
acount_list:'',
|
||||
showPayType:true,
|
||||
payHandler:null,
|
||||
Tip:'',
|
||||
@@ -546,37 +555,45 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
hasNumAndChar(str) {
|
||||
var zg = /^[0-9a-zA-Z]*$/;
|
||||
if (!zg.test(str)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
checkOneAccount() {
|
||||
if (this.OneBuyModel.Account.length > 10 || this.OneBuyModel.Account.length < 5) {
|
||||
if (this.OneBuyModel.Account.length > 10 || this.OneBuyModel.Account.length < 5|| !this.hasNumAndChar(this.OneBuyModel.Account)) {
|
||||
this.OneChecker.AccountOk = false;
|
||||
alert('账号长度必须在5-10位');
|
||||
alert('账号长度必须在5-10位,且不能包含特殊字符');
|
||||
return false;
|
||||
}
|
||||
this.OneChecker.AccountOk = true;
|
||||
return true;
|
||||
},
|
||||
checkOnePwd() {
|
||||
if (this.OneBuyModel.Pwd.length > 6 || this.OneBuyModel.Pwd.length <1) {
|
||||
if (this.OneBuyModel.Pwd.length > 6 || this.OneBuyModel.Pwd.length <1 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
|
||||
this.OneChecker.PwdOk = false;
|
||||
alert('密码长度必须在1-6位');
|
||||
alert('密码长度必须在1-6位,且不能包含特殊字符');
|
||||
return false;
|
||||
}
|
||||
this.OneChecker.PwdOk = true;
|
||||
return true;
|
||||
},
|
||||
checkMoreAccount() {
|
||||
if (this.MoreBuyModel.Account.length > 10 || this.MoreBuyModel.Account.length < 3) {
|
||||
if (this.MoreBuyModel.Account.length > 10 || this.MoreBuyModel.Account.length < 3|| !this.hasNumAndChar(this.MoreBuyModel.Account)) {
|
||||
this.MoreChecker.AccountOk = false;
|
||||
alert('账号长度必须在5-10位');
|
||||
alert('账号长度必须在5-10位,且不能包含特殊字符');
|
||||
return false;
|
||||
}
|
||||
this.MoreChecker.AccountOk = true;
|
||||
return true;
|
||||
},
|
||||
checkMorePwd() {
|
||||
if (this.MoreBuyModel.Pwd.length > 6 || this.MoreBuyModel.Pwd.length < 1) {
|
||||
if (this.MoreBuyModel.Pwd.length > 6 || this.MoreBuyModel.Pwd.length < 1 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
|
||||
this.MoreChecker.PwdOk = false;
|
||||
alert('密码长度必须在1-6位');
|
||||
alert('密码长度必须在1-6位,且不能包含特殊字符');
|
||||
return false;
|
||||
}
|
||||
this.MoreChecker.PwdOk = true;
|
||||
@@ -734,6 +751,24 @@
|
||||
clearInterval(this.payHandler);
|
||||
$('.payMask').hide();
|
||||
$('#qrcode').empty();
|
||||
},
|
||||
changeAccountCount() {
|
||||
this.acount_list = '';
|
||||
let start_account = this.MoreBuyModel.MinPostfix;
|
||||
let end_account = this.MoreBuyModel.MaxPostfix;
|
||||
if(end_account>3){
|
||||
for(let i = start_account;i<parseInt(start_account)+3;i++){
|
||||
this.acount_list += this.MoreBuyModel.Account+i+',';
|
||||
}
|
||||
this.acount_list = this.acount_list.substr(0,this.acount_list.length - 1);
|
||||
this.acount_list += '...'+this.MoreBuyModel.Account+(parseInt(start_account)+parseInt(end_account)-1)
|
||||
} else {
|
||||
for(let i = start_account;i<parseInt(start_account)+parseInt(end_account);i++){
|
||||
this.acount_list += this.MoreBuyModel.Account+i+',';
|
||||
}
|
||||
|
||||
this.acount_list = this.acount_list.substr(0,this.acount_list.length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user