Przeglądaj źródła

剩余接口联调完成(余下跟分享有关的等发布到生产小程序体验版再测)

htc 1 dzień temu
rodzic
commit
64ae6d44cd

+ 106 - 47
components/pages/archivesBox/index.vue

@@ -1,56 +1,121 @@
 <template>
-	<view class="cpage">
-		<div class="top adf">
-			<div class="top-left">
-				<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/28/19ca20d9-9131-4234-9a1f-daf364ff63b4.png"></image>
+	<view class="ni" v-if="item">
+		<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">{{item?.memberName||''}}</div>
+				<image class="sex" v-if="item?.gender==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
+				<image class="sex" v-else-if="item?.gender==0" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
+				<div class="age" :class="{'women':item?.gender==1,'man':item?.gender==0}">{{item?.age||0}}岁</div>
 			</div>
-			<div class="top-right">
-				<p>{{'感恩有你 温暖前行'}}</p>
+			<div class="ni-top-right"></div>
+		</div>
+		<div class="ni-info adfacjb">
+			<div class="ni-info-left">
+				<image :src="item?.coverFile||''"></image>
+			</div>
+			<div class="ni-info-right">
+				<div class="title">{{item?.activityName||''}}</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-01"}}</div>
+					<div class="tip-right">{{item?.activityStartTime||''}} ~ {{item?.activityEndTime||''}}</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 class="tip-right">{{item?.provinceName||''}}{{item?.cityName||''}}</div>
+				</div>
+				<div class="bottom">
+					<div class="btn" @click="handleReview">查看档案</div>
 				</div>
 			</div>
 		</div>
-		<div class="bottom adfacjb">
-			<div class="bottom-left">限{{46}}人报名参加</div>
-			<div class="bottom-right" @tap="toDetail">查看档案</div>
-		</div>
 	</view>
 </template>
 
 <script setup name="ArchivesBox">
 	import { ref } from 'vue'
 	
