refactor: 切换蝦皮数据到目录接口 (#135)

This commit is contained in:
chengma
2026-08-11 10:16:48 +08:00
parent 8f68845dfd
commit 0588ef18c8
20 changed files with 84 additions and 1043 deletions
+2 -32
View File
@@ -4,12 +4,6 @@
{{/* ── 第一段:顶部工具条 ────────────────────────────── */}}
<div class="toolbar">
{{if .CurrentUser.IsAdmin}}<a class="button" href="/integrations/catalog">导入记录</a>{{end}}
<form class="inline" method="post" action="/shopee/import" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<input type="file" name="file" accept=".xlsx" required>
<button type="submit">导入 Excel</button>
</form>
<form class="inline grow" method="get" action="/shopee">
{{/* 状态筛选是刚需(找待补规格 / 找没填链接的),不是锦上添花,
见 docs/admin/05-ui-specification.md §4.1、工单 #43。
@@ -82,8 +76,8 @@
{{if .IsFiltered}}
没有匹配的数据,换个商品 ID 或商品名称试试。
{{else}}
还没有数据,点左上角「导入 Excel」开始。<br>
<small>样本文件不在仓库里,需向项目负责人索取,放到 raw_data/ 下。</small>
还没有数据。蝦皮与 PDD 对应数据由第三方脚本通过商品目录接口导入。<br>
{{if $.CurrentUser.IsAdmin}}<small>可点击左上角「导入记录」查看脚本提交结果。</small>{{end}}
{{end}}
</td>
</tr>
@@ -96,30 +90,6 @@
双击任意一行可以查看这个商品的完整规格表。
</p>
{{/* ── 导入失败行:全部列出来,不折叠、不只显示条数 ──── */}}
{{if .Failures}}
<div class="table-wrap">
<p>本次导入有 {{len .Failures}} 行解析失败,规格原文已按原样保存,需人工补颜色/尺码/建议:</p>
<table>
<thead>
<tr>
<th>行号</th>
<th>规格原文</th>
<th>原因</th>
</tr>
</thead>
<tbody>
{{range .Failures}}
<tr>
<td>{{.Row}}</td>
<td>{{.Raw}}</td>
<td>{{.Reason}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}
{{/* ── 详情弹窗的壳子 ───────────────────────────
里面的内容双击行时由 /shopee/detail 返回,前端只负责放进来和显示,