Files
MiniProgram/NamingAssistant/pages/result/index.ttml

59 lines
2.1 KiB
Plaintext
Raw Normal View History

2025-11-06 19:23:37 +08:00
<view class="page">
2025-11-05 00:22:09 +08:00
<view class="glow-layer">
<view class="glow glow-one"></view>
<view class="glow glow-two"></view>
</view>
<scroll-view class="content" scroll-y="true">
<view class="headline">
2025-11-05 17:26:52 +08:00
<text class="title">八字名鉴</text>
<text class="subtitle">以生辰八字为准,优选五行调衡的候选姓名</text>
</view>
<view class="summary" tt:if="{{matchSummary}}">
<text class="summary-text">{{matchSummary}}</text>
2025-11-06 19:23:37 +08:00
<view class="chart-title">五行占比</view>
<block tt:for="{{elementsChart}}" tt:for-item="item" tt:key="label">
<view class="chart-row">
<view class="chart-label">{{item.label}}</view>
<view class="chart-bar">
<view class="chart-bar-fill" style="width: {{item.percentWidth}};"></view>
</view>
<text class="chart-percent">{{item.count}}{{item.percentText}}</text>
</view>
</block>
2025-11-05 00:22:09 +08:00
</view>
2025-11-06 19:23:37 +08:00
<!-- <view class="element-section" tt:if="{{elementsChart.length}}">
</view> -->
2025-11-05 00:22:09 +08:00
<view class="empty" tt:if="{{!results.length}}">
2025-11-05 17:26:52 +08:00
<text>暂无生成结果,请返回主页重新生成。</text>
2025-11-05 00:28:36 +08:00
<button class="primary back-button" bindtap="handleBack">返回主页</button>
2025-11-05 00:22:09 +08:00
</view>
<view tt:if="{{results.length}}">
2025-11-05 17:26:52 +08:00
<view class="tip">轻触收藏按钮即可将心仪姓名收入星册</view>
2025-11-05 00:22:09 +08:00
<block tt:for="{{results}}" tt:for-index="index" tt:for-item="item" tt:key="name">
<view class="result-card">
2025-11-06 19:23:37 +08:00
<view class="result-header">
<text class="result-name">{{item.name}}</text>
<button
class="collect-button"
size="mini"
bindtap="handleFavorite"
data-name="{{item.name}}"
data-meaning="{{item.meaning}}"
>
收藏
</button>
</view>
<text class="result-meaning">{{item.meaning}}</text>
<text class="result-reason">{{item.elementReason}}</text>
2025-11-05 00:22:09 +08:00
</view>
</block>
2025-11-05 17:26:52 +08:00
<button class="primary back-button" bindtap="handleBack">再测一批</button>
2025-11-05 00:22:09 +08:00
</view>
</scroll-view>
2025-11-06 19:23:37 +08:00
</view>