-	const toDetail = () => {
-		uni.navigateTo({
-			url:'/pagesMy/archivesDetail'
-		})
+	const props = defineProps({
+		item:{
+			typeof:Object,
+			default:null
+		}
+	})
+	
+	const emit = defineEmits(['handleReviewFile'])
+	const handleReview = () =>{ 
+		emit('handleReviewFile',props.item)
 	}
 </script>
 
 <style scoped lang="scss">
-	.cpage{
-		background-color: #FFFFFF;
-		background-image: url('https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/b72c473b-300d-4bef-966d-8dc67ba17a4c.png');
-		background-repeat: no-repeat;
-		background-size: 283rpx 286rpx;
-		background-position: top right;
+	.ni{
+		background: #FFFFFF;
 		border-radius: 24rpx;
+		padding: 40rpx 24rpx 32rpx;
 		margin-top: 20rpx;
-		padding: 36rpx 24rpx 32rpx 20rpx;
 		
-		.top{
+		&-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{
+				background: rgba(183, 243, 88, .2);
+				border-radius: 27rpx;
+				padding: 12rpx 18rpx;
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 400;
+				font-size: 24rpx;
+				color: #70CF52;
+				line-height: 24rpx;
+				&.grey{
+					background: #F0F2F8;
+					color: #646464;
+				}
+			}
+		}
+		
+		&-info{
+			margin-top: 40rpx;
 			&-left{
 				width: 158rpx;
 				height: 214rpx;
@@ -63,7 +128,7 @@
 				width: calc(100% - 158rpx);
 				padding-left: 20rpx;
 				box-sizing: border-box;
-				&>p{
+				.title{
 					font-family: PingFang-SC, PingFang-SC;
 					font-weight: bold;
 					font-size: 32rpx;
@@ -72,6 +137,7 @@
 					margin-bottom: 5rpx;
 				}
 				.tip{
+					align-items: flex-start;
 					margin-top: 25rpx;
 					&-left{
 						width: 160rpx;
@@ -98,28 +164,21 @@
 						margin-left: 10rpx;
 					}
 				}
-			}
-		}
-	
-		.bottom{
-			margin-top: 24rpx;
-			&-left{
-				font-family: PingFangSC, PingFang SC;
-				font-weight: 400;
-				font-size: 24rpx;
-				color: #676775;
-				line-height: 24rpx;
-			}
-			&-right{
-				background: #B7F358;
-				border-radius: 27rpx;
-				padding: 12rpx 30rpx;
-				font-family: PingFang-SC, PingFang-SC;
-				font-weight: bold;
-				font-size: 24rpx;
-				color: #151B29;
-				line-height: 30rpx;
-				letter-spacing: 2rpx;
+				.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;
+				}
 			}
 		}
 	}

+ 5 - 2
pages/my.vue

@@ -36,7 +36,7 @@
 		<view class="box" style="margin-top: 40rpx;">
 			<view class="box-title">公益记录</view>
 			<view class="box-card adfacjb">
-				<view class="box-card-pre adffcac red" @click="handleTurnPage('/pagesMy/heartNumber')">
+				<view class="box-card-pre adffcac red" @click="handleTurnPage('/pagesMy/heartNumber?loveValue='+numInfo?.loveValue)">
 					<image class="top" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/18/4e6e3db8-127f-433d-9644-66f1451a6d72.png"></image>
 					<view class="num">{{(numInfo?.loveValue||0).toFixed(2)}}</view>
 					<view class="text adf">
@@ -52,7 +52,7 @@
 						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/18/51adb43e-acdd-475e-9e3d-64cbeedd4fe4.png"></image>
 					</view>
 				</view>
-				<view class="box-card-pre adffcac orange" @click="handleTurnPage('/pagesMy/volunteerHours')">
+				<view class="box-card-pre adffcac orange" @click="handleTurnPage('/pagesMy/volunteerHours?volunteerHours='+numInfo?.volunteerHours)">
 					<image class="top" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/18/c5048d96-826e-4bbf-a133-dd2115162746.png"></image>
 					<view class="num">{{(numInfo?.volunteerHours||0).toFixed(2)}}</view>
 					<view class="text adf">
@@ -115,6 +115,9 @@
 	
 	const handleTurnPage = (url) => {
 		if(!isLogin()) return
+		if(url = '/pagesMy/achievement'){
+			url = `/pagesMy/achievement?numInfo=`+JSON.stringify(numInfo.value)
+		}
 		uni.navigateTo({ url })
 	}
 	

+ 1 - 1
pagesHome/activityDetail.vue

@@ -243,7 +243,7 @@
 		address: '深圳市南山区南山街道丰潭路',
 		organizer: '锦鲤俱乐部'
 	})
