feat: 增加蝦皮店铺图片筛选 (#150)

This commit is contained in:
chengma
2026-08-11 12:04:38 +08:00
parent 2a3224b86d
commit c39f5a7912
9 changed files with 212 additions and 11 deletions
+4
View File
@@ -23,6 +23,8 @@
<input type="hidden" name="shopee_goods_id" value="{{.GoodsID}}">
<input type="hidden" name="list_goods_id" value="{{$.Keyword}}">
<input type="hidden" name="status" value="{{$.StatusFilter}}">
<input type="hidden" name="shop" value="{{$.ShopFilter}}">
<input type="hidden" name="image" value="{{$.ImageFilter}}">
<input type="hidden" name="page" value="{{$.CurrentPage}}">
<div class="field">
<label for="shopee-pdd-url">PDD 商品链接</label>
@@ -44,6 +46,8 @@
<input type="hidden" name="shopee_goods_id" value="{{.GoodsID}}">
<input type="hidden" name="list_goods_id" value="{{$.Keyword}}">
<input type="hidden" name="status" value="{{$.StatusFilter}}">
<input type="hidden" name="shop" value="{{$.ShopFilter}}">
<input type="hidden" name="image" value="{{$.ImageFilter}}">
<input type="hidden" name="page" value="{{$.CurrentPage}}">
{{if .CanCollect}}
<button type="submit">{{if eq .CollectStatus "failed"}}重新创建采集任务{{else}}创建采集任务{{end}}</button>
+19 -1
View File
@@ -14,6 +14,18 @@
<option value="{{.Value}}" {{if eq .Value $.StatusFilter}}selected{{end}}>{{.Text}}</option>
{{end}}
</select>
<label for="shop">店铺</label>
<select id="shop" name="shop">
{{range .ShopOptions}}
<option value="{{.Value}}" {{if eq .Value $.ShopFilter}}selected{{end}}>{{.Text}}</option>
{{end}}
</select>
<label for="image">图片</label>
<select id="image" name="image">
{{range .ImageOptions}}
<option value="{{.Value}}" {{if eq .Value $.ImageFilter}}selected{{end}}>{{.Text}}</option>
{{end}}
</select>
<label for="q">商品 ID</label>
<input id="q" type="text" name="goods_id" value="{{.Keyword}}" placeholder="商品 ID">
<button type="submit">搜索</button>
@@ -22,6 +34,11 @@
<form class="inline" method="post" action="/shopee/delete"
data-confirm-delete>
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<input type="hidden" name="list_goods_id" value="{{.Keyword}}">
<input type="hidden" name="status" value="{{.StatusFilter}}">
<input type="hidden" name="shop" value="{{.ShopFilter}}">
<input type="hidden" name="image" value="{{.ImageFilter}}">
<input type="hidden" name="page" value="{{.CurrentPage}}">
<button type="submit" class="danger" data-need-checked>删除</button>
</form>
</div>
@@ -78,7 +95,8 @@
<tr class="empty">
<td colspan="13">
{{if .IsFiltered}}
没有匹配的数据,换个商品 ID 或商品名称试试。
当前筛选条件下没有商品。请调整状态、店铺、图片或商品 ID。<br>
<small><a href="/shopee">清除筛选条件</a></small>
{{else}}
还没有数据。蝦皮与 PDD 对应数据由第三方脚本通过商品目录接口导入。<br>
{{if $.CurrentUser.IsAdmin}}<small>可点击左上角「导入记录」查看脚本提交结果。</small>{{end}}