style: 设置页面添加紫色背景

This commit is contained in:
2026-06-03 13:44:40 +08:00
parent 55ce8b83eb
commit 5c7f7a9c4e
3 changed files with 25 additions and 1 deletions
+24
View File
@@ -14,6 +14,9 @@
</template>
<!-- <Agreement /> -->
<view class="theme-ai pages">
<view v-if="purple_bg" class="full-bg">
<image class="full-bg__img" src="/static/bg.jpg" mode="aspectFill" />
</view>
<view class="card1 w100">
<image v-if="pink_bg" class="w100" :src="$ygUrl + 'transparent_bg.png'" mode="" />
</view>
@@ -83,6 +86,10 @@
type: Boolean,
default: true,
},
purple_bg: {
type: Boolean,
default: false,
},
});
let height = ref(0);
let sysInfo = uni.getSystemInfoSync();
@@ -119,15 +126,32 @@
overflow: hidden;
}
.full-bg {
position: fixed;
inset: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
.full-bg__img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.card1 {
position: fixed;
top: 0;
left: 0;
z-index: 1;
}
.scon {
position: relative;
overflow-y: auto;
z-index: 2;
}
.s-con {