mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2025-12-09 20:37:48 +00:00
表格跳转处理
This commit is contained in:
12
src/vendors/axios.js
vendored
12
src/vendors/axios.js
vendored
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user