表格跳转处理

This commit is contained in:
gary.fu
2024-01-04 11:40:56 +08:00
parent 5355e4fd3e
commit 33f7fc700b
4 changed files with 49 additions and 5 deletions

12
src/vendors/axios.js vendored
View File

@@ -51,3 +51,15 @@ export const $httpPost = (url, data, config) => {
}, reject)
})
}
export const $httpGet = (url, data, config) => {
return new Promise((resolve, reject) => {
$http.get(url, config).then(response => {
if (response.data) {
resolve(response.data) // 只要有数据就认为成功,内容再解析
} else {
reject(new Error('No response data'))
}
}, reject)
})
}