|
@@ -26,7 +26,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
+<script setup>
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
import { readMessage } from "@/api/user";
|
|
|
const dictS = useDictionaryStore();
|
|
@@ -50,7 +50,7 @@ const submit = async (item, index) => {
|
|
|
};
|
|
|
//连接地址
|
|
|
const ws = new WebSocket(
|
|
|
- `ws://192.168.101.4:8079/websocket/${localStorage.getItem("token")}`
|
|
|
+ `${import.meta.env.VITE_WEBSOCKET_URL}/websocket/${localStorage.getItem("token")}`
|
|
|
);
|
|
|
ws.onopen = () => {
|
|
|
console.log("实时已连接");
|