TypeError: Cannot read properties of undefined (reading ‘then‘)

导致这个原因报错,原因是在与:

 封装该api时并没有返回值,在调用该接口时导致没有返回值,then前面的内容为false。

修改这个bug的方法也很简单,直接将花括号变成圆括号即可,变成圆括号后就有放回值。

就不会产生报错了。

大家写代码的时候还是要仔细哦~~不要像小编这么马虎o(╥﹏╥)o 

猜你喜欢

转载自blog.csdn.net/m0_50013284/article/details/125957380