-	const imageUrl = ref('https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/10/fbb4ac12-163e-48bd-9066-27b068078107.png')
+	const imageUrl = ref('https://transcend.ringzle.com/xiaozhi-app/profile/2025/11/21/50ac5bc4-8f92-46a5-81d5-60908b84e9f0.png')
 	
 	const handleReviewMembers = () => {
 		uni.navigateTo({

+ 56 - 51
pagesMy/achievement.vue

@@ -1,27 +1,31 @@
 <template>
-	<view class="common_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
+	<view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
 		<cus-header title="我的成就" bgColor="transparent"></cus-header>
 		<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/8dbf51e7-85cb-496a-b3d0-d5816fa8ff34.png" class="top_bg_img" mode="widthFix"></image>
 		<div class="info">
 			<div class="info-top adfac">
-				<image class="avatar" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/5dded84d-8594-4bbe-9204-c693098e7532.png"></image>
-				<div class="name">Hi~ {{'周晓瑾'}}</div>
-				<div class="level adfac"><text>LV</text><text>{{'04'}}</text></div>
+				<image class="avatar" :src="userInfo?.avatarPath||'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/5dded84d-8594-4bbe-9204-c693098e7532.png'"></image>
+				<div class="name">Hi~ {{userInfo?.realName??''}}</div>
+				<div class="level adfac"><text>LV</text><text>{{userInfo?.userLevel??1}}</text></div>
 			</div>
-			<div class="info-num">收获勋章:{{3}} <text>枚</text></div>
-			<div class="info-memo">共参与<text>{{8}}</text>次公益活动,累计义工时长<text>{{88}}</text>小时</div>
+			<div class="info-num">收获勋章:{{numInfo?.myMedals??0}} <text>枚</text></div>
+			<div class="info-memo">共参与<text>{{numInfo?.activityCount??0}}</text>次公益活动,累计义工时长<text>{{numInfo?.volunteerHours??0}}</text>小时</div>
 		</div>
 		<div class="tab adfacjc">
-			<div class="tab-pre" :class="{'active':tidx===''}" @tap="changeTab('')">全部</div>
-			<div class="tab-pre" :class="{'active':tidx===1}" @tap="changeTab(1)">已获得</div>
+			<div class="tab-pre" :class="{'active':queryParams.obtained===''}" @tap="changeTab('')">全部</div>
+			<div class="tab-pre" :class="{'active':queryParams.obtained===1}" @tap="changeTab(1)">已获得</div>
 		</div>
-		<div class="list">
+		<div class="list" v-if="list.length">
 			<div class="list-pre adffcac" v-for="(item,index) in list" :key="index" @tap="showSz(item)">
-				<image :src="item.img"></image>
-				<div class="p">{{item.title}}</div>
-				<div class="p tip">{{item.date?(item.date+'点亮'):'未获得'}}</div>
+				<image :src="item.imageUrl??''"></image>
+				<div class="p">{{item?.medalName||''}}</div>
+				<div class="p tip" v-if="item?.lightUp">{{item?.lightUpDate2??''}}点亮</div>
+				<div class="p tip" v-else>未获得</div>
 			</div>
 		</div>
+		<div class="dataEmpty" v-else>
+			<page-empty text="暂无勋章"></page-empty>
+		</div>
 		<div class="btn" @tap="showSave">晒出我的成就</div>
 		<div class="dialog adffcac" :style="{'height':'calc(100vh - '+mt+')px', 'top':mt+'px'}" v-if="xzShow">
 			<div class="title">"恭喜您获得荣誉勋章"</div>
@@ -80,41 +84,30 @@
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
-	import { ref, onMounted } from 'vue'
+	import PageEmpty from '@/components/pageEmpty/index.vue'
+	import { onLoad } from '@dcloudio/uni-app'
+	import { ref, getCurrentInstance } from 'vue'
+	const { proxy } = getCurrentInstance()
 	
-	const tidx = ref('')
-	const originData = ref([
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
-			title:'公益萌新',
-			date:'2025-07-30'
-		},
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
-			title:'黄金公益',
-			date:''
-		},
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
-			title:'公益萌新',
-			date:'2025-07-30'
-		},
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
-			title:'黄金公益',
-			date:''
-		},
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/94bda1ce-50c2-4e49-90ed-90db9b98c390.png',
-			title:'公益萌新',
-			date:'2025-07-30'
-		},
-		{
-			img:'https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/29/7c0b9a7c-a095-495b-a3e9-d953417ebfb1.png',
-			title:'黄金公益',
-			date:''
-		},
-	])
+	const userInfo = ref(null)
+	const numInfo = ref(null)
+	const queryParams = ref({
+		page:1,
+		limit:-1,
+		userId:'',
+		obtained:''
+	})
+	const typeDict = ref({
+		1:'公益萌新',
+		2:'青铜公益',
+		3:'白银公益',
+		4:'黄金公益',
+		5:'铂金公益',
+		6:'公益王者',
+		7:'公益活动能手',
+		8:'公益活动达人',
+		9:'月月公益达人'
+	})
 	const list = ref([])
 	const xzShow = ref(false)
 	const xzInfo = ref(null)
@@ -129,9 +122,8 @@
 	])
 	
 	const changeTab = type => {
-		tidx.value = type;
-		let yhd = originData.value.filter(d=>d.date);
-		list.value = JSON.parse(JSON.stringify(type?yhd:originData.value));
+		queryParams.value.obtained = type;
+		getList()
 	}
 	
 	const showSz = item => {
@@ -144,8 +136,19 @@
 		saveShow.value = true;
 	}
 	
