SimpleTaskSystem.Web/Assets/js/news/news.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

var News = $.extend({}, News);/* 全局对象 */



//文章点赞
News.Attention = function (toId, toUserName, IsFollow, callBack, args) {
    var res = "";
    $.ajax({
        url: "/PortalNews/Like",
        type: "post",
        data: { toId: toId, toUserName: toUserName, IsFollow: IsFollow },
        dataType: "json",
        async: false,
        success: function (data) {

            if (data.MsgCode == "notLogin") {
                News.OpenAutoLogin();
        
            } else if (data.MsgCode == "error") {
                layer.msg(data.MsgContent, { icon: 5 });

            } else {

                if (callBack != null && callBack != undefined) {
                    if (args != null && args != undefined) {
                        callBack.arguments = args;
                    }
                    callBack();
                }
            }
            res = data.MsgCode;

        },
        error: function (ex) {
            return false;

        }
    });

    return res;
}
//评论点赞
News.AttentionLike = function (toId, toUserName, IsFollow, callBack, args) {

    if (IsFollow==8) {
        var res = "";
        $.ajax({
            url: "/" + toUserName + "/StudyPlatform/News/CommentLike",
            type: "post",
            data: { toId: toId, toUserName: toUserName, IsFollow: IsFollow },
            dataType: "json",
            async: false,
            success: function (data) {

                if (data.MsgCode == "notLogin") {
                    News.OpenAutoLogin();

                } else if (data.MsgCode == "error") {
                    layer.msg(data.MsgContent, { icon: 5 });

后面还有 104 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。