From 342d5b63792e366a9dd96e31fcde2021338cb10f Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Wed, 14 Jun 2023 15:20:49 +0800 Subject: [PATCH 1/3] 2023-6-14 --- pages/raffle/raffle.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/raffle/raffle.vue b/pages/raffle/raffle.vue index ad5f724..7e9a971 100644 --- a/pages/raffle/raffle.vue +++ b/pages/raffle/raffle.vue @@ -280,7 +280,7 @@ export default { console.log(111,res) let resPrize = this.prizeList.find(i => i.id === res.id) this.result = resPrize - await this.fetchRandomNumbers(25) + await this.fetchRandomNumbers(15) this.flag = this.prizeList.indexOf(resPrize); if(resPrize.name === "谢谢参与") { From 5f461957ee7c517d31eb28e541c0ee9a61225517 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Wed, 14 Jun 2023 15:21:09 +0800 Subject: [PATCH 2/3] 2023-6-14 --- pages/raffle/raffle.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/raffle/raffle.vue b/pages/raffle/raffle.vue index 7e9a971..c2f2ace 100644 --- a/pages/raffle/raffle.vue +++ b/pages/raffle/raffle.vue @@ -251,7 +251,7 @@ export default { async fetchRandomNumbers(count) { for (let i = 0; i < count; i++) { const t = this.easeOut(i / (count - 1)); - const delay = t * 400; + const delay = t * 350; await new Promise((resolve) => setTimeout(resolve, delay)); this.flag = this.getRandomNumber(0, this.prizeList.length - 1); } From 1766e8a6eb66ee1ddc5354e9faff97ab0fac982b Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Wed, 14 Jun 2023 16:42:26 +0800 Subject: [PATCH 3/3] 2023-6-14 --- component/popover/index.vue | 5 +++-- pages/index/index.vue | 36 ++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/component/popover/index.vue b/component/popover/index.vue index 007bcaf..485d34a 100644 --- a/component/popover/index.vue +++ b/component/popover/index.vue @@ -23,9 +23,9 @@ - + - + @@ -153,6 +153,7 @@ export default { left: 2rpx; } &-text { + width: calc(100% - 32rpx - 32rpx); max-height: 46vh; overflow: scroll; diff --git a/pages/index/index.vue b/pages/index/index.vue index b6a3d25..ea714c5 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -131,23 +131,27 @@ import popover from "@/component/popover/index.vue"; }, sendCode() { - // if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) { - // uni.showToast({ - // icon: 'none', - // title: '手机号格式不正确' - // }) - // return - // } + if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) { + uni.showToast({ + icon: 'none', + title: '手机号格式不正确' + }) + return + } if(this.$refs.uCode.canGetCode) { - this.$refs.uCode.start() - this.$u.api.sendSms({ - tempate_key: 'sms_code_template', - mobile: this.inputMobile - //`192${this.inputMobile}` + this.$u.api.mobileCheck({ + mobile: `192${this.inputMobile}` }).then(res => { - uni.showToast({ - icon: 'none', - title: res.msg + this.$refs.uCode.start() + this.$u.api.sendSms({ + tempate_key: 'sms_code_template', + mobile: `192${this.inputMobile}` + //`192${this.inputMobile}` + }).then(res => { + uni.showToast({ + icon: 'none', + title: res.msg + }) }) }) } else { @@ -158,7 +162,7 @@ import popover from "@/component/popover/index.vue"; bindMobile() { if(this.inputMobile && this.code && /^\d{4}$/.test(this.code)) { this.$u.api.bindMobile({ - mobile: this.inputMobile, + mobile: `192${this.inputMobile}`, //`192${this.inputMobile}`, code: this.code }).then(res => {