修改Socket路径问题
This commit is contained in:
@@ -4744,17 +4744,17 @@ window.BMAP_AUTHENTIC_KEY = ''
|
|||||||
Ka.prototype.pc = function (a, b) {
|
Ka.prototype.pc = function (a, b) {
|
||||||
if (a instanceof tc && b instanceof J) {
|
if (a instanceof tc && b instanceof J) {
|
||||||
var c = this.R
|
var c = this.R
|
||||||
c.Nm
|
c.Nm:(c.Nm.bS = 1))
|
||||||
? c.Nm.sa(b)
|
// ? c.Nm.sa(b)
|
||||||
: ((c.Nm = new U(b, {
|
// : ((c.Nm = new U(b, {
|
||||||
icon: new qc(G.qa + 'blank.gif', {
|
// icon: new qc(G.qa + 'blank.gif', {
|
||||||
width: 1,
|
// width: 1,
|
||||||
height: 1
|
// height: 1
|
||||||
}),
|
// }),
|
||||||
offset: new O(0, 0),
|
// offset: new O(0, 0),
|
||||||
clickable: t
|
// clickable: t
|
||||||
})),
|
// })),
|
||||||
(c.Nm.bS = 1))
|
// (c.Nm.bS = 1))
|
||||||
this.Ga(c.Nm)
|
this.Ga(c.Nm)
|
||||||
c.Nm.pc(a)
|
c.Nm.pc(a)
|
||||||
}
|
}
|
||||||
@@ -5886,7 +5886,7 @@ window.BMAP_AUTHENTIC_KEY = ''
|
|||||||
Qc.prototype.co = function () {
|
Qc.prototype.co = function () {
|
||||||
this.Gb.src =
|
this.Gb.src =
|
||||||
0 < z.ca.ia && 6 >= z.ca.ia && this.GJ
|
0 < z.ca.ia && 6 >= z.ca.ia && this.GJ
|
||||||
? G.qa + 'blank.gif'
|
?'' //G.qa + 'blank.gif'
|
||||||
: '' !== this.src && this.Gb.src == this.src
|
: '' !== this.src && this.Gb.src == this.src
|
||||||
? this.src + '&t = ' + Date.now()
|
? this.src + '&t = ' + Date.now()
|
||||||
: this.src
|
: this.src
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|||||||
import useSetTheme from '@/utils/setTheme'
|
import useSetTheme from '@/utils/setTheme'
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
useSetTheme()
|
useSetTheme()
|
||||||
onMounted(async () => {
|
const fetchMqttUrl = async () => {
|
||||||
const response = await fetch('/')
|
const response = await fetch('/')
|
||||||
const WebSocketUrl: any = response.headers.get('X-WebSocket-Url')
|
const WebSocketUrl: any = response.headers.get('X-WebSocket-Url')
|
||||||
const WebSocketUrl2: any = response.headers.get('X-WebSocket-Url2')
|
const WebSocketUrl2: any = response.headers.get('X-WebSocket-Url2')
|
||||||
@@ -19,6 +19,10 @@ onMounted(async () => {
|
|||||||
localStorage.setItem('WebSocketUrl2', WebSocketUrl2)
|
localStorage.setItem('WebSocketUrl2', WebSocketUrl2)
|
||||||
localStorage.setItem('WebSocketUrl3', WebSocketUrl3)
|
localStorage.setItem('WebSocketUrl3', WebSocketUrl3)
|
||||||
localStorage.setItem('MqttUrl', MqttUrl)
|
localStorage.setItem('MqttUrl', MqttUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
fetchMqttUrl()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if='!VITE_FLAG' @keyup.enter="onSubmit(formRef)">
|
<div v-if="!VITE_FLAG" @keyup.enter="onSubmit(formRef)">
|
||||||
<div @contextmenu.stop="" id="bubble" class="bubble">
|
<div @contextmenu.stop="" id="bubble" class="bubble">
|
||||||
<canvas id="bubble-canvas" class="bubble-canvas"></canvas>
|
<canvas id="bubble-canvas" class="bubble-canvas"></canvas>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,8 +115,20 @@ const focusInput = () => {
|
|||||||
passwordRef.value!.focus()
|
passwordRef.value!.focus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const fetchMqttUrl = async () => {
|
||||||
|
const response = await fetch('/')
|
||||||
|
const WebSocketUrl: any = response.headers.get('X-WebSocket-Url')
|
||||||
|
const WebSocketUrl2: any = response.headers.get('X-WebSocket-Url2')
|
||||||
|
const WebSocketUrl3: any = response.headers.get('X-WebSocket-Url3')
|
||||||
|
const MqttUrl: any = response.headers.get('X-MqttUrl-Url')
|
||||||
|
localStorage.setItem('WebSocketUrl', WebSocketUrl)
|
||||||
|
localStorage.setItem('WebSocketUrl2', WebSocketUrl2)
|
||||||
|
localStorage.setItem('WebSocketUrl3', WebSocketUrl3)
|
||||||
|
localStorage.setItem('MqttUrl', MqttUrl)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
fetchMqttUrl()
|
||||||
if (VITE_FLAG) {
|
if (VITE_FLAG) {
|
||||||
LNonSubmit()
|
LNonSubmit()
|
||||||
}
|
}
|
||||||
@@ -215,7 +227,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
const LNonSubmit = async () => {
|
const LNonSubmit = async () => {
|
||||||
// 先检查是否是 CAS 回调
|
// 先检查是否是 CAS 回调
|
||||||
if (handleCasCallback()) {
|
if (handleCasCallback()) {
|
||||||
console.log("进入回调")
|
console.log('进入回调')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 没有 token,触发 CAS 登录流程
|
// 没有 token,触发 CAS 登录流程
|
||||||
@@ -237,10 +249,11 @@ const handleCasCallback = () => {
|
|||||||
// 清理 URL 中的 flag 参数,防止刷新重复触发
|
// 清理 URL 中的 flag 参数,防止刷新重复触发
|
||||||
const cleanHash = hash.substring(0, queryIndex)
|
const cleanHash = hash.substring(0, queryIndex)
|
||||||
window.history.replaceState(null, '', cleanHash)
|
window.history.replaceState(null, '', cleanHash)
|
||||||
if(hashParams && hashParams.get("flag") == 1){
|
if (hashParams && hashParams.get('flag') == 1) {
|
||||||
state.submitLoading = true
|
state.submitLoading = true
|
||||||
let data = {clientId:"njcn",clientSecret:"njcnpqs"}
|
let data = { clientId: 'njcn', clientSecret: 'njcnpqs' }
|
||||||
loginLNqr(data).then(res => {
|
loginLNqr(data)
|
||||||
|
.then(res => {
|
||||||
//拿到token了,可以正常操作页面
|
//拿到token了,可以正常操作页面
|
||||||
userInfo.dataFill(res.data)
|
userInfo.dataFill(res.data)
|
||||||
state.submitLoading = false
|
state.submitLoading = false
|
||||||
@@ -250,9 +263,9 @@ const handleCasCallback = () => {
|
|||||||
router.push({
|
router.push({
|
||||||
path: '/'
|
path: '/'
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}).catch(err => {
|
.catch(err => {
|
||||||
console.log("---------")
|
console.log('---------')
|
||||||
console.log(err)
|
console.log(err)
|
||||||
state.submitLoading = false
|
state.submitLoading = false
|
||||||
})
|
})
|
||||||
@@ -418,5 +431,3 @@ defineExpose({ VITE_FLAG })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user