Files
MBTI_wang/miniprogram/pages/result/pdp.wxml
Ghost d7137f9349 微信小程序:自定义底栏接入 AI 入口(含图标与样式)、AI 聊天相关页面与历史/报告等能力;审核模式与配置联动;资料/企业/首页/授权等页面与 app 入口配合调整。
后端 API:AI 对话/报告/余额告警 等服务与路由;小程序 tabBar 配置与分润相关能力;出站推送 Webhook 与管理端调试;飞书留资、小程序数据分析 等支撑;多份 数据库迁移(AI 聊天、灵魂文章、tabBar、分润等)。
管理端 / 超管:看板、用户/订单/分销/财务、设置与 小程序 tabBar 管理、分润规则、灵魂文章、AI 配置与监控 等大量页面与能力扩展;主题与布局更新。
抖音小程序:与微信侧在 结果页/购买/个人中心 等方向做了同步或优化。
另含 部署/脚本、开发文档 等配套更新。
邀请码与解锁:后端 分销/邀请码 接口与 add_invite_codes 等 SQL;小程序侧 邀请码弹窗组件、个人中心/推广/多类结果页 的填写入口与 解锁门控(inviteCodeGate、unlockGate);并补充 《小程序解锁引导与邀请码方案》 文档。
超管后台:路由与 企业中心(EnterpriseHub) 等交互与结构优化。
小程序体验:在 首页结果、推广、各测评结果页 上继续打磨;与 邀请码门控、审核门控 小步联动。
2026-04-23 11:28:16 +08:00

