- 超级个体:去掉首位特例;列表仅展示有头像且非微信默认昵称(vip.go) - 个人资料:居中头像、低调联系方式、点头像优先走存客宝 lead(ckbLeadToken) - 阅读页分享朋友圈复制与 toast 去重 - soul-api: miniprogram users 带 ckbLeadToken;其它 handler 与路由调整 - 脚本:content_upload、miniprogram 上传辅助等 Made-with: Cursor
190 lines
8.4 KiB
Plaintext
190 lines
8.4 KiB
Plaintext
<!--pages/index/index.wxml-->
|
|
<!--卡若创业派对 - 首页(按临时需求池/首页页面设计)-->
|
|
<view class="page page-transition">
|
|
<!-- 自定义导航栏占位 -->
|
|
<view class="nav-placeholder" style="height: {{statusBarHeight + 44}}px;"></view>
|
|
|
|
<!-- 顶部区域:中文标识 + 标题副标题 | 链接卡若 -->
|
|
<view class="header">
|
|
<view class="header-content">
|
|
<view class="logo-section">
|
|
<view class="logo-icon">
|
|
<text class="logo-text">派</text>
|
|
</view>
|
|
<view class="logo-info">
|
|
<text class="logo-title-text">卡若创业派对</text>
|
|
<text class="logo-subtitle">来自派对房的真实故事</text>
|
|
</view>
|
|
</view>
|
|
<view class="header-right">
|
|
<view class="contact-btn" bindtap="onLinkKaruo">
|
|
<image class="contact-avatar" src="/assets/images/author-avatar.png" mode="aspectFill"/>
|
|
<text class="contact-name">点击链接卡若</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 搜索栏(根据配置显示) -->
|
|
<view class="search-bar" wx:if="{{searchEnabled}}" bindtap="goToSearch">
|
|
<view class="search-icon-wrap">
|
|
<icon name="search" size="40" color="#8e8e93" customClass="search-icon-text"></icon>
|
|
</view>
|
|
<text class="search-placeholder">搜索章节标题或内容...</text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 主内容区 -->
|
|
<view class="main-content">
|
|
<!-- Banner 推荐卡片(优先 recommended API 第一条) -->
|
|
<view class="banner-card" wx:if="{{bannerSection}}" bindtap="goToRead" data-id="{{bannerSection.id}}" data-mid="{{bannerSection.mid}}">
|
|
<view class="banner-glow"></view>
|
|
<view class="banner-tag">推荐</view>
|
|
<view class="banner-title">{{bannerSection.title}}</view>
|
|
<view class="banner-action">
|
|
<text class="banner-action-text">点击阅读</text>
|
|
<icon name="direction-right" size="32" color="#00CED1" customClass="banner-arrow"></icon>
|
|
</view>
|
|
</view>
|
|
<view class="banner-card banner-skeleton" wx:else bindtap="goToChapters">
|
|
<view class="banner-glow"></view>
|
|
<view class="banner-tag">推荐</view>
|
|
<view class="banner-title">加载中...</view>
|
|
<view class="banner-action"><text class="banner-action-text">点击阅读</text><icon name="direction-right" size="32" color="#00CED1" customClass="banner-arrow"></icon></view>
|
|
|
|
</view>
|
|
|
|
<!-- 超级个体:与匹配页一致,仅 VIP 横向列表(无首位特例) -->
|
|
<view class="section" wx:if="{{!auditMode}}">
|
|
<view class="section-header">
|
|
<text class="section-title">超级个体</text>
|
|
<text class="section-subtitle">获客入口</text>
|
|
</view>
|
|
<!-- 加载中:骨架动画 -->
|
|
<view wx:if="{{superMembersLoading}}" class="super-loading">
|
|
<view class="super-loading-inner">
|
|
<view class="super-loading-item" wx:for="{{[1,2,3,4]}}" wx:key="*this">
|
|
<view class="super-loading-avatar"></view>
|
|
<view class="super-loading-name"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 已加载有数据 -->
|
|
<scroll-view wx:elif="{{superMembers.length > 0}}" class="super-scroll" scroll-x>
|
|
<view class="super-scroll-inner">
|
|
<view
|
|
class="super-item-h"
|
|
wx:for="{{superMembers}}"
|
|
wx:key="id"
|
|
bindtap="goToMemberDetail"
|
|
data-id="{{item.id}}"
|
|
hover-class="super-item-hover"
|
|
hover-stay-time="80"
|
|
>
|
|
<view class="super-item-stack">
|
|
<view class="super-avatar {{item.isVip ? 'super-avatar-vip' : ''}}">
|
|
<image class="super-avatar-img" wx:if="{{item.avatar}}" src="{{item.avatar}}" mode="aspectFill"/>
|
|
<text class="super-avatar-text" wx:else>{{item.avatarLetter}}</text>
|
|
</view>
|
|
<text class="super-name">{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
<!-- 已加载无数据 -->
|
|
<view wx:else class="super-empty">
|
|
<text class="super-empty-text">成为会员,展示你的项目</text>
|
|
<view class="super-empty-btn" bindtap="goToVip">加入创业派对 →</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 精选推荐:默认 3 条,列表下三角展开更多(与最新新增一致) -->
|
|
<view class="section">
|
|
<view class="section-header">
|
|
<text class="section-title">精选推荐</text>
|
|
</view>
|
|
<view class="featured-list">
|
|
<view
|
|
class="featured-item"
|
|
wx:for="{{featuredSections}}"
|
|
wx:key="id"
|
|
bindtap="goToRead"
|
|
data-id="{{item.id}}"
|
|
data-mid="{{item.mid}}"
|
|
>
|
|
<view class="featured-content">
|
|
<view class="featured-meta" wx:if="{{item.tag}}">
|
|
<text class="featured-tag {{item.tagClass || 'tag-rec'}}">{{item.tag}}</text>
|
|
</view>
|
|
<text class="featured-title">{{item.title}}</text>
|
|
</view>
|
|
<icon name="chevron-right" size="28" color="rgba(255,255,255,0.6)" customClass="featured-arrow"></icon>
|
|
</view>
|
|
</view>
|
|
<view
|
|
class="latest-expand-hint"
|
|
wx:if="{{!featuredExpanded && featuredSectionsFull.length > 3}}"
|
|
bindtap="expandFeaturedChapters"
|
|
hover-class="latest-expand-hint-hover"
|
|
hover-stay-time="80"
|
|
>
|
|
<view class="latest-expand-triangle"></view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 最新新增(时间线样式;超过 5 条时在列表下方点小三角展开,展开后随页面滚动看全部) -->
|
|
<view class="section" wx:if="{{latestChapters.length > 0}}">
|
|
<view class="section-header latest-header">
|
|
<text class="section-title">最新新增</text>
|
|
</view>
|
|
<view class="timeline-wrap">
|
|
<view class="timeline-line"></view>
|
|
<view class="timeline-list">
|
|
<view class="timeline-item {{index === 0 ? 'timeline-item-first' : ''}}" wx:for="{{displayLatestChapters}}" wx:key="id" bindtap="goToRead" data-id="{{item.id}}" data-mid="{{item.mid}}">
|
|
<view class="timeline-dot"></view>
|
|
<view class="timeline-content">
|
|
<view class="timeline-row">
|
|
<text class="timeline-title">{{item.title}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 仅文案「展开更多」去掉:下方居中轻点小三角,点一次展开剩余条目 -->
|
|
<view
|
|
class="latest-expand-hint"
|
|
wx:if="{{latestChapters.length > 5 && !latestExpanded}}"
|
|
bindtap="expandLatestChapters"
|
|
hover-class="latest-expand-hint-hover"
|
|
hover-stay-time="80"
|
|
>
|
|
<view class="latest-expand-triangle"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 底部留白 -->
|
|
<view class="bottom-space"></view>
|
|
|
|
<!-- 链接卡若 - 留资弹窗(未填手机/微信号时):一键获取 + 手动输入 -->
|
|
<view class="lead-mask" wx:if="{{showLeadModal}}" catchtap="closeLeadModal">
|
|
<!-- 使用 catchtap="stopPropagation" 阻止内部点击冒泡到遮罩层,避免点击输入框时弹窗被关闭 -->
|
|
<view class="lead-box" catchtap="stopPropagation">
|
|
<text class="lead-title">留下联系方式</text>
|
|
<text class="lead-desc">方便卡若与您联系</text>
|
|
<button id="agree-lead-phone-btn" class="lead-get-phone-btn" open-type="getPhoneNumber|agreePrivacyAuthorization" bindgetphonenumber="onGetPhoneNumberForLead" bindagreeprivacyauthorization="onAgreePrivacyForLead">一键获取手机号</button>
|
|
<view class="privacy-wechat-row" wx:if="{{showPrivacyModal}}">
|
|
<text class="privacy-wechat-desc">为获取手机号,请先同意《用户隐私保护指引》</text>
|
|
<button id="agree-privacy-btn" class="privacy-agree-btn" open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="onAgreePrivacyForLead">同意</button>
|
|
</view>
|
|
<text class="lead-divider">或手动输入</text>
|
|
<view class="lead-input-wrap">
|
|
<input class="lead-input" placeholder="请输入手机号" type="number" maxlength="11" value="{{leadPhone}}" bindinput="onLeadPhoneInput"/>
|
|
</view>
|
|
<view class="lead-actions">
|
|
<button class="lead-btn lead-btn-cancel" bindtap="closeLeadModal">取消</button>
|
|
<button class="lead-btn lead-btn-submit" bindtap="submitLead">提交</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|