https://blog.csdn.net/G_Z_X/article/details/123535642
https://gitee.com/yub4by/my-reggie-take-out
resources/backend/page/food/list.html
methods: {
async init () {
const params = {
page: this.page,
pageSize: this.pageSize,
name: this.input ? this.input : undefined
}
await getDishPage(params).then(res => {
if (String(res.code) === '1') {
this.tableData = res.data.records || []
this.counts = res.data.total
}
}).catch(err => {
this.$message.error('请求出错了:' + err)
})
},
}
标签:Vue,res,await,take,async,reggie,out
From: https://www.cnblogs.com/yppah/p/17051264.html