|
|
@@ -0,0 +1,128 @@
|
|
|
+<template>
|
|
|
+ <view v-if="title" class="guide-bar" :class="'guide-bar-' + color" @click="$emit('tap')">
|
|
|
+ <view class="guide-bar-icon-wrap">
|
|
|
+ <text class="guide-bar-icon">{{ icon }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="guide-bar-info">
|
|
|
+ <text class="guide-bar-title">{{ title }}</text>
|
|
|
+ <text class="guide-bar-sub">{{ sub }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="guide-bar-btn">
|
|
|
+ <text class="guide-bar-btn-text">{{ btnText }} ›</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: 'GuideBar',
|
|
|
+ props: {
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: 'orange'
|
|
|
+ },
|
|
|
+ icon: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ sub: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ btnText: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+/* ①.b 行动引导条 — Next Best Action;样式与 pages/index-home/index.vue 原内联区块一致。
|
|
|
+ 页面专有色阶(值非全局令牌)局部定义并注释来源(见 uni.scss §1 品牌/§13 状态) */
|
|
|
+$c-warm-tint: #FFF3E7; // 本地暖橙浅底(页面既有观感)
|
|
|
+$c-brand-ink-2: $mat-orange-deep; // orange-800
|
|
|
+$c-brand-ink-3: $status-warning-strong-2; // amber-700
|
|
|
+$c-wisdom-tint: #EFF4FF; // 本地靛蓝浅底
|
|
|
+$c-wisdom-ink: #312E81; // 本地靛蓝深文字
|
|
|
+$c-wisdom-mid: $accent-indigo-ink; // indigo-700
|
|
|
+$c-wisdom-light: $dim-wisdom-light; // indigo-400
|
|
|
+$c-action-tint: $status-success-tint; // emerald-50
|
|
|
+$c-action-ink: #064E3B; // 本地森林绿深文字
|
|
|
+$c-action-mid: $status-success-deep-2; // emerald-700
|
|
|
+$c-action-light: $status-success-light-3; // emerald-400
|
|
|
+$c-violet-tint: $facade-violet-tint-2; // violet-50
|
|
|
+$c-violet-ink: #4C1D95; // 本地紫深文字
|
|
|
+$c-violet-mid: $violet-700; // violet-700
|
|
|
+$c-fill-slate: $facade-fill-slate-50; // slate-50
|
|
|
+$c-text-slate: $uni-text-color-secondary; // slate-500
|
|
|
+$c-ink-slate: $facade-text-slate-700; // slate-700
|
|
|
+
|
|
|
+.guide-bar {
|
|
|
+ margin: 0 $uni-space-lg 16rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ padding: 18rpx 24rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
|
|
|
+}
|
|
|
+.guide-bar-icon-wrap {
|
|
|
+ width: 72rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin-right: 16rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+.guide-bar-icon { font-size: calc(34rpx * var(--font-scale, 1)); }
|
|
|
+.guide-bar-info { flex: 1; min-width: 0; }
|
|
|
+.guide-bar-title { font-size: calc(27rpx * var(--font-scale, 1)); font-weight: bold; display: block; }
|
|
|
+.guide-bar-sub { font-size: calc(21rpx * var(--font-scale, 1)); margin-top: 3rpx; display: block; }
|
|
|
+.guide-bar-btn {
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-left: 12rpx;
|
|
|
+ padding: 8rpx 20rpx;
|
|
|
+ border-radius: 999rpx;
|
|
|
+ font-size: calc(22rpx * var(--font-scale, 1));
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.guide-bar-btn-text { }
|
|
|
+
|
|
|
+/* 颜色主题 — 低饱和背景 + 深色文字,不抢自测卡风头 */
|
|
|
+.guide-bar-orange { background: $c-warm-tint; border: 1rpx solid rgba($brand-primary, 0.18); }
|
|
|
+.guide-bar-orange .guide-bar-icon-wrap { background: rgba($brand-primary, 0.14); }
|
|
|
+.guide-bar-orange .guide-bar-title { color: $c-brand-ink-2; }
|
|
|
+.guide-bar-orange .guide-bar-sub { color: $c-brand-ink-3; }
|
|
|
+.guide-bar-orange .guide-bar-btn { background: linear-gradient(135deg, $brand-primary, $brand-primary-light); color: $app-surface; }
|
|
|
+
|
|
|
+.guide-bar-blue { background: $c-wisdom-tint; border: 1rpx solid rgba($dim-wisdom, 0.18); }
|
|
|
+.guide-bar-blue .guide-bar-icon-wrap { background: rgba($dim-wisdom, 0.12); }
|
|
|
+.guide-bar-blue .guide-bar-title { color: $c-wisdom-ink; }
|
|
|
+.guide-bar-blue .guide-bar-sub { color: $c-wisdom-mid; }
|
|
|
+.guide-bar-blue .guide-bar-btn { background: linear-gradient(135deg, $dim-wisdom, $c-wisdom-light); color: $app-surface; }
|
|
|
+
|
|
|
+.guide-bar-green { background: $c-action-tint; border: 1rpx solid rgba($dim-action, 0.18); }
|
|
|
+.guide-bar-green .guide-bar-icon-wrap { background: rgba($dim-action, 0.12); }
|
|
|
+.guide-bar-green .guide-bar-title { color: $c-action-ink; }
|
|
|
+.guide-bar-green .guide-bar-sub { color: $c-action-mid; }
|
|
|
+.guide-bar-green .guide-bar-btn { background: linear-gradient(135deg, $dim-action, $c-action-light); color: $app-surface; }
|
|
|
+
|
|
|
+.guide-bar-purple { background: $c-violet-tint; border: 1rpx solid rgba($facade-violet, 0.18); }
|
|
|
+.guide-bar-purple .guide-bar-icon-wrap { background: rgba($facade-violet, 0.12); }
|
|
|
+.guide-bar-purple .guide-bar-title { color: $c-violet-ink; }
|
|
|
+.guide-bar-purple .guide-bar-sub { color: $c-violet-mid; }
|
|
|
+.guide-bar-purple .guide-bar-btn { background: linear-gradient(135deg, $brand-primary, $brand-primary-light); color: $app-surface; }
|
|
|
+
|
|
|
+.guide-bar-gray { background: $c-fill-slate; border: 1rpx solid rgba($c-text-slate, 0.15); }
|
|
|
+.guide-bar-gray .guide-bar-icon-wrap { background: rgba($c-text-slate, 0.10); }
|
|
|
+.guide-bar-gray .guide-bar-title { color: $c-ink-slate; }
|
|
|
+.guide-bar-gray .guide-bar-sub { color: $c-text-slate; }
|
|
|
+.guide-bar-gray .guide-bar-btn { background: linear-gradient(135deg, $app-text-subtle, $app-border); color: $app-surface; }
|
|
|
+</style>
|