过滤高僧,法师文章内容背景色样式

This commit is contained in:
WindowBird 2025-09-18 16:21:16 +08:00
parent 5a340d574b
commit 909d6a8470
2 changed files with 529 additions and 495 deletions

View File

@ -5,19 +5,23 @@
<view class="container"> <view class="container">
<view class="header"> <view class="header">
<view class="content"> <view class="content">
<image class="monk-image" :src="monkInfo.imgUrl" mode="aspectFill"></image> <image
:src="monkInfo.imgUrl"
class="monk-image"
mode="aspectFill"
></image>
</view> </view>
</view> </view>
</view> </view>
<view class="body" :style="{ backgroundColor: CommonEnum.BASE_COLOR }"> <view :style="{ backgroundColor: CommonEnum.BASE_COLOR }" class="body">
<!-- 导航标签 --> <!-- 导航标签 -->
<view class="nav-tabs"> <view class="nav-tabs">
<view <view
v-for="(tab, index) in tabs" v-for="(tab, index) in tabs"
:key="index" :key="index"
class="nav-tab"
:class="{ active: activeTab === index }" :class="{ active: activeTab === index }"
class="nav-tab"
@click="switchTab(index)" @click="switchTab(index)"
> >
{{ tab.title }} {{ tab.title }}
@ -29,10 +33,10 @@
<view class="section-title"> <view class="section-title">
{{ tabs[activeTab].title }} {{ tabs[activeTab].title }}
</view> </view>
<view class="monk-basic" v-if="activeTab === 0"> <view v-if="activeTab === 0" class="monk-basic">
<text class="monk-name">{{ monkInfo.name }}</text> <text class="monk-name">{{ monkInfo.name }}</text>
<view class="duties-wrapper"> <view class="duties-wrapper">
<text class="monk-duties">{{ monkInfo.duties || '暂无记录' }}</text> <text class="monk-duties">{{ monkInfo.duties || "暂无记录" }}</text>
</view> </view>
</view> </view>
<view class="section-content" v-html="tabs[activeTab].content"></view> <view class="section-content" v-html="tabs[activeTab].content"></view>
@ -42,277 +46,290 @@
</template> </template>
<script> <script>
import CommonEnum from '../../enum/common' import CommonEnum from "../../enum/common";
import MonkEnum from '../../enum/monk' import MonkEnum from "../../enum/monk";
import { getMonkDetail } from '../../api/monk/monkDetail.js' import { getMonkDetail } from "../../api/monk/monkDetail.js";
import CustomNavbar from '../../components/custom-navbar/custom-navbar.vue' import CustomNavbar from "../../components/custom-navbar/custom-navbar.vue";
import BaseBackground from '../../components/base-background/base-background.vue' import BaseBackground from "../../components/base-background/base-background.vue";
export default { export default {
components: { components: {
CustomNavbar, CustomNavbar,
BaseBackground, BaseBackground,
},
computed: {
MonkEnum() {
return MonkEnum;
}, },
computed: { CommonEnum() {
MonkEnum() { return CommonEnum;
return MonkEnum
},
CommonEnum() {
return CommonEnum
},
}, },
data() { },
return { data() {
activeTab: 0, // return {
tabs: [], activeTab: 0, //
monkInfo: {}, tabs: [],
} monkInfo: {},
};
},
onLoad() {
let id = uni.getStorageSync("abbotId");
//
if (id) {
this.fetchMonkDetail(id);
}
},
methods: {
//
switchTab(index) {
this.activeTab = index;
}, },
onLoad() { //
let id = uni.getStorageSync('abbotId') async fetchMonkDetail(monkId) {
// console.log("开始获取高僧详情, monkId:", monkId);
if (id) {
this.fetchMonkDetail(id)
}
},
methods: {
//
switchTab(index) {
this.activeTab = index
},
//
async fetchMonkDetail(monkId) {
console.log('开始获取高僧详情, monkId:', monkId)
try { try {
const res = await getMonkDetail(monkId) const res = await getMonkDetail(monkId);
console.log('高僧详情API响应:', res) console.log("高僧详情API响应:", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
this.monkInfo = res.data this.monkInfo = res.data;
// //
this.updateTabsContent() this.updateTabsContent();
console.log('高僧详情加载完成:', this.monkInfo) console.log("高僧详情加载完成:", this.monkInfo);
} else { } else {
console.error('API响应异常:', res) console.error("API响应异常:", res);
uni.showToast({
title: res.msg || '获取详情失败',
icon: 'none',
})
}
} catch (error) {
console.error('获取高僧详情失败:', error)
uni.showToast({ uni.showToast({
title: '网络错误', title: res.msg || "获取详情失败",
icon: 'none', icon: "none",
}) });
} }
}, } catch (error) {
// console.error("获取高僧详情失败:", error);
updateTabsContent() { uni.showToast({
this.tabs = [ title: "网络错误",
{ icon: "none",
title: '人物简介', });
content: this.monkInfo.profile || '暂无简介', }
},
{
title: '人物经历',
content: this.monkInfo.experience || '暂无经历',
},
{
title: '慈善事迹',
content: this.monkInfo.deeds || '暂无事迹',
},
{
title: '寺庙贡献',
content: this.monkInfo.contribution || '暂无贡献',
},
]
},
}, },
} //
updateTabsContent() {
this.tabs = [
{
title: "人物简介",
content:
this.monkInfo.profile.replace(/background-color:[^;"]*;?/g, "") ||
"暂无简介",
},
{
title: "人物经历",
content:
this.monkInfo.experience.replace(
/background-color:[^;"]*;?/g,
"",
) || "暂无经历",
},
{
title: "慈善事迹",
content:
this.monkInfo.deeds.replace(/background-color:[^;"]*;?/g, "") ||
"暂无事迹",
},
{
title: "寺庙贡献",
content:
this.monkInfo.contribution.replace(
/background-color:[^;"]*;?/g,
"",
) || "暂无贡献",
},
];
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: transparent; /* 透明背景,让背景图片显示 */ background: transparent; /* 透明背景,让背景图片显示 */
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
/* 移除padding-top因为导航栏已经处理了状态栏适配 */ /* 移除padding-top因为导航栏已经处理了状态栏适配 */
} }
.bg-image { .bg-image {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: -1; z-index: -1;
} }
.header { .header {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.body { .body {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
//background-color: v-bind('CommonEnum.BASE_COLOR'); /* 使 */ //background-color: v-bind('CommonEnum.BASE_COLOR'); /* 使 */
} }
.content {
padding: 20rpx;
position: relative;
z-index: 1;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.monk-image { .content {
width: 660rpx; padding: 20rpx;
height: 290rpx; position: relative;
background: #d8d8d8; /* 灰色占位背景 */ z-index: 1;
border-radius: 12rpx 12rpx 12rpx 12rpx; width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.monk-image {
width: 660rpx;
height: 290rpx;
background: #d8d8d8; /* 灰色占位背景 */
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: block;
margin: 20rpx auto;
border: 20px darkviolet; /* 紫色边框 */
object-fit: cover;
}
.monk-info {
display: flex;
align-items: center;
padding: 30rpx;
background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
border-radius: 16rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.monk-avatar {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
margin-right: 30rpx;
border: 4rpx solid #695347; /* 深棕色边框 */
}
}
.monk-basic {
flex: 1;
.monk-name {
font-size: 48rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
display: block; display: block;
margin: 20rpx auto; margin-bottom: 10rpx;
border: 20px darkviolet; /* 紫色边框 */
object-fit: cover;
} }
.monk-info { .monk-duties {
font-size: 28rpx;
color: #8b7355; /* 中棕色文字 */
display: block;
}
.duties-wrapper {
display: inline-block;
background-color: #f5f5f5; /* 浅灰色背景 */
border-radius: 8rpx;
padding: 8rpx 16rpx;
margin-top: 10rpx;
}
}
.nav-tabs {
display: flex;
justify-content: space-between;
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 10rpx 0; /* 增加左右内边距让tab之间有更多空间 */
margin: 20rpx 0;
//box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); /* */
backdrop-filter: blur(10rpx);
}
.nav-tab {
padding: 15rpx 38rpx; /* 增加左右内边距让tab之间有更多间距 */
font-size: 28rpx;
color: #666; /* 灰色文字 */
font-weight: 500;
border-radius: 10rpx;
transition: all 0.3s ease;
position: relative;
cursor: pointer;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active {
color: #695347; /* 深棕色文字(激活状态) */
//background-color: rgba(105, 83, 71, 0.1);
font-weight: bold;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active::after {
content: "";
position: absolute;
bottom: -2rpx;
left: 50%;
transform: translateX(-50%);
width: 60%;
height: 4rpx;
background-color: #695347; /* 深棕色下划线(激活状态) */
border-radius: 2rpx;
}
.detail-section {
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
margin-bottom: 20rpx;
border-left: 6rpx solid #695347; /* 深棕色左边框 */
padding-left: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 30rpx;
background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
border-radius: 16rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.monk-avatar { .title-icon {
width: 120rpx; width: 24rpx;
height: 120rpx; height: 24rpx;
border-radius: 60rpx; margin-right: 10rpx;
margin-right: 30rpx;
border: 4rpx solid #695347; /* 深棕色边框 */
} }
} }
.monk-basic { .section-content {
flex: 1;
.monk-name {
font-size: 48rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
display: block;
margin-bottom: 10rpx;
}
.monk-duties {
font-size: 28rpx;
color: #8b7355; /* 中棕色文字 */
display: block;
}
.duties-wrapper {
display: inline-block;
background-color: #f5f5f5; /* 浅灰色背景 */
border-radius: 8rpx;
padding: 8rpx 16rpx;
margin-top: 10rpx;
}
}
.nav-tabs {
display: flex;
justify-content: space-between;
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 10rpx 0; /* 增加左右内边距让tab之间有更多空间 */
margin: 20rpx 0;
//box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); /* */
backdrop-filter: blur(10rpx);
}
.nav-tab {
padding: 15rpx 38rpx; /* 增加左右内边距让tab之间有更多间距 */
font-size: 28rpx; font-size: 28rpx;
color: #666; /* 灰色文字 */ color: #666; /* 灰色文字 */
font-weight: 500; line-height: 1.6;
border-radius: 10rpx;
transition: all 0.3s ease;
position: relative;
cursor: pointer;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active { p {
color: #695347; /* 深棕色文字(激活状态) */ margin-bottom: 16rpx;
//background-color: rgba(105, 83, 71, 0.1);
font-weight: bold;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active::after {
content: '';
position: absolute;
bottom: -2rpx;
left: 50%;
transform: translateX(-50%);
width: 60%;
height: 4rpx;
background-color: #695347; /* 深棕色下划线(激活状态) */
border-radius: 2rpx;
}
.detail-section {
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
margin-bottom: 20rpx;
border-left: 6rpx solid #695347; /* 深棕色左边框 */
padding-left: 20rpx;
display: flex;
align-items: center;
.title-icon {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.section-content {
font-size: 28rpx;
color: #666; /* 灰色文字 */
line-height: 1.6;
p {
margin-bottom: 16rpx;
}
} }
} }
}
</style> </style>

View File

@ -5,19 +5,23 @@
<view class="container"> <view class="container">
<view class="header"> <view class="header">
<view class="content"> <view class="content">
<image class="monk-image" :src="monkInfo.imgUrl" mode="aspectFill"></image> <image
:src="monkInfo.imgUrl"
class="monk-image"
mode="aspectFill"
></image>
</view> </view>
</view> </view>
</view> </view>
<view class="body" :style="{ backgroundColor: CommonEnum.BASE_COLOR }"> <view :style="{ backgroundColor: CommonEnum.BASE_COLOR }" class="body">
<!-- 导航标签 --> <!-- 导航标签 -->
<view class="nav-tabs"> <view class="nav-tabs">
<view <view
v-for="(tab, index) in tabs" v-for="(tab, index) in tabs"
:key="index" :key="index"
class="nav-tab"
:class="{ active: activeTab === index }" :class="{ active: activeTab === index }"
class="nav-tab"
@click="switchTab(index)" @click="switchTab(index)"
> >
{{ tab.title }} {{ tab.title }}
@ -29,10 +33,10 @@
<view class="section-title"> <view class="section-title">
{{ tabs[activeTab].title }} {{ tabs[activeTab].title }}
</view> </view>
<view class="monk-basic" v-if="activeTab === 0"> <view v-if="activeTab === 0" class="monk-basic">
<text class="monk-name">{{ monkInfo.name }}</text> <text class="monk-name">{{ monkInfo.name }}</text>
<view class="duties-wrapper"> <view class="duties-wrapper">
<text class="monk-duties">{{ monkInfo.duties || '暂无记录' }}</text> <text class="monk-duties">{{ monkInfo.duties || "暂无记录" }}</text>
</view> </view>
</view> </view>
<view class="section-content" v-html="tabs[activeTab].content"></view> <view class="section-content" v-html="tabs[activeTab].content"></view>
@ -42,276 +46,289 @@
</template> </template>
<script> <script>
import CommonEnum from '../../enum/common' import CommonEnum from "../../enum/common";
import MonkEnum from '../../enum/monk' import MonkEnum from "../../enum/monk";
import { getMonkDetail } from '../../api/monk/monkDetail.js' import { getMonkDetail } from "../../api/monk/monkDetail.js";
import CustomNavbar from '../../components/custom-navbar/custom-navbar.vue' import CustomNavbar from "../../components/custom-navbar/custom-navbar.vue";
import BaseBackground from '../../components/base-background/base-background.vue' import BaseBackground from "../../components/base-background/base-background.vue";
export default { export default {
components: { components: {
CustomNavbar, CustomNavbar,
BaseBackground, BaseBackground,
},
computed: {
MonkEnum() {
return MonkEnum;
}, },
computed: { CommonEnum() {
MonkEnum() { return CommonEnum;
return MonkEnum
},
CommonEnum() {
return CommonEnum
},
}, },
data() { },
return { data() {
activeTab: 0, // return {
tabs: [], activeTab: 0, //
monkInfo: {}, tabs: [],
} monkInfo: {},
};
},
onLoad(options) {
//
if (options.id) {
this.fetchMonkDetail(options.id);
}
},
methods: {
//
switchTab(index) {
this.activeTab = index;
}, },
onLoad(options) { //
// async fetchMonkDetail(monkId) {
if (options.id) { console.log("开始获取高僧详情, monkId:", monkId);
this.fetchMonkDetail(options.id)
}
},
methods: {
//
switchTab(index) {
this.activeTab = index
},
//
async fetchMonkDetail(monkId) {
console.log('开始获取高僧详情, monkId:', monkId)
try { try {
const res = await getMonkDetail(monkId) const res = await getMonkDetail(monkId);
console.log('高僧详情API响应:', res) console.log("高僧详情API响应:", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
this.monkInfo = res.data this.monkInfo = res.data;
// //
this.updateTabsContent() this.updateTabsContent();
console.log('高僧详情加载完成:', this.monkInfo) console.log("高僧详情加载完成:", this.monkInfo);
} else { } else {
console.error('API响应异常:', res) console.error("API响应异常:", res);
uni.showToast({
title: res.msg || '获取详情失败',
icon: 'none',
})
}
} catch (error) {
console.error('获取高僧详情失败:', error)
uni.showToast({ uni.showToast({
title: '网络错误', title: res.msg || "获取详情失败",
icon: 'none', icon: "none",
}) });
} }
}, } catch (error) {
// console.error("获取高僧详情失败:", error);
updateTabsContent() { uni.showToast({
this.tabs = [ title: "网络错误",
{ icon: "none",
title: '人物简介', });
content: this.monkInfo.profile || '暂无简介', }
},
{
title: '人物经历',
content: this.monkInfo.experience || '暂无经历',
},
{
title: '慈善事迹',
content: this.monkInfo.deeds || '暂无事迹',
},
{
title: '寺庙贡献',
content: this.monkInfo.contribution || '暂无贡献',
},
]
},
}, },
} //
updateTabsContent() {
this.tabs = [
{
title: "人物简介",
content:
this.monkInfo.profile.replace(/background-color:[^;"]*;?/g, "") ||
"暂无简介",
},
{
title: "人物经历",
content:
this.monkInfo.experience.replace(
/background-color:[^;"]*;?/g,
"",
) || "暂无经历",
},
{
title: "慈善事迹",
content:
this.monkInfo.deeds.replace(/background-color:[^;"]*;?/g, "") ||
"暂无事迹",
},
{
title: "寺庙贡献",
content:
this.monkInfo.contribution.replace(
/background-color:[^;"]*;?/g,
"",
) || "暂无贡献",
},
];
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: transparent; /* 透明背景,让背景图片显示 */ background: transparent; /* 透明背景,让背景图片显示 */
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
/* 移除padding-top因为导航栏已经处理了状态栏适配 */ /* 移除padding-top因为导航栏已经处理了状态栏适配 */
} }
.bg-image { .bg-image {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: -1; z-index: -1;
} }
.header { .header {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.body { .body {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
//background-color: v-bind('CommonEnum.BASE_COLOR'); /* 使 */ //background-color: v-bind('CommonEnum.BASE_COLOR'); /* 使 */
} }
.content {
padding: 20rpx;
position: relative;
z-index: 1;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.monk-image { .content {
width: 660rpx; padding: 20rpx;
height: 290rpx; position: relative;
background: #d8d8d8; /* 灰色占位背景 */ z-index: 1;
border-radius: 12rpx 12rpx 12rpx 12rpx; width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.monk-image {
width: 660rpx;
height: 290rpx;
background: #d8d8d8; /* 灰色占位背景 */
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: block;
margin: 20rpx auto;
border: 20px darkviolet; /* 紫色边框 */
object-fit: cover;
}
.monk-info {
display: flex;
align-items: center;
padding: 30rpx;
background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
border-radius: 16rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.monk-avatar {
width: 120rpx;
height: 120rpx;
border-radius: 60rpx;
margin-right: 30rpx;
border: 4rpx solid #695347; /* 深棕色边框 */
}
}
.monk-basic {
flex: 1;
.monk-name {
font-size: 48rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
display: block; display: block;
margin: 20rpx auto; margin-bottom: 10rpx;
border: 20px darkviolet; /* 紫色边框 */
object-fit: cover;
} }
.monk-info { .monk-duties {
font-size: 28rpx;
color: #8b7355; /* 中棕色文字 */
display: block;
}
.duties-wrapper {
display: inline-block;
background-color: #f5f5f5; /* 浅灰色背景 */
border-radius: 8rpx;
padding: 8rpx 16rpx;
margin-top: 10rpx;
}
}
.nav-tabs {
display: flex;
justify-content: space-between;
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 10rpx 0; /* 增加左右内边距让tab之间有更多空间 */
margin: 20rpx 0;
//box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); /* */
backdrop-filter: blur(10rpx);
}
.nav-tab {
padding: 15rpx 38rpx; /* 增加左右内边距让tab之间有更多间距 */
font-size: 28rpx;
color: #666; /* 灰色文字 */
font-weight: 500;
border-radius: 10rpx;
transition: all 0.3s ease;
position: relative;
cursor: pointer;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active {
color: #695347; /* 深棕色文字(激活状态) */
//background-color: rgba(105, 83, 71, 0.1);
font-weight: bold;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active::after {
content: "";
position: absolute;
bottom: -2rpx;
left: 50%;
transform: translateX(-50%);
width: 60%;
height: 4rpx;
background-color: #695347; /* 深棕色下划线(激活状态) */
border-radius: 2rpx;
}
.detail-section {
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
margin-bottom: 20rpx;
border-left: 6rpx solid #695347; /* 深棕色左边框 */
padding-left: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 30rpx;
background-color: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
border-radius: 16rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.monk-avatar { .title-icon {
width: 120rpx; width: 24rpx;
height: 120rpx; height: 24rpx;
border-radius: 60rpx; margin-right: 10rpx;
margin-right: 30rpx;
border: 4rpx solid #695347; /* 深棕色边框 */
} }
} }
.monk-basic { .section-content {
flex: 1;
.monk-name {
font-size: 48rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
display: block;
margin-bottom: 10rpx;
}
.monk-duties {
font-size: 28rpx;
color: #8b7355; /* 中棕色文字 */
display: block;
}
.duties-wrapper {
display: inline-block;
background-color: #f5f5f5; /* 浅灰色背景 */
border-radius: 8rpx;
padding: 8rpx 16rpx;
margin-top: 10rpx;
}
}
.nav-tabs {
display: flex;
justify-content: space-between;
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 10rpx 0; /* 增加左右内边距让tab之间有更多空间 */
margin: 20rpx 0;
//box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); /* */
backdrop-filter: blur(10rpx);
}
.nav-tab {
padding: 15rpx 38rpx; /* 增加左右内边距让tab之间有更多间距 */
font-size: 28rpx; font-size: 28rpx;
color: #666; /* 灰色文字 */ color: #666; /* 灰色文字 */
font-weight: 500; line-height: 1.6;
border-radius: 10rpx;
transition: all 0.3s ease;
position: relative;
cursor: pointer;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active { p {
color: #695347; /* 深棕色文字(激活状态) */ margin-bottom: 16rpx;
//background-color: rgba(105, 83, 71, 0.1);
font-weight: bold;
/* 移除点击反馈效果 */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.nav-tab.active::after {
content: '';
position: absolute;
bottom: -2rpx;
left: 50%;
transform: translateX(-50%);
width: 60%;
height: 4rpx;
background-color: #695347; /* 深棕色下划线(激活状态) */
border-radius: 2rpx;
}
.detail-section {
//background-color: rgba(255, 255, 255, 0.95); /* */
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
backdrop-filter: blur(10rpx);
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #695347; /* 深棕色文字 */
margin-bottom: 20rpx;
border-left: 6rpx solid #695347; /* 深棕色左边框 */
padding-left: 20rpx;
display: flex;
align-items: center;
.title-icon {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
}
.section-content {
font-size: 28rpx;
color: #666; /* 灰色文字 */
line-height: 1.6;
p {
margin-bottom: 16rpx;
}
} }
} }
}
</style> </style>