| 插件 | 模块内容点赞 V2.9 |
| 应用作者 | 迅睿官方团队 |
| 发布时间 | 2019-03-14 16:42:07 |
| 更新时间 | 2024-11-08 07:16:23 |
使用点赞插件在列表页调用点赞按钮时,在js中如果要在get中请求多个模块怎么写?
我这边是设置了3个模块news,image,video里有内容,用副栏目把文章分配到了其他几个栏目单页面,使用用modules调用文章列表,因为模块不同显示模块内容不存在
function dr_module_digg{$t.id}(value) {
$.get("/index.php?is_ajax=1&s=api&app=news&c=module&m=digg&id={$t.id}&value="+value, function(data){
alert(data.msg);
if (data.code) {
$("#module_digg_{$t.id}_"+value).html(data.data);
}
}, 'json');
}
$(function() {
$.get("/index.php?is_ajax=1&s=zan&mid=news&id={$t.id}", function(data){
if (data.code) {
var s = data.data;
$('#module_digg_{$t.id}_0').html(s.a);
$('#module_digg_{$t.id}_1').html(s.b);
}
}, 'json');
});
1app=news改成不同的模块名 2dr_module_digg{$t.id}这个函数也加一个模块名作为区分