Uncaught TypeError: Cannot read property ‘then’ of undefined
发送请求then未定义就是请求未定义
普通函数
function fn(){
}
箭头函数
const fn = () =>{
return 123;
}
箭头函数简写
const fn = () => 123;
带花括号的是一个函数要把结果返回出来
Uncaught TypeError: Cannot read property ‘then’ of undefined
发送请求then未定义就是请求未定义
普通函数
function fn(){
}
箭头函数
const fn = () =>{
return 123;
}
箭头函数简写
const fn = () => 123;
带花括号的是一个函数要把结果返回出来