vue project, click the Enter key to automatically log

See some people write is better to reprint the URL https://blog.csdn.net/julying/article/details/83587370 Enter Login

  https://blog.csdn.net/julying/article/details/83587370 Enter login URL

  https://blog.csdn.net/julying/article/details/83587370 Enter Login

2. When the code is not the right time, automatic updates CAPTCHA image

 // this is the function of image verification code

CodeImg() {
let num = Math.ceil(Math.random() * 100);
this.vsCode = `$ {process.env.API_ROOT} / api / account / authcode num = $ {num}`;? + random path
},
The need to verify the local code update, call this method
Note: The distinction click event, click the event can not be called directly, to function inside the click event write alone, then click on the event call, you can only write a single event, and then call, write every ;;
//Click Refresh verification code
changeCodeImg () {// This is the time to click on the verification picture will refresh code
this.CodeImg();
},

Guess you like

Origin www.cnblogs.com/maibao666/p/11232656.html