htc пре 1 недеља
родитељ
комит
8a5547d5e7
3 измењених фајлова са 17 додато и 13 уклоњено
  1. 15 11
      pagesMy/achievement.vue
  2. 1 1
      pagesMy/archivesDetail.vue
  3. 1 1
      pagesMy/volunteerHours.vue

+ 15 - 11
pagesMy/achievement.vue

@@ -6,11 +6,11 @@
 		<view class="info">
 			<view class="info-top adfac">
 				<image class="avatar" :src="userInfo?.avatarPath||'https://oss.familydaf.cn/sxsnfile/20251218/ad5a1a788b6944358b0bc93e2506bf17.png'"></image>
-				<view class="name">Hi~ {{userInfo?.realName??''}}</view>
-				<view class="level adfac"><text>LV</text><text>{{userInfo?.userLevel??1}}</text></view>
+				<view class="name">Hi~ {{userInfo?.realName||''}}</view>
+				<view class="level adfac"><text>LV</text><text>{{userInfo?.userLevel||0}}</text></view>
 			</view>
-			<view class="info-num">收获勋章:{{numInfo?.myMedals??0}} <text>枚</text></view>
-			<view class="info-memo">共参与<text>{{numInfo?.activityCount??0}}</text>次公益活动,累计义工时长<text>{{numInfo?.volunteerHours??0}}</text>小时</view>
+			<view class="info-num">收获勋章:{{numInfo?.myMedals||0}} <text>枚</text></view>
+			<view class="info-memo">共参与<text>{{numInfo?.activityCount||0}}</text>次公益活动,累计义工时长<text>{{numInfo?.volunteerHours||0}}</text>小时</view>
 		</view>
 		<view class="tab adfacjc">
 			<view class="tab-pre" :class="{'active':queryParams.obtained===1}" @click="changeTab(1)">全部</view>
@@ -18,9 +18,9 @@
 		</view>
 		<view class="list" v-if="list.length">
 			<view class="list-pre adffcac" v-for="(item,index) in list" :key="index" @click="showSz(item)">
-				<image :src="item.imageUrl??''"></image>
+				<image :src="item.imageUrl||''"></image>
 				<view class="p">{{item?.medalName||''}}</view>
-				<view class="p tip" v-if="item?.lightUp">{{item?.lightUpDate2??''}}点亮</view>
+				<view class="p tip" v-if="item?.lightUp">{{item?.lightUpDate2||''}}点亮</view>
 				<view class="p tip" v-else>未获得</view>
 			</view>
 		</view>
@@ -372,11 +372,15 @@
 		})
 	}
 	
-	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()
+	onLoad((options)=>{
+		try{
+			userInfo.value = JSON.parse(uni.getStorageSync('userInfo'));
+			numInfo.value = options.numInfo&&JSON.parse(options.numInfo);
+			queryParams.value.userId = userInfo.value&&userInfo.value.id;
+			getList()
+		}catch(e){
+			//TODO handle the exception
+		}
 	})
 </script>
 

+ 1 - 1
pagesMy/archivesDetail.vue

@@ -10,7 +10,7 @@
 					</div>
 					<image class="logo" src="https://oss.familydaf.cn/sxsnfile/20251218/de06733ceb7f4178bf2e9e6d4ca22aa1.png"></image>
 					<image class="heart" src="https://oss.familydaf.cn/sxsnfile/20251218/4b2c795dd0214ccb8bce4e099acfe0ed.png"></image>
-					<div class="level">Lv.{{info?.userLevel||1}}</div>
+					<div class="level">Lv.{{info?.userLevel||0}}</div>
 					<div class="name-tip">昵称/NAME</div>
 					<div class="name">{{info?.memberName||''}}</div>
 					<div class="kh-tip">家庭公益口号</div>

+ 1 - 1
pagesMy/volunteerHours.vue

@@ -58,7 +58,7 @@
 	}
 	
 	onLoad(options=>{
-		volunteerHours.value = options.volunteerHours??0;
+		volunteerHours.value = options.volunteerHours||0;
 		queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
 		getList()
 	})