1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| import {
| ACCESSTOKEN,
| config
| } from '@/common/config.js'
| export default (url, method, params) => {
| // if(!showLoading){
| // uni.showLoading({
| // title:""
| // })
| // }
| return new Promise((resolve, reject) => {
| uni.request({
| url: config.VITE_APP_BASE + url,
| method: method,
| header: {
| 'Accept': 'application/json, text/plain, */*',
| 'content-type' : 'application/json',
| "responseType": "stream",
| 'connection': 'keep-alive',
| },
| data: {
| ...params
| },
| success(res) {
| if (res.data.code == 401) {
|
| }
| resolve(res.data);
| },
| fail(err) {
| reject(err);
| },
| complete() {
|
| }
| });
| });
| };
|
|