diff --git a/src/api/user.ts b/src/api/user.ts index 77f0ecd..9010f2f 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -180,4 +180,4 @@ export function updateUserAddressLocation(id: number) { */ export function getUserAddressInfo(id: number) { return http.Post('/teamapi/user/addressDetails', { id }) -} \ No newline at end of file +} diff --git a/src/bundle/parten/pages/bank-card/add.vue b/src/bundle/parten/pages/bank-card/add.vue index ad40822..b64a8d3 100644 --- a/src/bundle/parten/pages/bank-card/add.vue +++ b/src/bundle/parten/pages/bank-card/add.vue @@ -195,9 +195,9 @@ await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.mobile) }) startCountDown.value = true - nextTick(() => { - countDown.value?.start() - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, /** diff --git a/src/bundle/profile/change-mobile.vue b/src/bundle/profile/change-mobile.vue index a8d2af8..f9c0e8b 100644 --- a/src/bundle/profile/change-mobile.vue +++ b/src/bundle/profile/change-mobile.vue @@ -149,14 +149,12 @@ return } - await getVerificationCode({ scene: SMS_ENUM.BGSJHM, mobile: String(model.mobile)}) + await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile)}) startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/bundle/profile/change-password.vue b/src/bundle/profile/change-password.vue index 0fb8783..b9d132d 100644 --- a/src/bundle/profile/change-password.vue +++ b/src/bundle/profile/change-password.vue @@ -122,14 +122,12 @@ return } - await getVerificationCode({ scene: SMS_ENUM.ZHDLMM, mobile: String(model.mobile)}) + await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile)}) startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/bundle/settle-in/parten.vue b/src/bundle/settle-in/parten.vue index 8be59bb..7ae2722 100644 --- a/src/bundle/settle-in/parten.vue +++ b/src/bundle/settle-in/parten.vue @@ -184,11 +184,9 @@ // 发送验证码 handleCountDown: () => { startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/bundle/settle-in/tea-room.vue b/src/bundle/settle-in/tea-room.vue index cbe6a3d..5d28b8d 100644 --- a/src/bundle/settle-in/tea-room.vue +++ b/src/bundle/settle-in/tea-room.vue @@ -232,11 +232,9 @@ // 发送验证码 handleCountDown: () => { startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/bundle/settle-in/tea-specialist.vue b/src/bundle/settle-in/tea-specialist.vue index 60a90fc..3307df7 100644 --- a/src/bundle/settle-in/tea-specialist.vue +++ b/src/bundle/settle-in/tea-specialist.vue @@ -338,11 +338,9 @@ // 发送验证码 handleCountDown: () => { startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 8a83cc5..0149132 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -76,7 +76,7 @@ mobile: string passowrd: string }>({ - mobile: '', // 13011223344 + mobile: '', // 12322222222 passowrd: '' }) diff --git a/src/pages/login/mobile.vue b/src/pages/login/mobile.vue index 0ee8062..84c1671 100644 --- a/src/pages/login/mobile.vue +++ b/src/pages/login/mobile.vue @@ -149,11 +149,9 @@ } startCountDown.value = true - nextTick(() => { - countDown.value?.start() - - // 发送验证码请求 - }) + setTimeout(() => { + countDown.value.start() + }, 100) }, // 验证码倒计时结束 diff --git a/src/pages/login/password.vue b/src/pages/login/password.vue index eb813a9..76275e2 100644 --- a/src/pages/login/password.vue +++ b/src/pages/login/password.vue @@ -80,6 +80,8 @@ import {mobile as testMobile} from '@/utils/test' import { useToast } from 'wot-design-uni' import { router } from '@/utils/tools' + import { getVerificationCode } from '@/api/user' + import { SMS_ENUM } from '@/enum/sms' const OSS = inject('OSS') const toast = useToast() @@ -130,7 +132,7 @@ /** * 发送验证码 */ - handleCountDown: () => { + handleCountDown: async () => { if (disabled.value) { toast.show({ iconClass: 'info-circle', @@ -140,12 +142,12 @@ return } - startCountDown.value = true - nextTick(() => { - countDown.value?.start() + await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile) }) - // 发送验证码请求 - }) + startCountDown.value = true + setTimeout(() => { + countDown.value.start() + }, 100) }, /** @@ -176,7 +178,7 @@ return } - router.navigateTo(`/pages/login/set-password?type=${pageType}&mobile=${model.mobile}&userId=${userId.value}`) + router.navigateTo(`/pages/login/set-password?type=${pageType}&mobile=${model.mobile}&code=${model.code}&userId=${userId.value}`) }, // 获取手机号 diff --git a/src/pages/login/set-password.vue b/src/pages/login/set-password.vue index 67b49aa..b3bfedf 100644 --- a/src/pages/login/set-password.vue +++ b/src/pages/login/set-password.vue @@ -48,7 +48,7 @@ - 确定 + 确定 @@ -87,27 +87,31 @@ password_confirm: '' }) + // 手机和验证码 + const mobile = ref('') + const code = ref('') onLoad((args) => { - + mobile.value = args.mobile || '' + code.value = args.code || '' }) - const Mobile = { + const SetPassword = { // 重置密码 - handleToLogin: async () => { - if (!mobile(model.value.mobile)) { + handleToConfirm: async () => { + if (!mobile) { toast.show({ iconClass: 'info-circle', - msg: '手机号码错误请重新输入', + msg: '手机号异常,请重新操作', direction: 'vertical' }) return } - if (!model.value.code) { + if (!code) { toast.show({ iconClass: 'info-circle', - msg: '验证码不存在', + msg: '验证码异常,请重新操作', direction: 'vertical' }) return @@ -132,8 +136,8 @@ } const res = await resetPassword({ - mobile: model.value.mobile, - code: model.value.code, + mobile: mobile.value, + code: code.value, password: model.value.password, password_confirm: model.value.password_confirm }) diff --git a/src/pages/order/order.vue b/src/pages/order/order.vue index bdb0fa6..4c34b06 100644 --- a/src/pages/order/order.vue +++ b/src/pages/order/order.vue @@ -52,7 +52,7 @@ {{ TeaSpecialistManageStatusTextValue[order.order_status].title }} - +