Browse Source

ai诊断

master
luobinjie 3 months ago
parent
commit
c599e1d29d
  1. 3
      src/api/api.js

3
src/api/api.js

@ -82,10 +82,11 @@ export async function fetchStream(url, params = {}, onChunk = (chunk) => {}) {
showFullScreenLoading();
try {
const token = window.sessionStorage.getItem('token');
let tokentype = window.sessionStorage.getItem("tokentype");
const headers = {
'Content-Type': 'application/json'
};
if (token) headers['Authorization'] = `Bearer ${token}`;
if (token) headers['Authorization'] = `${tokentype} ${token}`;
const resp = await fetch(fullUrl, {
method: 'POST',

Loading…
Cancel
Save