业务经理

微信扫描以上二维码

028-61286886

技术咨询

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

迅睿框架 更新 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控制器,不是你的模板,看样子这个文件不是你开发的了

迅睿系统漏洞

GeoSeo收录宝
GeoSeo收录宝(2026-09-16)
ai发布增强: 1 新增Cron 心跳记录,任务列表实时显示。 ...
导入微信文章
导入微信文章(2026-09-15)
优化排版缺少文字情况
GEO系统
GEO系统(2026-09-15)
运营客户端,防止误触阴影处关闭对话框
独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...