|
@@ -38,7 +38,6 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
|
-
|
|
|
import tags from "./tags";
|
|
|
import search from "./search";
|
|
|
import top from "./top/";
|
|
@@ -184,6 +183,7 @@ export default {
|
|
|
//推送系统
|
|
|
|
|
|
setInitSocket () {
|
|
|
+ if (!website.socket) return
|
|
|
const user_id = this.userInfo.user_id;
|
|
|
socket = new WebSocket(website.socket + user_id);
|
|
|
socket.onopen = function (evt) {
|
|
@@ -209,6 +209,7 @@ export default {
|
|
|
|
|
|
//发送消息
|
|
|
socketSend (msg) {
|
|
|
+ if (!website.socket) return
|
|
|
const user_id = this.userInfo.user_id;
|
|
|
console.log('发送消息:',)
|
|
|
if (socket) {
|