@ 前端代码的框架采用vue.js + elementUI 这套较为简单的方式实现,以及typescript语法更方便阅读。 首先添加全局对象: loginForm: 登录表单对象 twoFactorData: 两步验证数据, showTwoFactorSuccess: 是否显示两步验证成功提示 loginForm: { //登录对象 username: "", password: "", twoFactorAuthenticationToken: "", twoFactorAuthenticationProvider: "Phone", }, twoFactorData: null, showTwoFactorSuccess: false, 发送验证码 编写发送验证码函数sendVerificationCode,发送验证码后,启动定时器,60秒后可以再次发送验证码。 async sendVerificationCode() { this.smsSendCd = 60; this.timer = setInterval(() => { this.smsSendCd--; if...