fix: homepage layout optimization (2-col grid, guest CTA, daily question for guests)
- Unified feature grid to consistent 2-column layout - Improved hero guest card with benefit tags - Show daily question section for guests with login prompt - Added AGENTS.md: H5 deployment docs, git remote, build gotchas
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="hero-row">
|
||||
<view class="hero-left">
|
||||
<text class="hero-title">{{ greeting }}</text>
|
||||
<text class="hero-sub">试试下面的功能,开启你的求职练习</text>
|
||||
<text class="hero-sub">{{ userInfo ? '试试下面的功能,开启你的求职练习' : '登录后免费使用 AI 模拟面试 · 简历优化 · 面经题库' }}</text>
|
||||
</view>
|
||||
<view class="hero-right">
|
||||
<view class="user-card card" v-if="userInfo" @click="goProfile">
|
||||
@@ -21,10 +21,13 @@
|
||||
<view class="guest-card card" v-else @click="goLogin">
|
||||
<image class="avatar" src="/static/avatar-default.png" mode="aspectFill" />
|
||||
<view class="user-meta">
|
||||
<text class="user-name">立即登录</text>
|
||||
<text class="guest-hint">登录后体验全部功能</text>
|
||||
<text class="user-name">登录 / 注册</text>
|
||||
<view class="guest-benefits">
|
||||
<text class="guest-benefit">🎙️ 模拟面试</text>
|
||||
<text class="guest-benefit">📄 简历优化</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="arrow">›</text>
|
||||
<text class="guest-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,16 +46,14 @@
|
||||
</view>
|
||||
<text class="fp-action">开始</text>
|
||||
</view>
|
||||
<view class="feature-secondary" style="margin-bottom: 16rpx;">
|
||||
<view class="feature-grid">
|
||||
<view class="fs-card card" @click="goCareer">
|
||||
<view class="fs-top">
|
||||
<view class="fs-icon fs-progress"><text class="fs-emoji">🎯</text></view>
|
||||
<view class="fs-icon fs-career"><text class="fs-emoji">🎯</text></view>
|
||||
<text class="fs-name">AI 择业顾问</text>
|
||||
</view>
|
||||
<text class="fs-brief">专业分析 · 岗位匹配 · 智能推荐</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="feature-tertiary">
|
||||
<view class="fs-card card" @click="goResume">
|
||||
<view class="fs-top">
|
||||
<view class="fs-icon fs-resume"><text class="fs-emoji">📄</text></view>
|
||||
@@ -74,18 +75,16 @@
|
||||
</view>
|
||||
<text class="fs-brief">分享经验 · 共建题库 · 帮更多人</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="feature-secondary">
|
||||
<view class="fs-card card" @click="goBank">
|
||||
<view class="fs-top">
|
||||
<view class="fs-icon fs-progress"><text class="fs-emoji">📚</text></view>
|
||||
<view class="fs-icon fs-bank"><text class="fs-emoji">📚</text></view>
|
||||
<text class="fs-name">公司真题库</text>
|
||||
</view>
|
||||
<text class="fs-brief">大厂真题 · 岗位分类 · 参考思路</text>
|
||||
</view>
|
||||
<view class="fs-card card" @click="goInternship">
|
||||
<view class="fs-top">
|
||||
<view class="fs-icon fs-contribute"><text class="fs-emoji">🔍</text></view>
|
||||
<view class="fs-icon fs-internship"><text class="fs-emoji">🔍</text></view>
|
||||
<text class="fs-name">实习搜索</text>
|
||||
</view>
|
||||
<text class="fs-brief">热门实习 · 一键搜索 · 精准匹配</text>
|
||||
@@ -95,12 +94,12 @@
|
||||
</view>
|
||||
|
||||
<!-- 每日一题 -->
|
||||
<view class="section" v-if="dailyQuestion">
|
||||
<view class="section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">📮 每日一题</text>
|
||||
<text class="section-desc" @click="refreshDaily">换一题</text>
|
||||
<text class="section-desc" @click="refreshDaily" v-if="dailyQuestion">换一题</text>
|
||||
</view>
|
||||
<view class="daily-card card">
|
||||
<view class="daily-card card" v-if="dailyQuestion">
|
||||
<text class="daily-tag">{{ dailyQuestion.category || '综合' }}</text>
|
||||
<text class="daily-question">{{ dailyQuestion.question }}</text>
|
||||
<view class="daily-answer" v-if="showAnswer">
|
||||
@@ -114,6 +113,16 @@
|
||||
<text class="daily-action primary" @click="goInterview">模拟练习 →</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="daily-guest card" v-else-if="!userInfo" @click="goLogin">
|
||||
<view class="daily-guest-top">
|
||||
<text class="daily-guest-icon">🔒</text>
|
||||
<view class="daily-guest-body">
|
||||
<text class="daily-guest-title">登录后获取今日面试题</text>
|
||||
<text class="daily-guest-desc">每日一道校招真题,持续积累面试经验</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="daily-action primary">立即登录 →</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 热门岗位 - AI 专区 -->
|
||||
@@ -269,7 +278,7 @@ const startInterview = (pos) => uni.navigateTo({ url: `/pages/interview/intervie
|
||||
}
|
||||
.hero-row { display: flex; align-items: flex-start; gap: 24rpx; }
|
||||
.hero-left { flex: 1; min-width: 0; padding-top: 8rpx; }
|
||||
.hero-right { flex-shrink: 0; width: 320rpx; }
|
||||
.hero-right { flex-shrink: 0; min-width: 280rpx; max-width: 340rpx; }
|
||||
.hero-title { font-size: 40rpx; font-weight: 700; color: #FFF; display: block; line-height: 1.3; }
|
||||
.hero-sub { font-size: 22rpx; color: rgba(255,255,255,0.7); margin-top: 8rpx; display: block; }
|
||||
|
||||
@@ -279,11 +288,15 @@ const startInterview = (pos) => uni.navigateTo({ url: `/pages/interview/intervie
|
||||
display: flex; align-items: center;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
.guest-card { background: rgba(255,255,255,0.15); backdrop-filter: blur(10rpx); }
|
||||
.guest-card .avatar { border-color: rgba(255,255,255,0.3); }
|
||||
.guest-card .user-name { font-size: 26rpx; color: #FFF; }
|
||||
.guest-hint { font-size: 20rpx; color: rgba(255,255,255,0.6); margin-top: 4rpx; display: block; }
|
||||
.guest-card .arrow { color: rgba(255,255,255,0.4); }
|
||||
.guest-card {
|
||||
background: rgba(255,255,255,0.2); backdrop-filter: blur(12rpx);
|
||||
border: 1rpx solid rgba(255,255,255,0.25);
|
||||
}
|
||||
.guest-card .avatar { border-color: rgba(255,255,255,0.35); }
|
||||
.guest-card .user-name { font-size: 26rpx; color: #FFF; font-weight: 700; }
|
||||
.guest-benefits { display: flex; gap: 12rpx; margin-top: 6rpx; flex-wrap: wrap; }
|
||||
.guest-benefit { font-size: 18rpx; color: rgba(255,255,255,0.8); padding: 2rpx 10rpx; background: rgba(255,255,255,0.12); border-radius: 8rpx; }
|
||||
.guest-arrow { font-size: 36rpx; color: rgba(255,255,255,0.5); margin-left: 12rpx; }
|
||||
.avatar { width: 72rpx; height: 72rpx; border-radius: 50%; margin-right: 16rpx; border: 3rpx solid var(--color-primary-light); flex-shrink: 0; }
|
||||
.user-meta { flex: 1; min-width: 0; }
|
||||
.user-name { font-size: 30rpx; font-weight: 600; color: var(--color-text); }
|
||||
@@ -315,17 +328,19 @@ const startInterview = (pos) => uni.navigateTo({ url: `/pages/interview/intervie
|
||||
.fp-name { font-size: 30rpx; font-weight: 700; color: var(--color-text); }
|
||||
.fp-brief { font-size: 20rpx; color: var(--color-text-secondary); margin-top: 4rpx; display: block; }
|
||||
.fp-action { font-size: 28rpx; color: var(--color-primary); font-weight: 600; flex-shrink: 0; }
|
||||
.feature-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 16rpx; }
|
||||
.feature-tertiary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16rpx; }
|
||||
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16rpx; }
|
||||
.fs-card { padding: 20rpx; border-radius: var(--radius-lg); }
|
||||
.fs-top { display: flex; align-items: center; gap: 10rpx; }
|
||||
.fs-icon { width: 44rpx; height: 44rpx; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
||||
.fs-emoji { font-size: 20rpx; }
|
||||
.fs-name { font-size: 26rpx; font-weight: 600; color: var(--color-text); }
|
||||
.fs-brief { font-size: 18rpx; color: var(--color-text-secondary); margin-top: 10rpx; display: block; }
|
||||
.fs-progress { background: linear-gradient(135deg, #EEF2FF, #C7D2FE); }
|
||||
.fs-career { background: linear-gradient(135deg, #F3E8FF, #D8B4FE); }
|
||||
.fs-resume { background: linear-gradient(135deg, #ECFDF5, #A7F3D0); }
|
||||
.fs-progress { background: linear-gradient(135deg, #EEF2FF, #C7D2FE); }
|
||||
.fs-contribute { background: linear-gradient(135deg, #FFF7ED, #FDBA74); }
|
||||
.fs-bank { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); }
|
||||
.fs-internship { background: linear-gradient(135deg, #E0F2FE, #7DD3FC); }
|
||||
|
||||
/* 每日一题 */
|
||||
.daily-card { padding: 24rpx; border-radius: var(--radius-lg); }
|
||||
@@ -338,6 +353,19 @@ const startInterview = (pos) => uni.navigateTo({ url: `/pages/interview/intervie
|
||||
.daily-action { font-size: 24rpx; color: var(--color-text-secondary); }
|
||||
.daily-action.primary { color: var(--color-primary); font-weight: 600; }
|
||||
|
||||
.daily-guest {
|
||||
padding: 24rpx; border-radius: var(--radius-lg);
|
||||
background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
cursor: pointer;
|
||||
}
|
||||
.daily-guest:active { opacity: 0.8; }
|
||||
.daily-guest-top { display: flex; align-items: center; gap: 16rpx; flex: 1; min-width: 0; }
|
||||
.daily-guest-icon { font-size: 32rpx; width: 56rpx; height: 56rpx; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.6); border-radius: 14rpx; flex-shrink: 0; }
|
||||
.daily-guest-body { flex: 1; min-width: 0; }
|
||||
.daily-guest-title { font-size: 26rpx; font-weight: 600; color: var(--color-text); }
|
||||
.daily-guest-desc { font-size: 20rpx; color: var(--color-text-secondary); margin-top: 4rpx; display: block; }
|
||||
|
||||
/* AI 岗位专区 */
|
||||
.ai-banner {
|
||||
background: linear-gradient(135deg, #FEF3C7, #FDE68A);
|
||||
|
||||
Reference in New Issue
Block a user