http.js 865 Bytes
Newer Older
wangdanlei's avatar
wangdanlei committed
1 2 3
import Vue from 'vue'
const sharePool = (Vue.__share_pool__ = Vue.__share_pool__ || {})
const http = (sharePool.http = sharePool.http || {})
wangdanlei's avatar
wangdanlei committed
4 5
function get(url, params, userAction) {
  return http.get(url, params, userAction)
wangdanlei's avatar
wangdanlei committed
6
}
wangdanlei's avatar
wangdanlei committed
7 8
function post(url, params, userAction) {
  return http.post(url, params, userAction)
wangdanlei's avatar
wangdanlei committed
9
}
wangdanlei's avatar
wangdanlei committed
10 11
function put(url, params, userAction) {
  return http.put(url, params, userAction)
wangdanlei's avatar
wangdanlei committed
12
}
wangdanlei's avatar
wangdanlei committed
13 14
function patch(url, params, userAction) {
  return http.patch(url, params, userAction)
wangdanlei's avatar
wangdanlei committed
15
}
wangdanlei's avatar
wangdanlei committed
16 17
function del(url, params, data, userAction) {
  return http.del(url, params, data, userAction)
wangdanlei's avatar
wangdanlei committed
18
}
wangdanlei's avatar
wangdanlei committed
19 20
function downloadFile(url, type, params, userAction) {
  return http.downloadFile(url, type, params, userAction)
wangdanlei's avatar
wangdanlei committed
21
}
wangdanlei's avatar
wangdanlei committed
22 23
function downloadZip(url, type, userAction) {
  return http.downloadZip(url, type, userAction)
wangdanlei's avatar
wangdanlei committed
24 25 26
}
export { get, post, put, del, patch, downloadFile, downloadZip }