diff --git a/goldminer/backend/__pycache__/app.cpython-312.pyc b/goldminer/backend/__pycache__/app.cpython-312.pyc index aab2687e..c097bb52 100644 Binary files a/goldminer/backend/__pycache__/app.cpython-312.pyc and b/goldminer/backend/__pycache__/app.cpython-312.pyc differ diff --git a/goldminer/backend/app.py b/goldminer/backend/app.py index b5f8faef..d526fdcb 100644 --- a/goldminer/backend/app.py +++ b/goldminer/backend/app.py @@ -6,24 +6,11 @@ from flask_socketio import SocketIO, emit, join_room, leave_room import os import uuid from datetime import datetime -from sqlalchemy.exc import OperationalError -import logging - -logging.basicConfig(level=logging.INFO) -logger = logging.getLogger(__name__) app = Flask(__name__, static_folder='../frontend/dist') app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'dev_key_for_goldminer') - -# MySQL 数据库配置 -DB_USER = os.environ.get('DB_USER', 'goldminer') -DB_PASSWORD = os.environ.get('DB_PASSWORD', 'goldminer') -DB_HOST = os.environ.get('DB_HOST', 'localhost') -DB_NAME = os.environ.get('DB_NAME', 'gold') - -app.config['SQLALCHEMY_DATABASE_URI'] = f'mysql+pymysql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}/{DB_NAME}' +app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///goldminer.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False -app.config['SQLALCHEMY_ECHO'] = True # 开启SQL查询日志,方便调试 CORS(app, supports_credentials=True, origins=['*']) # Enable CORS with credentials for all origins db = SQLAlchemy(app) @@ -80,24 +67,9 @@ class ChatMessage(db.Model): room = db.relationship('ChatRoom', backref=db.backref('messages', lazy=True)) user = db.relationship('User', backref=db.backref('messages', lazy=True)) -# 检查数据库连接并创建表 -def init_db(): - with app.app_context(): - try: - logger.info("正在连接到MySQL数据库...") - # The act of creating tables will test the connection. - db.create_all() - logger.info("数据库连接成功,并且所有表都已(如果不存在则)创建。") - except OperationalError as e: - logger.error("无法连接到MySQL数据库。请检查您的数据库配置和服务器状态。") - logger.error(f"错误详情: {e}") - logger.error("请确保:") - logger.error("1. MySQL服务器正在运行。") - logger.error(f"2. 数据库 '{DB_NAME}' 已存在。 (例如:CREATE DATABASE {DB_NAME};)") - logger.error(f"3. 用户 '{DB_USER}' 已创建并拥有对 '{DB_NAME}' 数据库的权限。") - # The application will likely fail to start properly, which is intended. - except Exception as e: - logger.error(f"初始化数据库时发生未知错误: {e}") +# 创建数据库表 +with app.app_context(): + db.create_all() # 注册API @app.route('/api/register', methods=['POST']) @@ -477,7 +449,4 @@ def handle_send_message(data): }, room=str(room_id)) if __name__ == '__main__': - # 在启动应用前初始化数据库 - init_db() - # 使用 eventlet 或 gevent 来获得更好的性能 - socketio.run(app, debug=True, host='0.0.0.0', port=5000) \ No newline at end of file + socketio.run(app, debug=True, host='0.0.0.0') \ No newline at end of file diff --git a/goldminer/backend/requirements.txt b/goldminer/backend/requirements.txt index 3881bc8c..260633af 100644 --- a/goldminer/backend/requirements.txt +++ b/goldminer/backend/requirements.txt @@ -3,5 +3,4 @@ flask-cors flask-sqlalchemy flask-socketio werkzeug -sqlalchemy<2.0.0 -PyMySQL \ No newline at end of file +sqlalchemy<2.0.0 \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/15df5abc4b3b0eb2d29c87df8ada1f7336ea51f0f22310d12c58bdef663c4d43.json b/goldminer/frontend/node_modules/.cache/babel-loader/15df5abc4b3b0eb2d29c87df8ada1f7336ea51f0f22310d12c58bdef663c4d43.json deleted file mode 100644 index b3e487fe..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/15df5abc4b3b0eb2d29c87df8ada1f7336ea51f0f22310d12c58bdef663c4d43.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.map.js\";\nimport \"core-js/modules/es.set.difference.v2.js\";\nimport \"core-js/modules/es.set.intersection.v2.js\";\nimport \"core-js/modules/es.set.is-disjoint-from.v2.js\";\nimport \"core-js/modules/es.set.is-subset-of.v2.js\";\nimport \"core-js/modules/es.set.is-superset-of.v2.js\";\nimport \"core-js/modules/es.set.symmetric-difference.v2.js\";\nimport \"core-js/modules/es.set.union.v2.js\";\nimport axios from 'axios';\nexport default {\n name: 'ChatRoom',\n data() {\n return {\n loading: true,\n error: null,\n rooms: [],\n currentRoom: null,\n messages: [],\n notifications: [],\n newMessage: '',\n newRoomName: '',\n showCreateRoomModal: false,\n messagesContainer: null,\n currentUser: JSON.parse(localStorage.getItem('user') || '{}'),\n pollingInterval: null,\n isConnecting: false\n };\n },\n created() {\n this.fetchRooms();\n\n // 每10秒刷新房间列表\n setInterval(() => {\n this.fetchRooms();\n }, 10000);\n },\n beforeUnmount() {\n this.stopPolling();\n },\n methods: {\n // 获取聊天室列表\n async fetchRooms() {\n this.loading = true;\n this.error = null;\n try {\n const response = await axios.get('/api/chat/rooms', {\n withCredentials: true\n });\n this.rooms = response.data || [];\n } catch (err) {\n console.error('获取聊天室列表失败:', err);\n this.error = '获取聊天室列表失败,请稍后重试';\n } finally {\n this.loading = false;\n }\n },\n // 创建聊天室\n async createRoom() {\n if (!this.newRoomName.trim()) return;\n try {\n const response = await axios.post('/api/chat/rooms', {\n name: this.newRoomName\n }, {\n withCredentials: true\n });\n this.newRoomName = '';\n await this.fetchRooms();\n\n // 自动加入创建的房间\n const newRoom = response.data;\n if (newRoom && newRoom.id) {\n this.joinRoom(newRoom);\n }\n } catch (err) {\n console.error('创建聊天室失败:', err);\n alert('创建聊天室失败,请稍后重试');\n }\n },\n // 加入聊天室\n async joinRoom(room) {\n if (this.currentRoom && this.currentRoom.id === room.id) return;\n\n // 停止之前的轮询\n this.stopPolling();\n this.currentRoom = room;\n this.messages = [];\n this.notifications = [];\n try {\n // 获取聊天室历史消息\n const response = await axios.get(`/api/chat/rooms/${room.id}/messages`, {\n withCredentials: true\n });\n this.messages = response.data.messages;\n\n // 开始轮询新消息\n this.startPolling();\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n } catch (err) {\n console.error('加入聊天室失败:', err);\n alert('加入聊天室失败,请稍后重试');\n this.currentRoom = null;\n }\n },\n // 离开聊天室\n leaveRoom() {\n if (!this.currentRoom) return;\n\n // 停止轮询\n this.stopPolling();\n this.currentRoom = null;\n this.messages = [];\n this.notifications = [];\n },\n // 发送消息\n async sendMessage() {\n if (!this.newMessage.trim() || !this.currentRoom) return;\n try {\n // 准备消息数据\n const messageData = {\n room_id: this.currentRoom.id,\n message: this.newMessage\n };\n\n // 发送消息\n await axios.post('/api/chat/send', messageData, {\n withCredentials: true,\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n\n // UDP不保证消息到达,所以这里我们模拟一条本地消息\n const localMessage = {\n id: Date.now(),\n user_id: this.currentUser.username,\n username: this.currentUser.username,\n message: this.newMessage,\n created_at: new Date().toISOString()\n };\n this.messages.push(localMessage);\n\n // 清空输入框\n this.newMessage = '';\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n } catch (err) {\n console.error('发送消息失败:', err);\n }\n },\n // 开始轮询获取新消息\n startPolling() {\n if (this.pollingInterval) return;\n this.pollingInterval = setInterval(async () => {\n if (!this.currentRoom) return;\n try {\n // 使用POST方法,因为某些浏览器可能会缓存GET请求\n const response = await axios.post(`/api/chat/poll/${this.currentRoom.id}`, {}, {\n withCredentials: true\n });\n\n // 更新消息列表,保留本地消息\n if (Array.isArray(response.data) && response.data.length > 0) {\n // 合并本地和服务器消息,避免重复\n const existingIds = new Set(this.messages.map(m => m.id));\n const newMessages = response.data.filter(m => !existingIds.has(m.id));\n if (newMessages.length > 0) {\n this.messages = [...this.messages, ...newMessages];\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n }\n }\n } catch (error) {\n console.error('轮询消息失败', error);\n }\n }, 2000); // 每2秒轮询一次\n },\n // 停止轮询\n stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n this.pollingInterval = null;\n }\n },\n // 格式化时间\n formatTime(dateString) {\n if (!dateString) return '';\n const date = new Date(dateString);\n return date.toLocaleTimeString('zh-CN', {\n hour: '2-digit',\n minute: '2-digit'\n });\n },\n // 滚动到底部\n scrollToBottom() {\n const container = this.$refs.messagesContainer;\n if (container) {\n container.scrollTop = container.scrollHeight;\n }\n },\n // 检查是否是当前用户\n isCurrentUser(userId) {\n return this.currentUser && this.currentUser.id === userId;\n }\n }\n};","map":{"version":3,"names":["axios","name","data","loading","error","rooms","currentRoom","messages","notifications","newMessage","newRoomName","showCreateRoomModal","messagesContainer","currentUser","JSON","parse","localStorage","getItem","pollingInterval","isConnecting","created","fetchRooms","setInterval","beforeUnmount","stopPolling","methods","response","get","withCredentials","err","console","createRoom","trim","post","newRoom","id","joinRoom","alert","room","startPolling","$nextTick","scrollToBottom","leaveRoom","sendMessage","messageData","room_id","message","headers","localMessage","Date","now","user_id","username","created_at","toISOString","push","Array","isArray","length","existingIds","Set","map","m","newMessages","filter","has","clearInterval","formatTime","dateString","date","toLocaleTimeString","hour","minute","container","$refs","scrollTop","scrollHeight","isCurrentUser","userId"],"sources":["D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n "],"mappings":";;;;;;;;;;;AAuHA,OAAOA,KAAI,MAAO,OAAM;AAExB,eAAe;EACbC,IAAI,EAAE,UAAU;EAChBC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,OAAO,EAAE,IAAI;MACbC,KAAK,EAAE,IAAI;MACXC,KAAK,EAAE,EAAE;MACTC,WAAW,EAAE,IAAI;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE,EAAE;MACjBC,UAAU,EAAE,EAAE;MACdC,WAAW,EAAE,EAAE;MACfC,mBAAmB,EAAE,KAAK;MAC1BC,iBAAiB,EAAE,IAAI;MACvBC,WAAW,EAAEC,IAAI,CAAC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CAACC,kBAAkB,CAAC,OAAO,EAAE;QACtCC,IAAI,EAAE,SAAS;QACfC,MAAM,EAAE;MACV,CAAC;IACH,CAAC;IAED;IACA/B,cAAcA,CAAA,EAAG;MACf,MAAMgC,SAAQ,GAAI,IAAI,CAACC,KAAK,CAAC9D,iBAAgB;MAC7C,IAAI6D,SAAS,EAAE;QACbA,SAAS,CAACE,SAAQ,GAAIF,SAAS,CAACG,YAAW;MAC7C;IACF,CAAC;IAED;IACAC,aAAaA,CAACC,MAAM,EAAE;MACpB,OAAO,IAAI,CAACjE,WAAU,IAAK,IAAI,CAACA,WAAW,CAACsB,EAAC,KAAM2C,MAAK;IAC1D;EACF;AACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/24a99a6067e6f9dcee51a29de6aacc420e32f03ce0b1f2d1c2f35c39e72fbfce.json b/goldminer/frontend/node_modules/.cache/babel-loader/24a99a6067e6f9dcee51a29de6aacc420e32f03ce0b1f2d1c2f35c39e72fbfce.json deleted file mode 100644 index badb121e..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/24a99a6067e6f9dcee51a29de6aacc420e32f03ce0b1f2d1c2f35c39e72fbfce.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import { createApp } from 'vue';\nimport App from './App.vue';\nimport router from './router';\nimport axios from 'axios';\n\n// In containerized environment, API calls will be proxied through Nginx\n// No need to specify a baseURL as we'll use relative URLs that Nginx will route\naxios.defaults.baseURL = '';\nconst app = createApp(App);\napp.use(router);\napp.mount('#app');","map":{"version":3,"names":["createApp","App","router","axios","defaults","baseURL","app","use","mount"],"sources":["D:/学习/网络应用程序开发/pdf/goldminer/frontend/src/main.js"],"sourcesContent":["import { createApp } from 'vue'\r\nimport App from './App.vue'\r\nimport router from './router'\r\nimport axios from 'axios'\r\n\r\n// In containerized environment, API calls will be proxied through Nginx\r\n// No need to specify a baseURL as we'll use relative URLs that Nginx will route\r\naxios.defaults.baseURL = ''\r\n\r\nconst app = createApp(App)\r\napp.use(router)\r\napp.mount('#app') "],"mappings":"AAAA,SAASA,SAAS,QAAQ,KAAK;AAC/B,OAAOC,GAAG,MAAM,WAAW;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,KAAK,MAAM,OAAO;;AAEzB;AACA;AACAA,KAAK,CAACC,QAAQ,CAACC,OAAO,GAAG,EAAE;AAE3B,MAAMC,GAAG,GAAGN,SAAS,CAACC,GAAG,CAAC;AAC1BK,GAAG,CAACC,GAAG,CAACL,MAAM,CAAC;AACfI,GAAG,CAACE,KAAK,CAAC,MAAM,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/4363643b0b4b21333a3577c8591557e973a38f3ea266600a7dc58b9a586879ec.json b/goldminer/frontend/node_modules/.cache/babel-loader/4363643b0b4b21333a3577c8591557e973a38f3ea266600a7dc58b9a586879ec.json deleted file mode 100644 index f87388bf..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/4363643b0b4b21333a3577c8591557e973a38f3ea266600a7dc58b9a586879ec.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives } from \"vue\";\nconst _hoisted_1 = {\n class: \"chat-container\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"loading\"\n};\nconst _hoisted_3 = {\n key: 1,\n class: \"error-message\"\n};\nconst _hoisted_4 = {\n key: 2,\n class: \"chat-content\"\n};\nconst _hoisted_5 = {\n class: \"rooms-panel\"\n};\nconst _hoisted_6 = {\n class: \"panel-header\"\n};\nconst _hoisted_7 = {\n class: \"room-list\"\n};\nconst _hoisted_8 = [\"onClick\"];\nconst _hoisted_9 = {\n class: \"room-name\"\n};\nconst _hoisted_10 = {\n class: \"room-info\"\n};\nconst _hoisted_11 = {\n key: 0,\n class: \"no-rooms\"\n};\nconst _hoisted_12 = {\n class: \"chat-panel\"\n};\nconst _hoisted_13 = {\n key: 0,\n class: \"no-room-selected\"\n};\nconst _hoisted_14 = {\n class: \"chat-room-header\"\n};\nconst _hoisted_15 = {\n class: \"messages-container\",\n ref: \"messagesContainer\"\n};\nconst _hoisted_16 = {\n class: \"timestamp\"\n};\nconst _hoisted_17 = {\n key: 0,\n class: \"no-messages\"\n};\nconst _hoisted_18 = {\n class: \"message-input\"\n};\nconst _hoisted_19 = [\"disabled\"];\nconst _hoisted_20 = {\n key: 3,\n class: \"modal-overlay\"\n};\nconst _hoisted_21 = {\n class: \"modal-content\"\n};\nconst _hoisted_22 = {\n class: \"form-group\"\n};\nconst _hoisted_23 = {\n class: \"modal-actions\"\n};\nconst _hoisted_24 = [\"disabled\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [_cache[16] || (_cache[16] = _createElementVNode(\"div\", {\n class: \"chat-header\"\n }, [_createElementVNode(\"h2\", null, \"游戏聊天室\"), _createElementVNode(\"p\", {\n class: \"subtitle\"\n }, \"与其他玩家交流游戏心得\")], -1 /* HOISTED */)), $data.loading ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _cache[9] || (_cache[9] = [_createElementVNode(\"p\", null, \"加载中...\", -1 /* HOISTED */)]))) : $data.error ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [_createElementVNode(\"p\", null, _toDisplayString($data.error), 1 /* TEXT */), _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = (...args) => $options.fetchRooms && $options.fetchRooms(...args)),\n class: \"retry-button\"\n }, \"重试\")])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [_createCommentVNode(\" 左侧聊天室列表 \"), _createElementVNode(\"div\", _hoisted_5, [_createElementVNode(\"div\", _hoisted_6, [_cache[10] || (_cache[10] = _createElementVNode(\"h3\", null, \"聊天室列表\", -1 /* HOISTED */)), _createElementVNode(\"button\", {\n onClick: _cache[1] || (_cache[1] = $event => $data.showCreateRoomModal = true),\n class: \"create-room-btn\"\n }, \" 创建聊天室 \")]), _createElementVNode(\"div\", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.rooms, room => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: room.id,\n class: _normalizeClass([\"room-item\", {\n active: $data.currentRoom && $data.currentRoom.id === room.id\n }]),\n onClick: $event => $options.joinRoom(room)\n }, [_createElementVNode(\"div\", _hoisted_9, _toDisplayString(room.name), 1 /* TEXT */), _createElementVNode(\"div\", _hoisted_10, _toDisplayString(room.members_count || 0) + \"人在线\", 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_8);\n }), 128 /* KEYED_FRAGMENT */)), $data.rooms.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _cache[11] || (_cache[11] = [_createElementVNode(\"p\", null, \"暂无聊天室,创建一个吧!\", -1 /* HOISTED */)]))) : _createCommentVNode(\"v-if\", true)])]), _createCommentVNode(\" 右侧聊天区域 \"), _createElementVNode(\"div\", _hoisted_12, [!$data.currentRoom ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, _cache[12] || (_cache[12] = [_createElementVNode(\"p\", null, \"请选择或创建一个聊天室\", -1 /* HOISTED */)]))) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [_createElementVNode(\"div\", _hoisted_14, [_createElementVNode(\"h3\", null, _toDisplayString($data.currentRoom.name), 1 /* TEXT */), _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = (...args) => $options.leaveRoom && $options.leaveRoom(...args)),\n class: \"leave-room-btn\"\n }, \"离开\")]), _createElementVNode(\"div\", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.messages, msg => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: msg.id,\n class: _normalizeClass([\"message-item\", {\n 'current-user-message': $options.isCurrentUser(msg.user_id)\n }])\n }, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"message-header\", {\n 'current-user-header': $options.isCurrentUser(msg.user_id)\n }])\n }, [_createElementVNode(\"span\", {\n class: _normalizeClass([\"username\", {\n 'current-user': $options.isCurrentUser(msg.user_id)\n }])\n }, _toDisplayString(msg.username), 3 /* TEXT, CLASS */), _createElementVNode(\"span\", _hoisted_16, _toDisplayString($options.formatTime(msg.created_at)), 1 /* TEXT */)], 2 /* CLASS */), _createElementVNode(\"div\", {\n class: _normalizeClass([\"message-content\", {\n 'current-user-content': $options.isCurrentUser(msg.user_id)\n }])\n }, _toDisplayString(msg.message), 3 /* TEXT, CLASS */)], 2 /* CLASS */);\n }), 128 /* KEYED_FRAGMENT */)), $data.messages.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, _cache[13] || (_cache[13] = [_createElementVNode(\"p\", null, \"暂无消息,开始聊天吧!\", -1 /* HOISTED */)]))) : _createCommentVNode(\"v-if\", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.notifications, notification => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: notification.id,\n class: \"notification\"\n }, _toDisplayString(notification.message), 1 /* TEXT */);\n }), 128 /* KEYED_FRAGMENT */))], 512 /* NEED_PATCH */), _createElementVNode(\"div\", _hoisted_18, [_withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $data.newMessage = $event),\n placeholder: \"输入消息...\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys((...args) => $options.sendMessage && $options.sendMessage(...args), [\"enter\"]))\n }, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [[_vModelText, $data.newMessage]]), _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = (...args) => $options.sendMessage && $options.sendMessage(...args)),\n disabled: !$data.newMessage.trim()\n }, \"发送\", 8 /* PROPS */, _hoisted_19)])], 64 /* STABLE_FRAGMENT */))])])), _createCommentVNode(\" 创建聊天室模态框 \"), $data.showCreateRoomModal ? (_openBlock(), _createElementBlock(\"div\", _hoisted_20, [_createElementVNode(\"div\", _hoisted_21, [_cache[15] || (_cache[15] = _createElementVNode(\"h3\", null, \"创建新聊天室\", -1 /* HOISTED */)), _createElementVNode(\"div\", _hoisted_22, [_cache[14] || (_cache[14] = _createElementVNode(\"label\", {\n for: \"roomName\"\n }, \"聊天室名称\", -1 /* HOISTED */)), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"roomName\",\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $data.newRoomName = $event),\n placeholder: \"输入聊天室名称\"\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.newRoomName]])]), _createElementVNode(\"div\", _hoisted_23, [_createElementVNode(\"button\", {\n onClick: _cache[7] || (_cache[7] = (...args) => $options.createRoom && $options.createRoom(...args)),\n class: \"create-btn\",\n disabled: !$data.newRoomName.trim()\n }, \"创建\", 8 /* PROPS */, _hoisted_24), _createElementVNode(\"button\", {\n onClick: _cache[8] || (_cache[8] = $event => $data.showCreateRoomModal = false),\n class: \"cancel-btn\"\n }, \"取消\")])])])) : _createCommentVNode(\"v-if\", true)]);\n}","map":{"version":3,"names":["class","ref","_createElementBlock","_hoisted_1","_createElementVNode","$data","loading","_hoisted_2","_cache","error","_hoisted_3","_toDisplayString","onClick","args","$options","fetchRooms","_hoisted_4","_createCommentVNode","_hoisted_5","_hoisted_6","$event","showCreateRoomModal","_hoisted_7","_Fragment","_renderList","rooms","room","key","id","_normalizeClass","active","currentRoom","joinRoom","_hoisted_9","name","_hoisted_10","members_count","length","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","leaveRoom","_hoisted_15","messages","msg","isCurrentUser","user_id","username","_hoisted_16","formatTime","created_at","message","_hoisted_17","notifications","notification","_hoisted_18","type","newMessage","placeholder","onKeyup","_withKeys","sendMessage","disabled","trim","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","for","newRoomName","_hoisted_23","createRoom","_hoisted_24"],"sources":["D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n "],"mappings":";;EACOA,KAAK,EAAC;AAAgB;;;EAMLA,KAAK,EAAC;;;;EAIHA,KAAK,EAAC;;;;EAKjBA,KAAK,EAAC;;;EAEXA,KAAK,EAAC;AAAa;;EACjBA,KAAK,EAAC;AAAc;;EAOpBA,KAAK,EAAC;AAAW;;;EAQbA,KAAK,EAAC;AAAW;;EACjBA,KAAK,EAAC;AAAW;;;EAGOA,KAAK,EAAC;;;EAOpCA,KAAK,EAAC;AAAY;;;EACIA,KAAK,EAAC;;;EAKxBA,KAAK,EAAC;AAAkB;;EAKxBA,KAAK,EAAC,oBAAoB;EAACC,GAAG,EAAC;;;EAWxBD,KAAK,EAAC;AAAW;;;EAOOA,KAAK,EAAC;;;EASrCA,KAAK,EAAC;AAAe;;;;EAcAA,KAAK,EAAC;;;EAC/BA,KAAK,EAAC;AAAe;;EAEnBA,KAAK,EAAC;AAAY;;EASlBA,KAAK,EAAC;AAAe;;;uBA5GhCE,mBAAA,CAkHM,OAlHNC,UAkHM,G,4BAjHJC,mBAAA,CAGM;IAHDJ,KAAK,EAAC;EAAa,IACtBI,mBAAA,CAAc,YAAV,OAAK,GACTA,mBAAA,CAAmC;IAAhCJ,KAAK,EAAC;EAAU,GAAC,aAAW,E,sBAGtBK,KAAA,CAAAC,OAAO,I,cAAlBJ,mBAAA,CAEM,OAFNK,UAEM,EAAAC,MAAA,QAAAA,MAAA,OADJJ,mBAAA,CAAa,WAAV,QAAM,oB,MAGKC,KAAA,CAAAI,KAAK,I,cAArBP,mBAAA,CAGM,OAHNQ,UAGM,GAFJN,mBAAA,CAAkB,WAAAO,gBAAA,CAAZN,KA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GAhBJ9D,mBAAA,CAeM,OAfN+D,WAeM,G,4BAdJ/D,mBAAA,CAAe,YAAX,QAAM,sBACVA,mBAAA,CAQM,OARNgE,WAQM,G,4BAPJhE,mBAAA,CAAmC;IAA5BiE,GAAG,EAAC;EAAU,GAAC,OAAK,sB,gBAC3BjE,mBAAA,CAKE;IAJAqD,IAAI,EAAC,MAAM;IACX7B,EAAE,EAAC,UAAU;+DACJvB,KAAA,CAAAiE,WAAW,GAAAlD,MAAA;IACpBuC,WAAW,EAAC;iDADHtD,KAAA,CAAAiE,WAAW,E,KAIxBlE,mBAAA,CAGM,OAHNmE,WAGM,GAFJnE,mBAAA,CAA0F;IAAjFQ,OAAK,EAAAJ,MAAA,QAAAA,MAAA,UAAAK,IAAA,KAAEC,QAAA,CAAA0D,UAAA,IAAA1D,QAAA,CAAA0D,UAAA,IAAA3D,IAAA,CAAU;IAAEb,KAAK,EAAC,YAAY;IAAE+D,QAAQ,GAAG1D,KAAA,CAAAiE,WAAW,CAACN,IAAI;KAAI,IAAE,iBAAAS,WAAA,GACjFrE,mBAAA,CAA2E;IAAlEQ,OAAK,EAAAJ,MAAA,QAAAA,MAAA,MAAAY,MAAA,IAAEf,KAAA,CAAAgB,mBAAmB;IAAUrB,KAAK,EAAC;KAAa,IAAE,E","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/a14b20bf1da3ea67acd97f53794399d3cbd4eb8348ac696b34b47ec4503228e7.json b/goldminer/frontend/node_modules/.cache/babel-loader/a14b20bf1da3ea67acd97f53794399d3cbd4eb8348ac696b34b47ec4503228e7.json deleted file mode 100644 index fe2f66c0..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/a14b20bf1da3ea67acd97f53794399d3cbd4eb8348ac696b34b47ec4503228e7.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives } from \"vue\";\nconst _hoisted_1 = {\n class: \"chat-container\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"loading\"\n};\nconst _hoisted_3 = {\n key: 1,\n class: \"error-message\"\n};\nconst _hoisted_4 = {\n key: 2,\n class: \"chat-content\"\n};\nconst _hoisted_5 = {\n class: \"rooms-panel\"\n};\nconst _hoisted_6 = {\n class: \"panel-header\"\n};\nconst _hoisted_7 = {\n class: \"room-list\"\n};\nconst _hoisted_8 = [\"onClick\"];\nconst _hoisted_9 = {\n class: \"room-name\"\n};\nconst _hoisted_10 = {\n class: \"room-creator\"\n};\nconst _hoisted_11 = {\n key: 0,\n class: \"no-rooms\"\n};\nconst _hoisted_12 = {\n class: \"chat-panel\"\n};\nconst _hoisted_13 = {\n key: 0,\n class: \"no-room-selected\"\n};\nconst _hoisted_14 = {\n class: \"chat-room-header\"\n};\nconst _hoisted_15 = {\n class: \"messages-container\",\n ref: \"messagesContainer\"\n};\nconst _hoisted_16 = {\n class: \"timestamp\"\n};\nconst _hoisted_17 = {\n key: 0,\n class: \"no-messages\"\n};\nconst _hoisted_18 = {\n class: \"message-input\"\n};\nconst _hoisted_19 = [\"disabled\"];\nconst _hoisted_20 = {\n key: 3,\n class: \"modal-overlay\"\n};\nconst _hoisted_21 = {\n class: \"modal-content\"\n};\nconst _hoisted_22 = {\n class: \"form-group\"\n};\nconst _hoisted_23 = {\n class: \"modal-actions\"\n};\nconst _hoisted_24 = [\"disabled\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [_cache[16] || (_cache[16] = _createElementVNode(\"div\", {\n class: \"chat-header\"\n }, [_createElementVNode(\"h2\", null, \"游戏聊天室\"), _createElementVNode(\"p\", {\n class: \"subtitle\"\n }, \"与其他玩家交流游戏心得\")], -1 /* HOISTED */)), $data.loading ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _cache[9] || (_cache[9] = [_createElementVNode(\"p\", null, \"加载中...\", -1 /* HOISTED */)]))) : $data.error ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [_createElementVNode(\"p\", null, _toDisplayString($data.error), 1 /* TEXT */), _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = (...args) => $options.fetchRooms && $options.fetchRooms(...args)),\n class: \"retry-button\"\n }, \"重试\")])) : (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [_createCommentVNode(\" 左侧聊天室列表 \"), _createElementVNode(\"div\", _hoisted_5, [_createElementVNode(\"div\", _hoisted_6, [_cache[10] || (_cache[10] = _createElementVNode(\"h3\", null, \"聊天室列表\", -1 /* HOISTED */)), _createElementVNode(\"button\", {\n onClick: _cache[1] || (_cache[1] = $event => $data.showCreateRoomModal = true),\n class: \"create-room-btn\"\n }, \" 创建聊天室 \")]), _createElementVNode(\"div\", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.rooms, room => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: room.id,\n class: _normalizeClass([\"room-item\", {\n active: $data.currentRoom && $data.currentRoom.id === room.id\n }]),\n onClick: $event => $options.joinRoom(room)\n }, [_createElementVNode(\"div\", _hoisted_9, _toDisplayString(room.name), 1 /* TEXT */), _createElementVNode(\"div\", _hoisted_10, \"创建者: \" + _toDisplayString(room.creator), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_8);\n }), 128 /* KEYED_FRAGMENT */)), $data.rooms.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _cache[11] || (_cache[11] = [_createElementVNode(\"p\", null, \"暂无聊天室,创建一个吧!\", -1 /* HOISTED */)]))) : _createCommentVNode(\"v-if\", true)])]), _createCommentVNode(\" 右侧聊天区域 \"), _createElementVNode(\"div\", _hoisted_12, [!$data.currentRoom ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, _cache[12] || (_cache[12] = [_createElementVNode(\"p\", null, \"请选择或创建一个聊天室\", -1 /* HOISTED */)]))) : (_openBlock(), _createElementBlock(_Fragment, {\n key: 1\n }, [_createElementVNode(\"div\", _hoisted_14, [_createElementVNode(\"h3\", null, _toDisplayString($data.currentRoom.name), 1 /* TEXT */), _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = (...args) => $options.leaveRoom && $options.leaveRoom(...args)),\n class: \"leave-room-btn\"\n }, \"离开\")]), _createElementVNode(\"div\", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.messages, msg => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: msg.id,\n class: _normalizeClass([\"message-item\", {\n 'current-user-message': $options.isCurrentUser(msg.user_id)\n }])\n }, [_createElementVNode(\"div\", {\n class: _normalizeClass([\"message-header\", {\n 'current-user-header': $options.isCurrentUser(msg.user_id)\n }])\n }, [_createElementVNode(\"span\", {\n class: _normalizeClass([\"username\", {\n 'current-user': $options.isCurrentUser(msg.user_id)\n }])\n }, _toDisplayString(msg.username), 3 /* TEXT, CLASS */), _createElementVNode(\"span\", _hoisted_16, _toDisplayString($options.formatTime(msg.created_at)), 1 /* TEXT */)], 2 /* CLASS */), _createElementVNode(\"div\", {\n class: _normalizeClass([\"message-content\", {\n 'current-user-content': $options.isCurrentUser(msg.user_id)\n }])\n }, _toDisplayString(msg.message), 3 /* TEXT, CLASS */)], 2 /* CLASS */);\n }), 128 /* KEYED_FRAGMENT */)), $data.messages.length === 0 ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, _cache[13] || (_cache[13] = [_createElementVNode(\"p\", null, \"暂无消息,开始聊天吧!\", -1 /* HOISTED */)]))) : _createCommentVNode(\"v-if\", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($data.notifications, notification => {\n return _openBlock(), _createElementBlock(\"div\", {\n key: notification.id,\n class: \"notification\"\n }, _toDisplayString(notification.message), 1 /* TEXT */);\n }), 128 /* KEYED_FRAGMENT */))], 512 /* NEED_PATCH */), _createElementVNode(\"div\", _hoisted_18, [_withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $data.newMessage = $event),\n placeholder: \"输入消息...\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys((...args) => $options.sendMessage && $options.sendMessage(...args), [\"enter\"]))\n }, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [[_vModelText, $data.newMessage]]), _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = (...args) => $options.sendMessage && $options.sendMessage(...args)),\n disabled: !$data.newMessage.trim()\n }, \"发送\", 8 /* PROPS */, _hoisted_19)])], 64 /* STABLE_FRAGMENT */))])])), _createCommentVNode(\" 创建聊天室模态框 \"), $data.showCreateRoomModal ? (_openBlock(), _createElementBlock(\"div\", _hoisted_20, [_createElementVNode(\"div\", _hoisted_21, [_cache[15] || (_cache[15] = _createElementVNode(\"h3\", null, \"创建新聊天室\", -1 /* HOISTED */)), _createElementVNode(\"div\", _hoisted_22, [_cache[14] || (_cache[14] = _createElementVNode(\"label\", {\n for: \"roomName\"\n }, \"聊天室名称\", -1 /* HOISTED */)), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"roomName\",\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $data.newRoomName = $event),\n placeholder: \"输入聊天室名称\"\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.newRoomName]])]), _createElementVNode(\"div\", _hoisted_23, [_createElementVNode(\"button\", {\n onClick: _cache[7] || (_cache[7] = (...args) => $options.createRoom && $options.createRoom(...args)),\n class: \"create-btn\",\n disabled: !$data.newRoomName.trim()\n }, \"创建\", 8 /* PROPS */, _hoisted_24), _createElementVNode(\"button\", {\n onClick: _cache[8] || (_cache[8] = $event => $data.showCreateRoomModal = false),\n class: \"cancel-btn\"\n }, \"取消\")])])])) : _createCommentVNode(\"v-if\", true)]);\n}","map":{"version":3,"names":["class","ref","_createElementBlock","_hoisted_1","_createElementVNode","$data","loading","_hoisted_2","_cache","error","_hoisted_3","_toDisplayString","onClick","args","$options","fetchRooms","_hoisted_4","_createCommentVNode","_hoisted_5","_hoisted_6","$event","showCreateRoomModal","_hoisted_7","_Fragment","_renderList","rooms","room","key","id","_normalizeClass","active","currentRoom","joinRoom","_hoisted_9","name","_hoisted_10","creator","length","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","leaveRoom","_hoisted_15","messages","msg","isCurrentUser","user_id","username","_hoisted_16","formatTime","created_at","message","_hoisted_17","notifications","notification","_hoisted_18","type","newMessage","placeholder","onKeyup","_withKeys","sendMessage","disabled","trim","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","for","newRoomName","_hoisted_23","createRoom","_hoisted_24"],"sources":["D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n "],"mappings":";;EACOA,KAAK,EAAC;AAAgB;;;EAMLA,KAAK,EAAC;;;;EAIHA,KAAK,EAAC;;;;EAKjBA,KAAK,EAAC;;;EAEXA,KAAK,EAAC;AAAa;;EACjBA,KAAK,EAAC;AAAc;;EAOpBA,KAAK,EAAC;AAAW;;;EAQbA,KAAK,EAAC;AAAW;;EACjBA,KAAK,EAAC;AAAc;;;EAGIA,KAAK,EAAC;;;EAOpCA,KAAK,EAAC;AAAY;;;EACIA,KAAK,EAAC;;;EAKxBA,KAAK,EAAC;AAAkB;;EAKxBA,KAAK,EAAC,oBAAoB;EAACC,GAAG,EAAC;;;EAWxBD,KAAK,EAAC;AAAW;;;EAOOA,KAAK,EAAC;;;EASrCA,KAAK,EAAC;AAAe;;;;EAcAA,KAAK,EAAC;;;EAC/BA,KAAK,EAAC;AAAe;;EAEnBA,KAAK,EAAC;AAAY;;EASlBA,KAAK,EAAC;AAAe;;;uBA5GhCE,mBAAA,CAkHM,OAlH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[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/cc6ca55790ce06b0d3a38d6c82998638025d37e2b0d25b48b5724ab7c95f99fb.json b/goldminer/frontend/node_modules/.cache/babel-loader/cc6ca55790ce06b0d3a38d6c82998638025d37e2b0d25b48b5724ab7c95f99fb.json deleted file mode 100644 index e670104c..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/cc6ca55790ce06b0d3a38d6c82998638025d37e2b0d25b48b5724ab7c95f99fb.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import { createApp } from 'vue';\nimport App from './App.vue';\nimport router from './router';\nimport axios from 'axios';\n\n// 配置axios默认URL,使用当前主机名而不是硬编码的localhost\nconst currentHost = window.location.hostname;\naxios.defaults.baseURL = process.env.NODE_ENV === 'production' ? '' : `http://${currentHost}:5000`;\nconst app = createApp(App);\napp.use(router);\napp.mount('#app');","map":{"version":3,"names":["createApp","App","router","axios","currentHost","window","location","hostname","defaults","baseURL","process","env","NODE_ENV","app","use","mount"],"sources":["D:/学习/网络应用程序开发/pdf/goldminer/frontend/src/main.js"],"sourcesContent":["import { createApp } from 'vue'\r\nimport App from './App.vue'\r\nimport router from './router'\r\nimport axios from 'axios'\r\n\r\n// 配置axios默认URL,使用当前主机名而不是硬编码的localhost\r\nconst currentHost = window.location.hostname\r\naxios.defaults.baseURL = process.env.NODE_ENV === 'production' \r\n ? '' \r\n : `http://${currentHost}:5000`\r\n\r\nconst app = createApp(App)\r\napp.use(router)\r\napp.mount('#app') "],"mappings":"AAAA,SAASA,SAAS,QAAQ,KAAK;AAC/B,OAAOC,GAAG,MAAM,WAAW;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,KAAK,MAAM,OAAO;;AAEzB;AACA,MAAMC,WAAW,GAAGC,MAAM,CAACC,QAAQ,CAACC,QAAQ;AAC5CJ,KAAK,CAACK,QAAQ,CAACC,OAAO,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAC1D,EAAE,GACF,UAAUR,WAAW,OAAO;AAEhC,MAAMS,GAAG,GAAGb,SAAS,CAACC,GAAG,CAAC;AAC1BY,GAAG,CAACC,GAAG,CAACZ,MAAM,CAAC;AACfW,GAAG,CAACE,KAAK,CAAC,MAAM,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/babel-loader/e1e88b21e19be30dc863165bf3e5d288a1c68f185ceade3496701a8cd6b8848e.json b/goldminer/frontend/node_modules/.cache/babel-loader/e1e88b21e19be30dc863165bf3e5d288a1c68f185ceade3496701a8cd6b8848e.json deleted file mode 100644 index 96d9d7ee..00000000 --- a/goldminer/frontend/node_modules/.cache/babel-loader/e1e88b21e19be30dc863165bf3e5d288a1c68f185ceade3496701a8cd6b8848e.json +++ /dev/null @@ -1 +0,0 @@ -{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.map.js\";\nimport \"core-js/modules/es.set.difference.v2.js\";\nimport \"core-js/modules/es.set.intersection.v2.js\";\nimport \"core-js/modules/es.set.is-disjoint-from.v2.js\";\nimport \"core-js/modules/es.set.is-subset-of.v2.js\";\nimport \"core-js/modules/es.set.is-superset-of.v2.js\";\nimport \"core-js/modules/es.set.symmetric-difference.v2.js\";\nimport \"core-js/modules/es.set.union.v2.js\";\nimport axios from 'axios';\nexport default {\n name: 'ChatRoom',\n data() {\n return {\n loading: true,\n error: null,\n rooms: [],\n currentRoom: null,\n messages: [],\n notifications: [],\n newMessage: '',\n newRoomName: '',\n showCreateRoomModal: false,\n messagesContainer: null,\n currentUser: JSON.parse(localStorage.getItem('user') || '{}'),\n pollingInterval: null,\n isConnecting: false\n };\n },\n created() {\n this.fetchRooms();\n\n // 每10秒刷新房间列表\n setInterval(() => {\n this.fetchRooms();\n }, 10000);\n },\n beforeUnmount() {\n this.stopPolling();\n },\n methods: {\n // 获取聊天室列表\n async fetchRooms() {\n this.loading = true;\n this.error = null;\n try {\n const response = await axios.get('/api/chat/rooms', {\n withCredentials: true\n });\n this.rooms = response.data.rooms;\n } catch (err) {\n console.error('获取聊天室列表失败:', err);\n this.error = '获取聊天室列表失败,请稍后重试';\n } finally {\n this.loading = false;\n }\n },\n // 创建聊天室\n async createRoom() {\n if (!this.newRoomName.trim()) return;\n try {\n const response = await axios.post('/api/chat/rooms', {\n name: this.newRoomName\n }, {\n withCredentials: true\n });\n this.newRoomName = '';\n await this.fetchRooms();\n\n // 自动加入创建的房间\n this.joinRoom(response.data.room);\n } catch (err) {\n console.error('创建聊天室失败:', err);\n alert('创建聊天室失败,请稍后重试');\n }\n },\n // 加入聊天室\n async joinRoom(room) {\n if (this.currentRoom && this.currentRoom.id === room.id) return;\n\n // 停止之前的轮询\n this.stopPolling();\n this.currentRoom = room;\n this.messages = [];\n this.notifications = [];\n try {\n // 获取聊天室历史消息\n const response = await axios.get(`/api/chat/rooms/${room.id}/messages`, {\n withCredentials: true\n });\n this.messages = response.data.messages;\n\n // 开始轮询新消息\n this.startPolling();\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n } catch (err) {\n console.error('加入聊天室失败:', err);\n alert('加入聊天室失败,请稍后重试');\n this.currentRoom = null;\n }\n },\n // 离开聊天室\n leaveRoom() {\n if (!this.currentRoom) return;\n\n // 停止轮询\n this.stopPolling();\n this.currentRoom = null;\n this.messages = [];\n this.notifications = [];\n },\n // 发送消息\n async sendMessage() {\n if (!this.newMessage.trim() || !this.currentRoom) return;\n try {\n await axios.post('/api/chat/send', {\n room_id: this.currentRoom.id,\n message: this.newMessage\n }, {\n withCredentials: true\n });\n\n // UDP不保证消息到达,所以这里我们模拟一条本地消息\n const localMessage = {\n id: Date.now(),\n user_id: this.currentUser.username,\n username: this.currentUser.username,\n message: this.newMessage,\n created_at: new Date().toISOString()\n };\n this.messages.push(localMessage);\n\n // 清空输入框\n this.newMessage = '';\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n } catch (err) {\n console.error('发送消息失败:', err);\n }\n },\n // 开始轮询获取新消息\n startPolling() {\n if (this.pollingInterval) return;\n this.pollingInterval = setInterval(async () => {\n if (!this.currentRoom) return;\n try {\n const response = await axios.get(`/api/chat/poll/${this.currentRoom.id}`, {\n withCredentials: true\n });\n\n // 更新消息列表,保留本地消息\n if (response.data && response.data.length > 0) {\n // 合并本地和服务器消息,避免重复\n const existingIds = new Set(this.messages.map(m => m.id));\n const newMessages = response.data.filter(m => !existingIds.has(m.id));\n if (newMessages.length > 0) {\n this.messages = [...this.messages, ...newMessages];\n\n // 滚动到底部\n this.$nextTick(() => {\n this.scrollToBottom();\n });\n }\n }\n } catch (error) {\n console.error('轮询消息失败', error);\n }\n }, 2000); // 每2秒轮询一次\n },\n // 停止轮询\n stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n this.pollingInterval = null;\n }\n },\n // 格式化时间\n formatTime(dateString) {\n if (!dateString) return '';\n const date = new Date(dateString);\n return date.toLocaleTimeString('zh-CN', {\n hour: '2-digit',\n minute: '2-digit'\n });\n },\n // 滚动到底部\n scrollToBottom() {\n const container = this.$refs.messagesContainer;\n if (container) {\n container.scrollTop = container.scrollHeight;\n }\n },\n // 检查是否是当前用户\n isCurrentUser(userId) {\n return this.currentUser && this.currentUser.id === userId;\n }\n }\n};","map":{"version":3,"names":["axios","name","data","loading","error","rooms","currentRoom","messages","notifications","newMessage","newRoomName","showCreateRoomModal","messagesContainer","currentUser","JSON","parse","localStorage","getItem","pollingInterval","isConnecting","created","fetchRooms","setInterval","beforeUnmount","stopPolling","methods","response","get","withCredentials","err","console","createRoom","trim","post","joinRoom","room","alert","id","startPolling","$nextTick","scrollToBottom","leaveRoom","sendMessage","room_id","message","localMessage","Date","now","user_id","username","created_at","toISOString","push","length","existingIds","Set","map","m","newMessages","filter","has","clearInterval","formatTime","dateString","date","toLocaleTimeString","hour","minute","container","$refs","scrollTop","scrollHeight","isCurrentUser","userId"],"sources":["D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n "],"mappings":";;;;;;;;;;;AAuHA,OAAOA,KAAI,MAAO,OAAM;AAExB,eAAe;EACbC,IAAI,EAAE,UAAU;EAChBC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,OAAO,EAAE,IAAI;MACbC,KAAK,EAAE,IAAI;MACXC,KAAK,EAAE,EAAE;MACTC,WAAW,EAAE,IAAI;MACjBC,QAAQ,EAAE,EAAE;MACZC,aAAa,EAAE,EAAE;MACjBC,UAAU,EAAE,EAAE;MACdC,WAAW,EAAE,EAAE;MACfC,mBAAmB,EAAE,KAAK;MAC1BC,iBAAiB,EAAE,IAAI;MACvBC,WAAW,EAAEC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACC,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC;MAC7DC,eAAe,EAAE,IAAI;MACrBC,YAAY,EAAE;IAChB;EACF,CAAC;EACDC,OAAOA,CAAA,EAAG;IACR,IAAI,CAACC,UAAU,CAAC;;IAEhB;IACAC,WAAW,CAAC,MAAM;MAChB,IAAI,CAACD,UAAU,CAAC;IAClB,CAAC,EAAE,KAAK;EACV,CAAC;EACDE,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,WAAW,CAAC;EACnB,CAAC;EACDC,OAAO,EAAE;IACP;IACA,MAAMJ,UAAUA,CAAA,EAAG;MACjB,IAAI,CAAClB,OAAM,GAAI,IAAG;MAClB,IAAI,CAACC,KAAI,GAAI,IAAG;MAEhB,IAAI;QACF,MAAMsB,QAAO,GAAI,MAAM1B,KAAK,CAAC2B,GAAG,CAAC,iBAAiB,EAAE;UAAEC,eAAe,EAAE;QAAK,CAAC;QAC7E,IAAI,CAACvB,KAAI,GAAIqB,QAAQ,CAACxB,IAAI,CAACG,KAAI;MACj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CAAC,EAAE,IAAI,GAAE;IACX,CAAC;IAED;IACAoB,WAAWA,CAAA,EAAG;MACZ,IAAI,IAAI,CAACN,eAAe,EAAE;QACxB2C,aAAa,CAAC,IAAI,CAAC3C,eAAe;QAClC,IAAI,CAACA,eAAc,GAAI,IAAG;MAC5B;IACF,CAAC;IAED;IACA4C,UAAUA,CAACC,UAAU,EAAE;MACrB,IAAI,CAACA,UAAU,EAAE,OAAO,EAAC;MAEzB,MAAMC,IAAG,GAAI,IAAIlB,IAAI,CAACiB,UAAU;MAChC,OAAOC,IAAI,CAACC,kBAAkB,CAAC,OAAO,EAAE;QACtCC,IAAI,EAAE,SAAS;QACfC,MAAM,EAAE;MACV,CAAC;IACH,CAAC;IAED;IACA3B,cAAcA,CAAA,EAAG;MACf,MAAM4B,SAAQ,GAAI,IAAI,CAACC,KAAK,CAACzD,iBAAgB;MAC7C,IAAIwD,SAAS,EAAE;QACbA,SAAS,CAACE,SAAQ,GAAIF,SAAS,CAACG,YAAW;MAC7C;IACF,CAAC;IAED;IACAC,aAAaA,CAACC,MAAM,EAAE;MACpB,OAAO,IAAI,CAAC5D,WAAU,IAAK,IAAI,CAACA,WAAW,CAACwB,EAAC,KAAMoC,MAAK;IAC1D;EACF;AACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} \ No newline at end of file diff --git a/goldminer/frontend/node_modules/.cache/eslint/123ee647.json b/goldminer/frontend/node_modules/.cache/eslint/123ee647.json index b246fd38..5d8fd632 100644 --- a/goldminer/frontend/node_modules/.cache/eslint/123ee647.json +++ b/goldminer/frontend/node_modules/.cache/eslint/123ee647.json @@ -1 +1 @@ -[{"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\main.js":"1","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\App.vue":"2","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\router.js":"3","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Home.vue":"4","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Register.vue":"5","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Game.vue":"6","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Login.vue":"7","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\UserProfile.vue":"8","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue":"9","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Leaderboard.vue":"10","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Header.vue":"11"},{"size":420,"mtime":1750175162366,"results":"12","hashOfConfig":"13"},{"size":1004,"mtime":1750128639386,"results":"14","hashOfConfig":"13"},{"size":1555,"mtime":1750147385472,"results":"15","hashOfConfig":"13"},{"size":5735,"mtime":1750130209089,"results":"16","hashOfConfig":"13"},{"size":4492,"mtime":1750147385471,"results":"17","hashOfConfig":"13"},{"size":26829,"mtime":1750130209088,"results":"18","hashOfConfig":"13"},{"size":3647,"mtime":1750147385470,"results":"19","hashOfConfig":"13"},{"size":11652,"mtime":1750130209090,"results":"20","hashOfConfig":"13"},{"size":16278,"mtime":1750176402240,"results":"21","hashOfConfig":"13"},{"size":13225,"mtime":1750128639387,"results":"22","hashOfConfig":"13"},{"size":4152,"mtime":1750147491182,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i331ru",{"filePath":"26","messages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\main.js",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\App.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\router.js",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Home.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Register.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Game.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Login.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\UserProfile.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Leaderboard.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Header.vue",[]] \ No newline at end of file +[{"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\main.js":"1","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\App.vue":"2","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\router.js":"3","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Home.vue":"4","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Register.vue":"5","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Game.vue":"6","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Login.vue":"7","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\UserProfile.vue":"8","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue":"9","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Leaderboard.vue":"10","D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Header.vue":"11"},{"size":407,"mtime":1750159657634,"results":"12","hashOfConfig":"13"},{"size":1004,"mtime":1750128639386,"results":"14","hashOfConfig":"13"},{"size":1555,"mtime":1750147385472,"results":"15","hashOfConfig":"13"},{"size":5735,"mtime":1750130209089,"results":"16","hashOfConfig":"13"},{"size":4492,"mtime":1750147385471,"results":"17","hashOfConfig":"13"},{"size":26829,"mtime":1750130209088,"results":"18","hashOfConfig":"13"},{"size":3647,"mtime":1750147385470,"results":"19","hashOfConfig":"13"},{"size":11652,"mtime":1750130209090,"results":"20","hashOfConfig":"13"},{"size":16278,"mtime":1750130209087,"results":"21","hashOfConfig":"13"},{"size":13225,"mtime":1750128639387,"results":"22","hashOfConfig":"13"},{"size":4152,"mtime":1750147491182,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i331ru",{"filePath":"26","messages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\main.js",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\App.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\router.js",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Home.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Register.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Game.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Login.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\UserProfile.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\ChatRoom.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Leaderboard.vue",[],"D:\\学习\\网络应用程序开发\\pdf\\goldminer\\frontend\\src\\components\\Header.vue",[]] \ No newline at end of file diff --git a/goldminer/start.bat b/goldminer/start.bat index 4e460151..a5f27312 100644 --- a/goldminer/start.bat +++ b/goldminer/start.bat @@ -65,7 +65,7 @@ echo =================================== echo Starting Backend Server... echo Backend will listen on all network interfaces (0.0.0.0:5000) echo =================================== -python app.py +python -c "from app import socketio, app; socketio.run(app, host='0.0.0.0', port=5000, debug=True)" pause if "%1"=="" goto menu exit /b