feat(companion): 全面确立以陪吃·陪喝·陪唱为主的核心架构,重构首屏推荐阵容与歌声试听
这个提交包含在:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="user-container">
|
||||
<view class="user-container" :class="{ 'theme-warm': currentThemeKey === 'warm' }">
|
||||
<!-- 用户头部个人资料卡 -->
|
||||
<view class="profile-card">
|
||||
<image class="user-avatar" :src="user.avatar" mode="aspectFill" />
|
||||
@@ -92,6 +92,14 @@
|
||||
|
||||
<!-- 列表式功能菜单 (纯矢量SVG图标) -->
|
||||
<view class="list-menu-card">
|
||||
<view class="list-row btn-active" @click="handleSwitchTheme">
|
||||
<image class="row-svg" :src="ICONS.palette" mode="aspectFit" />
|
||||
<text class="row-label">界面主题风格</text>
|
||||
<view class="theme-pill" :class="{ warm: currentThemeKey === 'warm' }">
|
||||
<text>{{ currentThemeKey === 'warm' ? '暖阳赤焰' : '冷光暗夜' }}</text>
|
||||
</view>
|
||||
<text class="row-arrow">></text>
|
||||
</view>
|
||||
<view class="list-row btn-active" @click="contactService">
|
||||
<image class="row-svg" :src="ICONS.headphones" mode="aspectFit" />
|
||||
<text class="row-label">官方在线客服</text>
|
||||
@@ -112,12 +120,43 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, onMounted, onUnmounted } from 'vue';
|
||||
import { USER_PROFILE } from '@/common/mock.js';
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, setTheme, THEME_KEYS } from '@/common/theme.js';
|
||||
|
||||
const user = ref(USER_PROFILE);
|
||||
const currentRole = ref('PLAYER');
|
||||
const currentThemeKey = ref(getCurrentThemeKey());
|
||||
|
||||
const onThemeChanged = (key) => {
|
||||
currentThemeKey.value = key;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
uni.$on('theme-change', onThemeChanged);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('theme-change', onThemeChanged);
|
||||
});
|
||||
|
||||
const handleSwitchTheme = () => {
|
||||
uni.showActionSheet({
|
||||
itemList: ['冷光暗夜 (经典暗夜蓝紫)', '暖阳赤焰 (热情暖橙金流光)'],
|
||||
success: (res) => {
|
||||
const selectedKey = res.tapIndex === 1 ? THEME_KEYS.WARM : THEME_KEYS.COOL;
|
||||
currentThemeKey.value = selectedKey;
|
||||
setTheme(selectedKey);
|
||||
uni.showToast({
|
||||
title: selectedKey === THEME_KEYS.WARM ? '已切换至【暖阳赤焰】暖色系' : '已切换至【冷光暗夜】经典款',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const toggleRole = () => {
|
||||
if (currentRole.value === 'PLAYER') {
|
||||
@@ -522,6 +561,23 @@ const navTo = (url) => {
|
||||
color: #E2E8F0;
|
||||
}
|
||||
|
||||
.theme-pill {
|
||||
margin-right: 16rpx;
|
||||
font-size: 22rpx;
|
||||
color: #818CF8;
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
border: 1px solid rgba(99, 102, 241, 0.3);
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
font-weight: 500;
|
||||
|
||||
&.warm {
|
||||
color: #FB923C;
|
||||
background: rgba(249, 115, 22, 0.15);
|
||||
border-color: rgba(249, 115, 22, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.row-arrow {
|
||||
font-size: 24rpx;
|
||||
color: #64748B;
|
||||
@@ -529,6 +585,25 @@ const navTo = (url) => {
|
||||
}
|
||||
}
|
||||
|
||||
.user-container.theme-warm {
|
||||
background-color: #140E0A;
|
||||
|
||||
.profile-card .user-avatar {
|
||||
border-color: #F97316;
|
||||
}
|
||||
.role-switch-card .role-glow-border {
|
||||
background: conic-gradient(from 0deg, #F97316, #F59E0B, #EA580C, #F97316);
|
||||
}
|
||||
.role-switch-card .btn-switch-role {
|
||||
background: linear-gradient(135deg, #F97316, #EA580C);
|
||||
box-shadow: 0 4rpx 16rpx rgba(249, 115, 22, 0.4);
|
||||
}
|
||||
.wallet-card, .menu-grid-card, .list-menu-card {
|
||||
background-color: #221711;
|
||||
border-color: rgba(249, 115, 22, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes glowSpin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
|
||||
在新工单中引用
屏蔽一个用户