报告域: - 报告 Tab 列表接入 GET /reports(重启可找回);重新生成采纳新 report_id - 任务状态前后端大小写归一——轮询完成检测与「导出 PDF」按钮首次真正可达 - FAILED 重试换新幂等键;导出→重生成→再导出幂等冲突死路修复 - PDF 下载前 unlink 可重入;预览页常驻挂载+失败态重试;分享/另存文案拆分 对话页: - 「内容由 AI 生成」常驻标识(CR-05)+ 快捷问题 chips + 额度 0 置灰与恢复时间 - 发送失败回填输入+重试+request_key 幂等;40301 额度同步 试衣间/发型设计: - 人脸照片知情同意弹窗(preferences 持久化+版本+「我的」撤回入口) - 生成期防中断(keepScreenOn/返回挽留/取消出口/genSeq 防串扰) - 结果转存 filesDir/results:杀 App 回看、飞行模式离线保存、保存三态文案 - R4N1 照片输入链修复:裁除 describe 挂起载体、选图/拍照超时兜底、 openSource URI 直建失败回退 fd 口径(R5N2) - @Builder 改 $$ 对象传参修复槽位预览不刷新(R5N1);发型列表三态 全局: - 会话过期四处「重新登录」出路;UTC 时间显示归正(差 8h) - 10 处技术黑话清理;主色统一 Theme.ets;配额卡 4 张真实消耗集 - 登录页内测口径;f2 ErrorView/LoadingView 换用;调试入口 debug 守卫 门禁:App 构建 BUILD SUCCESSFUL;后端 576 单测绿(子仓 00ef56b); 28 项静态检查 PASS;真机 PDF 全链/照片送达/零崩溃验证通过
74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
/**
|
||
* QuotaCardView(F1)—— 配额卡片:剩余数大字 + 进度条 + 周期文案。
|
||
*
|
||
* 数据契约(对齐后端 GET /api/v1/quota):
|
||
* used / (limit_value + bonus_granted) 为进度;remaining 为剩余额度。
|
||
* 周期文案由父层根据 quota_key + reset_at 算好传入(日=明日恢复/终身=一次性)。
|
||
*/
|
||
|
||
import { COLOR_PRIMARY } from '../../core/Theme'
|
||
|
||
@Component
|
||
export struct QuotaCardView {
|
||
@Prop title: string = ''
|
||
@Prop remaining: number = 0
|
||
@Prop used: number = 0
|
||
@Prop total: number = 0
|
||
@Prop resetText: string = ''
|
||
@Prop loaded: boolean = false
|
||
@Prop errorText: string = ''
|
||
@Prop accent: string = COLOR_PRIMARY
|
||
|
||
build() {
|
||
Column({ space: 6 }) {
|
||
Text(this.title)
|
||
.fontSize(13)
|
||
.fontColor('#8A8A8A')
|
||
.maxLines(1)
|
||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||
|
||
if (!this.loaded) {
|
||
LoadingProgress()
|
||
.width(28)
|
||
.height(28)
|
||
.color('#CCCCCC')
|
||
.margin({ top: 10, bottom: 14 })
|
||
} else if (this.errorText !== '') {
|
||
Text(this.errorText)
|
||
.fontSize(13)
|
||
.fontColor('#C0392B')
|
||
.maxLines(2)
|
||
.margin({ top: 6, bottom: 8 })
|
||
.textAlign(TextAlign.Center)
|
||
} else {
|
||
Text(`${this.remaining}`)
|
||
.fontSize(34)
|
||
.fontWeight(FontWeight.Bold)
|
||
.fontColor(this.accent)
|
||
Text('剩余次数')
|
||
.fontSize(11)
|
||
.fontColor('#AAAAAA')
|
||
Progress({ value: this.used, total: Math.max(this.total, 1), type: ProgressType.Linear })
|
||
.width('100%')
|
||
.height(6)
|
||
.borderRadius(3)
|
||
.color(this.accent)
|
||
.backgroundColor('#F1E7EB')
|
||
.margin({ top: 4 })
|
||
Text(`已用 ${this.used}/${this.total}`)
|
||
.fontSize(11)
|
||
.fontColor('#999999')
|
||
Text(this.resetText)
|
||
.fontSize(10)
|
||
.fontColor('#B3B3B3')
|
||
.maxLines(1)
|
||
}
|
||
}
|
||
.width('100%')
|
||
.padding(12)
|
||
.borderRadius(16)
|
||
.backgroundColor('#FFFFFF')
|
||
.alignItems(HorizontalAlign.Center)
|
||
}
|
||
}
|