From b5ab3f8148f3f2842b2aad3c56a3fd72953ddbb2 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Thu, 23 Nov 2023 18:07:49 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E3=80=81=E5=85=91=E6=8D=A2=E7=A0=81=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E6=8F=90=E7=A4=BA=E5=AF=B9=E5=BE=AE=E5=8D=9A?= =?UTF-8?q?=E5=81=9A=E5=87=BA=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/details.html | 12 +++++++++--- exchange.html | 14 ++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/coupon/details.html b/coupon/details.html index f44d8bc..01fc02b 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -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; diff --git a/exchange.html b/exchange.html index 9fc726a..8a3c2f0 100644 --- a/exchange.html +++ b/exchange.html @@ -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号/微信号"; }