We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 354a995 commit b3b3065Copy full SHA for b3b3065
src/config.ts
@@ -0,0 +1 @@
1
+export const API_KEY = 'edd1c9f034335f136f87ad84b625c8f1'
src/utils/request.ts
@@ -24,10 +24,14 @@
24
25
import axios from 'axios'
26
import { Message } from 'element-ui'
27
+import { API_KEY } from '@/config'
28
29
const service = axios.create({
30
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
- timeout: 5000
31
+ timeout: 5000,
32
+ headers: {
33
+ 'X-API-KEY': API_KEY
34
+ }
35
})
36
37
service.interceptors.request.use(
0 commit comments