refactor(login): 将短信验证码登录改为密码登录

移除短信验证码相关代码,修改输入框提示为密码输入
清理未使用的代码和多余的空行
This commit is contained in:
zzp 2025-09-03 17:30:30 +08:00
parent a791e542f1
commit c14d52ec9a
1 changed files with 8 additions and 13 deletions

View File

@ -8,8 +8,8 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item class="login-animation1 send_code"> <el-form-item class="login-animation1">
<el-input text class="code_input" placeholder="请输入短信验证码" v-model="state.ruleForm.captcha" clearable> <el-input text class="code_input" placeholder="请输入码" v-model="state.ruleForm.captcha" clearable>
<!-- <template #append> <!-- <template #append>
<view @click="doSendCode"> <view @click="doSendCode">
<text v-if="!isSendCode" class="sendcode">发送验证码</text> <text v-if="!isSendCode" class="sendcode">发送验证码</text>
@ -18,15 +18,14 @@
</template> --> </template> -->
</el-input> </el-input>
<el-button class="code_button" @click="doSendCode"> <!-- <el-button class="code_button" @click="doSendCode">
<text v-if="!isSendCode" class="sendcode">发送验证码</text> <text v-if="!isSendCode" class="sendcode">发送验证码</text>
<text v-if="isSendCode">{{ sendCodeMins }}s后重新获取</text> <text v-if="isSendCode">{{ sendCodeMins }}s后重新获取</text>
</el-button> </el-button> -->
</el-form-item> </el-form-item>
<el-form-item class="login-animation4"> <el-form-item class="login-animation4">
<el-button type="primary" class="login-content-submit" round v-waves @click="onSignIn" <el-button type="primary" class="login-content-submit" round v-waves @click="onSignIn" :loading="state.loading.signIn">
:loading="state.loading.signIn">
<span>{{ $t('message.account.accountBtnText') }}</span> <span>{{ $t('message.account.accountBtnText') }}</span>
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -47,7 +46,7 @@ import { Session, Local } from '/@/utils/storage';
import { formatAxis } from '/@/utils/formatTime'; import { formatAxis } from '/@/utils/formatTime';
import { NextLoading } from '/@/utils/loading'; import { NextLoading } from '/@/utils/loading';
import { getCommonSms, doLogin } from '/@/api/login'; import { getCommonSms, doLogin } from '/@/api/login';
import { isMobileByWidth } from '/@/utils/Utils' import { isMobileByWidth } from '/@/utils/Utils';
const isSendCode = ref(false); const isSendCode = ref(false);
const sendCodeMins = ref(60); const sendCodeMins = ref(60);
@ -114,7 +113,7 @@ const state = reactive({
}, },
}); });
onMounted(() => { }); onMounted(() => {});
// //
const currentTime = computed(() => { const currentTime = computed(() => {
@ -185,9 +184,8 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
// //
// / // /
if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') { if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') {
console.log("🚀 ~ signInSuccess ~ router:", route) console.log('🚀 ~ signInSuccess ~ router:', route);
// //
router.push('/richeditMobile'); router.push('/richeditMobile');
@ -201,7 +199,6 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
} else { } else {
router.push('/richedit'); router.push('/richedit');
} }
} }
// //
@ -212,8 +209,6 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
} }
state.loading.signIn = false; state.loading.signIn = false;
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">