- 外面的123能正常收到,但是在axio中我使用ctx.body返回数据显示ctx.body为undefined
router.post("/", async ctx => {
// console.log(wxcode);
// ctx.body = '123'
axios.get(wxAPI).then(async response => {
const token = jwt.creatToken({
openid: response.data.openid,
session_key: response.data.session_key
});
ctx.body = '345'
})
应该是因为没有
await axios.get
吧