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
手机号输入邮箱,用两个邮箱登录加好友(加好友是输入用户名加)后就可以相互发消息