feat: share窗口

This commit is contained in:
archer
2023-03-21 23:47:26 +08:00
parent d065539707
commit 984baf60f0
11 changed files with 33 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
import { getToken } from '../utils/user';
interface StreamFetchProps {
url: string;
data: any;
@@ -9,7 +10,8 @@ export const streamFetch = ({ url, data, onMessage }: StreamFetchProps) =>
const res = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
Authorization: getToken() || ''
},
body: JSON.stringify(data)
});