♻️ refactor: 优惠券、兑换码输入框提示对微博做出特殊处理
This commit is contained in:
parent
55fac5c36e
commit
b5ab3f8148
|
@ -305,6 +305,9 @@
|
|||
case 14:
|
||||
this.placeholder = "请输入邮箱/QQ号/微信号";
|
||||
break;
|
||||
case 99:
|
||||
this.placeholder = "请输入昵称";
|
||||
break;
|
||||
default:
|
||||
this.placeholder = "请输入手机号/邮箱/QQ号/微信号";
|
||||
break;
|
||||
|
@ -364,6 +367,12 @@
|
|||
} else {
|
||||
this.productType = data.entity.account_type;
|
||||
}
|
||||
|
||||
/* 微博 */
|
||||
if (goodsDetail.entity.account_type == 0 && this.goodInfo.product_name.indexOf('微博') !== -1) {
|
||||
this.productType = 99;
|
||||
}
|
||||
|
||||
this.receive_time = data.entity.time_limit;
|
||||
this.$nextTick(function () {
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
|
@ -453,9 +462,6 @@
|
|||
let weiXinReg = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/.test(this.account);
|
||||
let regFlag = true;
|
||||
switch (Number(this.productType)) {
|
||||
case 0:
|
||||
this.placeholder = "请输入昵称";
|
||||
break;
|
||||
case 1:
|
||||
regFlag = phoneReg;
|
||||
break;
|
||||
|
|
|
@ -184,6 +184,12 @@
|
|||
} else {
|
||||
this.productType = goodsInform.account_type;
|
||||
}
|
||||
|
||||
/* 微博 */
|
||||
if (goodsDetail.entity.account_type == 0 && goodsInform.product_name.indexOf('微博') !== -1) {
|
||||
this.productType = 99;
|
||||
}
|
||||
|
||||
this.$nextTick(function () {
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
loop: true, // 循环模式选项
|
||||
|
@ -255,9 +261,7 @@
|
|||
let emailsreg = /^[A-Za-z0-9\u4e00-\u9fa5\.]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(this.account);
|
||||
let weixinreg = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/.test(this.account);
|
||||
let regflag = true;
|
||||
if (this.productType == 0) {
|
||||
this.placeholder = "请输入昵称";
|
||||
} else if (this.productType == 1) {
|
||||
if (this.productType == 1) {
|
||||
regflag = phonereg;
|
||||
} else if (this.productType == 2) {
|
||||
regflag = emailsreg;
|
||||
|
@ -398,7 +402,7 @@
|
|||
this.maxlen = 50;
|
||||
this.acctype = "text";
|
||||
if (newVal == 0) {
|
||||
this.placeholder = "请输入昵称";
|
||||
this.placeholder = "请输入账号";
|
||||
} else if (newVal == 1) {
|
||||
this.acctype = "tel";
|
||||
this.placeholder = "请输入手机号";
|
||||
|
@ -437,6 +441,8 @@
|
|||
this.maxlen = 20;
|
||||
} else if (newVal == 14) {
|
||||
this.placeholder = "请输入邮箱/QQ号/微信号";
|
||||
} else if (newVal == 99) {
|
||||
this.placeholder = "请输入昵称";
|
||||
} else {
|
||||
this.placeholder = "请输入手机号/邮箱/QQ号/微信号";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue