PHP中要把数据进行 (只是键为数据的数组,有键名的不行)
$list['interest'] = json_encode(explode('--',$list['interest']));
前台使用就可以了
if('{$vo.interest|default="0"}'){
$.each({$vo.interest}, function(index, value) {
$("input[name='interest\[\]'][value='"+value+"']").attr('checked','checked');
});
};