1、打开apps/admin/view/default/content/message.html,找到<td>[value->$field]</td>
2、打开apps/admin/view/default/content/form.html,找到<td>[value->$field]</td>
3、把两个文件找到的代码都替换成以下
-
<!-- 判断图片 -->
-
{if(preg_match('/(.(jpg|gif|png|bmp|jpeg|ico|webp))$/i', $value->$field) || strpos($value->$field,'qlogo'))}
-
<td><a href='[value->$field]' target='_blank'><img src='[value->$field]' width='30' height='30' style='float: unset;cursor: pointer;' /></a></td>
-
{/if}
-
<!-- 判断文件 -->
-
{if(preg_match('/(.(zip|gz|rar|iso|doc|xsl|ppt|wps|docx|xslx|pdf))$/i', $value->$field))}
-
{php}$arr=explode("/", $value->$field);$last=$arr[count($arr)-1];{/php}
-
<td><a href='[value->$field]' target='_blank'>{php}echo $last;{/php}</a></td>
-
{/if}
-
<!-- 判断非图片与文件 -->
-
{if(!preg_match('/(.(jpg|gif|png|bmp|jpeg|ico|webp|zip|gz|rar|iso|doc|xsl|ppt|wps|docx|xslx|pdf))$/i', $value->$field) && !strpos($value->$field,'qlogo'))}
-
<td>[value->$field]</td>
-
{/if}