mirror of
https://github.com/Dichgrem/Vue.git
synced 2026-02-04 23:41:56 -05:00
update:finish
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
"title": "运动会志愿者招募",
|
"title": "运动会志愿者招募",
|
||||||
"startTime": 1671494400000,
|
"startTime": 1671494400000,
|
||||||
"endTime": 1671697800000,
|
"endTime": 1671697800000,
|
||||||
"palce": "福州大学至诚学院",
|
"place": "福州大学至诚学院",
|
||||||
"content": "为确保运动会顺利进行,现招募志愿者协助现场秩序维护、运动员服务等工作。",
|
"content": "为确保运动会顺利进行,现招募志愿者协助现场秩序维护、运动员服务等工作。",
|
||||||
"publisher": "福州大学至诚学院团委",
|
"publisher": "福州大学至诚学院团委",
|
||||||
"hour": 4,
|
"hour": 4,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"title": "运动会志愿者招募",
|
"title": "运动会志愿者招募",
|
||||||
"startTime": 1671494400000,
|
"startTime": 1671494400000,
|
||||||
"endTime": 1671697800000,
|
"endTime": 1671697800000,
|
||||||
"palce": "福州大学至诚学院",
|
"place": "福州大学至诚学院",
|
||||||
"isYourSchool": true,
|
"isYourSchool": true,
|
||||||
"canApply": false,
|
"canApply": false,
|
||||||
"actPic": "./imgs/actImg.jpeg"
|
"actPic": "./imgs/actImg.jpeg"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"title": "图书馆志愿服务",
|
"title": "图书馆志愿服务",
|
||||||
"startTime": 1670284800000,
|
"startTime": 1670284800000,
|
||||||
"endTime": 1670371200000,
|
"endTime": 1670371200000,
|
||||||
"palce": "福州市图书馆",
|
"place": "福州市图书馆",
|
||||||
"isYourSchool": false,
|
"isYourSchool": false,
|
||||||
"canApply": false,
|
"canApply": false,
|
||||||
"actPic": "./imgs/actImg.jpeg"
|
"actPic": "./imgs/actImg.jpeg"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"title": "社区敬老院服务",
|
"title": "社区敬老院服务",
|
||||||
"startTime": 1672012800000,
|
"startTime": 1672012800000,
|
||||||
"endTime": 1672099200000,
|
"endTime": 1672099200000,
|
||||||
"palce": "福州市养老院",
|
"place": "福州市养老院",
|
||||||
"isYourSchool": false,
|
"isYourSchool": false,
|
||||||
"canApply": false,
|
"canApply": false,
|
||||||
"actPic": "./imgs/actImg.jpeg"
|
"actPic": "./imgs/actImg.jpeg"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"title": "社区敬老院服务",
|
"title": "社区敬老院服务",
|
||||||
"startTime": 1672012800000,
|
"startTime": 1672012800000,
|
||||||
"endTime": 1672099200000,
|
"endTime": 1672099200000,
|
||||||
"palce": "福州市养老院",
|
"place": "福州市养老院",
|
||||||
"isYourSchool": false,
|
"isYourSchool": false,
|
||||||
"canApply": true,
|
"canApply": true,
|
||||||
"actPic": "./imgs/actImg.jpeg",
|
"actPic": "./imgs/actImg.jpeg",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"title": "运动会志愿者招募",
|
"title": "运动会志愿者招募",
|
||||||
"startTime": 1671494400000,
|
"startTime": 1671494400000,
|
||||||
"endTime": 1671697800000,
|
"endTime": 1671697800000,
|
||||||
"palce": "福州大学至诚学院",
|
"place": "福州大学至诚学院",
|
||||||
"isYourSchool": true,
|
"isYourSchool": true,
|
||||||
"canApply": true,
|
"canApply": true,
|
||||||
"actPic": "./imgs/actImg.jpeg",
|
"actPic": "./imgs/actImg.jpeg",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"title": "图书馆志愿服务",
|
"title": "图书馆志愿服务",
|
||||||
"startTime": 1670284800000,
|
"startTime": 1670284800000,
|
||||||
"endTime": 1670371200000,
|
"endTime": 1670371200000,
|
||||||
"palce": "福州市图书馆",
|
"place": "福州市图书馆",
|
||||||
"isYourSchool": false,
|
"isYourSchool": false,
|
||||||
"canApply": false,
|
"canApply": false,
|
||||||
"actPic": "./imgs/actImg.jpeg",
|
"actPic": "./imgs/actImg.jpeg",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"error": 0,
|
"error": 0,
|
||||||
"data": {
|
"data": {
|
||||||
"provinceRank": 156,
|
"provinceRank": 156,
|
||||||
"totalScore": 132,
|
"totalScore": 180,
|
||||||
"grandeRank": 8
|
"grandeRank": 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -9,6 +9,6 @@
|
|||||||
"school": "福州大学至诚学院",
|
"school": "福州大学至诚学院",
|
||||||
"profession": "计算机",
|
"profession": "计算机",
|
||||||
"userType": 2,
|
"userType": 2,
|
||||||
"totalScore": 132
|
"totalScore": 180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"error": 0,
|
"error": 0,
|
||||||
"data": {
|
"data": {
|
||||||
"avatar": "./imgs/avatar.png",
|
"avatar": "./imgs/avatar.png",
|
||||||
"name": "李华",
|
"name": "dich",
|
||||||
"totalScore": 132
|
"totalScore": 180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
{
|
{
|
||||||
"value": 2025,
|
"value": 2025,
|
||||||
"text": "2025年"
|
"text": "2025年"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 2026,
|
||||||
|
"text": "2026年"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"error": 0,
|
"error": 0,
|
||||||
"data": {
|
"data": {
|
||||||
"times": 13,
|
"times": 16,
|
||||||
"duration": 50,
|
"duration": 74,
|
||||||
"score": 100
|
"score": 180
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
{{ formatDate(data.endTime) }}
|
{{ formatDate(data.endTime) }}
|
||||||
</p>
|
</p>
|
||||||
<p class="actItem-tag">
|
<p class="actItem-tag">
|
||||||
{{ data.isYourSchool ? "本人所在学校活动" : data.palce }}
|
{{ data.isYourSchool ? "本人所在学校活动" : data.place }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<div class="dataItem">
|
<div class="dataItem">
|
||||||
<span class="label">活动地点</span>
|
<span class="label">活动地点</span>
|
||||||
<p>{{ data.palce }}</p>
|
<p>{{ data.place }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dataItem">
|
<div class="dataItem">
|
||||||
|
|||||||
@@ -53,8 +53,7 @@ export default {
|
|||||||
const searchTerm = this.keyword.trim().toLowerCase();
|
const searchTerm = this.keyword.trim().toLowerCase();
|
||||||
return this.allActList.filter(item => {
|
return this.allActList.filter(item => {
|
||||||
const title = (item.title || '').toLowerCase();
|
const title = (item.title || '').toLowerCase();
|
||||||
// 注意:模拟数据中的字段是 'palce' 而不是 'place'
|
const place = (item.place || '').toLowerCase();
|
||||||
const place = (item.palce || '').toLowerCase();
|
|
||||||
return title.includes(searchTerm) || place.includes(searchTerm);
|
return title.includes(searchTerm) || place.includes(searchTerm);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="frm">
|
<div class="frm">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="pushlisher.text"
|
v-model="publisher.text"
|
||||||
is-link
|
is-link
|
||||||
readonly
|
readonly
|
||||||
label="活动来源"
|
label="活动来源"
|
||||||
@@ -96,7 +96,7 @@ function dateRange() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let pushlisherList = [];
|
let publisherList = [];
|
||||||
let durationList = [];
|
let durationList = [];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -104,7 +104,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
columns: [],
|
columns: [],
|
||||||
pickerId: null,
|
pickerId: null,
|
||||||
pushlisher: { value: null, text: "" },
|
publisher: { value: null, text: "" },
|
||||||
duration: { value: null, text: "" },
|
duration: { value: null, text: "" },
|
||||||
date: null,
|
date: null,
|
||||||
content: "",
|
content: "",
|
||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
fieldCLick(value) {
|
fieldCLick(value) {
|
||||||
this.pickerId = value;
|
this.pickerId = value;
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
this.columns = pushlisherList;
|
this.columns = publisherList;
|
||||||
} else if (value === 2) {
|
} else if (value === 2) {
|
||||||
this.columns = durationList;
|
this.columns = durationList;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,8 @@ export default {
|
|||||||
|
|
||||||
if (curPickerId === 1) {
|
if (curPickerId === 1) {
|
||||||
const data = selectedValues;
|
const data = selectedValues;
|
||||||
this.date = data.join(".");
|
const [year, month, day] = data;
|
||||||
|
this.date = `${year}-${month}-${day}`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +156,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (curPickerId === 0) {
|
if (curPickerId === 0) {
|
||||||
this.pushlisher = payload;
|
this.publisher = payload;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +166,7 @@ export default {
|
|||||||
axios.get("/api/act/publisherList").then(function (response) {
|
axios.get("/api/act/publisherList").then(function (response) {
|
||||||
const { error, data = {} } = response.data;
|
const { error, data = {} } = response.data;
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
pushlisherList = data.list || [];
|
publisherList = data.list || [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -178,7 +179,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (!this.pushlisher.text) {
|
if (!this.publisher.text) {
|
||||||
showToast("未选择活动来源");
|
showToast("未选择活动来源");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -200,7 +201,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
pushlisher: this.pushlisher.value,
|
publisher: this.publisher.value,
|
||||||
date: +new Date(this.date),
|
date: +new Date(this.date),
|
||||||
duration: this.duration.value,
|
duration: this.duration.value,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ function mockPlugin() {
|
|||||||
title: act.title,
|
title: act.title,
|
||||||
startTime: act.startTime,
|
startTime: act.startTime,
|
||||||
endTime: act.endTime,
|
endTime: act.endTime,
|
||||||
palce: act.palce,
|
place: act.place,
|
||||||
content: detailsTemplate.content || "活动详情待补充",
|
content: detailsTemplate.content || "活动详情待补充",
|
||||||
publisher: detailsTemplate.publisher || "福州大学至诚学院团委",
|
publisher: detailsTemplate.publisher || "福州大学至诚学院团委",
|
||||||
hour: detailsTemplate.hour || 4,
|
hour: detailsTemplate.hour || 4,
|
||||||
@@ -218,8 +218,53 @@ function mockPlugin() {
|
|||||||
};
|
};
|
||||||
return send(res, result);
|
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");
|
const url = new URL(req.url, `http://${req.headers.host}`);
|
||||||
|
const id = Number(url.searchParams.get("id"));
|
||||||
|
|
||||||
|
if (!id) {
|
||||||
|
return send(res, { error: 1, msg: "missing id parameter" }, 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
const sl = readJson("serviceList.json", {
|
||||||
|
error: 0,
|
||||||
|
data: { current: 1, pageSize: 10, pageCount: 1, list: [] },
|
||||||
|
});
|
||||||
|
const record = (sl.data?.list || []).find((x) => Number(x.id) === id);
|
||||||
|
|
||||||
|
if (!record) {
|
||||||
|
return send(res, { error: 1, msg: "record not found" }, 404);
|
||||||
|
}
|
||||||
|
|
||||||
|
let placeText = record.publisher || "未知来源";
|
||||||
|
if (typeof placeText === "number") {
|
||||||
|
const publishers = readJson("publishers.json", {
|
||||||
|
error: 0,
|
||||||
|
data: { list: [] },
|
||||||
|
});
|
||||||
|
const publisherItem = (publishers.data?.list || []).find(
|
||||||
|
(x) => x.value === placeText
|
||||||
|
);
|
||||||
|
placeText = publisherItem?.text || "未知来源";
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
error: 0,
|
||||||
|
data: {
|
||||||
|
details: {
|
||||||
|
actTime: record.time,
|
||||||
|
place: placeText,
|
||||||
|
content: record.content || "",
|
||||||
|
imgList: record.imgList || [record.pic || "./imgs/actImg.jpeg"],
|
||||||
|
hour: record.hour || 0,
|
||||||
|
uploadTime: record.uploadTime || record.time || Date.now(),
|
||||||
|
status: record.status || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return send(res, result);
|
||||||
|
}
|
||||||
|
|
||||||
// ========== POST:全部改成“落盘” ==========
|
// ========== POST:全部改成“落盘” ==========
|
||||||
// 1) 用户信息保存
|
// 1) 用户信息保存
|
||||||
@@ -343,9 +388,12 @@ function mockPlugin() {
|
|||||||
const nextId =
|
const nextId =
|
||||||
list.reduce((m, x) => Math.max(m, Number(x.id) || 0), 0) + 1;
|
list.reduce((m, x) => Math.max(m, Number(x.id) || 0), 0) + 1;
|
||||||
|
|
||||||
|
const imgList = (incoming.fileList || []).map(item => item.url || item.content || incoming.pic || "./imgs/actImg.jpeg");
|
||||||
|
|
||||||
list.unshift({
|
list.unshift({
|
||||||
id: nextId,
|
id: nextId,
|
||||||
pic: incoming.pic || "./imgs/actImg.jpeg",
|
pic: incoming.pic || "./imgs/actImg.jpeg",
|
||||||
|
imgList,
|
||||||
content: incoming.content || "新增服务记录",
|
content: incoming.content || "新增服务记录",
|
||||||
publisher: incoming.publisher || "未知来源",
|
publisher: incoming.publisher || "未知来源",
|
||||||
time: incoming.time || Date.now(),
|
time: incoming.time || Date.now(),
|
||||||
|
|||||||
Reference in New Issue
Block a user