This commit is contained in:
xman 2025-06-16 21:39:47 +08:00
parent e24f5f0449
commit e5f0572c3f
2 changed files with 11 additions and 5 deletions

View File

@ -72,6 +72,7 @@ class Dispatchlog extends Backend
} }
} }
$this->view->assign('logs',json_encode($orderLogs)); $this->view->assign('logs',json_encode($orderLogs));
$this->view->assign('cdnurl',config('upload.cdnurl'));
return $this->view->fetch(); return $this->view->fetch();
} }
//如果发送的来源是 Selectpage则转发到 Selectpage //如果发送的来源是 Selectpage则转发到 Selectpage

View File

@ -113,6 +113,8 @@
<script> <script>
const logs = {$logs}; // 后端传入的数据,格式保持和你的一致 const logs = {$logs}; // 后端传入的数据,格式保持和你的一致
const cdnurl = '{$cdnurl}';
function getRoleLabel(role) { function getRoleLabel(role) {
return ''; return '';
} }
@ -197,11 +199,14 @@
return ` return `
<div class="progress-images" style="margin-top: 6px;"> <div class="progress-images" style="margin-top: 6px;">
${imageList.map(img => ` ${imageList.map(img => {
<img src="${img}" data-preview="true" const fullUrl = img.startsWith('http') ? img : cdnurl + img;
return `
<img src="${fullUrl}" data-preview="true"
style="width:40px;height:40px;border-radius:4px;border:1px solid #ccc;margin-right:5px;" style="width:40px;height:40px;border-radius:4px;border:1px solid #ccc;margin-right:5px;"
onerror="this.style.display='none'" /> onerror="this.style.display='none'" />
`).join('')} `;
}).join('')}
</div> </div>
`; `;
} }