mirror of
https://github.com/Dichgrem/Vue.git
synced 2026-02-05 04:41:55 -05:00
fix:css&&select
This commit is contained in:
@@ -5,21 +5,12 @@
|
|||||||
"pageSize": 10,
|
"pageSize": 10,
|
||||||
"pageCount": 1,
|
"pageCount": 1,
|
||||||
"list": [
|
"list": [
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"pic": "./imgs/actImg.jpeg",
|
|
||||||
"content": "666",
|
|
||||||
"publisher": "未知来源",
|
|
||||||
"time": 1766717931972,
|
|
||||||
"status": 1,
|
|
||||||
"hour": 2
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"pic": "./imgs/actImg.jpeg",
|
"pic": "./imgs/actImg.jpeg",
|
||||||
"content": "参与运动会志愿服务,协助现场秩序维护",
|
"content": "参与运动会志愿服务,协助现场秩序维护",
|
||||||
"publisher": "福州大学至诚学院",
|
"publisher": "福州大学至诚学院",
|
||||||
"time": 1671494400000,
|
"time": 1703011200000,
|
||||||
"status": 1
|
"status": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -27,7 +18,7 @@
|
|||||||
"pic": "./imgs/actImg.jpeg",
|
"pic": "./imgs/actImg.jpeg",
|
||||||
"content": "图书馆整理图书志愿服务",
|
"content": "图书馆整理图书志愿服务",
|
||||||
"publisher": "福州市图书馆",
|
"publisher": "福州市图书馆",
|
||||||
"time": 1670284800000,
|
"time": 1701801600000,
|
||||||
"status": 0
|
"status": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -35,8 +26,26 @@
|
|||||||
"pic": "./imgs/actImg.jpeg",
|
"pic": "./imgs/actImg.jpeg",
|
||||||
"content": "社区敬老院陪伴老人服务",
|
"content": "社区敬老院陪伴老人服务",
|
||||||
"publisher": "鼓楼区养老院",
|
"publisher": "鼓楼区养老院",
|
||||||
"time": 1672012800000,
|
"time": 1703529600000,
|
||||||
"status": 2
|
"status": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"pic": "./imgs/actImg.jpeg",
|
||||||
|
"content": "2024年志愿服务",
|
||||||
|
"publisher": "未知来源",
|
||||||
|
"time": 1735689600000,
|
||||||
|
"status": 1,
|
||||||
|
"hour": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"pic": "./imgs/actImg.jpeg",
|
||||||
|
"content": "2025年志愿服务",
|
||||||
|
"publisher": "福州大学至诚学院",
|
||||||
|
"time": 1737244800000,
|
||||||
|
"status": 1,
|
||||||
|
"hour": 4
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
|
||||||
margin: -20px 12px 15px;
|
margin: 10px 12px 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,21 +72,30 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: transparent;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user {
|
.user {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user > div,
|
||||||
|
.user > div > p,
|
||||||
|
.user > div > span {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.van-button) {
|
||||||
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 65px;
|
width: 65px;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 3px solid rgba(255, 255, 255, 0.8);
|
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,16 +104,15 @@ export default {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-score {
|
.user-score {
|
||||||
background: rgba(255, 255, 255, 0.25);
|
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
backdrop-filter: blur(5px);
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ export default {
|
|||||||
const { error, data = {} } = response.data;
|
const { error, data = {} } = response.data;
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
const list = data.list || [];
|
const list = data.list || [];
|
||||||
that.dateList = list;
|
that.dateList = [{ value: 'all', text: '全部' }, ...list];
|
||||||
that.year = list[list.length - 1];
|
that.year = that.dateList[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -61,8 +61,10 @@ export default {
|
|||||||
const payload = {
|
const payload = {
|
||||||
currentPage,
|
currentPage,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
year: this.year.value,
|
|
||||||
};
|
};
|
||||||
|
if (this.year.value !== 'all') {
|
||||||
|
payload.year = this.year.value;
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
axios
|
axios
|
||||||
@@ -105,6 +107,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
"year.value"() {
|
"year.value"() {
|
||||||
if (this.year.value) {
|
if (this.year.value) {
|
||||||
|
this.currentPage = 1;
|
||||||
this.fetchServiceRecords(1);
|
this.fetchServiceRecords(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -120,18 +123,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffb347 100%);
|
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffb347 100%);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 10px 12px 12px;
|
padding: 20px 12px 25px;
|
||||||
border-radius: 0 0 30px 30px;
|
border-radius: 0 0 30px 30px;
|
||||||
box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
|
box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
|
||||||
|
|
||||||
.header :deep(.container) {
|
|
||||||
min-height: 0 !important;
|
|
||||||
height: auto !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -148,8 +148,32 @@ function mockPlugin() {
|
|||||||
req.method === "GET"
|
req.method === "GET"
|
||||||
)
|
)
|
||||||
return sendJSON("yearScore.json");
|
return sendJSON("yearScore.json");
|
||||||
if (pathname.startsWith("/api/service/list") && req.method === "GET")
|
if (pathname.startsWith("/api/service/list") && req.method === "GET") {
|
||||||
return sendJSON("serviceList.json");
|
const sl = readJson("serviceList.json", {
|
||||||
|
error: 0,
|
||||||
|
data: { current: 1, pageSize: 10, pageCount: 1, list: [] },
|
||||||
|
});
|
||||||
|
const url = new URL(req.url, `http://${req.headers.host}`);
|
||||||
|
const year = url.searchParams.get("year");
|
||||||
|
let list = sl.data?.list || [];
|
||||||
|
if (year && year !== "all") {
|
||||||
|
const yearNum = Number(year);
|
||||||
|
list = list.filter((item) => {
|
||||||
|
const date = new Date(item.time);
|
||||||
|
return date.getFullYear() === yearNum;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const result = {
|
||||||
|
error: 0,
|
||||||
|
data: {
|
||||||
|
...sl.data,
|
||||||
|
list,
|
||||||
|
current: 1,
|
||||||
|
pageCount: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return send(res, result);
|
||||||
|
}
|
||||||
if (pathname.startsWith("/api/service/details") && req.method === "GET")
|
if (pathname.startsWith("/api/service/details") && req.method === "GET")
|
||||||
return sendJSON("recordDetails.json");
|
return sendJSON("recordDetails.json");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user