-	onMounted(()=>{
-		list.value = JSON.parse(JSON.stringify(originData.value));
+	const getList = () => {
+		proxy.$api.get('/core/love/value/record/obtainedMedalList',queryParams.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			list.value = res.data.list;
+			list.value.forEach(l=>l.lightUpDate2 = new Date(l.lightUpDate).Format('yyyy-MM-dd'));
+		})
+	}
+	
+	onLoad((options)=>{
+		userInfo.value = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo'));
+		numInfo.value = options.numInfo&&JSON.parse(options.numInfo);
+		queryParams.value.userId = userInfo.value&&userInfo.value.id;
+		getList()
 	})
 </script>
 
@@ -261,6 +264,8 @@
 		.list{
 			margin-left: -60rpx;
 			overflow: hidden;
+			flex: 1;
+			overflow-y: auto;
 			&-pre{
 				width: calc(100% / 3 - 60rpx);
 				margin-top: 48rpx;

+ 93 - 10
pagesMy/archives.vue

@@ -10,34 +10,117 @@
 				</view>
 			</scroll-view>
 		</div>
-		<div class="list">
+		<div class="list" v-if="list.length">
 			<up-list @scrolltolower="scrolltolower" style="height: 100%;">
 				<up-list-item v-for="(item, index) in list" :key="index">
-					<ArchivesBox></ArchivesBox>
+					<ArchivesBox :item="item" @handleReviewFile="handleReview"></ArchivesBox>
 				</up-list-item>
 			</up-list>
 			<ArchivesBox v-for="(item,index) in list" :key="index"></ArchivesBox>
 		</div>
+		<div class="dataEmpty" v-else>
+			<page-empty text="暂无档案记录"></page-empty>
+		</div>
 	</view>
 </template>
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
 	import ArchivesBox from '@/components/pages/archivesBox/index.vue'
-	import { ref } from 'vue'
+	import PageEmpty from '@/components/pageEmpty/index.vue'
+	import { ref, getCurrentInstance, onMounted } from 'vue'
+	const { proxy } = getCurrentInstance()
 	
-	const midx = ref(0)
+	const midx = ref('')
 	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 memberList = ref([])
+	const isOver = ref(false)
+	const queryParams = ref({
+		page:1,
+		limit:10,
+		memberId:'',
+		userId:''
+	})
+	const list = ref([])
 	
+	const initList = () => {
+		queryParams.value.page = 1;
+		isOver.value = false;
+		list.value = [];
+	}
 	const changeMember = (item,index) => {
 		midx.value = index;
+		queryParams.value.memberId = item.id;
+		initList()
+		getList()
+	}
+	
+	const getMemberList = () => {
+		proxy.$api.get('/core/family/member/page',{page:1,limit:-1}).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			memberList.value = res.data.list||[];
+		})
+	}
+	
+	const getList = () => {
+		proxy.$api.get('/core/activity/signup/memberProfileList',queryParams.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			list.value = [...list.value,...res.data.list];
+			list.value.forEach(l=>{
+				l.age = getAge(l.idCard)
+			})
+			queryParams.value.page++;
+			if(res.data.list.length===0) isOver.value = true;
+		})
+	}
+	
+	const isValid = (idCard) => {
+		// 正则表达式校验18位身份证号码(最后一位可以是数字或X/x)
+		const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+		return typeof idCard === 'string' && regex.test(idCard);
+	  }
+	
+	const getAge = (idCard) => {
+		if (!isValid(idCard)) return 0
+	
+		// 从身份证的第7位开始,截取8位作为出生日期字符串 (YYYYMMDD)
+		const birthDateStr = idCard.substring(6, 14);
+		const birthYear = parseInt(birthDateStr.substring(0, 4), 10);
+		const birthMonth = parseInt(birthDateStr.substring(4, 6), 10);
+		const birthDay = parseInt(birthDateStr.substring(6, 8), 10);
+	
+		const today = new Date();
+		const currentYear = today.getFullYear();
+		const currentMonth = today.getMonth() + 1; // getMonth() 返回 0-11
+		const currentDay = today.getDate();
+	
+		// 计算周岁
+		let age = currentYear - birthYear;
+	
+		// 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
+		if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+		  age--;
+		}
+	
+		return age < 0 ? 0 : age; 
 	}
