Browse Source

调通dmsecond接口

zhaowenkang/feature-20251028181547-行情页面
wangyetao 4 weeks ago
parent
commit
77b49d8f6c
  1. 4
      api/deepMate/deepMate.js
  2. 8
      utils/http.js

4
api/deepMate/deepMate.js

@ -20,7 +20,7 @@ export const getData = () => {
export const postIntent = (data) => {
return http({
method: 'POST',
url: '/api/deepMate/dmFirst',
url: '/testApi/api/deepMate/dmFirst',
data
})
}
@ -34,7 +34,7 @@ export const postIntent = (data) => {
export const postStock = (data) => {
return http({
method: 'POST',
url: '/testApi/api/coze/decodingSecond',
url: '/testApi/api/deepMate/dmSecond',
data
})
}

8
utils/http.js

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

Loading…
Cancel
Save