报错:Argument `Object` at index 0 passed to the method `KS.prototype.request(...)` is not assignable to type `RequestOptions`. `'post'` is not assignable to property `RequestOptions.prototype.method` of type `'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT' | 'PATCH'`.
问题描述:
根据产品需求,开发了抖音小程序,因为网络请求重复写就太麻烦了,所以进行了简单的封装 uni-app 封装网络请求
由于抖音看到了希望,所以希望在快手再开发一波,还好有先见之明使用了uni-app进行开发
但是在兼容快手小程序的时候,遇到了报错,即文章一开始的报错。
当尝试将各种请求方式改为大写
的时候就没出现该问题了