Files
juzi/taobao/pages/history/history.axml
T
xsl 774376fa16 feat: 完善淘宝小程序拍照、报告与登录流程
接入本地实时识别和自动三连拍,调整报告裁切、商品跳转、分享标题及居中页眉;完善游客会话、后台渠道隔离、部署脚本与回归测试。
2026-11-04 15:07:51 +08:00

56 lines
2.8 KiB
XML

<import src="../../components/brand-header.axml" />
<template is="brand-header" data="{{brandHeader: brandHeader}}" />
<!-- ═════ 历史报告 —— 对照 H5 index.html #s-history(L32-42) 与 app.js renderHistoryList()(L1956-1985) ═════ -->
<view class="history" style="padding-top:{{brandHeader.height}}px;">
<view class="session-guard" a:if="{{identityChecking || identityError}}">
<view>{{identityChecking ? '正在确认当前淘宝账号…' : identityError}}</view>
<button a:if="{{identityError}}" class="btn-primary" onTap="onRetryIdentity">重新验证</button>
</view>
<!-- H5 #s-history{background:#efefef url(bg-history-h5) center/cover fixed} -->
<image class="history-bg" src="{{bgUrl}}" mode="aspectFill" />
<!-- H5 .history-content -->
<view class="history-content" hidden="{{identityChecking || identityError}}">
<view class="report-title">您的报告</view>
<!-- H5 .account-status.account-status-history -->
<view class="account-status account-status-history {{signedIn ? 'account-status-on' : ''}}">
<view class="account-label">
<view class="account-dot"></view>
<text class="account-text">{{accountLabel}}</text>
</view>
<view class="account-logout" a:if="{{signedIn}}" onTap="onLogout">退出登录</view>
</view>
<!-- H5 .card.history-count -->
<view class="card history-count">
<view class="history-count-label">测试数量</view>
<view class="history-count-value">{{countText}}</view>
</view>
<!-- H5 .identity-note -->
<view class="identity-note">{{identityNote}}</view>
<!-- H5 #history-list -->
<view class="history-list">
<view class="history-list-note" a:if="{{loading && !items.length}}">正在读取报告…</view>
<view class="history-list-note" a:if="{{!loading && error}}">{{error}},请刷新列表重试。</view>
<view class="history-empty" a:if="{{!loading && !error && !items.length}}">
<view>暂无检测报告</view>
<view>{{guest ? '游客报告不保存,淘宝登录后可保存之后生成的报告。' : '完成一次检测后,报告会自动保存在这里。'}}</view>
<button a:if="{{guest}}" class="history-retry" onTap="onLogin">淘宝账号登录</button>
</view>
<view class="card history-item" a:for="{{items}}" a:key="id" data-id="{{item.id}}" onTap="onOpen">
<view class="history-item-line"><text class="history-item-label">测试时间</text> {{item.date}}</view>
<button class="history-detail" data-id="{{item.id}}" catchTap="onOpen">查看详情</button>
</view>
</view>
<!-- H5 .history-retry -->
<button class="history-retry" onTap="load">刷新列表</button>
</view>
<!-- H5 .toast -->
<view class="toast {{toastOn ? 'show' : ''}}">{{toastText}}</view>
</view>