批量开账号提示

This commit is contained in:
“wanyongkang”
2021-03-19 18:28:09 +08:00
parent 173e44be22
commit 48ab7fbe3e
2 changed files with 76 additions and 14 deletions

View File

@@ -226,7 +226,7 @@
</div> </div>
<div class="conPi"> <div class="conPi">
<p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p> <p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p>
<p class="shuoming">如:注册账号前缀为【user】开始数为【6】个数为【10】则注册的账号为user06user07user08....user14</p> <p class="shuoming">如:注册账号前缀为【user】开始数为【2】个数为【10】则注册的账号为user2user3user4....user11</p>
<div class="row"> <div class="row">
<div class="col-sm-5 col-xs-5"> <div class="col-sm-5 col-xs-5">
IP账号前缀 IP账号前缀
@@ -240,7 +240,7 @@
IP开始号 IP开始号
</div> </div>
<div class="col-sm-7 col-xs-7 shuru"> <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> </div>
<div class="row"> <div class="row">
@@ -248,7 +248,15 @@
IP注册个数 IP注册个数
</div> </div>
<div class="col-sm-7 col-xs-7 shuru"> <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> </div>
<div class="row"> <div class="row">
@@ -369,6 +377,7 @@
var app = new Vue({ var app = new Vue({
el: '#app', el: '#app',
data: { data: {
acount_list:'',
showPayType:true, showPayType:true,
payHandler:null, payHandler:null,
Tip:'', Tip:'',
@@ -546,37 +555,45 @@
} }
}) })
}, },
hasNumAndChar(str) {
var zg = /^[0-9a-zA-Z]*$/;
if (!zg.test(str)) {
return false;
} else {
return true;
}
},
checkOneAccount() { 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; this.OneChecker.AccountOk = false;
alert('账号长度必须在5-10位'); alert('账号长度必须在5-10位,且不能包含特殊字符');
return false; return false;
} }
this.OneChecker.AccountOk = true; this.OneChecker.AccountOk = true;
return true; return true;
}, },
checkOnePwd() { 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; this.OneChecker.PwdOk = false;
alert('密码长度必须在1-6位'); alert('密码长度必须在1-6位,且不能包含特殊字符');
return false; return false;
} }
this.OneChecker.PwdOk = true; this.OneChecker.PwdOk = true;
return true; return true;
}, },
checkMoreAccount() { 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; this.MoreChecker.AccountOk = false;
alert('账号长度必须在5-10位'); alert('账号长度必须在5-10位,且不能包含特殊字符');
return false; return false;
} }
this.MoreChecker.AccountOk = true; this.MoreChecker.AccountOk = true;
return true; return true;
}, },
checkMorePwd() { 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; this.MoreChecker.PwdOk = false;
alert('密码长度必须在1-6位'); alert('密码长度必须在1-6位,且不能包含特殊字符');
return false; return false;
} }
this.MoreChecker.PwdOk = true; this.MoreChecker.PwdOk = true;
@@ -734,6 +751,24 @@
clearInterval(this.payHandler); clearInterval(this.payHandler);
$('.payMask').hide(); $('.payMask').hide();
$('#qrcode').empty(); $('#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);
}
} }
} }
}) })

View File

@@ -254,7 +254,7 @@
<div class="container t2" id="moreBuy" style="font-size: 18px;font-weight: bold;"> <div class="container t2" id="moreBuy" style="font-size: 18px;font-weight: bold;">
<form action="~/product/CreateOrder" method="post"> <form action="~/product/CreateOrder" method="post">
<p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p> <p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p>
<p class="shuoming">如:注册账号前缀为【user】开始数为【6】个数为【10】则注册的账号为user06user07user08....user14</p> <p class="shuoming">如:注册账号前缀为【user】开始数为【2】个数为【10】则注册的账号为user2user3user4....user11</p>
<div class="row"> <div class="row">
<div class="col-lg-4 text-right"> <div class="col-lg-4 text-right">
IP账号前缀 IP账号前缀
@@ -272,7 +272,7 @@
开始号: 开始号:
</div> </div>
<div class="col-lg-4 regDan"> <div class="col-lg-4 regDan">
<input type="number" name="MinPostfix" v-model="MoreBuyModel.MinPostfix" /> <input type="number" name="MinPostfix" v-on:input="changeAccountCount()" v-model="MoreBuyModel.MinPostfix" />
</div> </div>
<div class="col-lg-4 text-left"> <div class="col-lg-4 text-left">
<span class="grayText">本批次账号的起始账号的尾数</span> <span class="grayText">本批次账号的起始账号的尾数</span>
@@ -283,13 +283,21 @@
注册个数: 注册个数:
</div> </div>
<div class="col-lg-4 regDan"> <div class="col-lg-4 regDan">
<input type="number" name="MaxPostfix" v-model="MoreBuyModel.MaxPostfix" /> <input type="number" name="MaxPostfix" v-on:input="changeAccountCount()" v-model="MoreBuyModel.MaxPostfix" />
<p class="jinggao" v-if="MoreBuyModel.MaxPostfix>500">一次最多注册500个</p> <p class="jinggao" v-if="MoreBuyModel.MaxPostfix>500">一次最多注册500个</p>
</div> </div>
<div class="col-lg-4 text-left"> <div class="col-lg-4 text-left">
<span class="grayText">本批次的账号个数</span> <span class="grayText">本批次的账号个数</span>
</div> </div>
</div> </div>
<div class="row">
<div class="col-lg-4 text-right">
即将生成的账号:
</div>
<div class="col-lg-8 regDan">
<p class="jinggao">{{acount_list}}</p>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-4 text-right"> <div class="col-lg-4 text-right">
IP产品密码 IP产品密码
@@ -438,6 +446,7 @@
var app = new Vue({ var app = new Vue({
el: '#app', el: '#app',
data: { data: {
acount_list:'',
payHandler: null, payHandler: null,
Tip: '', Tip: '',
RestAmount: @(userEntity.RestAmount), RestAmount: @(userEntity.RestAmount),
@@ -771,6 +780,24 @@
clearInterval(this.payHandler); clearInterval(this.payHandler);
$('.payMask').hide(); $('.payMask').hide();
$('#qrcode').empty(); $('#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);
}
} }
} }
}) })