mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
fix: fixed bug for ssl websocket url
This commit is contained in:
@@ -234,7 +234,8 @@ if (!user.value) {
|
||||
loadChats();
|
||||
// 创建新的会话
|
||||
newChat();
|
||||
}).catch(() => {
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
ElMessage.error('获取聊天角色失败')
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -421,7 +422,7 @@ const connect = function (chat_id, role_id) {
|
||||
const _sessionId = getSessionId();
|
||||
let host = process.env.VUE_APP_WS_HOST
|
||||
if (host === '') {
|
||||
if (location.protocol === 'https') {
|
||||
if (location.protocol === 'https:') {
|
||||
host = 'wss://'+location.host;
|
||||
} else {
|
||||
host = 'ws://'+location.host;
|
||||
|
||||
@@ -50,8 +50,8 @@ import {useRouter} from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const title = ref('ChatGPT Plus 用户登录');
|
||||
const username = ref('geekmaster');
|
||||
const password = ref('12345678');
|
||||
const username = ref(process.env.VUE_APP_USER);
|
||||
const password = ref(process.env.VUE_APP_PASS);
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('keyup', (e) => {
|
||||
|
||||
Reference in New Issue
Block a user