feat: P1 合盘/星座/问答与测测完整设计包及模拟器取证工具
落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
:key="item.to"
|
||||
:to="item.to"
|
||||
class="item"
|
||||
:class="{ ask: item.ask, on: isActive(item.to) }"
|
||||
:class="{ ask: item.ask, on: isActive(item.key) }"
|
||||
>
|
||||
<span class="ni">{{ item.icon }}</span>
|
||||
{{ item.label }}
|
||||
<span class="lb">{{ item.label }}</span>
|
||||
</router-link>
|
||||
</nav>
|
||||
</template>
|
||||
@@ -18,36 +18,74 @@ import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const items = [
|
||||
{ to: '/', icon: '⌂', label: '首页' },
|
||||
{ to: '/explore', icon: '◎', label: '探索' },
|
||||
{ to: '/ask', icon: '问', label: '问答', ask: true },
|
||||
{ to: '/companion', icon: '♡', label: '陪伴' },
|
||||
{ to: '/mine', icon: '◍', label: '我的' },
|
||||
]
|
||||
{ key: 'home', to: '/', icon: '⌂', label: '首页' },
|
||||
{ key: 'explore', to: '/explore', icon: '◎', label: '探索' },
|
||||
{ key: 'ask', to: '/ask', icon: '问', label: '问答', ask: true },
|
||||
{ key: 'companion', to: '/companion', icon: '♡', label: '陪伴' },
|
||||
{ key: 'mine', to: '/mine', icon: '◍', label: '我的' },
|
||||
] as const
|
||||
|
||||
function isActive(to: string): boolean {
|
||||
if (to === '/') return route.path === '/'
|
||||
return route.path.startsWith(to)
|
||||
function activeKey(): string {
|
||||
const p = route.path
|
||||
if (p.startsWith('/ask')) return 'ask'
|
||||
if (p.startsWith('/companion')) return 'companion'
|
||||
if (
|
||||
p.startsWith('/mine') ||
|
||||
p.startsWith('/profile') ||
|
||||
p.startsWith('/membership') ||
|
||||
p.startsWith('/reports')
|
||||
) {
|
||||
return 'mine'
|
||||
}
|
||||
if (
|
||||
p.startsWith('/explore') ||
|
||||
p.startsWith('/relation') ||
|
||||
p.startsWith('/scales') ||
|
||||
p.startsWith('/portrait') ||
|
||||
p.startsWith('/star') ||
|
||||
p.startsWith('/synastry') ||
|
||||
p.startsWith('/rhythm') ||
|
||||
p.startsWith('/cards') ||
|
||||
p.startsWith('/growth-plan') ||
|
||||
p.startsWith('/share')
|
||||
) {
|
||||
return 'explore'
|
||||
}
|
||||
if (p === '/') return 'home'
|
||||
return 'home'
|
||||
}
|
||||
|
||||
function isActive(key: string): boolean {
|
||||
return activeKey() === key
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tabbar{
|
||||
position:fixed;bottom:0;left:50%;transform:translateX(-50%);
|
||||
width:100%;max-width:var(--yxg-max-w);background:#fff;
|
||||
width:100%;max-width:var(--yxg-max-w);
|
||||
background:rgba(255,255,255,.96);
|
||||
backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
|
||||
display:flex;justify-content:space-around;
|
||||
padding:6px 0 calc(10px + env(safe-area-inset-bottom,0));
|
||||
border-top:1px solid #f0f0f0;z-index:100;
|
||||
border-top:1px solid var(--color-border);z-index:100;
|
||||
box-shadow:var(--shadow-nav);
|
||||
}
|
||||
.item{
|
||||
flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
|
||||
font-size:10px;color:var(--yxg-sub);padding:2px 0;
|
||||
font-size:10px;color:var(--color-text-secondary);padding:2px 0;
|
||||
letter-spacing:.02em;
|
||||
}
|
||||
.item.on{color:var(--yxg-pri);font-weight:600}
|
||||
.ni{font-size:16px;line-height:1.2}
|
||||
.ni{font-size:17px;line-height:1.2}
|
||||
.lb{line-height:1.2}
|
||||
.item.ask .ni{
|
||||
width:36px;height:36px;border-radius:50%;background:var(--yxg-pri);color:#fff;
|
||||
display:flex;align-items:center;justify-content:center;font-size:14px;margin-top:-10px;
|
||||
width:40px;height:40px;border-radius:50%;
|
||||
background:linear-gradient(135deg,#ff7a6e,var(--yxg-pri));
|
||||
color:#fff;
|
||||
display:flex;align-items:center;justify-content:center;
|
||||
font-size:14px;font-weight:700;margin-top:-12px;
|
||||
box-shadow:0 4px 12px rgba(229,77,66,.35);
|
||||
}
|
||||
.item.ask.on{color:var(--yxg-pri)}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user