|
|
@ -1,6 +1,6 @@ |
|
|
import { useUserStore } from "../stores/modules/userInfo" |
|
|
import { useUserStore } from "../stores/modules/userInfo" |
|
|
|
|
|
|
|
|
const baseURL = "https://hwjb.homilychart.com/testApi" |
|
|
|
|
|
|
|
|
const baseURL = "https://hwjb.homilychart.com" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const httpInterceptor = { |
|
|
const httpInterceptor = { |
|
|
@ -32,15 +32,15 @@ const httpInterceptor = { |
|
|
'source-client': 'miniapp', |
|
|
'source-client': 'miniapp', |
|
|
// 标准头与文档头同时设置,确保兼容
|
|
|
// 标准头与文档头同时设置,确保兼容
|
|
|
'content-type': 'application/json', |
|
|
'content-type': 'application/json', |
|
|
// 'contentType': 'application/json',
|
|
|
|
|
|
|
|
|
'contentType': 'application/json', |
|
|
'version': '1', |
|
|
'version': '1', |
|
|
'client': client |
|
|
'client': client |
|
|
} |
|
|
} |
|
|
//4 添加token,优先用store,没有则回退到body中的token,保持与Apifox一致
|
|
|
//4 添加token,优先用store,没有则回退到body中的token,保持与Apifox一致
|
|
|
const memberStore = useUserStore() |
|
|
const memberStore = useUserStore() |
|
|
// const token = memberStore.userInfo?.token || options.data?.token
|
|
|
// const token = memberStore.userInfo?.token || options.data?.token
|
|
|
options.header.token = '790750702588f1ea79f24dc56ccd5d8a' |
|
|
|
|
|
const token = '790750702588f1ea79f24dc56ccd5d8a' |
|
|
|
|
|
|
|
|
options.header.token = 'dccec0b65a94f498b8183a17589ab16e' |
|
|
|
|
|
const token = 'dccec0b65a94f498b8183a17589ab16e' |
|
|
if (token) { |
|
|
if (token) { |
|
|
options.header.token = token |
|
|
options.header.token = token |
|
|
} |
|
|
} |
|
|
|