修改api地址
This commit is contained in:
@@ -5,8 +5,9 @@ let heartbeatInterval = null;
|
||||
* 建立 WebSocket 连接
|
||||
*/
|
||||
function createWebSocket(token, onMessage) {
|
||||
const url = `wss://api.shelingxingqiu.com/socket?authorization=${token}`;
|
||||
socket = uni.connectSocket({
|
||||
url: `ws://120.79.241.5:8000/socket?authorization=${token}`,
|
||||
url,
|
||||
success: () => console.log("websocket 连接成功"),
|
||||
});
|
||||
|
||||
@@ -23,7 +24,7 @@ function createWebSocket(token, onMessage) {
|
||||
uni.onSocketClose((result) => {
|
||||
console.log("WebSocket 已关闭", result);
|
||||
socket = uni.connectSocket({
|
||||
url: `ws://120.79.241.5:8000/socket?authorization=${token}`,
|
||||
url,
|
||||
success: () => console.log("websocket 连接成功"),
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user