Browse Source

Merge branch 'dongqian/feature-20251022181325-deepmate简版' into milestone-20251031-简版功能开发

zhaowenkang/feature-20251028181547-行情页面
wangyetao 4 weeks ago
parent
commit
72b2395184
  1. 2
      api/deepMate/deepMate.js
  2. 27
      pages/deepMate/deepMate.vue
  3. 1
      utils/http.js

2
api/deepMate/deepMate.js

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

27
pages/deepMate/deepMate.vue

@ -623,17 +623,24 @@ const simulateBotResponse = async (userMessage) => {
// //
const StockInfo = await postStock({ const StockInfo = await postStock({
recordId: "42",
parentId: "0",
stockId:"42",
token: memberStore.userInfo?.token || '',
language: "cn",
language: 'cn',
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q',
recordId: Number(recordId),
parentId: Number(parentId),
stockId: Number(stockId),
}); });
console.log("StockInfo", StockInfo);
// if (StockInfo.code !== 200) {
// return ;
// }
console.log('postStock payload', { language: 'cn', token: '790750702588f1ea79f24dc56ccd5d8a', recordId, parentId, stockId });
console.log('StockInfo', StockInfo);
if (StockInfo && StockInfo.code !== 200) {
const errMsg = `postStock失败(${StockInfo.code}): ${StockInfo.message || '未知错误'}`
console.warn(errMsg, StockInfo)
messages.value[messages.value.length - 1].isThinking = false
messages.value[messages.value.length - 1].isTyping = false
messages.value[messages.value.length - 1].content = errMsg
isSending.value = false
return
}
const markdown = StockInfo.markdown; const markdown = StockInfo.markdown;
console.log("StockInfo", StockInfo); console.log("StockInfo", StockInfo);

1
utils/http.js

@ -39,6 +39,7 @@ const httpInterceptor = {
//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' const token = '790750702588f1ea79f24dc56ccd5d8a'
if (token) { if (token) {
options.header.token = token options.header.token = token

Loading…
Cancel
Save