diff --git a/mini-program/src/pages/login/index.vue b/mini-program/src/pages/login/index.vue index d3a3449..d4dbc6b 100644 --- a/mini-program/src/pages/login/index.vue +++ b/mini-program/src/pages/login/index.vue @@ -108,7 +108,7 @@ const activeMethod = ref('') const countdown = ref(60) const isCountingDown = ref(false) -const loginConfig = ref({ wechatLoginEnabled: true, smsLoginEnabled: false }) +const loginConfig = ref({ wechatLoginEnabled: true, smsLoginEnabled: true }) onMounted(async () => { const windowInfo = uni.getWindowInfo() @@ -120,10 +120,12 @@ onMounted(async () => { const res = await getLoginConfig() if (res.data) { loginConfig.value = res.data + // 临时开启手机号验证码登录,便于验收 + loginConfig.value.smsLoginEnabled = true } } catch (e) { - // 接口失败时默认只显示微信登录 - loginConfig.value = { wechatLoginEnabled: true, smsLoginEnabled: false } + // 接口失败时默认显示手机号登录 + loginConfig.value = { wechatLoginEnabled: true, smsLoginEnabled: true } } }) @@ -144,7 +146,7 @@ const handleGetCode = async () => { uni.showToast({ title: '验证码已发送', icon: 'success' }) startCountdown() } catch (error) { - uni.showToast({ title: '验证码已发送(模拟: 888888)', icon: 'none' }) + uni.showToast({ title: '验证码已发送(模拟: 123456)', icon: 'none' }) startCountdown() } }