feat: 展示任务PDD店铺和客户端名称 (#158)

This commit is contained in:
chengma
2026-08-11 15:49:01 +08:00
parent 3e52e188f5
commit df1287f8eb
7 changed files with 175 additions and 28 deletions
+3 -1
View File
@@ -16,7 +16,8 @@
<dt>类型</dt><dd>{{.TypeText}}</dd>
<dt>执行模式</dt><dd>{{.ExecutionModeText}}</dd>
<dt>状态</dt><dd>{{.StatusText}}</dd>
<dt>分配客户端</dt><dd>{{.ClientText}}</dd>
<dt>客户端名称</dt><dd>{{.ClientText}}</dd>
<dt>客户端 ID</dt><dd>{{.ClientIDText}}</dd>
<dt>创建人</dt><dd>{{.CreatorText}}</dd>
<dt>领取时间</dt><dd>{{.ClaimedAt}}</dd>
<dt>完成时间</dt><dd>{{.FinishedAt}}</dd>
@@ -26,6 +27,7 @@
<dl class="detail">
<dt>PDD 链接</dt>
<dd><a href="{{.PddGoodsURL}}" target="_blank" rel="noopener noreferrer">{{.PddGoodsURL}}</a></dd>
<dt>PDD 店铺</dt><dd>{{.PddShopText}}</dd>
{{/* 下面三项只有采购任务才有;采集任务这里整段不出现,不显示空行 */}}
{{if .IsPurchase}}
+4 -2
View File
@@ -66,6 +66,7 @@
<th>类型</th>
<th>执行模式</th>
<th>目标</th>
<th>PDD 店铺</th>
<th>状态</th>
<th>客户端</th>
{{if .ShowCreator}}<th>创建人</th>{{end}}
@@ -84,15 +85,16 @@
<td>{{.TypeText}}</td>
<td>{{.ExecutionModeText}}</td>
<td class="truncate" title="{{.Target}}">{{.Target}}</td>
<td class="truncate" title="{{.PddShopText}}">{{.PddShopText}}</td>
<td>{{.StatusText}}</td>
<td>{{.ClientText}}</td>
<td class="truncate" title="{{.ClientTitle}}">{{.ClientText}}</td>
{{if $.ShowCreator}}<td>{{.CreatorText}}</td>{{end}}
<td>{{.UpdatedAt}}</td>
</tr>
{{else}}
{{/* 空状态要分情况:从没建过任务 和 筛选没结果,下一步动作完全不同 */}}
<tr class="empty">
<td colspan="{{if .ShowCreator}}9{{else}}8{{end}}">
<td colspan="{{if .ShowCreator}}10{{else}}9{{end}}">
{{if .IsFiltered}}
当前筛选条件下没有任务。<br>
<small>换个类型、状态或关键词再试。<a href="/tasks">查看全部</a></small>