fix(admin): display numeric sortOrder tag instead of dot badge

这个提交包含在:
xcbyy
2026-10-10 10:18:27 +08:00
父节点 8845fbe7cb
当前提交 c6efac2ee5
共有 3 个文件被更改,包括 72 次插入 和 46 次删除

查看文件

@@ -76,7 +76,9 @@
<a-table-column title="显示排序" data-index="sortOrder" :width="100"> <a-table-column title="显示排序" data-index="sortOrder" :width="100">
<template #cell="{ record }"> <template #cell="{ record }">
<a-badge :count="record.sortOrder" :max-count="999" color="#165dff" /> <a-tag color="arcoblue" size="small" style="font-weight: 600; min-width: 32px; justify-content: center">
{{ record.sortOrder }}
</a-tag>
</template> </template>
</a-table-column> </a-table-column>

查看文件

@@ -73,7 +73,9 @@
<a-table-column title="显示排序" data-index="sortOrder" :width="100"> <a-table-column title="显示排序" data-index="sortOrder" :width="100">
<template #cell="{ record }"> <template #cell="{ record }">
<a-badge :count="record.sortOrder" :max-count="999" color="#165dff" /> <a-tag color="arcoblue" size="small" style="font-weight: 600; min-width: 32px; justify-content: center">
{{ record.sortOrder }}
</a-tag>
</template> </template>
</a-table-column> </a-table-column>

查看文件

@@ -642,33 +642,7 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
`); `);
} }
// 17. 种子平台通用配置(官方客服、履约公告指引、规范协议) // 17. 种子平台通用配置(官方客服、履约公告指引、规范协议、话题、公告、FAQ)
const [cfgItemRows]: any = await conn.query('SELECT COUNT(*) as count FROM platform_configs');
if (cfgItemRows[0].count === 0) {
const customerServiceVal = JSON.stringify({
hotline: '400-888-6666',
hotlineDesc: '7x24h 官方客服服务热线',
wechat: 'peiwan_vip_kefu',
wechatDesc: '官方 VIP 客服微信号',
workHours: '周一至周日 00:00 - 24:00'
});
const safetyNoticeVal = JSON.stringify({
title: '平台官方公告与指引',
points: [
'【安全履约须知】为保障搭子与陪伴师人身与财产安全,线下约局须在合规公开商业街区进行。',
'【现场核销】现场碰面后请出示 4 位数字核销码进行签到确认。',
'【平台兜底】平台提供 7x24 小时争议仲裁与资金托管保障服务,严禁脱离平台私下交易。'
],
noticePopup: false
});
const protocolVal = JSON.stringify({
title: '用户服务协议与隐私规范',
summary: '严禁发布任何违规言论及低俗诈骗行为,平台全面遵循微信内容安全风控与用户隐私保护标准。',
content: '1. 账号使用规范:用户注册与使用陪玩服务须符合国家法律法规,严禁利用平台从事涉黄、赌博、欺诈等违规行为。\n2. 资金与交易保障:平台提供全额担保交易,订单完成前款项由官方账户托管,核销确认后自动结算至大神钱包。\n3. 争议与售后:若遇服务不符或搭子违约,可随时提交争议仲裁由运营平台人工介入裁决。'
});
const communityTopicsVal = JSON.stringify([ const communityTopicsVal = JSON.stringify([
{ id: 'top_1', name: '三里屯探店', hot: true, postsCount: 1280 }, { id: 'top_1', name: '三里屯探店', hot: true, postsCount: 1280 },
{ id: 'top_2', name: '铜锅涮肉AA', hot: true, postsCount: 890 }, { id: 'top_2', name: '铜锅涮肉AA', hot: true, postsCount: 890 },
@@ -712,6 +686,32 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
} }
]); ]);
const [cfgItemRows]: any = await conn.query('SELECT COUNT(*) as count FROM platform_configs');
if (cfgItemRows[0].count === 0) {
const customerServiceVal = JSON.stringify({
hotline: '400-888-6666',
hotlineDesc: '7x24h 官方客服服务热线',
wechat: 'peiwan_vip_kefu',
wechatDesc: '官方 VIP 客服微信号',
workHours: '周一至周日 00:00 - 24:00'
});
const safetyNoticeVal = JSON.stringify({
title: '平台官方公告与指引',
points: [
'【安全履约须知】为保障搭子与陪伴师人身与财产安全,线下约局须在合规公开商业街区进行。',
'【现场核销】现场碰面后请出示 4 位数字核销码进行签到确认。',
'【平台兜底】平台提供 7x24 小时争议仲裁与资金托管保障服务,严禁脱离平台私下交易。'
],
noticePopup: false
});
const protocolVal = JSON.stringify({
title: '用户服务协议与隐私规范',
summary: '严禁发布任何违规言论及低俗诈骗行为,平台全面遵循微信内容安全风控与用户隐私保护标准。',
content: '1. 账号使用规范:用户注册与使用陪玩服务须符合国家法律法规,严禁利用平台从事涉黄、赌博、欺诈等违规行为。\n2. 资金与交易保障:平台提供全额担保交易,订单完成前款项由官方账户托管,核销确认后自动结算至大神钱包。\n3. 争议与售后:若遇服务不符或搭子违约,可随时提交争议仲裁由运营平台人工介入裁决。'
});
await conn.query(` await conn.query(`
INSERT INTO platform_configs (config_key, name, value_json, description, status) INSERT INTO platform_configs (config_key, name, value_json, description, status)
VALUES VALUES
@@ -722,5 +722,27 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
('community_notice', '友圈社区置顶头条公告', ?, '友圈广场顶部置顶横幅公告与社区公约', 1), ('community_notice', '友圈社区置顶头条公告', ?, '友圈广场顶部置顶横幅公告与社区公约', 1),
('faq_list', '帮助中心与常见问题FAQ', ?, '小程序端帮助中心常见问答与指引', 1); ('faq_list', '帮助中心与常见问题FAQ', ?, '小程序端帮助中心常见问答与指引', 1);
`, [customerServiceVal, safetyNoticeVal, protocolVal, communityTopicsVal, communityNoticeVal, faqListVal]); `, [customerServiceVal, safetyNoticeVal, protocolVal, communityTopicsVal, communityNoticeVal, faqListVal]);
} else {
// 增量保证 community_topics, community_notice, faq_list 存在
const [existingRows]: any = await conn.query('SELECT config_key FROM platform_configs');
const existingKeys = new Set(existingRows.map((r: any) => r.config_key));
if (!existingKeys.has('community_topics')) {
await conn.query(`
INSERT INTO platform_configs (config_key, name, value_json, description, status)
VALUES ('community_topics', '友圈热门推荐话题库', ?, '友圈广场发帖推荐话题与热门标签', 1)
`, [communityTopicsVal]);
}
if (!existingKeys.has('community_notice')) {
await conn.query(`
INSERT INTO platform_configs (config_key, name, value_json, description, status)
VALUES ('community_notice', '友圈社区置顶头条公告', ?, '友圈广场顶部置顶横幅公告与社区公约', 1)
`, [communityNoticeVal]);
}
if (!existingKeys.has('faq_list')) {
await conn.query(`
INSERT INTO platform_configs (config_key, name, value_json, description, status)
VALUES ('faq_list', '帮助中心与常见问题FAQ', ?, '小程序端帮助中心常见问答与指引', 1)
`, [faqListVal]);
}
} }
} }