+	
+	const scrolltolower = () => {
+		if(isOver.value) return
+		getList()
+	}
+	
+	const handleReview = (data) => {
+		uni.navigateTo({
+			url:'/pagesMy/archivesDetail?activityId='+data?.activityId+'&memberId='+data?.memberId
+		})
+	}
+	
+	onMounted(()=>{
+		queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
+		getMemberList()
+		getList()
+	})
 </script>
 
 <style scoped lang="scss">

+ 1 - 1
pagesMy/archivesDetail.vue

@@ -15,7 +15,7 @@
 					<div class="name">{{info?.memberName||''}}</div>
 					<div class="kh-tip">家庭公益口号</div>
 					<div class="kh">{{info?.welfareSlogan||''}}</div>
-					<div class="memo">亲爱的,从{{info?.signupStartTime||''}}至{{info?.activityEndTime||''}},您的每一分善意都让世界更温暖!</div>
+					<div class="memo">亲爱的,从{{info?.activityStartTime||''}}至{{info?.activityEndTime||''}},您的每一分善意都让世界更温暖!</div>
 					<div class="gx-tip">爱心贡献/CONTRIBUTION</div>
 					<div class="num" style="margin-top: 28rpx;">捐赠爱心值<text>{{info?.valueLimit||0}}</text></div>
 					<div class="num">获得义工时长<text>{{info?.serviceHours||0}}</text>小时</div>

+ 62 - 21
pagesMy/heartNumber.vue

@@ -3,37 +3,78 @@
 		<cus-header title="我的爱心值" bgColor="transparent"></cus-header>
 		<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/19f555c2-ee0a-437b-8871-42b5605f8a8b.png" class="top_bg_img" mode="widthFix"></image>
 		<div class="top">
-			<div class="num">{{800}}</div>
+			<div class="num">{{loveValue}}</div>
 			<div class="text">我的爱心值</div>
 		</div>
-		<div class="list">
-			<div class="list-item" v-for="(item,index) in list" :key="index">
-				<div class="time">{{'2025-07-30 14:00:32'}}</div>
-				<div class="content adfacjb">
-					<div class="left adfac">
-						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/d5b79c0e-bcda-49ff-8cc5-5f6275b6bac1.png"></image>
-						<div class="texts">
-							<div class="p">{{'参与献爱心'}}</div>
-							<div class="p tip">{{'报名参与公益实践活动'}}</div>
+		<div class="list" v-if="list.length">
+			<up-list @scrolltolower="scrolltolower" style="height: 100%;">
+				<up-list-item v-for="(item, index) in list" :key="index">
+					<div class="list-item">
+						<div class="time">{{item.createDate||''}}</div>
+						<div class="content adfacjb">
+							<div class="left adfac">
+								<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/d5b79c0e-bcda-49ff-8cc5-5f6275b6bac1.png"></image>
+								<div class="texts">
+									<div class="p">{{transactionTypeDict[item.transactionType]||''}}</div>
+									<div class="p tip">{{'报名参与公益实践活动'}}</div>
+								</div>
+							</div>
+							<div class="right adfac">
+								<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/9d038c9c-268c-44ae-a396-949039c77f47.png" v-if="item.capitalFlow==2"></image>
+								<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/b6cbd075-f008-448a-ac9f-074787d08924.png" v-else></image>
+								<text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.capitalFlow==2?'':'+'}}</text>
+								<text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.loveQuantity??0}}</text>
+							</div>
 						</div>
 					</div>
-					<div class="right adfac">
-						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/9d038c9c-268c-44ae-a396-949039c77f47.png" v-if="index%2===0"></image>
-						<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/b6cbd075-f008-448a-ac9f-074787d08924.png" v-else></image>
-						<text :class="{'black':index%2===0,'red':index%2===1}">{{index%2===0?'-':'+'}}</text>
-						<text :class="{'black':index%2===0,'red':index%2===1}">{{800}}</text>
-					</div>
-				</div>
-			</div>
+				</up-list-item>
+			</up-list>
+		</div>
+		<div class="dataEmpty" v-else>
+			<page-empty text="暂无爱心值记录"></page-empty>
 		</div>
 	</view>
 </template>
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
-	import { ref } from 'vue'
+	import PageEmpty from '@/components/pageEmpty/index.vue'
+	import { onLoad } from '@dcloudio/uni-app'
+	import { ref, getCurrentInstance } from 'vue'
+	const { proxy } = getCurrentInstance()
+	
+	const queryParams = ref({
+		page:1,
+		limit:10,
+		userId:''
+	})
+	const transactionTypeDict = ref({
+		1:'渠道导入',
+		2:'公益捐赠'
+	})
+	const loveValue = ref(0)
+	const isOver = ref(false)
+	const list = ref([])
+	
+	const scrolltolower = () => {
+		if(isOver.value) return
+		getList()
+	}
+	
+	const getList = () => {
+		proxy.$api.get('/core/love/value/record/loveValueList',queryParams.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			list.value= [...list.value,...res.data.list];
+			queryParams.value.page++
+			if(res.data.list.length===0) isOver.value = true;
+		})
+	}
 	
