194 lines
8.4 KiB
Plaintext
194 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">{{mpUiLogoTitle}}</text>
|
||
<text class="logo-subtitle">{{mpUiLogoSubtitle}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="header-right" wx:if="{{!auditMode}}">
|
||
<view class="contact-btn" catchtap="onLinkKaruo" hover-class="none">
|
||
<image class="contact-avatar" src="{{mpUiLinkKaruoDisplay}}" mode="aspectFill"/>
|
||
<text class="contact-name">{{mpUiLinkKaruoText}}</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">{{mpUiSearchPlaceholder}}</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">{{mpUiBannerTag}}</view>
|
||
<view class="banner-title">{{bannerSection.title}}</view>
|
||
<view class="banner-action">
|
||
<text class="banner-action-text">{{mpUiBannerReadMore}}</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">{{mpUiBannerTag}}</view>
|
||
<view class="banner-title">加载中...</view>
|
||
<view class="banner-action"><text class="banner-action-text">{{mpUiBannerReadMore}}</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">{{mpUiSuperTitle}}</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">{{mpUiPickTitle}}</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">{{mpUiLatestTitle}}</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>
|
||
|
||
<!-- 隐私授权(首页在 needPrivacy 列表内,需有遮罩否则无法完成 agree) -->
|
||
<view class="privacy-mask" wx:if="{{showPrivacyModal}}" catchtouchmove="preventMove">
|
||
<view class="privacy-modal">
|
||
<text class="privacy-title">温馨提示</text>
|
||
<text class="privacy-desc">使用手机号能力前,请先同意《用户隐私保护指引》</text>
|
||
<button id="agree-privacy-btn" class="privacy-btn" open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="onLeadPrivacyAuthorize">同意</button>
|
||
<view class="privacy-cancel" bindtap="onDisagreePrivacyForLead">拒绝</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 链接卡若 - 留资弹窗 -->
|
||
<view class="lead-mask" wx:if="{{showLeadModal}}" catchtap="closeLeadModal">
|
||
<view class="lead-box" catchtap="stopPropagation">
|
||
<text class="lead-title">留下联系方式</text>
|
||
<text class="lead-desc">方便卡若与您联系</text>
|
||
<button class="lead-get-phone-btn" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumberForLead">一键获取手机号</button>
|
||
<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>
|