Browse Source

申领社会实践记录静态页完成

htc 19 giờ trước cách đây
mục cha
commit
06c15ba800
4 tập tin đã thay đổi với 386 bổ sung1 xóa
  1. 173 0
      components/pages/practiceBox/index.vue
  2. 6 0
      pages.json
  3. 1 1
      pages/my.vue
  4. 206 0
      pagesMy/practice.vue

+ 173 - 0
components/pages/practiceBox/index.vue

@@ -0,0 +1,173 @@
+<template>
+	<view class="ni">
+		<div class="ni-top adfacjb">
+			<div class="ni-top-left adfac">
+				<image class="avatar" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/4bd05666-201c-4016-acb6-09cd1f554524.png"></image>
+				<div class="name">{{'张琳琳'}}</div>
+				<image class="sex" v-if="sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
+				<image class="sex" v-else-if="sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
+				<div class="age" :class="{'women':sex==2,'man':sex==1}">{{46}}岁</div>
+			</div>
+			<div class="ni-top-right">
+				<!-- 	<image v-if="agree" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/87b5b244-d14f-43cd-991b-4ac9f48d909e.png" @tap="changeAgree"></image> -->
+					<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b8a5cabd-57f8-4ad7-9677-f6372423c50a.png"></image>
+			</div>
+		</div>
+		<div class="ni-info adf">
+			<div class="ni-info-left">
+				<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/d3c53597-a848-4a33-8deb-ab256f028baa.png"></image>
+			</div>
+			<div class="ni-info-right">
+				<div class="title">{{'中国少年先锋队诞辰日'}}</div>
+				<div class="tip adf">
+					<div class="tip-left adfac">
+						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/201a4250-24a4-412d-9ec9-fc58071d10ea.png"></image>
+						<text>活动时间:</text>
+					</div>
+					<div class="tip-right">{{"2025-06-01 ~ 2025-06-02"}}</div>
+				</div>
+				<div class="tip adf">
+					<div class="tip-left adfac">
+						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/11/e9025f86-a59e-4f82-92f0-9d22e846193c.png"></image>
+						<text>活动地点:</text>
+					</div>
+					<div class="tip-right">{{"广东省深圳市南山区"}}</div>
+				</div>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script setup name="PracticeBox">
+	import { ref } from 'vue'
+	
+	const props = defineProps({
+		sex:{
+			typeof:Number,
+			default:1
+		}
+	})
+</script>
+
+<style scoped lang="scss">
+	.ni{
+		background: linear-gradient(45deg, #FFFFFF 60%, #F2FFE8 100%);
+		border-radius: 24rpx;
+		padding: 40rpx 24rpx 32rpx;
+		margin-top: 20rpx;
+		
+		&-top{
+			&-left{
+				.avatar{
+					width: 48rpx;
+					height: 48rpx;
+				}
+				.name{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #151B29;
+					line-height: 32rpx;
+					margin-left: 16rpx;
+				}
+				.sex{
+					width: 44rpx;
+					height: 32rpx;
+					margin-left: 10rpx;
+				}
+				.age{
+					border-radius: 13rpx;
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 20rpx;
+					line-height: 24rpx;
+					padding: 4rpx 10rpx;
+					margin-left: 13rpx;
+					&.women{
+						background: rgba(244,101,122,0.14);
+						color: #F4657A;
+					}
+					&.man{
+						background: rgba(5,169,254,0.12);
+						color: #05A9FE;
+					}
+				}
+			}
+			&-right{
+				width: 37rpx;
+				height: 37rpx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		
+		&-info{
+			margin-top: 40rpx;
+			&-left{
+				width: 158rpx;
+				height: 214rpx;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			&-right{
+				width: calc(100% - 158rpx);
+				padding-left: 20rpx;
+				box-sizing: border-box;
+				.title{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #151B29;
+					line-height: 40rpx;
+					margin-bottom: 5rpx;
+				}
+				.tip{
+					margin-top: 25rpx;
+					&-left{
+						width: 160rpx;
+						image{
+							width: 24rpx;
+							height: 24rpx;
+						}
+						text{
+							font-family: PingFangSC, PingFang SC;
+							font-weight: 400;
+							font-size: 24rpx;
+							color: #676775;
+							line-height: 24rpx;
+							margin-left: 10rpx;
+						}
+					}
+					&-right{
+						width: calc(100% - 160rpx);
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #676775;
+						line-height: 24rpx;
+						margin-left: 10rpx;
+					}
+				}
+				.bottom{
+					margin-top: 30rpx;
+					display: flex;
+					justify-content: flex-end;
+				}
+				.btn{
+					background: #B7F358;
+					border-radius: 27rpx;
+					padding: 12rpx 26rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 24rpx;
+					color: #252525;
+					line-height: 30rpx;
+				}
+			}
+		}
+	}
+</style>

+ 6 - 0
pages.json

@@ -86,6 +86,12 @@
 					"style": {
 						"navigationStyle": "custom"
 					}
+				},
+				{
+					"path": "practice",
+					"style": {
+						"navigationStyle": "custom"
+					}
 				}
 			]
 		}

+ 1 - 1
pages/my.vue

@@ -77,7 +77,7 @@
 		<div class="box">
 			<div class="box-title">其他功能</div>
 			<div class="box-other adfacjb">
-				<div class="box-other-pre adffcac">
+				<div class="box-other-pre adffcac" @tap="handleTurnPage('/pagesMy/practice')">
 					<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/18/53fb5a7a-e7fb-4e5d-b902-f434cfc6d786.png"></image>
 					<text>申领社会实践记录</text>
 				</div>

+ 206 - 0
pagesMy/practice.vue

@@ -0,0 +1,206 @@
+<template>
+	<view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px', 'padding-bottom':pb+'rpx'}">
+		<cus-header title="申领社会实践记录" bgColor="#FFFFFF"></cus-header>
+		<div class="tab adf">
+			<div class="tab-pre adfacjc" :class="{'active':tidx===1}" @tap="changeTab(1)">可申领</div>
+			<div class="tab-pre adfacjc" :class="{'active':tidx===2}" @tap="changeTab(2)">已申领</div>
+		</div>
+		<div class="member">
+			<scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation="true" :scroll-left="scrollLeft">
+				<view class="scroll-view-item_H" :id="'svih_'+index" v-for="(item,index) in memberList" :key="index" @tap="changeMember(item,index)">
+					<view class="cl_item" :class="{'active':midx===index}">
+						<text>{{item.name}}</text>
+					</view>
+				</view>
+			</scroll-view>
+		</div>
+		<template v-if="tidx===1">
+			<div class="list">
+				<up-list @scrolltolower="scrolltolower" style="height: 100%;">
+					<up-list-item v-for="(item, index) in list" :key="index">
+						<practice-box></practice-box>
+					</up-list-item>
+				</up-list>
+			</div>
+			<div class="btn">申领社会实践记录</div>
+		</template>
+		<template v-else-if="tidx===2">
+			<div class="list">
+				<up-list @scrolltolower="scrolltolower2" style="height: 100%;">
+					<up-list-item v-for="(item, index) in yslList" :key="index">
+						<div class="ysl-box">
+							<div class="ysl-box-title">{{'感恩有你 温暖前行'}}</div>
+							<div class="ysl-box-tip">申领时间:{{'2025-06-01 ~ 2025-07-01'}}</div>
+							<div class="ysl-box-tip">申 领 人:{{'张琳琳'}}</div>
+							<div class="ysl-box-btn">查看</div>
+						</div>
+					</up-list-item>
+				</up-list>
+			</div>
+		</template>
+	</view>
+</template>
+
+<script setup name="">
+	import CusHeader from '@/components/CusHeader/index.vue'
+	import PracticeBox from '@/components/pages/practiceBox/index.vue'
+	import { ref } from 'vue'
+	
+	const pb = ref(184)
+	const tidx = ref(1)
+	const midx = ref(0)
+	const scrollLeft = ref(0)
+	const memberList = ref([
+		{id:1,name:'张三'},
+		{id:2,name:'李四'},
+		{id:3,name:'龙傲天'}
+	])
+	const list = ref([1,1,1,1,1])
+	const yslList = ref([1,1,1])
+
+	const changeTab = index => {
+		tidx.value = index;
+		pb.value = index===1?184:40;
+	}
+	
+	const changeMember = (item,index) => {
+		midx.value = index;
+	}
+</script>
+
+<style scoped lang="scss">
+	.scroll-view_H {
+		white-space: nowrap;
+		width: 100%;
+	}
+	
+	.scroll-view-item_H {
+		display: inline-block;
+		height: 100%;
+		margin-left: 30rpx;
+		&:first-child{
+			margin-left: 0;
+		}
+	}
+	
+	.common_page{
+		padding: 0;
+		box-sizing: border-box;
+		.tab{
+			width: 100%;
+			height: 102rpx;
+			background: #FFFFFF;
+			&-pre{
+				width: 50%;
+				height: 102rpx;
+				position: relative;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 32rpx;
+				color: #676775;
+				line-height: 48rpx;
+				&.active{
+					font-weight: bold;
+					font-size: 36rpx;
+					color: #252525;
+					&::after{
+						content: '';
+						width: 42rpx;
+						height: 6rpx;
+						background: #B7F358;
+						border-radius: 3rpx;
+						position: absolute;
+						left: 50%;
+						margin-left: -21rpx;
+						bottom: 6rpx;
+					}
+				}
+			}
+		}
+	
+		.member{
+			width: 100%;
+			height: 56rpx;
+			padding: 0 30rpx;
+			margin-top: 20rpx;
+			box-sizing: border-box;
+			.cl_item{
+				padding: 0 26rpx;
+				height: 56rpx;
+				background: #FFFFFF;
+				border-radius: 10rpx;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 26rpx;
+				color: #252525;
+				line-height: 56rpx;
+				text-align: center;
+				&.active{
+					background: #B7F358;
+				}
+			}
+		}
+
+		.list{
+			padding: 0 24rpx;
+			flex: 1;
+			overflow-y: auto;
+			margin-top: 4rpx;
+			
+			.ysl-box{
+				margin-top: 20rpx;
+				padding: 36rpx 24rpx;
+				position: relative;
+				background: linear-gradient(45deg, #FFFFFF 80%, #F2FFE8 100%);
+				&-title{
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 32rpx;
+					color: #151B29;
+					line-height: 40rpx;
+				}
+				&-tip{
+					font-family: PingFangSC, PingFang SC;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #676775;
+					line-height: 24rpx;
+					margin-top: 30rpx;
+				}
+				&-btn{
+					width: 118rpx;
+					height: 64rpx;
+					background: #B7F358;
+					border-radius: 45rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					font-size: 26rpx;
+					color: #151B29;
+					line-height: 64rpx;
+					text-align: center;
+					letter-spacing: 2rpx;
+					position: absolute;
+					right: 24rpx;
+					bottom: 40rpx;
+				}
+			}
+		}
+		
+		.btn{
+			width: calc(100% - 210rpx);
+			height: 90rpx;
+			background: #B7F358;
+			border-radius: 45rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #151B29;
+			line-height: 90rpx;
+			text-align: center;
+			letter-spacing: 2rpx;
+			position: fixed;
+			left: 105rpx;
+			bottom: 64rpx;
+		}
+	}
+</style>