自字义栏目字段前端不能调用显示,请大侠指点为谢!

迅睿框架 更新 2023-11-13 15:23:25 atsee2023

自定义栏目字段前端无法调用显示:

(1)字段定义如下:

1699858780114

1699858834643

1699858874349

(2)前端代码如下:

1699857797618

(3)显示位置(显示默认图片,没有显示出后台定义的栏目图片)

1699858532478

方案

  • 迅睿框架创始人 #1 · 2023-11-13 15:06:35
    首先,这个地址并不是迅睿自带的地址
    1699858532478
    可能是被二次开发过,所以这种情况就无法准确的找出他为什么掉不出来的原因-------------------如果是系统本身的内容页或者栏目页,那么直接用这个标签调用类别选择:image(在自定义字段管理里面看),名称填写:thumb(也在自定义字段管理里面),前缀:cat,字段标签生成工具:https://www.xunruicms.com/doc/code/field.html
  • atsee2023 #2 · 2023-11-13 15:19:22

    1699859774542
    这个是自定义的模块
  • 迅睿框架创始人 #3 · 2023-11-13 15:20:50
    我说是这个url,不是说你的模块,你这个地址m=show_list不是官方的地址
  • atsee2023 #4 · 2023-11-13 15:22:02
    show_list页面也很简单,主要代码如下:
    <body class="random-bg">
        <div class="label1">
            <div class="label2">
    
                <img src="/titi.png" alt="" width="100%">
                <!-- <div class="label3">
                    <img src="{dr_get_file(dr_block('wangzhanlogo'))}" class="pic1" />
                    <div class="label4">大理健康教育资料库</div>
                </div> -->
                <div class="label5">
    
                    <div class="label6" style="background-color:#fff ; padding:10px">
                        <!-- <h2 class="title">大理健康教育公众资料库</h2> -->
                        <div class="title2">
                            {loop $hrefs $v} {if $v.type == 'href'}
                            <a href="{$v.url}">{$v.name}</a>>> {else}
                            {$v.name}</span>{/if} {/loop}
                           
                           
                        </div>
                        <table class="table-hover table-thead-hidden">
                            <thead>
                                <tr>
                                    <th width="12%"></th>
                                    <th width="80%"></th>
                                    <th width="8%"></th>
                                </tr>
                            </thead>
                            <tbody>
                               {loop $data $v}
                        
                                <tr>
                                    <td class="text-center">
                                         
                                       {if $v.type == 'category'}
                                           <img src="{dr_thumb($v.thumb,50,50)}">{dr_count($cat['thumb'])}
                                         {elseif $v.type == 'video'} 
                                        <img src="{dr_get_file(dr_block('shipin'))}" alt="" width="24"> {elseif $v.type == 'audio'}
                                        <img src="{dr_get_file(dr_block('yinpin'))}" alt="" width="24"> {elseif $v.type == 'pdf'}
                                        <img src="{dr_get_file(dr_block('pdf'))}" alt="" width="24"> {else}
                                        <img src="{dr_get_file(dr_block('tupian'))}" alt="" width="24"> {/if}
                                    </td>
                                    <td><a href="{$v.type == 'category' ? dr_url('/publicbase/home/show_list').'&pid='.$v['id']:dr_url('/publicbase/home/show_info').'&id='.$v['id']}">{$v.name}</a><br><span class="item-meta-info" style="display:{$v.type == 'category'?'none' : 'inline-block'};">{$v.time}</span></td>
                                    <td>
                                        {if $v.type != 'category'}
                                        <img class="dropdown" src="{dr_get_file(dr_block('caidan'))}" data-href="{$v.url}" onclick="show_download(this);"> {/if}
                                    </td>
                                </tr>
                               
                               {/loop}
                               
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="shadow" style="display: none;">
            <div class="mobile-operation-menu-bg-layer" onclick="hide_download();"></div>
            <div class="mobile-operation-menu">
                <a tabindex="0" href="" class="mobile-menu-item dropdown-item" download="">下载</a>
            </div>
        </div>
    </body>
  • 迅睿框架创始人 #5 · 2023-11-13 15:23:25
    我说的是php控制器,不是你的模板,看样子这个文件不是你开发的了

迅睿系统漏洞

站群分站系统
站群分站系统(2026-10-15)
子站域名新增llms.txt访问
GEO系统
GEO系统(2026-10-14)
修复下载zip空白地址问题 修复流量复刻和任务队列错误
GeoSeo收录宝
GeoSeo收录宝(2026-10-14)
新增 站长工具箱 前端首页自动调用meta 数据
滑块验证码 Gocaptcha
滑块验证码 Gocaptcha(2026-10-13)
基于开源项目 go-captcha 的行为验证码插件,滑动拼图、区域...
GeoSeo工具箱
GeoSeo工具箱(2026-10-13)
优化巡检任务
GeoSeo排名助手
GeoSeo排名助手(2026-10-11)
加入大模型自定义
SEO聚合关键字
SEO聚合关键字(2026-10-11)
优化关键字列表页最多支持1万篇文章,过多会导致服务器扛不住;
CMS内容同步复制
CMS内容同步复制(2026-10-10)
增加时间是否更新的开关