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 7b2b3e7..a0c163a 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 => { diff --git a/pages/raffle/raffle.vue b/pages/raffle/raffle.vue index 6defeab..4ee8781 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); } @@ -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 === "谢谢参与") {