monkDetail页面优化
This commit is contained in:
parent
8e39137f61
commit
295b15958a
|
|
@ -1,45 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="monk-detail-page">
|
<view class="page">
|
||||||
<!-- 背景图 -->
|
|
||||||
<image class="bg-image" src="https://api.ccttiot.com/smartmeter/img/static/uz3vQk44WkGnJPVjKrw1"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
|
|
||||||
<custom-navbar title="高僧详情" />
|
<custom-navbar title="高僧详情" />
|
||||||
|
<image class="background-image" :src="CommonEnum.BACKGROUND" mode="aspectFill"></image>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image class="background-image" :src="CommonEnum.BACKGROUND" mode="aspectFill"></image>
|
|
||||||
<image class="monk-image" :src="monkInfo.imgUrl" mode="aspectFill"></image>
|
<image class="monk-image" :src="monkInfo.imgUrl" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 导航标签 -->
|
<view class="body">
|
||||||
<view class="nav-tabs">
|
<!-- 导航标签 -->
|
||||||
<view
|
<view class="nav-tabs">
|
||||||
v-for="(tab, index) in tabs"
|
<view
|
||||||
:key="index"
|
v-for="(tab, index) in tabs"
|
||||||
class="nav-tab"
|
:key="index"
|
||||||
:class="{ active: activeTab === index }"
|
class="nav-tab"
|
||||||
@click="switchTab(index)"
|
:class="{ active: activeTab === index }"
|
||||||
>
|
@click="switchTab(index)"
|
||||||
{{ tab.title }}
|
>
|
||||||
|
{{ tab.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 内容区域 -->
|
||||||
|
<view class="detail-section">
|
||||||
|
<view class="section-title">
|
||||||
|
{{ tabs[activeTab].title }}
|
||||||
|
</view>
|
||||||
|
<view class="monk-basic" v-if="activeTab === 0">
|
||||||
|
<text class="monk-name">{{ monkInfo.name}}</text>
|
||||||
|
<view class="duties-wrapper">
|
||||||
|
<text class="monk-duties">{{ monkInfo.duties || '暂无记录' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="section-content" v-html="tabs[activeTab].content"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
|
||||||
<view class="detail-section">
|
|
||||||
<view class="section-title">
|
|
||||||
{{ tabs[activeTab].title }}
|
|
||||||
</view>
|
|
||||||
<view class="monk-basic" v-if="activeTab === 0">
|
|
||||||
<text class="monk-name">{{ monkInfo.name }}</text>
|
|
||||||
<view class="duties-wrapper">
|
|
||||||
<text class="monk-duties">{{ monkInfo.duties }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="section-content" v-html="tabs[activeTab].content"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -138,10 +140,12 @@ export default {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monk-detail-page {
|
.page {
|
||||||
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
position: relative;
|
background: transparent; /* 透明背景,让背景图片显示 */
|
||||||
background-color: rgba(255, 255, 255, 0.95);
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
/* 移除padding-top,因为导航栏已经处理了状态栏适配 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-image {
|
.bg-image {
|
||||||
|
|
@ -160,6 +164,14 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.body{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #FAF8F3; /* 浅米色背景 */
|
||||||
|
}
|
||||||
.content {
|
.content {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -173,11 +185,11 @@ export default {
|
||||||
.monk-image {
|
.monk-image {
|
||||||
width: 660rpx;
|
width: 660rpx;
|
||||||
height: 290rpx;
|
height: 290rpx;
|
||||||
background: #D8D8D8;
|
background: #D8D8D8; /* 灰色占位背景 */
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 20rpx auto;
|
margin: 20rpx auto;
|
||||||
border: 20px darkviolet;
|
border: 20px darkviolet; /* 紫色边框 */
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,7 +197,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
background-color: rgba(255, 255, 255, 0.95);
|
background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
backdrop-filter: blur(10rpx);
|
backdrop-filter: blur(10rpx);
|
||||||
|
|
@ -195,7 +207,7 @@ export default {
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
border: 4rpx solid #695347;
|
border: 4rpx solid #695347; /* 深棕色边框 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -205,22 +217,22 @@ export default {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.monk-name {
|
.monk-name {
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #695347;
|
color: #695347; /* 深棕色文字 */
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monk-duties {
|
.monk-duties {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #8B7355;
|
color: #8B7355; /* 中棕色文字 */
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.duties-wrapper {
|
.duties-wrapper {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5; /* 浅灰色背景 */
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
padding: 8rpx 16rpx;
|
padding: 8rpx 16rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
|
@ -230,19 +242,19 @@ export default {
|
||||||
|
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
background-color: rgba(255, 255, 255, 0.95);
|
//background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0; /* 增加左右内边距,让tab之间有更多空间 */
|
||||||
margin: 20rpx;
|
margin: 20rpx 0;
|
||||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
//box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); /* 黑色阴影 */
|
||||||
backdrop-filter: blur(10rpx);
|
backdrop-filter: blur(10rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab {
|
.nav-tab {
|
||||||
padding: 15rpx 25rpx;
|
padding: 15rpx 38rpx; /* 增加左右内边距,让tab之间有更多间距 */
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666; /* 灰色文字 */
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
@ -256,7 +268,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab.active {
|
.nav-tab.active {
|
||||||
color: #695347;
|
color: #695347; /* 深棕色文字(激活状态) */
|
||||||
//background-color: rgba(105, 83, 71, 0.1);
|
//background-color: rgba(105, 83, 71, 0.1);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
/* 移除点击反馈效果 */
|
/* 移除点击反馈效果 */
|
||||||
|
|
@ -274,12 +286,12 @@ export default {
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 60%;
|
width: 60%;
|
||||||
height: 4rpx;
|
height: 4rpx;
|
||||||
background-color: #695347;
|
background-color: #695347; /* 深棕色下划线(激活状态) */
|
||||||
border-radius: 2rpx;
|
border-radius: 2rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-section {
|
.detail-section {
|
||||||
background-color: rgba(255, 255, 255, 0.95);
|
//background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
@ -288,9 +300,9 @@ export default {
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #695347;
|
color: #695347; /* 深棕色文字 */
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
border-left: 6rpx solid #695347;
|
border-left: 6rpx solid #695347; /* 深棕色左边框 */
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -304,7 +316,7 @@ export default {
|
||||||
|
|
||||||
.section-content {
|
.section-content {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666; /* 灰色文字 */
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user