This commit is contained in:
2025-12-09 09:58:25 +08:00
parent ade83bf8d5
commit 7e4fd94817
44 changed files with 1548 additions and 774 deletions
@@ -309,7 +309,6 @@ layout("/layouts/v4/baseLayout.html"){
},
methods: {
menuSelect(index, indexPath) {
debugger
try {
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
window.sessionStorage.setItem("zhgh_sub_app_left_menu_active_index-" + app.id, index)
@@ -319,7 +318,6 @@ layout("/layouts/v4/baseLayout.html"){
},
// 获取菜单
getMenus(appId) {
debugger
if (!appId) return
this.$axios.post("/platform/sys/user/subAppMenus", {appId}).then((res) => {
if (res.code === 0) {
@@ -334,7 +332,6 @@ layout("/layouts/v4/baseLayout.html"){
// 设置应用信息
setAppInfo(app) {
debugger
if (app) {
// 储存到缓存
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
@@ -350,13 +347,10 @@ layout("/layouts/v4/baseLayout.html"){
},
// 菜单回显
echoMenus() {
debugger
try {
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id)
this.openedMenus = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app_left_menu_opens-" + app.id)) || []
console.log(this.openedMenus)
console.log(this.activeMenuIndex)
// !this.activeMenuIndex &&
if ('/platform/v4/subApp' === getBaseSubAppPath()) {
@@ -371,7 +365,6 @@ layout("/layouts/v4/baseLayout.html"){
// 地址选中
hrefSelect() {
debugger
function findMenuPath(menus, targetHref) {
function search(items, path) {
for (const item of items) {
@@ -451,7 +444,6 @@ layout("/layouts/v4/baseLayout.html"){
},
init() {
debugger
// 页面加载时获取到正确的菜单
const pathname = window.location.pathname
if (!pathname.startsWith("/platform/v4/subApp")) {
@@ -217,7 +217,6 @@
this.subscribers.get(type).add(callback)
setTimeout(() => {
console.log(this.ws.readyState)
// 所有订阅完成后,发送 join 消息
if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) {
this.isSubscribed = true
@@ -149,8 +149,8 @@
}
connect() {
//const WS_URL = window.location.host + "${base}/websocket"
const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket"
const WS_URL = window.location.host + "${base}/websocket"
// const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket"
const protocol = window.location.protocol === "http:" ? "ws://" : "wss://"
this.ws = new WebSocket(protocol + WS_URL)
}
@@ -163,7 +163,6 @@
this.subscribers.get(type).add(callback)
setTimeout(() => {
console.log(this.ws.readyState)
// 所有订阅完成后,发送 join 消息
if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) {
this.isSubscribed = true