虽然不影响代码的执行,但是看的控制台报错,还是想看看问题产生的原因。使用 async 和 await 异步请求接口数据,代码如下:
await this.Login(this.form)
我们需要进行错误捕获,即 catch 捕获后,问题就解决了,代码如下:
await this.Login(this.form).catch(() => {})
虽然不影响代码的执行,但是看的控制台报错,还是想看看问题产生的原因。使用 async 和 await 异步请求接口数据,代码如下:
await this.Login(this.form)
我们需要进行错误捕获,即 catch 捕获后,问题就解决了,代码如下:
await this.Login(this.form).catch(() => {})