|
@@ -1,15 +1,21 @@
|
1
|
1
|
import axios from "axios";
|
2
|
2
|
// import { Toast } from 'mint-ui'
|
3
|
3
|
import { Toast } from "vant";
|
|
4
|
+const https = require('https');
|
|
5
|
+
|
4
|
6
|
|
5
|
7
|
import context from '../../src/main.js'
|
6
|
8
|
|
|
9
|
+const agent = new https.Agent({
|
|
10
|
+ rejectUnauthorized: false // 忽略证书验证
|
|
11
|
+});
|
7
|
12
|
|
8
|
13
|
// create an axios instance
|
9
|
14
|
const service = axios.create({
|
10
|
15
|
baseURL: process.env.BASE_API, // api的base_url
|
11
|
16
|
timeout: 30000, // request timeout
|
12
|
|
- withCredentials: true
|
|
17
|
+ withCredentials: true,
|
|
18
|
+ httpsAgent: agent,
|
13
|
19
|
});
|
14
|
20
|
|
15
|
21
|
var self = this;
|