2026-07-08 16:17:50 +08:00

195 lines
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 未来社区(九九社区)静态内容数据 —— 1:1 还原设计稿 mock
* 来源liuyuanxitong-yidong/src/config/community-data.js、community-content-data.js、convenience-phone-data.js
* 全部为固定数据;关注/报名等可变状态用本地存储维护。
* 图标名为 uview u-icon 名称(已由 Vant 名映射而来)。
*/
/** 顶部定位 */
export const locationInfo = { community: '上河坊·九九社区' }
export const searchPlaceholder = '搜索公告、活动、便民信息'
/** 5 个快捷入口(彩色渐变圆形图标) */
export const shortcuts = [
{ key: 'notice', label: '社区公告', icon: 'volume', bg: 'linear-gradient(135deg, #FF9A12 0%, #FF7900 100%)' },
{ key: 'activity', label: '社区活动', icon: 'calendar', bg: 'linear-gradient(135deg, #FF4752 0%, #EF2231 100%)' },
{ key: 'phone', label: '便民电话', icon: 'phone', bg: 'linear-gradient(135deg, #21C86A 0%, #08A84E 100%)' },
{ key: 'house', label: '我的房屋', icon: 'home', bg: 'linear-gradient(135deg, #3C82FF 0%, #2164F0 100%)' },
{ key: 'goodshop', label: '周边好店', icon: 'shopping-cart', bg: 'linear-gradient(135deg, #B04AFF 0%, #913EE7 100%)' }
]
/** 顶部轮播(用渐变+文案,不依赖外链图片) */
export const heroSlides = [
{ key: 'community-life', title: '九九社区美好生活', subtitle: '邻里相伴,生活更暖心', bg: 'linear-gradient(120deg, #ff4752 0%, #ff8a3d 100%)' },
{ key: 'community-activity', title: '邻里活动精彩不断', subtitle: '一起参与,共享社区好时光', bg: 'linear-gradient(120deg, #ff6a3d 0%, #ffb14a 100%)' },
{ key: 'community-service', title: '便民服务就在身边', subtitle: '公告、报修、生活服务一站直达', bg: 'linear-gradient(120deg, #2164f0 0%, #4aa8ff 100%)' }
]
/** 公告分类标签样式 */
export const NOTICE_TAG_META = {
announcement: { label: '公告', color: '#ffffff', bg: '#df3c3f' },
urgent: { label: '紧急', color: '#ffffff', bg: '#e9272d' },
notice: { label: '通知', color: '#e46d25', bg: '#ffe3cb' },
service: { label: '服务', color: '#1f8a4c', bg: '#dcf5e5' },
activity: { label: '活动', color: '#2164f0', bg: '#e2ecff' }
}
export const NOTICE_TABS = [
{ key: 'all', label: '全部' },
{ key: 'urgent', label: '紧急' },
{ key: 'notice', label: '通知' },
{ key: 'service', label: '服务' }
]
/** 活动状态样式 */
export const ACTIVITY_STATUS_META = {
upcoming: { label: '即将开始', color: '#e46d25', bg: '#ffe9d6' },
ongoing: { label: '进行中', color: '#ffffff', bg: '#e9272d' },
ended: { label: '已结束', color: '#9aa0a8', bg: '#eef0f3' }
}
export const ACTIVITY_TABS = [
{ key: 'all', label: '全部' },
{ key: 'upcoming', label: '即将开始' },
{ key: 'ongoing', label: '进行中' },
{ key: 'ended', label: '已结束' }
]
export const ACTIVITY_REGISTER_NOTICE = [
'请准时到场,活动开始后 15 分钟未到视为放弃名额',
'如需取消报名,请提前 1 天在「邻里关注」中操作',
'活动现场请听从工作人员安排,注意自身与财物安全',
'亲子类活动需家长全程陪同,确保儿童安全'
]
/** 活动场景 → 兜底渐变(无封面图时用) */
export const ACTIVITY_SCENE_BG = {
handicraft: 'linear-gradient(135deg, #ffd9c0 0%, #ffb088 100%)',
market: 'linear-gradient(135deg, #ffe6a3 0%, #ffc24d 100%)',
garden: 'linear-gradient(135deg, #c8efb0 0%, #7cc36a 100%)',
fitness: 'linear-gradient(135deg, #bfe3ff 0%, #6db4f0 100%)',
festival: 'linear-gradient(135deg, #ffc1bb 0%, #f37c6e 100%)'
}
/** 社区公告 */
export const notices = [
{
id: 'n1', icon: 'volume', tag: 'announcement', title: '关于五一劳动节期间服务安排的通知',
summary: '五一期间物业服务中心值班安排及服务时间调整…', date: '2025-04-28', source: '物业服务中心',
readCount: 1286, pinned: true,
content: '<p>尊敬的业主:</p><p>五一劳动节期间,物业服务中心将安排工作人员轮值。前台服务时间调整为每日 9:00-17:0024 小时报修及应急电话保持畅通。</p><p>如需办理装修登记、门禁卡等业务,建议提前预约。祝各位业主节日愉快。</p>'
},
{
id: 'n2', icon: 'bell', tag: 'notice', title: '电梯例行维护保养通知',
summary: '本周将对小区部分楼栋电梯进行例行维护保养…', date: '2025-04-27', source: '物业服务中心',
readCount: 942, pinned: false,
content: '<p>尊敬的业主:</p><p>本周将对小区部分楼栋电梯进行例行维护保养。维护期间电梯将分时段暂停运行,请根据现场提示错峰出行。</p><p>给您带来的不便敬请谅解,感谢您的理解与配合。</p>'
},
{
id: 'n3', icon: 'account', tag: 'notice', title: '物业服务中心工作时间调整',
summary: '自5月1日起物业服务中心工作时间调整如下…', date: '2025-04-25', source: '社区服务站',
readCount: 658, pinned: false,
content: '<p>自 5 月 1 日起,物业服务中心工作时间调整为周一至周日 8:30-18:00午间照常提供咨询服务。</p><p>非工作时间如遇紧急情况,请拨打物业 24 小时值班电话。</p>'
},
{
id: 'n4', icon: 'account', tag: 'activity', title: '邻里议事会:小区充电桩加装意见征集',
summary: '诚邀业主代表参与议事会,就充电桩选址与方案建言。', date: '2026-06-12', source: '社区居委会',
readCount: 473, pinned: false,
content: '<p>为缓解小区新能源车充电难题,社区拟在地面停车区加装公共充电桩。现面向全体业主征集选址与方案意见,欢迎参加本月邻里议事会,共同决定社区事务。</p>'
},
{
id: 'n5', icon: 'gift', tag: 'notice', title: '端午粽香·社区敬老慰问活动回顾',
summary: '社区联合志愿者为高龄独居老人送上粽子与节日问候。', date: '2026-06-09', source: '社区志愿队',
readCount: 805, pinned: false,
content: '<p>端午节前夕,社区志愿者走访慰问了 30 余位高龄独居老人,送上亲手包的粽子与节日祝福。邻里互助、守望相助,是九九社区一直倡导的温暖底色。</p>'
}
]
/** 社区活动image 为本地封面,空串则用 sceneBg 渐变兜底) */
export const activities = [
{
id: 'a6', scene: 'festival', status: 'ended', title: '端午竹编小龙舟手工活动', subtitle: '粽香艾草间,一起把龙舟装进端午记忆',
image: 'https://static.hshuishang.com/static/act-dragonboat.jpg', time: '2026-06-18 14:30 至 16:00',
place: '五常街道海汇社区党群服务中心', address: '五常街道海汇社区党群服务中心一楼活动室', distance: '4.08km',
quota: '限 25 人', enrolled: '25/25人', signupRange: '2026-06-16 10:00 至 2026-06-18 14:00', deadline: '2026-06-18 14:00',
fee: '免费', phone: '0571-8888 0618', organizer: '海汇社区联合九九社区',
points: ['认识端午节、龙舟与竹编手作的传统文化', '在老师指导下完成竹编龙舟骨架与端午挂饰', '活动材料由社区统一提供,成品可带回家留念'],
content: '<p>五月五,过端午。粽子香、艾草芳,龙舟划进手掌上。</p><p>本次活动将传统端午文化与亲子手作结合,老师会从竹编基础、龙舟结构和端午纹样讲起,带领居民一步步完成属于自己的竹编小龙舟。</p><p>活动现场提供竹篾、彩绳、粽子挂饰等材料,完成作品后还可参与社区端午作品展示与合影。</p>'
},
{
id: 'a1', scene: 'handicraft', status: 'upcoming', title: '亲子手工课堂', subtitle: '一起动手,创意无限',
image: 'https://static.hshuishang.com/static/act-handicraft.jpg', time: '2025-05-10 10:00',
place: '橘园社区活动室', address: '橘园社区党群服务中心二楼手工教室', distance: '320m',
quota: '限 20 人', enrolled: '12/20人', signupRange: '2025-05-01 09:00 至 2025-05-09 18:00', deadline: '2025-05-09 18:00',
fee: '免费', phone: '021-5666 0510', organizer: '橘园社区',
points: ['亲子协作完成手工制作,增进亲子感情', '培养孩子动手能力与创造力,激发想象力', '作品展示与分享,收获成就感与快乐'],
content: '<p>本周末邀请专业老师带领小朋友们体验黏土手工,材料由社区免费提供。完成的作品可带回家,也可参与社区作品展。</p><p>适合 3-10 岁儿童及家长共同参与,名额有限,报满即止。</p>'
},
{
id: 'a2', scene: 'market', status: 'upcoming', title: '邻里集市 · 乐享生活', subtitle: '好物共享,邻里更亲',
image: 'https://static.hshuishang.com/static/act-market.jpg', time: '2025-05-17 09:00',
place: '小区中心广场', address: '上河坊小区中心广场东侧', distance: '560m',
quota: '限 50 人', enrolled: '31/50人', signupRange: '2025-05-08 09:00 至 2025-05-16 20:00', deadline: '2025-05-16 20:00',
fee: '免费', phone: '021-5666 0517', organizer: '九九社区邻里中心',
points: ['闲置好物以物换物或低价转让', '现场分区:儿童玩具 / 二手书 / 生活用品', '报名后可领取专属摊位号'],
content: '<p>把家里的闲置好物带到市集,与邻居以物换物或低价转让。现场设有儿童玩具区、二手书区、生活用品区,欢迎全家一起来逛。</p><p>报名后可领取专属摊位号。</p>'
},
{
id: 'a3', scene: 'garden', status: 'ongoing', title: '社区花园认养计划', subtitle: '一平米花园,邻里共养',
image: '', time: '2026-06-01 至 2026-08-31', place: '小区中央花园', address: '', distance: '',
quota: '剩余 8 个地块', enrolled: '16/24人', signupRange: '', deadline: '认养至 2026-08-31',
fee: '免费', phone: '', organizer: '',
points: ['认养小块菜地,自由种植花草蔬果', '社区统一提供工具与水源', '共建绿意社区,结识园艺邻居'],
content: '<p>社区中央花园开放小块菜地认养,认养后可自行种植花草蔬果,社区提供工具与水源。让我们一起把社区装扮得更绿意盎然。</p>'
},
{
id: 'a4', scene: 'fitness', status: 'ongoing', title: '清晨广场健身操', subtitle: '动起来,遇见更好的邻居',
image: '', time: '每日 07:00 · 长期', place: '中心广场', address: '', distance: '',
quota: '无需报名亦可参加', enrolled: '不限人数', signupRange: '', deadline: '长期开放',
fee: '免费', phone: '', organizer: '',
points: ['专业志愿者带操,节奏舒缓适合各年龄', '报名后加入晨练群,接收每日提醒', '坚持打卡有机会获得社区健康好礼'],
content: '<p>社区健身志愿者每天清晨带操,舒缓的有氧节奏适合各年龄段邻居。报名后可加入晨练群,接收每日提醒。</p>'
},
{
id: 'a5', scene: 'festival', status: 'ended', title: '端午包粽子邻里大赛', subtitle: '巧手包粽,温情端午',
image: '', time: '2026-06-08 周日 10:00', place: '社区活动中心', address: '', distance: '',
quota: '活动已结束', enrolled: '40/40人', signupRange: '', deadline: '报名已截止',
fee: '免费', phone: '', organizer: '',
points: ['邻里比拼包粽手艺,现场欢声笑语', '本次共 40 组家庭参与', '感谢参与,下次活动再见'],
content: '<p>端午佳节,邻里齐聚一堂比拼包粽手艺,现场欢声笑语不断。本次活动共有 40 组家庭参与,感谢大家的热情参与,我们下次活动再见。</p>'
}
]
/** 便民电话 */
export const phoneTip = '社区常用便民电话,点击即可一键拨打'
export const phoneList = [
{ id: 'P01', name: '物业服务中心', phone: '021-8266 1234', time: '服务时间 08:00-20:00', icon: 'server-man', iconBg: '#f53d42' },
{ id: 'P02', name: '社区卫生服务站', phone: '021-8266 5678', time: '服务时间 08:30-17:30', icon: 'plus', iconBg: '#24bd6c' },
{ id: 'P03', name: '社区警务室', phone: '021-8266 0110', time: '24 小时值班', icon: 'account', iconBg: '#397eef' },
{ id: 'P04', name: '水电报修热线', phone: '021-8266 9000', time: '服务时间 07:00-22:00', icon: 'home', iconBg: '#ff8a24' },
{ id: 'P05', name: '社区便民服务台', phone: '021-8266 2233', time: '服务时间 09:00-18:00', icon: 'server-man', iconBg: '#ff4164' }
]
// ===== 查找辅助 =====
export function findNotice(id) { return notices.find(n => n.id === id) }
export function findActivity(id) { return activities.find(a => a.id === id) }
// ===== 关注 / 报名状态(本地存储,初始种子与设计稿一致)=====
const K_FN = 'fc_followed_notices'
const K_JA = 'fc_joined_acts'
const K_FA = 'fc_followed_acts'
function getArr(key, seed) {
const v = uni.getStorageSync(key)
if (v === '' || v === undefined || v === null) { uni.setStorageSync(key, seed); return seed.slice() }
return Array.isArray(v) ? v : seed.slice()
}
function toggle(key, seed, id) {
const arr = getArr(key, seed)
const i = arr.indexOf(id)
if (i >= 0) arr.splice(i, 1); else arr.push(id)
uni.setStorageSync(key, arr)
return i < 0
}
export function isNoticeFollowed(id) { return getArr(K_FN, ['n1']).includes(id) }
export function toggleNoticeFollow(id) { return toggle(K_FN, ['n1'], id) }
export function isActivityJoined(id) { return getArr(K_JA, ['a3', 'a6']).includes(id) }
export function toggleActivityJoin(id) { return toggle(K_JA, ['a3', 'a6'], id) }
export function isActivityFollowed(id) { return getArr(K_FA, ['a1']).includes(id) }
export function toggleActivityFollow(id) { return toggle(K_FA, ['a1'], id) }