fix(activity): 完善活动大厅主题事件监听与生命周期绑定
这个提交包含在:
@@ -129,13 +129,28 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||||
import { ACTIVITIES_LIST } from '@/common/mock.js';
|
import { ACTIVITIES_LIST } from '@/common/mock.js';
|
||||||
import { ICONS } from '@/common/icons.js';
|
import { ICONS } from '@/common/icons.js';
|
||||||
|
import { getCurrentThemeKey } from '@/common/theme.js';
|
||||||
|
|
||||||
const activities = ref(ACTIVITIES_LIST);
|
const activities = ref(ACTIVITIES_LIST);
|
||||||
const currentTab = ref('ALL');
|
const currentTab = ref('ALL');
|
||||||
const currentCategory = ref('ALL');
|
const currentCategory = ref('ALL');
|
||||||
|
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 categoryOptions = [
|
const categoryOptions = [
|
||||||
{ key: 'ALL', label: '全部品类' },
|
{ key: 'ALL', label: '全部品类' },
|
||||||
@@ -501,4 +516,51 @@ const createActivity = () => {
|
|||||||
0%, 100% { box-shadow: 0 8rpx 24rpx rgba(99, 102, 241, 0.45); }
|
0%, 100% { box-shadow: 0 8rpx 24rpx rgba(99, 102, 241, 0.45); }
|
||||||
50% { box-shadow: 0 8rpx 36rpx rgba(99, 102, 241, 0.75); }
|
50% { box-shadow: 0 8rpx 36rpx rgba(99, 102, 241, 0.75); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activity-container.theme-warm {
|
||||||
|
background-color: #140E0A;
|
||||||
|
|
||||||
|
.tab-header {
|
||||||
|
background-color: #221711;
|
||||||
|
border-color: rgba(249, 115, 22, 0.12);
|
||||||
|
|
||||||
|
.tab-item.active {
|
||||||
|
background: rgba(249, 115, 22, 0.2);
|
||||||
|
|
||||||
|
.tab-text {
|
||||||
|
color: #FFF7ED;
|
||||||
|
}
|
||||||
|
.tab-indicator {
|
||||||
|
background: #F97316;
|
||||||
|
box-shadow: 0 0 10rpx #F97316;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips-bar {
|
||||||
|
background: rgba(249, 115, 22, 0.1);
|
||||||
|
border-color: rgba(249, 115, 22, 0.25);
|
||||||
|
.tips-text {
|
||||||
|
color: #FB923C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cat-filter-list .cat-chip.active {
|
||||||
|
background: linear-gradient(135deg, #F97316, #F59E0B);
|
||||||
|
box-shadow: 0 4rpx 14rpx rgba(249, 115, 22, 0.4);
|
||||||
|
.chip-text {
|
||||||
|
color: #FFF7ED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.activity-list .activity-card {
|
||||||
|
background-color: #221711;
|
||||||
|
border-color: rgba(249, 115, 22, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fab-btn {
|
||||||
|
background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
|
||||||
|
box-shadow: 0 8rpx 28rpx rgba(249, 115, 22, 0.55);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户