| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- import axiosApi from './AxiosApi.js'
- /**
- * 若后端要使用zuul服务,以下接口需要加一个前缀 /gate
- */
- const apiList = {
- page: {
- method: 'POST',
- url: `/gateway/blockList/page`,
- },
- query: {
- method: 'POST',
- url: `/gateway/blockList/query`,
- },
- update: {
- method: 'PUT',
- url: `/gateway/blockList`
- },
- save: {
- method: 'POST',
- url: `/gateway/blockList`
- },
- delete: {
- method: 'DELETE',
- url: `/gateway/blockList`
- },
- export: {
- method: 'POST',
- url: `/gateway/blockList/export`
- },
- preview: {
- method: 'POST',
- url: `/gateway/blockList/preview`
- },
- import: {
- method: 'POST',
- url: `/gateway/blockList/import`
- }
- }
- export default {
- page (data, custom = {}) {
- return axiosApi({
- ...apiList.page,
- data,
- custom
- })
- },
- query (data, custom = {}) {
- return axiosApi({
- ...apiList.query,
- data,
- custom
- })
- },
- save (data, custom = {}) {
- return axiosApi({
- ...apiList.save,
- data,
- custom
- })
- },
- update (data, custom = {}) {
- return axiosApi({
- ...apiList.update,
- data,
- custom
- })
- },
- delete (data, custom = {}) {
- return axiosApi({
- ...apiList.delete,
- data,
- custom
- })
- },
- export (data, custom = {}) {
- return axiosApi({
- ...apiList.export,
- responseType: "blob",
- data,
- custom
- })
- },
- preview (data, custom = {}) {
- return axiosApi({
- ...apiList.preview,
- data,
- custom
- })
- },
- import (data, custom = {}) {
- return axiosApi({
- ...apiList.import,
- data,
- custom
- })
- }
- }
|