$.get("/index.php/user/ajax_ulog/?ac=set&mid=1&id=" + id + "&type=2", function(data) { if (data.msg == "Succeed") { layer.msg('Collect'); } else if (userstatus == "0") { layer.msg('Please log in first'); } else if (userstatus == "1") { layer.msg('Successful collection'); } }, "json"); } function artfavs(id) { var userstatus = "0"; $.get("/index.php/user/ajax_ulog/?ac=set&mid=2&id=" + id + "&type=2", function(data) { if (data.msg == "Succeed") { layer.msg('Collect'); } else if (userstatus == "0") { layer.msg('Please log in first'); } else if (userstatus == "1") { layer.msg('Successful collection'); } }, "json"); } function actorfavs(id) { var userstatus = "0"; $.get("/index.php/user/ajax_ulog/?ac=set&mid=8&id=" + id + "&type=2", function(data) { if (data.msg == "Succeed") { layer.msg('Collect'); } else if (userstatus == "0") { layer.msg('Please log in first'); } else if (userstatus == "1") { layer.msg('Successful collection'); } }, "json"); } function topicfavs(id) { var userstatus = "0"; $.get("/index.php/user/ajax_ulog/?ac=set&mid=3&id=" + id + "&type=2", function(data) { if (data.msg == "Succeed") { layer.msg('Collect'); } else if (userstatus == "0") { layer.msg('Please log in first'); } else if (userstatus == "1") { layer.msg('Successful collection'); } }, "json"); }