fix: 修复小程序登录页变量初始化顺序错误导致微信登录失败
This commit is contained in:
@@ -101,6 +101,15 @@ const statusBarHeight = ref(uni.getStorageSync('statusBarHeight') || 20)
|
|||||||
const safeAreaTop = ref(uni.getStorageSync('safeAreaTop') || 20)
|
const safeAreaTop = ref(uni.getStorageSync('safeAreaTop') || 20)
|
||||||
const safeAreaBottom = ref(uni.getStorageSync('safeAreaBottom') || 0)
|
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 () => {
|
onMounted(async () => {
|
||||||
const windowInfo = uni.getWindowInfo()
|
const windowInfo = uni.getWindowInfo()
|
||||||
statusBarHeight.value = windowInfo.statusBarHeight || 20
|
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(() => {
|
const canSubmit = computed(() => {
|
||||||
return phone.value.length === 11 && code.value.length === 6
|
return phone.value.length === 11 && code.value.length === 6
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user