-	const list = ref([1,1,1,1,1])
+	onLoad(options=>{
+		loveValue.value = options.loveValue??0;
+		queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
+		getList()
+	})
 </script>
 
 <style scoped lang="scss">
@@ -69,7 +110,7 @@
 			margin: 0 auto;
 			background: #FFFFFF;
 			border-radius: 24rpx;
-			padding: 6rpx 24rpx;
+			padding: 6rpx 24rpx 40rpx;
 			box-sizing: border-box;
 			&-item{
 				padding: 36rpx 0;

+ 38 - 9
pagesMy/volunteerHours.vue

@@ -1,38 +1,67 @@
 <template>
 	<view class="common_page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
 		<cus-header title="义工时长" bgColor="#FFFFFF"></cus-header>
-		<div class="hours">义工时长:{{88}}<text>小时</text></div>
-		<div class="list">
+		<div class="hours">义工时长:{{volunteerHours}}<text>小时</text></div>
+		<div class="list" v-if="list.length">
 			<up-list @scrolltolower="scrolltolower" style="height: 100%;">
 				<up-list-item class="list-item" v-for="(item, index) in list" :key="index">
-					<div class="time">{{'2025-07-30 14:00:32'}}</div>
+					<div class="time">{{item.createDate||""}}</div>
 					<div class="content adfacjb">
 						<div class="left adfac">
 							<image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/d5b79c0e-bcda-49ff-8cc5-5f6275b6bac1.png"></image>
 							<div class="texts">
-								<div class="p">{{'《环保知识知多少?让孩子成为大自然的守护者'}}</div>
-								<div class="p tip">{{'报名参与公益实践活动'}}</div>
+								<div class="p">{{item.activityName??''}}</div>
+								<div class="p tip">{{item.typeName??''}}</div>
 							</div>
 						</div>
 						<div class="right adfac">
-							<text>+{{4}}</text>
+							<text>+{{item.volunteerHours??0}}</text>
 						</div>
 					</div>
 				</up-list-item>
 			</up-list>
 		</div>
+		<div class="dataEmpty" v-else>
+			<page-empty text="暂无义工时长记录"></page-empty>
+		</div>
 	</view>
 </template>
 
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
-	import { ref } from 'vue'
+	import PageEmpty from '@/components/pageEmpty/index.vue'
+	import { onLoad } from '@dcloudio/uni-app'
+	import { ref, getCurrentInstance } from 'vue'
+	const { proxy } = getCurrentInstance()
 	
-	const list = ref([1,1,1,1,1,1,1,1,1])
+	const queryParams = ref({
+		page:1,
+		limit:10,
+		userId:''
+	})
+	const volunteerHours = ref(0)
+	const isOver = ref(false)
+	const list = ref([])
 	
 	const scrolltolower = () => {
-		console.log(1);
+		if(isOver.value) return
+		getList()
+	}
+	
+	const getList = () => {
+		proxy.$api.get('/core/love/value/record/volunteerHoursList',queryParams.value).then(({data:res})=>{
+			if(res.code!==0) return proxy.$showToast(res.msg)
+			list.value= [...list.value,...res.data.list];
+			queryParams.value.page++
+			if(res.data.list.length===0) isOver.value = true;
+		})
 	}
+	
+	onLoad(options=>{
+		volunteerHours.value = options.volunteerHours??0;
+		queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
+		getList()
+	})
 </script>
 
 <style scoped lang="scss">