refactor(login): 将短信验证码登录改为密码登录
移除短信验证码相关代码,修改输入框提示为密码输入 清理未使用的代码和多余的空行
This commit is contained in:
parent
a791e542f1
commit
c14d52ec9a
|
|
@ -8,8 +8,8 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="login-animation1 send_code">
|
||||
<el-input text class="code_input" placeholder="请输入短信验证码" v-model="state.ruleForm.captcha" clearable>
|
||||
<el-form-item class="login-animation1">
|
||||
<el-input text class="code_input" placeholder="请输入密码" v-model="state.ruleForm.captcha" clearable>
|
||||
<!-- <template #append>
|
||||
<view @click="doSendCode">
|
||||
<text v-if="!isSendCode" class="sendcode">发送验证码</text>
|
||||
|
|
@ -18,15 +18,14 @@
|
|||
</template> -->
|
||||
</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">{{ sendCodeMins }}s后重新获取</text>
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="login-animation4">
|
||||
<el-button type="primary" class="login-content-submit" round v-waves @click="onSignIn"
|
||||
:loading="state.loading.signIn">
|
||||
<el-button type="primary" class="login-content-submit" round v-waves @click="onSignIn" :loading="state.loading.signIn">
|
||||
<span>{{ $t('message.account.accountBtnText') }}</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
|
@ -47,7 +46,7 @@ import { Session, Local } from '/@/utils/storage';
|
|||
import { formatAxis } from '/@/utils/formatTime';
|
||||
import { NextLoading } from '/@/utils/loading';
|
||||
import { getCommonSms, doLogin } from '/@/api/login';
|
||||
import { isMobileByWidth } from '/@/utils/Utils'
|
||||
import { isMobileByWidth } from '/@/utils/Utils';
|
||||
|
||||
const isSendCode = ref(false);
|
||||
const sendCodeMins = ref(60);
|
||||
|
|
@ -114,7 +113,7 @@ const state = reactive({
|
|||
},
|
||||
});
|
||||
|
||||
onMounted(() => { });
|
||||
onMounted(() => {});
|
||||
|
||||
// 时间获取
|
||||
const currentTime = computed(() => {
|
||||
|
|
@ -185,9 +184,8 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
|
|||
// 登录成功,跳到转首页
|
||||
// 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中
|
||||
|
||||
|
||||
if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') {
|
||||
console.log("🚀 ~ signInSuccess ~ router:", route)
|
||||
console.log('🚀 ~ signInSuccess ~ router:', route);
|
||||
|
||||
// 移动端逻辑
|
||||
router.push('/richeditMobile');
|
||||
|
|
@ -201,7 +199,6 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
|
|||
} else {
|
||||
router.push('/richedit');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 登录成功提示
|
||||
|
|
@ -212,8 +209,6 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
|
|||
}
|
||||
state.loading.signIn = false;
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in New Issue