1.增加网络判断刷新页面,防止没网无法连接ws

2.商品增加上下架、售罄、修改库存登操作
This commit is contained in:
gyq
2024-08-13 16:00:13 +08:00
parent 0f522fa9d2
commit e4a82411ba
9 changed files with 526 additions and 250 deletions

View File

@@ -1,10 +1,10 @@
<template>
<div class="left_menu_wrap">
<div class="item" :class="{ online: socketStore.online }" @click="connectWsHandle">
<div class="item first" :class="{ online: socketStore.online }" @click="connectWsHandle">
<el-icon class="icon">
<Monitor />
</el-icon>
<el-text :type="socketStore.online ? 'success' : ''">
<el-text :type="socketStore.online ? 'success' : 'danger'">
<template v-if="socketStore.online">
在线
</template>
@@ -106,7 +106,7 @@ function openCall() {
// 手动重新连接ws
function connectWsHandle() {
if (socketStore.online) return
window.onload()
location.reload()
}
defineExpose({