Files
MBTI_wang/miniprogram/pages/result/resume.wxml
Ghost 830e3611d7 feat: 企业版合作模式(后端、管理端、小程序)
- API:合作模式配置、用户选择、企业版入口与迁移 SQL

- 管理端:合作方式管理、企业/用户侧设置与 CSV 导出等

- 小程序:合作模式弹窗与结果/简历等页对接;开发脚本小调整

Made-with: Cursor
2026-04-23 16:08:13 +08:00

117 lines
5.1 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/resume.wxml - 简历综合分析结果页 -->
<view class="container">
<!-- 分析中状态 -->
<view class="analyzing-modal" wx:if="{{loading && !error}}">
<view class="analyzing-content">
<view class="analyzing-icon">
<view class="spinner"></view>
</view>
<text class="analyzing-title">{{analyzingTitle || '正在分析中'}}</text>
<text class="analyzing-desc">{{analyzingTip}}</text>
<view class="analyzing-bar">
<view class="analyzing-bar-fill" style="width: {{progress}}%"></view>
</view>
<text class="analyzing-hint">这个过程可能需要30秒到1分钟请耐心等待...</text>
</view>
</view>
<!-- 结果显示 -->
<block wx:if="{{!loading || error || content || profileGate}}">
<!-- 页面顶部 Hero -->
<view class="hero-banner {{error ? 'hero-error' : 'hero-success'}}">
<text class="hero-icon">{{error ? '⚠️' : '📋'}}</text>
<view class="hero-text-wrap">
<text class="hero-title">{{error ? '生成失败' : '人才综合评估报告'}}</text>
<text class="hero-sub">{{error ? '请检查后重新生成' : '基于测评结果 · 综合分析'}}</text>
</view>
</view>
<view class="invite-fill-entry invite-fill-entry--resume" wx:if="{{!error && !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>
<!-- 异常状态 -->
<view class="card error-card" wx:if="{{error}}">
<text class="card-title error-title">失败原因</text>
<text class="card-text error-message">{{error}}</text>
<view class="action-btn-retry" bindtap="fetchResumeAnalysis">
<text class="retry-text">点击重新生成</text>
</view>
</view>
<!-- 需要付费解锁 -->
<view class="card pay-gate-card" wx:if="{{payInfo.requiresPayment && !payInfo.isPaid && !error}}">
<text class="pay-gate-icon">🔒</text>
<text class="pay-gate-title">报告已生成,需付费解锁</text>
<text class="pay-gate-desc">完整的简历综合分析报告已生成\n支付后即可查看全部内容</text>
<view class="pay-gate-amount">
<text class="pay-amount-label">解锁价格</text>
<text class="pay-amount-value">¥{{payInfo.amountYuan}}</text>
</view>
<view class="pay-gate-btn {{paying ? 'paying' : ''}}" bindtap="doPay">
<text class="pay-gate-btn-text">{{paying ? '支付中...' : '立即支付解锁'}}</text>
</view>
</view>
<!-- 资料未完善:与问卷/面相报告一致 -->
<view class="card pay-gate-card" wx:if="{{profileGate && (!payInfo.requiresPayment || payInfo.isPaid) && !error}}">
<text class="pay-gate-icon">📝</text>
<text class="pay-gate-title">完善资料后查看完整报告</text>
<text class="pay-gate-desc">请补全头像、昵称并绑定手机号\n即可查看简历综合分析全文</text>
<view class="pay-gate-btn" bindtap="goCompleteProfile">
<text class="pay-gate-btn-text">去完善资料</text>
</view>
</view>
<!-- 成功内容:分块卡片展示 -->
<block wx:if="{{content && sections.length > 0 && !payInfo.requiresPayment && !profileGate}}">
<view class="card section-card" wx:for="{{sections}}" wx:key="index">
<view class="section-header">
<text class="section-icon">{{item.icon}}</text>
<text class="section-title-text">{{item.title}}</text>
</view>
<view class="section-body">
<text class="content-text">{{item.body}}</text>
</view>
</view>
</block>
<!-- 兜底显示:解析失败时显示原始内容 -->
<view class="card" wx:if="{{content && sections.length === 0 && !payInfo.requiresPayment}}">
<text class="card-title">综合分析综评</text>
<text class="card-text content-text">{{content}}</text>
</view>
<!-- 操作按钮 -->
<view class="action-section" wx:if="{{!loading || error}}">
<button class="btn btn-primary" open-type="share" wx:if="{{!payInfo.requiresPayment && !profileGate && content}}">
<text class="btn-text">分享分析报告</text>
</button>
<view class="btn btn-outline" bindtap="fetchResumeAnalysis" wx:if="{{!loading && content && !payInfo.requiresPayment && !profileGate}}">
<text class="btn-text-outline">重新分析生成</text>
</view>
<view class="btn btn-outline" bindtap="goHome">
<text class="btn-text-outline">返回首页</text>
</view>
</view>
</block>
<invite-code-dialog
visible="{{showInviteCodeDialog}}"
bind:skip="onInviteCodeSkip"
bind:success="onInviteCodeSuccess"
/>
<cooperation-mode-dialog
visible="{{showCooperationModal}}"
modes="{{cooperationModes}}"
bind:success="onCooperationSuccess"
/>
</view>