296 lines
16 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--pages/result/pdp.wxml - PDP 结果页(高级排版)-->
<view class="result-page">
<scroll-view
class="content-scroll {{fromShare ? 'content-scroll--with-fixed-footer' : ''}} {{result && !fromShare ? 'content-scroll--with-bottom-tools' : ''}}"
scroll-y
scroll-into-view="{{scrollTarget}}"
scroll-with-animation
bindscroll="onSectionScroll"
>
<view
class="content-container {{fromShare ? 'content-container--with-fixed-footer' : ''}} {{result && !fromShare ? 'content-container--with-bottom-tools' : ''}}"
>
<!-- 分类锚点导航 -->
<result-section-nav
wx:if="{{result && !fromShare}}"
sections="{{sectionNav}}"
active="{{activeSection}}"
theme="orange"
bindnavtap="onTapSectionNav"
/>
<!-- Hero -->
<view class="hero-card hero-card--pdp" id="sec-hero" wx:if="{{result}}">
<text class="hero-eyebrow">PDP · ANIMAL STYLE</text>
<text class="hero-code">{{typeSummaryLine}}</text>
<text class="hero-title" wx:if="{{result.description && result.description.title}}">{{result.description.title}}</text>
<text class="hero-subtitle" wx:if="{{profileGate && previewPdpDescription}}">{{previewPdpDescription}}</text>
<text class="hero-subtitle" wx:elif="{{result.description && result.description.description && !profileGate}}">{{result.description.description}}</text>
<view class="hero-badges">
<view class="hero-badge hero-badge--solid" wx:if="{{pdpInsight && pdpInsight.mind}}">{{pdpInsight.mind}}</view>
<view class="hero-badge" wx:for="{{pdpTags}}" wx:key="*this">{{item}}</view>
</view>
</view>
<view class="invite-fill-entry" wx:if="{{result && !fromShare && !hideInviteCodeEntry}}" bindtap="openInviteCodeFill">
<text class="invite-fill-entry__icon">🔗</text>
<view class="invite-fill-entry__main">
<text class="invite-fill-entry__title">填写好友邀请码</text>
<text class="invite-fill-entry__sub">绑定推广关系 · 可选</text>
</view>
<text class="invite-fill-entry__arrow"></text>
</view>
<!-- 深度洞察 -->
<block wx:if="{{pdpInsight}}">
<view class="section-head" id="sec-insight">
<view class="section-head__bar section-head__bar--pdp"></view>
<text class="section-head__title">深度洞察</text>
<text class="section-head__desc">动物型背后的底层风格</text>
</view>
<view class="insight-grid">
<view class="insight-card">
<view class="insight-card__icon insight-card__icon--orange">🧠</view>
<text class="insight-card__label">心智模式</text>
<text class="insight-card__value">{{pdpInsight.mind}}</text>
</view>
<view class="insight-card">
<view class="insight-card__icon insight-card__icon--blue">🎯</view>
<text class="insight-card__label">决策倾向</text>
<text class="insight-card__value">{{pdpInsight.decision}}</text>
</view>
<view class="insight-card">
<view class="insight-card__icon insight-card__icon--teal">⚡</view>
<text class="insight-card__label">能量来源</text>
<text class="insight-card__value">{{pdpInsight.energy}}</text>
</view>
<view class="insight-card">
<view class="insight-card__icon insight-card__icon--rose">⚠️</view>
<text class="insight-card__label">压力反应</text>
<text class="insight-card__value">{{pdpInsight.stress}}</text>
</view>
<view class="insight-card" wx:if="{{pdpInsight.comm}}">
<view class="insight-card__icon insight-card__icon--purple">💬</view>
<text class="insight-card__label">沟通风格</text>
<text class="insight-card__value">{{pdpInsight.comm}}</text>
</view>
<view class="insight-card" wx:if="{{pdpInsight.lead}}">
<view class="insight-card__icon insight-card__icon--orange">🚩</view>
<text class="insight-card__label">领导模式</text>
<text class="insight-card__value">{{pdpInsight.lead}}</text>
</view>
<view class="insight-card" wx:if="{{pdpInsight.love}}">
<view class="insight-card__icon insight-card__icon--rose">💝</view>
<text class="insight-card__label">恋爱与亲密</text>
<text class="insight-card__value">{{pdpInsight.love}}</text>
</view>
<view class="insight-card" wx:if="{{pdpInsight.team}}">
<view class="insight-card__icon insight-card__icon--teal">👥</view>
<text class="insight-card__label">团队角色</text>
<text class="insight-card__value">{{pdpInsight.team}}</text>
</view>
</view>
</block>
<!-- 付费墙 -->
<view class="type-card" wx:if="{{payInfo.requiresPayment && !payInfo.isPaid}}">
<view class="paywall-card">
<view class="paywall-content">
<view class="paywall-blur">
<text class="paywall-fake-title">完整PDP报告</text>
<text class="paywall-fake-line">• 五维得分详情</text>
<text class="paywall-fake-line">• 性格特征与团队角色</text>
<text class="paywall-fake-line">• 推荐职业</text>
</view>
<view class="paywall-mask"></view>
<view id="unlock-gate-anchor" class="unlock-gate-anchor-btn-wrap">
<view class="paywall-btn" bindtap="unlockFullReport">
<text class="paywall-btn-main">解锁完整报告</text>
<text class="paywall-btn-price">¥{{payInfo.amountYuan}} / 次</text>
</view>
</view>
</view>
</view>
</view>
<view class="type-card" wx:elif="{{result && result.locked && !fromShare && !profileGate}}">
<view class="paywall-card">
<view class="paywall-content">
<text class="paywall-fake-title">完整报告暂不可查看</text>
<text class="paywall-fake-line">请稍后在「我的」重试;若刚授权手机,可下拉刷新本页。</text>
<view class="paywall-btn" bindtap="goCompleteProfile">
<text class="paywall-btn-main">去个人资料</text>
</view>
</view>
</view>
</view>
<!-- 五维得分 -->
<block wx:if="{{pdpDimensions.length && (!payInfo.requiresPayment || payInfo.isPaid) && (profileGate || !result.locked)}}">
<view class="section-head" id="sec-dim">
<view class="section-head__bar section-head__bar--pdp"></view>
<text class="section-head__title">{{profileGate ? 'PDP 得分预览' : '五维动物型得分'}}</text>
<text class="section-head__desc">老虎 · 孔雀 · 无尾熊 · 猫头鹰 · 变色龙</text>
</view>
<view class="type-card" style="padding: 36rpx 32rpx;">
<view class="dash-dimension-row" wx:for="{{pdpDimensions}}" wx:key="key">
<view class="dash-dimension-labels">
<text class="dash-lab">{{item.emoji}} {{item.label}}</text>
<text class="dash-lab">{{item.percentage}}%</text>
</view>
<view class="dash-track">
<view class="dash-fill {{item.dashClass}}" style="width: {{item.percentage}}%"></view>
</view>
<text class="dash-dim-desc">{{item.desc}}</text>
</view>
</view>
</block>
<!-- 资料门禁预览 -->
<view wx:if="{{profileGate && result && (!payInfo.requiresPayment || payInfo.isPaid)}}" id="unlock-gate-anchor" class="unlock-gate-profile-block">
<view class="preview-teaser-card" wx:if="{{previewPdpStrengths.length}}">
<text class="preview-teaser-title">优势摘录(预览约 30%</text>
<view class="preview-strength-row" wx:for="{{previewPdpStrengths}}" wx:key="*this">
<text class="preview-strength-dot">•</text>
<text class="preview-strength-text">{{item}}</text>
</view>
<text class="preview-teaser-hint">授权手机号并设置头像、昵称后即可查看全文(与下方按钮为同一条流程)。</text>
</view>
<button
wx:if="{{!hasPhone}}"
class="paywall-btn paywall-btn--inline-profile"
open-type="getPhoneNumber"
bindgetphonenumber="onPhoneLoginForResultGate"
>
<text class="paywall-btn-main">登录解锁全文</text>
</button>
<button
wx:else
class="paywall-btn paywall-btn--inline-profile"
bindtap="goCompleteProfile"
>
<text class="paywall-btn-main">完善资料 · 查看全文</text>
</button>
</view>
<!-- 优势 / 注意 -->
<block wx:if="{{!profileGate && result && !result.locked && (!payInfo.requiresPayment || payInfo.isPaid)}}">
<view class="section-head" id="sec-trait">
<view class="section-head__bar section-head__bar--pdp"></view>
<text class="section-head__title">性格特征</text>
<text class="section-head__desc">善用与防守指南</text>
</view>
<view class="trait-dual">
<view class="trait-dual__col trait-dual__col--strength">
<view class="trait-dual__title">
<view class="trait-dual__ic trait-dual__ic--strength">✨</view>
<text>天赋优势</text>
</view>
<view>
<text class="trait-dual__chip trait-dual__chip--strength" wx:for="{{result.description.strengths}}" wx:key="*this">{{item}}</text>
</view>
</view>
<view class="trait-dual__col trait-dual__col--caution">
<view class="trait-dual__title">
<view class="trait-dual__ic trait-dual__ic--caution">⚠️</view>
<text>需要注意</text>
</view>
<view>
<text class="trait-dual__chip trait-dual__chip--caution" wx:for="{{result.description.weaknesses}}" wx:key="*this">{{item}}</text>
</view>
</view>
</view>
</block>
<!-- 团队角色(引用) -->
<block wx:if="{{!profileGate && result && !result.locked && (!payInfo.requiresPayment || payInfo.isPaid) && result.description.teamRole}}">
<view class="section-head" id="sec-team">
<view class="section-head__bar section-head__bar--pdp"></view>
<text class="section-head__title">团队角色</text>
<text class="section-head__desc">在团队协作中的最佳位置</text>
</view>
<view class="quote-card">
<text class="quote-card__label">TEAM · 协作画像</text>
<text class="quote-card__text">{{result.description.teamRole}}</text>
</view>
</block>
<!-- 推荐职业 -->
<block wx:if="{{!profileGate && result && !result.locked && (!payInfo.requiresPayment || payInfo.isPaid) && pdpCareerItems.length}}">
<view class="section-head" id="sec-career">
<view class="section-head__bar section-head__bar--pdp"></view>
<text class="section-head__title">推荐职业</text>
<text class="section-head__desc">高契合度职业方向</text>
</view>
<view class="career-grid">
<view class="career-grid__item" wx:for="{{pdpCareerItems}}" wx:key="name">
<view class="career-grid__ic">{{item.icon}}</view>
<text class="career-grid__text">{{item.name}}</text>
</view>
</view>
</block>
<!-- 深度解读 CTA -->
<view class="deep-cta-card" id="sec-cta" wx:if="{{result}}">
<view class="deep-cta-head">
<view class="deep-cta-ic">💎</view>
<text class="deep-cta-title">深度解读 · 团队/企业方案</text>
</view>
<text class="deep-cta-desc">结合 PDP、MBTI、DISC 与面相综合报告;团队可做岗位适配、沟通协作与领导力建议。邀请好友测评可参与推广分润。</text>
<view class="deep-cta-actions">
<view class="deep-cta-btn deep-cta-btn--primary" bindtap="onTapDeepService">深度解读方案</view>
<view class="deep-cta-btn deep-cta-btn--ghost" bindtap="onTapPromoCenter">推广中心</view>
</view>
</view>
</view>
</scroll-view>
<view class="result-bottom-tools" wx:if="{{result && !fromShare}}">
<view class="journey-stepper">
<view class="journey-stepper__item">
<view class="journey-stepper__dot {{journey.step1Unlocked ? 'journey-stepper__dot--done' : (journey.activeStep===1 ? 'journey-stepper__dot--active' : '')}}">1</view>
<text class="journey-stepper__label {{journey.activeStep===1 ? 'journey-stepper__label--active' : ''}}">看全文</text>
</view>
<view class="journey-stepper__bar {{journey.step1Unlocked ? 'journey-stepper__bar--done' : ''}}"></view>
<view class="journey-stepper__item">
<view class="journey-stepper__dot {{journey.step2Unlocked ? 'journey-stepper__dot--done' : (journey.activeStep===2 ? 'journey-stepper__dot--active' : '')}}">2</view>
<text class="journey-stepper__label {{journey.activeStep===2 ? 'journey-stepper__label--active' : ''}}">分享朋友圈</text>
</view>
<view class="journey-stepper__bar {{journey.step2Unlocked ? 'journey-stepper__bar--done' : ''}}"></view>
<view class="journey-stepper__item">
<view class="journey-stepper__dot {{journey.step3Unlocked ? 'journey-stepper__dot--done' : (journey.activeStep===3 ? 'journey-stepper__dot--active' : '')}}">3</view>
<text class="journey-stepper__label {{journey.activeStep===3 ? 'journey-stepper__label--active' : ''}}">AI 拍照</text>
</view>
</view>
<view class="result-bottom-tools__row">
<view class="result-tool-btn result-tool-btn--primary" bindtap="onTapReadFull">
<text>{{journey.step1Unlocked ? '查看全文' : '① 解锁全文'}}</text>
<text class="result-tool-sub">{{journey.step1Unlocked ? '已解锁' : (profileGate ? (hasPhone ? '完善资料后解锁' : '登录并完善资料') : '点击解锁')}}</text>
</view>
<view class="result-tool-btn {{journey.step1Unlocked ? 'result-tool-btn--rose' : 'result-tool-btn--locked'}}" bindtap="onTapShareMoment">
<text><text wx:if="{{!journey.step1Unlocked}}" class="result-tool-btn__lock">🔒</text>朋友圈</text>
<text class="result-tool-sub">{{journey.step1Unlocked ? (journey.step2Unlocked ? '已分享' : '点击分享') : '先解锁全文'}}</text>
</view>
<view class="result-tool-btn {{journey.step2Unlocked ? 'result-tool-btn--ghost' : 'result-tool-btn--locked'}}" bindtap="onTapFaceCamera">
<text><text wx:if="{{!journey.step2Unlocked}}" class="result-tool-btn__lock">🔒</text>AI 拍照</text>
<text class="result-tool-sub">{{journey.step2Unlocked ? '面相+人格' : '先分享朋友圈'}}</text>
</view>
</view>
</view>
<view class="result-share-footer result-share-footer--stack" wx:if="{{fromShare}}">
<button class="result-share-footer-btn" bindtap="goWantTest">我也要测试</button>
<view class="result-share-footer-row2">
<button class="result-share-footer-btn result-share-footer-btn--ghost" bindtap="goReadFullFromShare">看全文</button>
<button class="result-share-footer-btn result-share-footer-btn--share" open-type="share">分享给好友</button>
</view>
</view>
<invite-code-dialog
visible="{{showInviteCodeDialog}}"
bind:skip="onInviteCodeSkip"
bind:success="onInviteCodeSuccess"
/>
</view>