12345678910111213141516171819202122 |
- import fetch from '@/utils/fetch'
- import axios from 'axios'
- export default function() {
- const source = axios.CancelToken.source()
- return {
- cancel() {
- source.cancel('cancel')
- },
- fetch(data) {
- return fetch({
- url: `/authdata/exesql`,
- cancelToken: source.token,
- headers: {
- 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
- },
- method: 'POST',
- data
- })
- }
- }
- }
|