Commit dbbc0feb by liangjianmin

在登录组件中添加方法注释,包括更新验证码、切换密码显示和登录功能,提升代码可读性。

parent b3ba8573
Showing with 9 additions and 0 deletions
......@@ -111,6 +111,9 @@
},
computed: {},
methods: {
/**
* 更新验证码
*/
updateCp() {
this.$http('get', "/auth/cp").then(res => {
if (res.code === 0) {
......@@ -121,9 +124,15 @@
console.log(err.message);
})
},
/**
* 切换密码显示
*/
changePwd: function () {
this.pwdFlag = !this.pwdFlag;
},
/**
* 登录
*/
submit() {
var myreg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if (!this.form.mobile) {
......
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 sign in to comment