fix(admin): display numeric sortOrder tag instead of dot badge
这个提交包含在:
@@ -642,7 +642,50 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
`);
|
||||
}
|
||||
|
||||
// 17. 种子平台通用配置(官方客服、履约公告指引、规范协议)
|
||||
// 17. 种子平台通用配置(官方客服、履约公告指引、规范协议、话题、公告、FAQ)
|
||||
const communityTopicsVal = JSON.stringify([
|
||||
{ id: 'top_1', name: '三里屯探店', hot: true, postsCount: 1280 },
|
||||
{ id: 'top_2', name: '铜锅涮肉AA', hot: true, postsCount: 890 },
|
||||
{ id: 'top_3', name: '工体纯K麦霸', hot: false, postsCount: 650 },
|
||||
{ id: 'top_4', name: '国服上分车队', hot: true, postsCount: 2310 },
|
||||
{ id: 'top_5', name: '望京跳海微醺', hot: false, postsCount: 420 },
|
||||
{ id: 'top_6', name: '同城搭子招募', hot: true, postsCount: 3100 }
|
||||
]);
|
||||
|
||||
const communityNoticeVal = JSON.stringify({
|
||||
title: '友圈同城互动与公约置顶',
|
||||
content: '欢迎来到同城搭子友圈!文明交友,发布真实组局诉求;平台全天候对动态与评论实施微信官方内容安全过滤,严禁广告引流及私下交易。',
|
||||
tag: '置顶推荐',
|
||||
showInBanner: true
|
||||
});
|
||||
|
||||
const faqListVal = JSON.stringify([
|
||||
{
|
||||
id: 'faq_1',
|
||||
category: '新手预约与组局',
|
||||
question: '什么是4位纯数字核销码?',
|
||||
answer: '为确保搭子碰面和订单真实履约,下单成功或报名组局后系统自动生成专属4位防伪数字码,到达公开活动现场后出示给陪伴师或房主签到核销。'
|
||||
},
|
||||
{
|
||||
id: 'faq_2',
|
||||
category: '新手预约与组局',
|
||||
question: 'AA制拼桌与房主请客有什么区别?',
|
||||
answer: '【AA制拼桌】由参与人员平摊费用,报名时支付人均分摊金额;【房主请客/项目制】由发起房主全额买单,且房主可随时追加赏金或提高出价。'
|
||||
},
|
||||
{
|
||||
id: 'faq_3',
|
||||
category: '资金与退款',
|
||||
question: '如何申请退款与争议仲裁?',
|
||||
answer: '在订单【待接单】或【待付款】状态可随时取消全额退款;在【服务中】或遇违约可在订单详情点击【发起争议仲裁】,由平台官方运营人工介入判定。'
|
||||
},
|
||||
{
|
||||
id: 'faq_4',
|
||||
category: '大神与收益',
|
||||
question: '成为陪玩大神有什么资质要求?',
|
||||
answer: '需在小程序个人中心提交实名认证与技能资质,通过平台运营团队人工审核后,即可解锁接单工作台与附近雷达扫单功能。'
|
||||
}
|
||||
]);
|
||||
|
||||
const [cfgItemRows]: any = await conn.query('SELECT COUNT(*) as count FROM platform_configs');
|
||||
if (cfgItemRows[0].count === 0) {
|
||||
const customerServiceVal = JSON.stringify({
|
||||
@@ -669,49 +712,6 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
content: '1. 账号使用规范:用户注册与使用陪玩服务须符合国家法律法规,严禁利用平台从事涉黄、赌博、欺诈等违规行为。\n2. 资金与交易保障:平台提供全额担保交易,订单完成前款项由官方账户托管,核销确认后自动结算至大神钱包。\n3. 争议与售后:若遇服务不符或搭子违约,可随时提交争议仲裁由运营平台人工介入裁决。'
|
||||
});
|
||||
|
||||
const communityTopicsVal = JSON.stringify([
|
||||
{ id: 'top_1', name: '三里屯探店', hot: true, postsCount: 1280 },
|
||||
{ id: 'top_2', name: '铜锅涮肉AA', hot: true, postsCount: 890 },
|
||||
{ id: 'top_3', name: '工体纯K麦霸', hot: false, postsCount: 650 },
|
||||
{ id: 'top_4', name: '国服上分车队', hot: true, postsCount: 2310 },
|
||||
{ id: 'top_5', name: '望京跳海微醺', hot: false, postsCount: 420 },
|
||||
{ id: 'top_6', name: '同城搭子招募', hot: true, postsCount: 3100 }
|
||||
]);
|
||||
|
||||
const communityNoticeVal = JSON.stringify({
|
||||
title: '友圈同城互动与公约置顶',
|
||||
content: '欢迎来到同城搭子友圈!文明交友,发布真实组局诉求;平台全天候对动态与评论实施微信官方内容安全过滤,严禁广告引流及私下交易。',
|
||||
tag: '置顶推荐',
|
||||
showInBanner: true
|
||||
});
|
||||
|
||||
const faqListVal = JSON.stringify([
|
||||
{
|
||||
id: 'faq_1',
|
||||
category: '新手预约与组局',
|
||||
question: '什么是4位纯数字核销码?',
|
||||
answer: '为确保搭子碰面和订单真实履约,下单成功或报名组局后系统自动生成专属4位防伪数字码,到达公开活动现场后出示给陪伴师或房主签到核销。'
|
||||
},
|
||||
{
|
||||
id: 'faq_2',
|
||||
category: '新手预约与组局',
|
||||
question: 'AA制拼桌与房主请客有什么区别?',
|
||||
answer: '【AA制拼桌】由参与人员平摊费用,报名时支付人均分摊金额;【房主请客/项目制】由发起房主全额买单,且房主可随时追加赏金或提高出价。'
|
||||
},
|
||||
{
|
||||
id: 'faq_3',
|
||||
category: '资金与退款',
|
||||
question: '如何申请退款与争议仲裁?',
|
||||
answer: '在订单【待接单】或【待付款】状态可随时取消全额退款;在【服务中】或遇违约可在订单详情点击【发起争议仲裁】,由平台官方运营人工介入判定。'
|
||||
},
|
||||
{
|
||||
id: 'faq_4',
|
||||
category: '大神与收益',
|
||||
question: '成为陪玩大神有什么资质要求?',
|
||||
answer: '需在小程序个人中心提交实名认证与技能资质,通过平台运营团队人工审核后,即可解锁接单工作台与附近雷达扫单功能。'
|
||||
}
|
||||
]);
|
||||
|
||||
await conn.query(`
|
||||
INSERT INTO platform_configs (config_key, name, value_json, description, status)
|
||||
VALUES
|
||||
@@ -722,5 +722,27 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
('community_notice', '友圈社区置顶头条公告', ?, '友圈广场顶部置顶横幅公告与社区公约', 1),
|
||||
('faq_list', '帮助中心与常见问题FAQ', ?, '小程序端帮助中心常见问答与指引', 1);
|
||||
`, [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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户