request.ts
818 Bytes
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
39
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-06 16:17:36
* @LastEditors: huyue
* @LastEditTime: 2023-03-07 10:26:01
*/
import http from './http'
import http1 from './http1'
import { useUserStore } from '../store/user'
const PATH = 'rop-scrm-shopmall/router'
const DJPATH = 'rop-dj-smartcarlife/router'
const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST',) => {
data.method = url
const options = {
domain: 'request',
url: PATH,
method,
data,
returnAll
}
return http(options)
}
const djReq: any = (url: string, data: any = {}, returnAll = false, method = 'POST',) => {
data.method = url
const options = {
domain: 'otherRequest',
url: DJPATH,
method,
data,
returnAll
}
return http1(options)
}
export {
req,
djReq
}