feat: 修复工作台卡片背景图并调整水印展示

This commit is contained in:
2026-10-08 18:22:17 +08:00
parent 8243a82aa7
commit 9e70b4a1f3
6 changed files with 27 additions and 6 deletions
+27 -6
View File
@@ -26,7 +26,8 @@
hover-class="menu-card--active"
@click="navTo(item.url)"
>
<image class="card-background" :src="item.backgroundImage" mode="aspectFill"></image>
<image class="card-background" :src="staticSrc(item.backgroundImage)" mode="aspectFit"></image>
<view class="card-scrim"></view>
<text class="card-mark">“</text>
<view class="card-content">
<view class="card-title">{{ item.name }}</view>
@@ -147,6 +148,13 @@ export default {
}
},
methods: {
staticSrc(path) {
let base = '';
// #ifdef H5
base = (process.env.BASE_URL || '/').replace(/\/$/, '');
// #endif
return `${base}${path}`;
},
// 自定义扫码处理回调 - 处理本页面特有的扫码逻辑
handleScanCode(scanResult) {
console.log('工作台-扫码结果:', scanResult);
@@ -327,16 +335,29 @@ page {
.card-background {
position: absolute;
z-index: 0;
top: 18rpx;
right: -4rpx;
width: 150rpx;
height: 120rpx;
opacity: 0.72;
pointer-events: none;
}
.card-scrim {
position: absolute;
z-index: 1;
top: 0;
right: 0;
width: 100%;
height: 100%;
opacity: 0.72;
bottom: 0;
left: 0;
background: linear-gradient(105deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.02) 58%);
pointer-events: none;
}
.card-mark {
position: absolute;
z-index: 2;
top: 10rpx;
left: 18rpx;
color: rgba(255, 255, 255, 0.2);
@@ -348,7 +369,7 @@ page {
.card-content {
position: absolute;
z-index: 1;
z-index: 2;
right: 16rpx;
bottom: 42rpx;
left: 22rpx;
@@ -374,7 +395,7 @@ page {
.card-arrow {
position: absolute;
z-index: 2;
z-index: 3;
right: 0;
bottom: 0;
display: flex;