官方文檔
https://gitcode.com/gh_mirrors/vuechat7/vue-chat.git
npm install
?可能需要用 npm 下載兩個包
"viewerjs": "^1.9.0",
"vue-hot-reload-api": "^2.3.4",
src\constant\index.js 改下面兩行
export const LOGIN_API = "/login";
export const SNED_VERIFY_CODE_API = "/send_code";
src\page\login\login.vue 刪除兩處手機驗證邏輯
this.$message.error('請輸入正確的手機號');
nginx 配置
server {listen 8086;server_name localhost;location / {proxy_pass http://localhost:9080;}location /login {proxy_pass https://backend-http.fsharechat.cn/login; # 后端地址和端口proxy_set_header Host "backend-http.fsharechat.cn";proxy_set_header Origin "https://web.fsharechat.cn";proxy_set_header Referer "https://web.fsharechat.cn";proxy_set_header Connection "keep-alive";proxy_set_header Cookie $http_cookie;}location /send_code {proxy_pass https://backend-http.fsharechat.cn/send_code; # 后端地址和端口proxy_set_header Host "backend-http.fsharechat.cn";proxy_set_header Origin "https://web.fsharechat.cn";proxy_set_header Referer "https://web.fsharechat.cn";proxy_set_header Connection "keep-alive";proxy_set_header Cookie $http_cookie;}}
因為現在只允許郵箱登錄,啟動項目
npm run dev
手機號輸入郵箱,用兩個郵箱登錄加好友(加好友是輸入用戶名加)后就可以相互發消息