diff --git a/mini-program/src/pages/login/index.vue b/mini-program/src/pages/login/index.vue index ddd7baf..d3a3449 100644 --- a/mini-program/src/pages/login/index.vue +++ b/mini-program/src/pages/login/index.vue @@ -101,6 +101,15 @@ const statusBarHeight = ref(uni.getStorageSync('statusBarHeight') || 20) const safeAreaTop = ref(uni.getStorageSync('safeAreaTop') || 20) const safeAreaBottom = ref(uni.getStorageSync('safeAreaBottom') || 0) +const phone = ref('') +const code = ref('') +const loading = ref(false) +const activeMethod = ref('') +const countdown = ref(60) +const isCountingDown = ref(false) + +const loginConfig = ref({ wechatLoginEnabled: true, smsLoginEnabled: false }) + onMounted(async () => { const windowInfo = uni.getWindowInfo() statusBarHeight.value = windowInfo.statusBarHeight || 20 @@ -118,15 +127,6 @@ onMounted(async () => { } }) -const phone = ref('') -const code = ref('') -const loading = ref(false) -const activeMethod = ref('') -const countdown = ref(60) -const isCountingDown = ref(false) - -const loginConfig = ref({ wechatLoginEnabled: true, smsLoginEnabled: false }) - const canSubmit = computed(() => { return phone.value.length === 11 && code.value.length === 6 })