后端app.js:const express=require('express')
const app=express()
app.get('/test',function(req,res){
res.setHeader('Access-Control-Allow-Origin','*') //跨域处理
let data=[
{id:0,name:'张三',age:23},
{id:1,name:'李四',age:13},
{id:2,name:'王五',age:42},
{id:3,name:'刘能',age:55},
{id:4,name:'赵四',age:34},
]
let result={
code:1,
data
}
res.send(JSON.stringify(result))
})
app.listen(8000,function(){
console.log('app is runing at htt
铅笔Naruto