data没有加括号表示给response取别名
test = {
response: {
data: 3
}
}
const { response: data } = test
console.log( data ) // { data: 3 }
data加了括号表示给response继续解构赋值
test = {
response: {
data: 3
}
}
const { response: { data } } = test
console.log( data ) // 3