From 855deb4dfb6458a1eed217363625b13d58143f58 Mon Sep 17 00:00:00 2001 From: web <candymxq888@outlook.com> Date: 星期三, 30 四月 2025 15:33:32 +0800 Subject: [PATCH] fix:修改图片地址,路由懒加载 --- src/views/screen/flow/home/index.vue | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/views/screen/flow/home/index.vue b/src/views/screen/flow/home/index.vue index dfbc0b7..5b38f63 100644 --- a/src/views/screen/flow/home/index.vue +++ b/src/views/screen/flow/home/index.vue @@ -6,7 +6,7 @@ <div class="point-address" @click="handleShow(index)"></div> <div class="point-message" v-show="item.showMsg"> <div class="msg-box"> - <div class="video-box" :style="{backgroundImage: `url(${item.imageRul})`}"> + <div class="video-box" :style="{backgroundImage: `url(${imgBaseUrl + item.imageRul})`}" @click="jumpMonitor(item.id)"> <el-icon><VideoPlay /></el-icon> </div> <div class="info-box"> @@ -44,6 +44,9 @@ <script setup> import {ref, onMounted} from "vue"; import {getHomePonit} from '@/api/screen/home/index.js' +import {useRouter} from "vue-router"; +const router = useRouter(); +const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL; // 标点配置 const config = [ @@ -73,6 +76,11 @@ } }) }) +} + +// 跳转监控点 +const jumpMonitor = (id) => { + router.push({ path: `/flow/graphic/${id}` }) } const handleShow = (index) => { @@ -136,6 +144,8 @@ line-height: 138px; text-align: center; font-size: 38px; + background-repeat: no-repeat; + background-size: cover; } .info-box{ height: 100%; -- Gitblit v1.9.3