解决dede(织梦)联动枚举无法更新bug,dede5,织梦dede5,下面小编来给大家介绍一下,一起来了解一下吧!
dede5.7联动枚举类型有无法无法更新的bug。infotype自定义类型或nativeplace自定义类型,在分类信息中无法正常显示。
主要原因是dede5.7无法在/data/enums目录下自动生成自定义后的infotype.js,nativeplace.js。但庆幸的是系统可以自动生成infotype.php,nativeplace.php。所以把后面这两个php文件改成对应的.js文件即可。
举个例子:假设自定义infotype联动类型,更新缓存后生成的infotype.php内容如下:
<?php
global $em_infotypes;
$em_infotypes = array();
$em_infotypes['500'] = '跳蚤市场';
$em_infotypes['501'] = '二手电脑';
$em_infotypes['502'] = '二手手机';
$em_infotypes['503'] = '二手家电';
$em_infotypes['504'] = '二手数码';
$em_infotypes['505'] = '二手家居';
$em_infotypes['506'] = '办公用品';
$em_infotypes['507'] = '图书/音像/软件';
$em_infotypes['508'] = '文体用品/乐器';
$em_infotypes['509'] = '居家用品/家纺';
$em_infotypes['510'] = '服装/箱包/鞋帽';
$em_infotypes['511'] = '艺术/工艺/收藏品';
$em_infotypes['512'] = '母婴/儿童用品';
$em_infotypes['513'] = '化装品/保健品';
$em_infotypes['514'] = '车票转让';
$em_infotypes['515'] = '二手设备';
$em_infotypes['516'] = '建材';
$em_infotypes['517'] = '商城';
$em_infotypes['518'] = '其它跳蚤信息';
?>
对就的.js文件为:
<!–
em_infotypes=new Array();
em_infotypes[500] = '跳蚤市场';
em_infotypes[501] = '二手电脑';
em_infotypes[502] = '二手手机';
em_infotypes[503] = '二手家电';
em_infotypes[504] = '二手数码';
em_infotypes[505] = '二手家居';
em_infotypes[506] = '办公用品';
em_infotypes[507] = '图书/音像/软件';
em_infotypes[508] = '文体用品/乐器';
em_infotypes[509] = '居家用品/家纺';
em_infotypes[510] = '服装/箱包/鞋帽';
em_infotypes[511] = '艺术/工艺/收藏品';
em_infotypes[512] = '母婴/儿童用品';
em_infotypes[513] = '化装品/保健品';
em_infotypes[514] = '车票转让';
em_infotypes[515] = '二手设备';
em_infotypes[516] = '建材';
em_infotypes[517] = '商城';
em_infotypes[518] = '其它跳蚤信息';
–>
php文件改为对应的.js文件需要注意的问题:
<?php ?>
改为:
<!– –>
global $em_infotypes;
$em_infotypes = array();
改为:
em_infotypes=new Array(); // 注意有 new , Array的A为大写
$em_infotypes['500'] = '跳蚤市场';
改为:
em_infotypes[500] = '跳蚤市场'; // 注意中括号内无单引号
以上就是dede5 dede表单省级联动的介绍,希望大家喜欢!
更多教程关注FF推源码网。