Commit 634d59df authored by 许珑标's avatar 许珑标

测试环境免短信登录

parent 4f4f0901
...@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) { ...@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) {
uuid uuid
} }
return request({ return request({
url: '/loginBySmsCode', url: '/login',
headers: { headers: {
isToken: false isToken: false
}, },
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
@keyup.enter.native="getSmsCode"> @keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="数字验证码" style="width: 63%;" <el-input v-model="loginForm.code" auto-complete="off" placeholder="数字验证码" style="width: 63%;"
@keyup.enter.native="getSmsCode"> @keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-checkbox v-model="loginForm.rememberMe" style="margin:12px 0px 25px 0px;">记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe" style="margin:12px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;"> <el-form-item style="width:100%;">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
@click.native.prevent="getSmsCode"> @click.native.prevent="handleLogin">
<span v-if="!loading">登 录</span> <span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span> <span v-else>登 录 中...</span>
</el-button> </el-button>
...@@ -236,7 +236,7 @@ export default { ...@@ -236,7 +236,7 @@ export default {
// this.loginRules.smsCode = [{ required: true, trigger: "change", message: "请输入短信验证码" }] // this.loginRules.smsCode = [{ required: true, trigger: "change", message: "请输入短信验证码" }]
// this.$refs.loginForm.validate(valid => { // this.$refs.loginForm.validate(valid => {
// if (valid) { // if (valid) {
this.loginForm.smsCode = code // this.loginForm.smsCode = code
this.loading = true; this.loading = true;
if (this.loginForm.rememberMe) { if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 }); Cookies.set("username", this.loginForm.username, { expires: 30 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment