Pre Merge pull request !83 from AprilWind/feat/dev-docs

This commit is contained in:
AprilWind 2024-01-19 09:25:24 +00:00 committed by Gitee
commit 403c842626
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -18,12 +18,12 @@ export const isRelogin = { show: false };
export const globalHeaders = () => {
return {
Authorization: 'Bearer ' + getToken(),
clientid: import.meta.env.VITE_APP_CLIENT_ID
clientId: import.meta.env.VITE_APP_CLIENT_ID
};
};
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
axios.defaults.headers['clientId'] = import.meta.env.VITE_APP_CLIENT_ID;
// 创建 axios 实例
const service = axios.create({
baseURL: import.meta.env.VITE_APP_BASE_API,

View File

@ -36,7 +36,7 @@ export const initWebSocket = (url: any) => {
}
socketUrl = url;
// 初始化 websocket
websocket = new WebSocket(url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID);
websocket = new WebSocket(url + '?Authorization=Bearer ' + getToken() + '&clientId=' + import.meta.env.VITE_APP_CLIENT_ID);
websocketonopen();
websocketonmessage();
websocketonerror();