update:student-vol

This commit is contained in:
dichgrem
2025-12-25 17:02:20 +08:00
parent 57679a4d0b
commit 13697cb76e
8 changed files with 77 additions and 38 deletions

Binary file not shown.

View File

@@ -1,15 +1,14 @@
<template> <template>
<div class="header-inner"> <router-link to="/userCenter" class="header-inner">
<div class="userInfo"> <div class="title">大学生志愿者活动</div>
<span class="avatar"> <div class="user-info-container">
<img :src="user.avatar" /> <div class="userInfo">
</span> <img class="avatar" :src="user.avatar" />
<span>{{ user.name }}</span> <span class="user-name">{{ user.name }}</span>
</div>
<span class="arrow">></span>
</div> </div>
<router-link to="/userCenter"> </router-link>
<button class="rArrow"></button>
</router-link>
</div>
</template> </template>
<script> <script>
@@ -20,11 +19,25 @@ export default {
<style scoped> <style scoped>
.header-inner { .header-inner {
display: flex;
flex-direction: column;
padding: 15px;
color: white;
text-decoration: none;
}
.title {
font-size: 18px;
font-weight: bold;
text-align: center;
margin-bottom: 15px;
}
.user-info-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 15px; width: 100%;
background: white;
} }
.userInfo { .userInfo {
@@ -33,18 +46,19 @@ export default {
gap: 10px; gap: 10px;
} }
.avatar img { .avatar {
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 50%; border-radius: 50%;
border: 2px solid white;
} }
.rArrow { .user-name {
width: 20px; font-weight: bold;
height: 20px; }
border: none;
background: url('../assets/rArrow.png') no-repeat center; .arrow {
background-size: contain; font-size: 24px;
cursor: pointer; font-weight: bold;
} }
</style> </style>

View File

@@ -58,11 +58,13 @@ export default {
<style scoped> <style scoped>
.overview { .overview {
display: flex; display: flex;
justify-content: space-around; justify-content: space-between;
padding: 20px; padding: 15px;
background: white; background: white;
list-style: none; list-style: none;
margin: 10px 0; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
margin-bottom: 5px;
} }
.overview li { .overview li {

View File

@@ -44,11 +44,13 @@ export default {
<style scoped> <style scoped>
.details { .details {
display: flex; display: flex;
gap: 15px; gap: 10px;
padding: 15px; padding: 15px;
background: white; background: white;
margin-bottom: 10px;
cursor: pointer; cursor: pointer;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
margin-bottom: 5px;
} }
.imgBox { .imgBox {

View File

@@ -70,13 +70,13 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 15px; padding: 10px;
} }
.user { .user {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 15px; gap: 10px;
} }
.user-avatar { .user-avatar {

View File

@@ -1,7 +1,6 @@
<template> <template>
<div class="home"> <div class="home">
<div class="header"> <div class="header">
<h1>大学生志愿者活动</h1>
<User :user="userInfo" /> <User :user="userInfo" />
</div> </div>
<Navs /> <Navs />

View File

@@ -104,9 +104,21 @@ export default {
</script> </script>
<style scoped> <style scoped>
.container {
background-color: #f7f8fa;
padding: 10px;
min-height: 100vh;
}
.tabs, .dataList, .rank {
background: white;
border-radius: 8px;
margin-bottom: 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.tabs { .tabs {
display: flex; display: flex;
background: white;
padding: 10px; padding: 10px;
} }
@@ -115,19 +127,19 @@ export default {
text-align: center; text-align: center;
padding: 10px; padding: 10px;
cursor: pointer; cursor: pointer;
color: #666;
} }
.tabItem.active { .tabItem.active {
color: #ff5d23; color: #ff5d23;
border-bottom: 2px solid #ff5d23; border-bottom: 2px solid #ff5d23;
font-weight: bold;
} }
.dataList { .dataList {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
padding: 20px; padding: 20px;
background: white;
margin: 10px 0;
} }
.dataItem { .dataItem {
@@ -143,11 +155,10 @@ export default {
.dataItem-label { .dataItem-label {
font-size: 12px; font-size: 12px;
color: #666; color: #333;
} }
.rank { .rank {
background: white;
padding: 15px; padding: 15px;
} }
@@ -162,12 +173,13 @@ export default {
.rank-range { .rank-range {
font-size: 12px; font-size: 12px;
color: #666; color: #333;
margin-top: 5px; margin-top: 5px;
} }
.rank-list { .rank-list {
list-style: none; list-style: none;
padding: 0;
} }
.rank-list li { .rank-list li {
@@ -178,6 +190,10 @@ export default {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.rank-list li:last-child {
border-bottom: none;
}
.rank-student { .rank-student {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="container">
<div class="header"> <div class="header">
<User <User
@updateYear="updateYear" @updateYear="updateYear"
@@ -8,9 +8,7 @@
/> />
</div> </div>
<div class="overview"> <Overview :year="year.value" />
<Overview :year="year.value" />
</div>
<van-list <van-list
v-model:loading="loading" v-model:loading="loading"
@@ -119,8 +117,16 @@ export default {
</script> </script>
<style scoped> <style scoped>
.container {
background-color: #f7f8fa;
padding: 10px;
min-height: 100vh;
}
.header { .header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white; color: white;
margin: -10px -10px 10px -10px;
padding: 10px;
} }
</style> </style>