Monk组件静态创建

This commit is contained in:
minimaxagent1 2025-07-29 15:38:02 +08:00
parent b8fbbb8053
commit 8d1bb07ac0
3 changed files with 138 additions and 80 deletions

0
api/monk.js Normal file
View File

View File

@ -1,5 +1,6 @@
export const CommonEnum = { export const CommonEnum = {
BACKGROUND: "https://api.ccttiot.com/image-1753769939853.png", //返回的按钮图像 BACKGROUND: "https://api.ccttiot.com/image-1753769939853.png", //返回的按钮图像
RIGHT_CHEVRON:"https://api.ccttiot.com/image-1753773619878.png"
}; };
export default CommonEnum; export default CommonEnum;

View File

@ -10,95 +10,152 @@
<text class="search-text">张姗姗</text> <text class="search-text">张姗姗</text>
<view class="search-btn">搜索</view> <view class="search-btn">搜索</view>
</view> </view>
<view class="monk-list">
<view class="monk-item" v-for="(item, idx) in monkList" :key="idx">
<image class="monk-avatar" :src="item.avatar" mode="aspectFill"></image>
<view class="monk-info">
<view class="monk-desc">{{ item.desc }}</view>
<view class="monk-detail" @click="goDetail(item)">查看详情></view>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import { CommonEnum } from '@/enum/common.js';
CommonEnum import { MonkEnum } from '@/enum/monk.js';
} from '@/enum/common.js';
import { MonkEnum } from '@/enum/monk.js' export default {
export default { data() {
data() { return {
return { bgc: {
bgc: { backgroundColor: "#F5F0E7",
backgroundColor: "#F5F0E7", },
CommonEnum,
MonkEnum,
monkList: [
{
avatar: 'https://api.ccttiot.com/image-1753770000001.png',
desc: '释某某法师现任平山寺方丈。法师于2000年在平山寺剃度出家2001年平山寺龙坛受具足戒师承临济宗第11代传人深耕禅修。',
}, },
CommonEnum, {
MonkEnum avatar: 'https://api.ccttiot.com/image-1753770000001.png',
} desc: '释某某法师现任平山寺方丈。法师于2000年在平山寺剃度出家2001年平山寺龙坛受具足戒师承临济宗第11代传人深耕禅修。',
}, },
onLoad() { {
avatar: 'https://api.ccttiot.com/image-1753770000001.png',
}, desc: '释某某法师现任平山寺方丈。法师于2000年在平山寺剃度出家2001年平山寺龙坛受具足戒师承临济宗第11代传人深耕禅修。',
methods: { }
]
}
},
methods: {
goDetail(item) {
uni.showToast({
title: '详情功能待开发',
icon: 'none'
})
} }
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
page { .page {
width: 750rpx; width: 750rpx;
height: 2492rpx; min-height: 100vh;
background: #F5F0E7; background: #F5F0E7;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
} }
.container {
.container { display: flex;
display: flex; flex-direction: column;
justify-content: center; align-items: center;
min-height: 100vh; min-height: 100vh;
background-color: transparent; background-color: transparent;
width: 750rpx; margin: 20px 14px 40rpx 14px;
position: relative; width: 694rpx;
} border-radius: 16rpx;
position: relative;
.searchBox { }
display: flex; .background-image {
align-items: center; position: absolute;
width: 660rpx; top: 0;
height: 70rpx; left: 0;
background: #FFFBF5; width: 100%;
border-radius: 10rpx; height: 100%;
border: 1rpx solid #C7A26D; z-index: -1;
margin-top: 20rpx; border-radius: 16rpx;
padding: 0 12rpx; }
} .searchBox {
display: flex;
.search-icon { align-items: center;
width: 32rpx; width: 660rpx;
height: 32rpx; height: 70rpx;
margin: 0 16rpx 0 0; background: #FFFBF5;
} border-radius: 10rpx;
border: 1rpx solid #C7A26D;
.search-text { margin-top: 20rpx;
flex: 1; padding: 0 12rpx;
font-size: 28rpx; }
color: #bfa16b; .search-icon {
} width: 32rpx;
height: 32rpx;
.search-btn { margin: 0 16rpx 0 0;
background: #bfa16b; }
color: #fff; .search-text {
font-size: 26rpx; flex: 1;
border-radius: 6rpx; font-size: 28rpx;
padding: 0 24rpx; color: #bfa16b;
height: 48rpx; }
display: flex; .search-btn {
align-items: center; background: #bfa16b;
justify-content: center; color: #fff;
margin-left: 16rpx; font-size: 26rpx;
} border-radius: 6rpx;
padding: 0 24rpx;
.background-image { height: 48rpx;
position: absolute; display: flex;
top: 0; align-items: center;
left: 0; justify-content: center;
width: 100%; margin-left: 16rpx;
height: 100%; }
z-index: -1; .monk-list {
border-radius: 16rpx; width: 100%;
} margin-top: 24rpx;
}
.monk-item {
display: flex;
flex-direction: row;
align-items: flex-start;
background: transparent;
margin-bottom: 24rpx;
}
.monk-avatar {
width: 100rpx;
height: 100rpx;
background: #e5e5e5;
border-radius: 8rpx;
margin-right: 18rpx;
}
.monk-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.monk-desc {
font-size: 26rpx;
color: #695347;
line-height: 1.6;
margin-bottom: 8rpx;
word-break: break-all;
}
.monk-detail {
color: #bfa16b;
font-size: 24rpx;
align-self: flex-end;
}
</style> </style>