添加whatshub工单

This commit is contained in:
root
2026-06-20 04:47:34 +08:00
parent a6c87e8e25
commit d5a0ffa6db
271 changed files with 9377 additions and 303 deletions
+25
View File
@@ -64,10 +64,35 @@ class Link extends Backend
$this->assignconfig('ipProtectList', $this->model->getIpProtectList());
$this->assignconfig('randomShuffleList', $this->model->getRandomShuffleList());
$this->assignconfig('statusList', $this->model->getStatusList());
$this->assignconfig('linkFilterList', $this->buildLinkFilterList());
$this->setupPatchFrontend();
}
/**
* 分流链接列表筛选下拉(id => 链接码 - 描述)
*
* @return array<string, string>
*/
private function buildLinkFilterList(): array
{
$query = $this->model->order('id', 'desc');
if ($this->dataLimit) {
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds)) {
$query->where('admin_id', 'in', $adminIds);
}
}
$list = [];
foreach ($query->field('id,link_code,description')->select() as $row) {
$code = (string) $row['link_code'];
$desc = (string) $row['description'];
$label = $desc !== '' ? $code . ' - ' . $desc : $code;
$list[(string) $row['id']] = $label;
}
return $list;
}
/**
* 未部署 JS 到 public 时,或 patches 版本较新时,jsname 指向 script 接口
*/