uni.request({
url: 'https://www.baidu.com/',
method: 'GET'
});
用上面这个就会有警告
ks.request({
url: 'https://www.baidu.com/',
method: 'GET'
});
用下面这个就不会有警告
产品分类: uniapp/小程序
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 11.6.1
第三方开发者工具版本号: 1.9.8
基础库版本号: 1.54.0
项目创建方式: CLI
CLI版本号: 3070820230322001
uni.request({
url: 'https://www.baidu.com/',
method: 'GET'
});
用上面这个就会有警告
ks.request({
url: 'https://www.baidu.com/',
method: 'GET'
});
用下面这个就不会有警告
ks.request({
url: 'https://www.baidu.com/',
method: 'GET'
});
无警告
AssignmentError: Object
is not assignable to type RequestResponse
.
Property isPrefetch
is missing but required in type RequestResponse
.
at j (<anonymous>:2:151935)
at <anonymous>:2:151045
at <anonymous>:2:152156
at d (<anonymous>:2:151301)
at success (<anonymous>:2:282601)
at Object.success (<anonymous>:2:171856)
at P (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:170585)
at lp.<anonymous> (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:15948)
at Generator.next (<anonymous>)
at o (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:14311)
AssignmentError: Object
is not assignable to type RequestResponse
.
Property isPrefetch
is missing but required in type RequestResponse
.
at j (<anonymous>:2:151935)
at <anonymous>:2:151045
at <anonymous>:2:152156
at d (<anonymous>:2:151301)
at success (<anonymous>:2:282601)
at Object.success (<anonymous>:2:171856)
at P (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:170585)
at lp.<anonymous> (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:15948)
at Generator.next (<anonymous>)
at o (/Applications/快手开发者工具.app/Contents/Resources/app.asar/preload-service.js:2:14311)
1 个回复
YUANRJ
经测试在原生快手小程序中也会出现这个问题,请向快手小程序社区进行反馈。