feat(companion): 全面确立以陪吃·陪喝·陪唱为主的核心架构,重构首屏推荐阵容与歌声试听

这个提交包含在:
wikiboss
2026-09-16 20:16:56 +08:00
父节点 341023c77b
当前提交 9fd7ea2c5a
共有 14 个文件被更改,包括 749 次插入 和 82 次删除

查看文件

@@ -264,5 +264,34 @@ export const ICONS = {
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
`),
// 同城陪唱·KTV/麦霸
micVocal: svgToUri(`
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#F43F5E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
<line x1="12" y1="19" x2="12" y2="23"></line>
<line x1="8" y1="23" x2="16" y2="23"></line>
</svg>
`),
// 主题切换·调色板
palette: svgToUri(`
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#F97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="13.5" cy="6.5" r=".5" fill="#F97316"></circle>
<circle cx="17.5" cy="10.5" r=".5" fill="#F97316"></circle>
<circle cx="8.5" cy="7.5" r=".5" fill="#F97316"></circle>
<circle cx="6.5" cy="12.5" r=".5" fill="#F97316"></circle>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"></path>
</svg>
`),
// 暖阳火苗·暖色流光
warmFlame: svgToUri(`
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#F97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"></path>
</svg>
`)
};

查看文件

@@ -3,21 +3,130 @@ import { ICONS } from './icons.js';
export const GAMES_LIST = [
{ id: 'all', name: '全部', icon: ICONS.gameAll, hot: false },
{ id: 'offline_meal', name: '美食陪吃', icon: ICONS.utensils, hot: true },
{ id: 'offline_drink', name: '下午茶陪喝', icon: ICONS.coffee, hot: false },
{ id: 'offline_play', name: '同城陪玩', icon: ICONS.dice, hot: true },
{ id: 'offline_drink', name: '下午茶陪喝', icon: ICONS.coffee, hot: true },
{ id: 'offline_sing', name: '同城陪唱', icon: ICONS.micVocal, hot: true },
{ id: 'offline_play', name: '同城陪玩', icon: ICONS.dice, hot: false },
{ id: 'wzry', name: '王者荣耀', icon: ICONS.gameCrown, hot: false },
{ id: 'hpjy', name: '和平精英', icon: ICONS.gameCrosshair, hot: false },
{ id: 'lol', name: '英雄联盟', icon: ICONS.gameSwords, hot: false },
{ id: 'val', name: '无畏契约', icon: ICONS.gameTarget, hot: false },
];
export const BANNERS = [
{ id: '1', title: '周末车队狂欢 | AA制五排冲分', tag: '热门活动', bg: 'linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%)' },
{ id: '2', title: '新用户专享 | 首单立减20元', tag: '新人福利', bg: 'linear-gradient(135deg, #059669 0%, #10B981 100%)' },
{ id: '3', title: '全国水友杯内战 | 项目制万元奖池', tag: '巅峰赛事', bg: 'linear-gradient(135deg, #D97706 0%, #F59E0B 100%)' },
{ id: '1', title: '同城聚会狂欢 | 网红火锅探店与量贩KTV嗨唱', tag: '热门陪伴', bg: 'linear-gradient(135deg, #F43F5E 0%, #FB7185 100%)' },
{ id: '2', title: '新用户专享 | 线下陪吃陪喝立减30元', tag: '新人特惠', bg: 'linear-gradient(135deg, #059669 0%, #10B981 100%)' },
{ id: '3', title: '天籁歌喉进驻 | 音乐学院陪唱达人歌声试听', tag: 'K歌对唱', bg: 'linear-gradient(135deg, #7C3AED 0%, #6366F1 100%)' },
];
export const EXPERTS_LIST = [
{
id: 'exp_105',
nickname: '橙子小七',
avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=800&h=400&fit=crop',
gender: 'female',
age: 22,
game: '美食陪吃',
track: 'OFFLINE_MEAL',
city: '北京市 · 朝阳/三里屯',
rankTag: '美食探店达人 · 火锅烤肉搭子',
levelTag: '同城红人',
price: 68,
rating: 5.0,
orderCount: 420,
isOnline: true,
voiceDuration: 14,
voiceType: 'voice',
bio: '资深美食探店博主,性格随和开朗,陪你吃遍同城网红餐厅与地道市井美味,消费约定AA或请客~',
photos: ['https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=500&fit=crop'],
services: [
{ id: 'srv_7', title: '同城美食探店 · 火锅/烤肉饭搭子', price: 68, unit: '小时', desc: '公开商场餐厅,绝不踩雷,现场AA或买单' },
{ id: 'srv_8', title: '商圈早午餐/轻食下午茶陪伴', price: 58, unit: '小时', desc: '轻松闲聊,氛围愉快,阳光公开场所' },
],
reviews: [
{ id: 'r4', userNickname: '吃货小张', userAvatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=100', rating: 5, tags: ['随和健谈', '推荐靠谱'], content: '火锅店推荐的太好吃了,聊得很投缘!', time: '昨天' },
],
},
{
id: 'exp_107',
nickname: '苏苏学姐',
avatar: 'https://images.unsplash.com/photo-1524504388940-b1c1722653e1?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?w=800&h=400&fit=crop',
gender: 'female',
age: 21,
game: '同城陪唱',
track: 'OFFLINE_SING',
city: '北京市 · 工体/五道口',
rankTag: '音乐学院在读 · 甜美情歌对唱',
levelTag: '天籁歌喉',
price: 88,
rating: 5.0,
orderCount: 560,
isOnline: true,
voiceDuration: 18,
voiceType: 'song',
voiceTitle: '歌声试听 · 《晴天》甜美对唱',
bio: '音乐学院流行演唱在读,精通流行热门情歌与粤语金曲,KTV对唱超好听,包厢气氛组担当~限正规公开量贩KTV。',
photos: ['https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?w=500&fit=crop'],
services: [
{ id: 'srv_11', title: '量贩KTV麦霸对唱与包厢气氛', price: 88, unit: '小时', desc: '正规公开KTV,包厢房费与酒水消费约定AA或请客' },
{ id: 'srv_12', title: '同城Livehouse/音乐节同游陪伴', price: 98, unit: '小时', desc: '现场沉浸听歌,音乐狂欢好搭子' },
],
reviews: [
{ id: 'r5', userNickname: 'K歌达人阿伟', userAvatar: 'https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?w=100', rating: 5, tags: ['歌声惊艳', '超高情商'], content: '歌声真的太好听了,完全是专业级水平,气氛特别好!', time: '3小时前' },
],
},
{
id: 'exp_106',
nickname: '莫吉托学长',
avatar: 'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?w=800&h=400&fit=crop',
gender: 'male',
age: 24,
game: '下午茶陪喝',
track: 'OFFLINE_DRINK',
city: '北京市 · 国贸/望京',
rankTag: '手冲咖啡师 · 清吧倾听解压',
levelTag: '暖心导师',
price: 58,
rating: 4.9,
orderCount: 310,
isOnline: true,
voiceDuration: 16,
voiceType: 'voice',
bio: 'SCA认证咖啡师与调酒师,善于倾听情绪解压,阳光透明,约定公开正规咖啡馆或清吧。',
photos: ['https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?w=500&fit=crop'],
services: [
{ id: 'srv_9', title: '精品咖啡品鉴 · 聊天解压倾听', price: 58, unit: '小时', desc: '星巴克臻选/独立咖啡馆,温和交流' },
{ id: 'srv_10', title: '正规清吧微醺特调陪伴', price: 78, unit: '小时', desc: '限公开正规商业清吧,严禁过量饮酒' },
],
reviews: [],
},
{
id: 'exp_108',
nickname: '阿泽学长',
avatar: 'https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?w=800&h=400&fit=crop',
gender: 'male',
age: 23,
game: '同城陪唱',
track: 'OFFLINE_SING',
city: '北京市 · 海淀/中关村',
rankTag: '流行摇滚主唱 · 吉他伴奏对唱',
levelTag: '全能麦霸',
price: 78,
rating: 4.9,
orderCount: 480,
isOnline: true,
voiceDuration: 20,
voiceType: 'song',
voiceTitle: '歌声试听 · 摇滚流行高音',
bio: '高校乐队主唱,吉他弹唱/流行摇滚,KTV气氛直接拉满,绝不冷场,带你体验演唱会包厢~',
photos: ['https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?w=500&fit=crop'],
services: [
{ id: 'srv_13', title: 'KTV流行摇滚对唱与吉他弹唱', price: 78, unit: '小时', desc: '气氛担当,带动全场,限公开正规量贩KTV' },
],
reviews: [],
},
{
id: 'exp_101',
nickname: '月色浅浅',
@@ -119,58 +228,6 @@ export const EXPERTS_LIST = [
],
reviews: [],
},
{
id: 'exp_105',
nickname: '橙子小七',
avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=800&h=400&fit=crop',
gender: 'female',
age: 22,
game: '美食陪吃',
track: 'OFFLINE_MEAL',
city: '北京市 · 朝阳/三里屯',
rankTag: '美食探店达人 · 火锅烤肉搭子',
levelTag: '同城红人',
price: 68,
rating: 5.0,
orderCount: 420,
isOnline: true,
voiceDuration: 14,
bio: '资深美食探店博主,性格随和开朗,陪你吃遍同城网红餐厅与地道市井美味,消费约定AA或请客~',
photos: ['https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=500&fit=crop'],
services: [
{ id: 'srv_7', title: '同城美食探店 · 火锅/烤肉饭搭子', price: 68, unit: '小时', desc: '公开商场餐厅,绝不踩雷,现场AA或买单' },
{ id: 'srv_8', title: '商圈早午餐/轻食下午茶陪伴', price: 58, unit: '小时', desc: '轻松闲聊,氛围愉快,阳光公开场所' },
],
reviews: [
{ id: 'r4', userNickname: '吃货小张', userAvatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=100', rating: 5, tags: ['随和健谈', '推荐靠谱'], content: '火锅店推荐的太好吃了,聊得很投缘!', time: '昨天' },
],
},
{
id: 'exp_106',
nickname: '莫吉托学长',
avatar: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=300&h=300&fit=crop&crop=faces',
coverImage: 'https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?w=800&h=400&fit=crop',
gender: 'male',
age: 24,
game: '下午茶陪喝',
track: 'OFFLINE_DRINK',
city: '北京市 · 国贸/望京',
rankTag: '手冲咖啡师 · 清吧倾听解压',
levelTag: '暖心导师',
price: 58,
rating: 4.9,
orderCount: 310,
isOnline: true,
voiceDuration: 16,
bio: '前五星酒店调酒师与SCA认证咖啡师,善于倾听情绪解压,阳光透明,约定公开正规咖啡馆或清吧。',
photos: ['https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?w=500&fit=crop'],
services: [
{ id: 'srv_9', title: '精品咖啡品鉴 · 聊天解压倾听', price: 58, unit: '小时', desc: '星巴克臻选/独立咖啡馆,温和交流' },
{ id: 'srv_10', title: '正规清吧微醺特调陪伴', price: 78, unit: '小时', desc: '限公开正规商业清吧,严禁过量饮酒' },
],
reviews: [],
},
];
export const ACTIVITIES_LIST = [

116
pwuniapp/common/theme.js 普通文件
查看文件

@@ -0,0 +1,116 @@
/**
* 前端双主题设计系统核心管理模块
* 严格遵照 UI/UX 规范:无 Emoji、纯矢量、高对比度与 WCAG AA 标准
*/
export const THEME_KEYS = {
COOL: 'cool',
WARM: 'warm'
};
export const THEMES = {
[THEME_KEYS.COOL]: {
key: THEME_KEYS.COOL,
name: '冷光暗夜',
description: '深邃暗夜黑与电竞靛蓝流光,专业沉浸质感',
tokens: {
bgPrimary: '#0A0F1D',
bgSurface: '#151D30',
bgSurfaceElevated: '#1E2942',
bgSurfaceGlass: 'rgba(21, 29, 48, 0.85)',
colorBrand: '#6366F1',
colorBrandLight: '#818CF8',
colorBrandGold: '#F59E0B',
colorBrandGlow: 'rgba(99, 102, 241, 0.35)',
colorBrandGradient: 'linear-gradient(135deg, #6366F1, #8B5CF6)',
borderSubtle: '#1E293B',
borderFocus: '#4F46E5',
textPrimary: '#F8FAFC',
textSecondary: '#94A3B8',
textMuted: '#64748B',
shadowBrand: '0 8rpx 24rpx rgba(99, 102, 241, 0.35)'
}
},
[THEME_KEYS.WARM]: {
key: THEME_KEYS.WARM,
name: '暖阳赤焰',
description: '深邃暖焦糖褐与暖阳曜橙流光,热情温馨有活力',
tokens: {
bgPrimary: '#140E0A',
bgSurface: '#221711',
bgSurfaceElevated: '#2E1F17',
bgSurfaceGlass: 'rgba(34, 23, 17, 0.85)',
colorBrand: '#F97316',
colorBrandLight: '#FB923C',
colorBrandGold: '#F59E0B',
colorBrandGlow: 'rgba(249, 115, 22, 0.35)',
colorBrandGradient: 'linear-gradient(135deg, #F97316, #F59E0B)',
borderSubtle: '#342217',
borderFocus: '#EA580C',
textPrimary: '#FFF7ED',
textSecondary: '#C7B5A7',
textMuted: '#8C7565',
shadowBrand: '0 8rpx 24rpx rgba(249, 115, 22, 0.35)'
}
}
};
const STORAGE_KEY = 'peiwan_app_theme';
/**
* 获取当前持久化的主题标识
*/
export function getCurrentThemeKey() {
try {
const saved = uni.getStorageSync(STORAGE_KEY);
if (saved && THEMES[saved]) {
return saved;
}
} catch (e) {
// 忽略异常,降级到默认
}
return THEME_KEYS.COOL;
}
/**
* 获取当前主题配置对象
*/
export function getCurrentTheme() {
const key = getCurrentThemeKey();
return THEMES[key];
}
/**
* 获取当前主题 Tokens
*/
export function getCurrentTokens() {
return getCurrentTheme().tokens;
}
/**
* 切换全局主题并持久化,广播全局事件
*/
export function setTheme(themeKey) {
const targetKey = THEMES[themeKey] ? themeKey : THEME_KEYS.COOL;
try {
uni.setStorageSync(STORAGE_KEY, targetKey);
} catch (e) {
// 忽略持久化异常
}
// 广播主题变更事件
try {
uni.$emit('theme-change', targetKey);
} catch (e) {
// 忽略事件抛出异常
}
return THEMES[targetKey];
}
/**
* 获取所有可选主题列表
*/
export function getAvailableThemes() {
return Object.values(THEMES);
}