feat(members): add member ID to members list
This commit introduces a 'Member ID' column to the members table, making it the first column for easy reference. - The member data schema and sample CSV have been updated to include the `memberId`. - The members page now displays the `memberId` for each member. - Additionally, a version query string has been added to the hero image URL to force a cache refresh.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<UPageHero
|
<UPageHero
|
||||||
class="bg-cover bg-center"
|
class="bg-cover bg-center"
|
||||||
style="
|
style="
|
||||||
background-image: url("/hero-image-2.jpg");
|
background-image: url("/hero-image-2.jpg?v=2");
|
||||||
background-position-y: -40px;
|
background-position-y: -40px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent black */
|
background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent black */
|
||||||
|
|||||||
@@ -15,16 +15,17 @@ import { z } from "zod";
|
|||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "会员总览",
|
title: "会员总览",
|
||||||
description: "永平中学校友会会员总览,查询每位校友的毕业年份、届别、加入年份与现居国家。",
|
description:
|
||||||
|
"永平中学校友会会员总览,查询每位校友的毕业年份、届别、加入年份与现居国家。",
|
||||||
keywords: "永平中学校友会, 校友会员, 毕业届别, 会员名录, 校友查询",
|
keywords: "永平中学校友会, 校友会员, 毕业届别, 会员名录, 校友查询",
|
||||||
ogTitle: "永平中学校友会会员总览",
|
ogTitle: "永平中学校友会会员总览",
|
||||||
ogDescription:
|
ogDescription: "浏览永平中学校友会会员资料,了解各届校友的分布与加入年份。",
|
||||||
"浏览永平中学校友会会员资料,了解各届校友的分布与加入年份。",
|
|
||||||
// ogImage: "/members/ogImage.png",
|
// ogImage: "/members/ogImage.png",
|
||||||
ogType: "website",
|
ogType: "website",
|
||||||
})
|
});
|
||||||
|
|
||||||
const MemberSchema = z.object({
|
const MemberSchema = z.object({
|
||||||
|
memberId: z.string(),
|
||||||
chineseName: z.string(),
|
chineseName: z.string(),
|
||||||
englishName: z.string(),
|
englishName: z.string(),
|
||||||
// ic: z.string(),
|
// ic: z.string(),
|
||||||
@@ -51,6 +52,10 @@ const { data: members } = await useAsyncData("members", async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const columns: TableColumn<Member>[] = [
|
const columns: TableColumn<Member>[] = [
|
||||||
|
{
|
||||||
|
accessorKey: "memberId",
|
||||||
|
header: "会员编号",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "chineseName",
|
accessorKey: "chineseName",
|
||||||
header: "中文姓名",
|
header: "中文姓名",
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export default defineContentConfig({
|
|||||||
type: "data",
|
type: "data",
|
||||||
source: "members/members.csv",
|
source: "members/members.csv",
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
|
// id: z.number(),
|
||||||
// chinese_name: z.string(),
|
// chinese_name: z.string(),
|
||||||
// english_name: z.string(),
|
// english_name: z.string(),
|
||||||
// ic: z.string(),
|
// ic: z.string(),
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
chineseName,englishName,ic,mobile,home,email,graduateLevel,,graduateYear,marriageStatus,livingCountry,addressLine1,addressLine2,addressLine3,joinedYear,receiptNumber
|
memberId,chineseName,englishName,ic,mobile,home,email,graduateLevel,,graduateYear,marriageStatus,livingCountry,addressLine1,addressLine2,addressLine3,joinedYear,receiptNumber
|
||||||
|
|||||||
|
@@ -50,7 +50,7 @@ export default defineNuxtConfig({
|
|||||||
{ property: "og:url", content: "https://yphsalumni.org" }, // ✅ 换成你网站的真实域名
|
{ property: "og:url", content: "https://yphsalumni.org" }, // ✅ 换成你网站的真实域名
|
||||||
{
|
{
|
||||||
property: "og:image",
|
property: "og:image",
|
||||||
content: "https://yphsalumni.org/hero-image-2.jpg",
|
content: "https://yphsalumni.org/hero-image-2.jpg?v=2",
|
||||||
}, // ✅ 上传一张封面图
|
}, // ✅ 上传一张封面图
|
||||||
|
|
||||||
// Twitter Card
|
// Twitter Card
|
||||||
@@ -62,7 +62,7 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "twitter:image",
|
name: "twitter:image",
|
||||||
content: "https://yphsalumni.org/hero-image-2.jpg",
|
content: "https://yphsalumni.org/hero-image-2.jpg?v=2",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user