﻿var NetHome = {
    //<通用类
    Utility: {
        //<检查Email格式
        CheckIsEmil: function (str) {
            if (str == null || str.length < 3) { return false; } // 需出现'@',且不在首字符.
            var aPos = str.indexOf("@", 1); if (aPos < 0) { return false; }
            // '@'后出现'.',且不紧跟其后.
            if (str.indexOf(".", aPos + 2) < 0) { return false; }
            return true;
        },
        //检查Email格式/>
        //<冻结注册按钮
        cantreg: function (id) { $("#" + id).attr("disabled", "disabled"); },
        //冻结注册按钮/>
        //<激活注册按钮
        canreg: function (id) { $("#" + id).attr("disabled", ""); },
        //激活注册按钮/>
        //<推荐内容
        UpContent: function (Upid) {
            $("#upcontent_" + Upid.toString()).html("提交中···");
            var Pid;
            $.ajax({
                type: 'POST',
                url: '/Content/UpContent',
                dateType: "text",
                data: { Pid: Upid },
                success: function (Msg) {
                    if (Msg == "OK") {
                        $("#upcontent_" + Upid.toString()).html("提交成功");
                        $("#upnum_" + Upid.toString()).html(parseInt($("#upnum_" + Upid.toString()).html()) + 1);
                    }
                    else if (Msg == "未登录") {
                        $("#upcontent_" + Upid.toString()).html("");
                        NetHome.Utility.ShowLoginBox();
                    }
                    else if (Msg == "转换int失败") {
                        $("#upcontent_" + Upid.toString()).html("");
                        NetHome.Utility.RefencePage();
                    }
                    else if (Msg == "已推荐") {
                        $("#upcontent_" + Upid.toString()).html("");
                        if (confirm("您已推荐，取消推荐？")) {
                            $.post("/Content/AbolishUp", { Pid: Upid }, function (Msg2) {
                                if (Msg2 == "OK") { $("#upcontent_" + Upid.toString()).html("已取消"); $("#upnum_" + Upid.toString()).html(parseInt($("#upnum_" + Upid.toString()).html()) - 1); }
                                else { $("#upcontent_" + Upid.toString()).html(Msg2); }
                            });
                        } else { }
                    }
                    else { $("#upcontent_" + Upid.toString()).html(""); $("#upcontent_" + Upid.toString()).html("提交失败，请重试！"); }
                },
                Error: function () {
                    $("#upcontent_" + Upid.toString()).html("提交失败，请重试！");
                }
            });
        },
        //推荐内容/>
        //<默认头像
        DefaultIcon: function (e) {
            $(e).attr("src", "/Content/images/default.jpg");
        },
        DefaultIcon_big: function (e) {
            $(e).attr("src", "/Content/images/default_big.jpg");
        },
        //默认头像/>
        //<展示登录框
        ShowLoginBox: function () {
            var LoginBox = $("#LoginBox").wBox({ title: "登录.Net之家", html: '<div style="width:315px;" class="reg-form" id="J_RegisterForm"><div class="h35 m_t10"><span>登录.Net之家</span><span><a class="right m_r20" href="/Profile/Reg">没有账号，注册&gt;&gt;</a></span></div><div class="reg-form-item"><div class="reg-form-wapper"><label class="reg-label-2c" for="email">邮&nbsp;箱</label><div class="reg-form-element"><input id="email" class="reg-form-input" name="email" type="text" value="" tabindex="1"></div></div></div><div class="reg-form-item"><div class="reg-form-wapper"><label class="reg-label-2c" for="password">密&nbsp;码</label><div class="reg-form-element"><input id="password" class="reg-form-input" name="password" value="" type="password" tabindex="2"></div></div></div><div class="reg-form-item2"><div class="reg-form-element"><label class="reg-label-2c" for="remember">一周内自动登录</label><input name="remember" id="remember" value="1" type="checkbox"></div></div><div class="reg-form-item2"><div class="reg-form-wapper reg-submit-holder m_r65"><input id="J_RegSubmit" class="reg-submit" tabindex="10" onclick="NetHome.Utility.BoxLogin()" type="button" value="登录"><label id="boxloginerror" class="red m_r20 fs14"></label></div><div class="reg-form-tip"></div></div></div>' }).showBox();
        },
        //<登录框登录
        BoxLogin: function () {
            if ($('#email').val() == "") { $("#boxloginerror").html("登录邮箱为空~").parent("div").removeClass("m_r65").addClass("m_r40"); NetHome.Reg.adderror("email"); return false; }
            if ($('#password').val() == "") { $("#boxloginerror").html("密码为空~").parent("div").removeClass("m_r65").addClass("m_r40"); NetHome.Reg.adderror("password"); return false; }
            var remember;
            if ($("#remember").attr("checked") == true) { remember = "1"; }
            $.post("/Profile/BoxLogin", { Email: $('#email').val(), PassWord: $('#password').val(), Remember: remember }, function (Msg) {
                if (Msg == "OK") { top.location.reload(); }
                else { $("#boxloginerror").html(Msg).parent("div").removeClass("m_r65").removeClass("m_r40"); }
            });
        },
        //登录框登录/>
        //展示登录框/>
        //<出现待刷新页面的错误
        RefencePage: function () {
            $("#refencepage").wBox({ noTitle: true, html: "<div>操作出现错误，请刷新重试！</div><a href='#' class='m_r20' onclick='top.location.reload()'>确定</a><a href='#' class='wBox_close m_r20'>取消</a>" }).showBox();
        },
        //出现待刷新页面的错误/>
        //<关注用户
        Attention: function (id) {
            $.post("/Profile/Attention", { Uid: id }, function (Msg) {
                if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                else if (Msg == "OK") { $("#carestate").html("已关注"); $("#careli").html('<a href="#" onclick="NetHome.Utility.AbolishAttention(' + id + ');return false;" class="orange">-取消关注</a>'); }
                else {
                    $("#posterrorlabel").html(Msg);
                    $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
                }
            });
        },
        //关注用户/>
        //<取消关注
        AbolishAttention: function (id) {
            $.post("/Profile/AbolishAttention", { Uid: id }, function (Msg) {
                if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                else if (Msg == "OK") { $("#carestate").html("已取消"); $("#careli").html('<a href="#" onclick="NetHome.Utility.Attention(' + id + ');return false;" class="orange">+关注</a>'); }
                else {
                    $("#posterrorlabel").html(Msg);
                    $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
                }
            });
        },
        //取消关注/>
        //<显示通知框
        SendNodeBox: function (nickname, uid) {
            $("#LoginBox").wBox({ title: "发送通知", html: '<div id="sideleft" style="width:400px;"><div><span><table width="100%" border="0"><tbody><tr height="35"><td class="m_l20" width="60">收件人: </td><td><input id="txtIncept" type="text" value="' + nickname + '" maxlength="90" id="txtIncept" class="text_fixedsys" style="width:300px"></td></tr><tr><td class="m_l20" width="60">内容: </td><td><div style="text-align:right;padding-right:60px;"></div><textarea rows="2" cols="20"  id="MsgContent" class="text_fixedsys" style="width:300px;height:200px"></textarea></td></tr><tr><td colspan="2" align="center" height="50"><input type="button" value=" 发 送 " id="btnSend" onclick="NetHome.Utility.SendNode(' + uid + ')"></td></tr></tbody></table></span></div></div>' }).showBox();
        },
        //显示通知框/>
        SendNode: function (uid) {
            if ($("#txtIncept").val() == '') { alert('收件人为空~'); return false; }
            if ($("#MsgContent").val() == "") { alert('内容为空~'); return false; }
            if ($("#MsgContent").val().length > 200) { alert("内容长度不能超过200~"); return false; }
            $.post("/Ajax/SendNode", { Uid: uid, NickName: $("#txtIncept").val(), Content: $("#MsgContent").val() }, function (Msg) {
                if (Msg == "OK") { Msg = "发送成功~"; }
                else if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); return false; }
                $("#posterrorlabel").html(Msg);
                $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
            });
        },
        //<发表内容
        SendContent: function () {

            if ($("#selType").val() == 0) { $("#postcontenttag").html("请选择内容分类~"); return false; } else { $("#postcontenttag").html(""); }
            if ($("#txtTitle").val() == '') { $("#postcontenttag").html("请填写内容标题~"); return false; } else { $("#postcontenttag").html(""); }
            if ($(".xheditor").val() == "") { $("#postcontenttag").html("请填写内容~"); return false; } else { $("#postcontenttag").html(""); }
            var content = "";
            $("input[name='radChl']:checked").each(function (index, e) { content += $(e).val(); });
            if (content == "") { $("#postcontenttag").html("请选择技术分类~"); return false; } else { $("#postcontenttag").html(""); }
            if (NetHome.PostMessage.posting) { $("#postcontenttag").html("正在提交，请不要重复提交~"); return false; }
            $("#postcontenttag").html("正在提交...");
            $("#postcontent").ajaxSubmit({ url: "/Content/SendContent", success: function (Msg) {
                $("#postcontenttag").html("");
                if (Msg == "OK") { $("#postsuccess").wBox({ noTitle: true, html: "<div style='width:170px;height:50px;'><div>发表成功，您可以</div><br/><div><a href='#' class='m_r20' onclick='NetHome.Utility.GoHome()'>去首页</a><a href='#' onclick='NetHome.Utility.GoToPost()' class='wBox_close m_r20'>继续发表</a></div></div>" }).showBox(); NetHome.PostMessage.posting = false; return false; }
                if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); NetHome.PostMessage.posting = false; return false; }
                $("#posterrorlabel").html(Msg);
                $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
                NetHome.PostMessage.posting = false;
            }
            });
        },
        //发表内容/>
        DeleContent: function (pid) {
            $.post("/Content/DeleContent", { Pid: pid }, function (Msg) {
                if (Msg == "OK") { $("#content_list_" + pid).hide(300); return false; }
                if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); return false; }
                else {
                    $("#posterrorlabel").html(Msg);
                    $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
                    return false;
                }
            });
        },
        SetPost: function () {//修改内容
            if ($("#selType").val() == 0) { $("#postcontenttag").html("请选择内容分类~"); return false; } else { $("#postcontenttag").html(""); }
            if ($("#txtTitle").val() == '') { $("#postcontenttag").html("请填写内容标题~"); return false; } else { $("#postcontenttag").html(""); }
            if ($(".xheditor").val() == "") { $("#postcontenttag").html("请填写内容~"); return false; } else { $("#postcontenttag").html(""); }
            var content = "";
            $("input[name='TSort0']:checked").each(function (index, e) { content = content + "," + $(e).val(); });
            if (content == "") { $("#postcontenttag").html("请选择技术分类~"); return false; } else { $("#TSort").val(content.substring(1)); $("#postcontenttag").html(""); }
        },
        GoHome: function () { top.location.href = "/"; },
        GoToPost: function () { $("#selType").val(0); $("#txtTitle").val(""); $("#txtTag").val(''); $(".xheditor").val(""); $("input[name='radChl']").each(function (i, e) { $(e).attr("checked", ""); }); },
        Index_Submit: function (Str) {
            if (Str != "") {
                $("#" + Str.split('=')[0]).val(Str.split('=')[1]);
            }
            if (Str.split('=')[0] != "Page") { $("#Page").val("1"); }
            var T = $("#T").val(); var C = $("#C").val(); var Key = $("#Key").val();
            $("#mainajaxcontent").html("<center><img class='m_t50' alt='正在加载' src='/Content/images/LoadMsg.gif' /></center>");
            $("#Index_Submit").ajaxSubmit({ success: function (Msg) {
                $("#mainajaxcontent").html(Msg);
                $(".nav_mid ul li").removeClass("current"); $(".post_nav_block li a").removeClass("current_nav");
                if (Key != "") { $("#searchtxt").val(Key); $("#stateli").html("当前为搜索状态,<a href='#' class='orange' onclick='NetHome.Utility.ClearKey()'>切换到分类模式</a>"); return false; } //如果是搜索就只是搜索
                if (T == "") { $("#All").addClass("current"); } else { $("#" + T).addClass("current"); }
                if (C == "") { $("#Call").addClass("current_nav"); } else { $("#" + C).addClass("current_nav"); }
            }
            });
        },
        ClearKey: function () {
            $("#Key").val("");
            $("#searchtxt").val("");
            $("#searchrech").parent().hide();
            NetHome.Utility.Index_Submit("");
        },
        StringToJson: function (Str) {
            return eval('(' + Str + ')');
        },
        AjaxSearch: function (Str) {
            if (Str.trim() == "") { return false; }
            if (NetHome.PostMessage.posting == false) {
                NetHome.PostMessage.posting = true;
                setTimeout("NetHome.Utility.AjaxSearching()", 1000);
            }
        },
        AjaxSearching: function () {
            var Str = $('#searchtxt').val().trim(); //文本框的值
            $.post("/Ajax/AjaxSearch", { SearchKey: Str }, function (Msg) {
                var json = NetHome.Utility.StringToJson(Msg);
                $("#searchrech").bind("mouseleave", function () { $("#searchrech").parent().fadeOut(500); });
                $("#searchrech").html("");
                if (json.State) {
                    var ulhtml = "";
                    var index = 1;
                    for (var p in json.Data) { _p = json.Data[p]; ulhtml += '<li><a iid="' + index + '" href="/Content/' + _p.Pid + '">' + _p.Pname + '</a></li>'; index++; }
                    $("#searchrech").html(ulhtml).parent().show();
                    //$("#searchrech li a:first").hover();
                }
                NetHome.PostMessage.posting = false;
            });
        },
        KeyCode: function (e) {           //待修改
            if (window.event.keyCode == 40) {
                //if ($(e).attr("id") == "") { $("#1").focus(); return false; }
                alert(parseInt($(e).attr("iid")) + 1);
                //$("#5").focus();
                $("#" + (parseInt($(e).attr("iid")) + 1)).focus();
            }
            else if (window.event.keyCode == 38) {
                $("#" + ($(e).attr("id") - 1)).focus();
            }
        },
        ShowTipBox: function (str) {
            $("#posterrorlabel").html(str + "~");
            $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox(); return false;
        }
    },
    //通用类/>
    //<注册
    Reg: {
        //<检查Email
        checkmail: function () {
            if ($("#email").val() == "") { $("#emailtab").html("邮箱名不能为空~"); this.adderror("email"); return false; } else { $("#emailtab").html(""); this.removeerror("email"); }
            if (!NetHome.Utility.CheckIsEmil($("#email").val())) { $("#emailtab").html("邮箱名格式不正确~"); this.adderror("email"); return false; } else { $("#emailtab").html(""); this.removeerror("email"); }
            $.post("/Profile/CheckEmail", { Email: $("#email").val() }, function (Msg) {
                if (Msg == "NO") { $("#emailtab").html("此邮箱名已注册过~"); NetHome.Reg.adderror("email"); return false; } else { $("#emailtab").html(""); NetHome.Reg.removeerror("email"); }
            });
        },
        //检查Email/>
        //<检查密码
        CheckPa: function () {
            if ($("#password").val() == "") { $("#passwordtab").html("密码不能为空~"); this.adderror("password"); return false; } else { $("#passwordtab").html(""); this.removeerror("password"); };
            if ($("#password").val().length < 6) { $("#passwordtab").html("密码不能小于6位~"); this.adderror("password"); return false; } else { $("#passwordtab").html(""); this.removeerror("password"); }
        },
        //检查密码/>
        //<检查再次输入的密码
        CheckPa2: function () {
            if ($("#password2").val() != $("#password").val()) { $("#password2tab").html("两次密码输入不同~"); this.adderror("password2"); return false; } else { $("#password2tab").html(""); this.removeerror("password2"); }
        },
        //检查再次输入的密码/>
        //<检查用户昵称
        CheckNickName: function () {
            if ($("#blogName").val() == "") { $("#blogNametab").html("昵称不能为空~"); this.adderror("blogName"); return false; } else { $("#blogNametab").html(""); this.removeerror("password2"); }
            if ($("#blogName").val().length >= 2 && $("#blogName").val().length <= 8) { $("#blogNametab").html(""); this.removeerror("blogName"); } else { $("#blogNametab").html("昵称长度请控制在2到8位~"); this.adderror("blogName"); return false; }
            $.post("/Profile/CheckNickName", { NickName: $("#blogName").val() }, function (Msg) {
                if (Msg == "NO") { $("#blogNametab").html("此昵称已注册过~"); NetHome.Reg.adderror("blogName"); return false; } else { $("#blogNametab").html(""); NetHome.Reg.removeerror("blogName"); }
            });
        },
        //检查用户昵称/>
        beforesubmit: function () {
            this.checkmail(); this.CheckPa(); this.CheckPa2(); this.CheckNickName(); if ($("#emailtab").html() + $("#passwordtab").html() + $("#password2tab").html() + $("#blogNametab").html() == "") { $("#J_RegisterForm").submit(); }
        },
        //<增加错误样式
        adderror: function (id) {
            $("#" + id).addClass("errortext");
        },
        //增加错误样式/>
        //<去除错误样式
        removeerror: function (id) {
            $("#" + id).removeClass("errortext");
        },
        //去除错误样式/>
        //<冻结注册按钮
        cantreg: function () { $("#J_RegSubmit").attr("disabled", "disabled"); },
        //冻结注册按钮/>
        //<激活注册按钮
        canreg: function () { if ($("#emailtab").html() + $("#passwordtab").html() + $("#password2tab").html() + $("#blogNametab").html() == "") { $("#J_RegSubmit").attr("disabled", ""); } },
        //激活注册按钮/>
        //<登录
        login: function () {
            if ($('#email').val() == "") { $("#loginerror").html("登录邮箱为空~"); NetHome.Reg.adderror("email"); return false; }
            if ($('#password').val() == "") { $("#loginerror").html("密码为空~"); NetHome.Reg.adderror("password"); return false; }
            return true;
        }
        //登录/>
    },
    //注册/>
    //<发表信息,提交内容
    PostMessage: {
        //<评论
        comment: function (pid, nickname, icon, time, uid) {
            if (!NetHome.PostMessage.posting) {
                NetHome.PostMessage.posting = true;
                var content = $(".xheditor").val();
                if (content == "") { $("#commenterror").html("评论内容为空~"); NetHome.PostMessage.posting = false; return false; } else { $("#commenterror").html(""); }
                if (content.length > 5000) { $("#commenterror").html("评论内容过长~"); NetHome.PostMessage.posting = false; return false; } else { $("#commenterror").html(""); }
                $.post("/Content/PostComment", { Pid: pid, Content: content }, function (Msg) {
                    if (Msg.indexOf("OK") >= 0) {
                        $("#commenterror").html("评论成功~");
                        var floor;
                        if ($(".comment_head").length <= 0) { floor = 1; } else { floor = parseInt($(".comment_head:last").attr("floor")) + 1; }
                        $("#comment_list").append(NetHome.PostMessage.appendcomment(pid, floor, nickname, icon, time, content, Msg.split(",")[1], uid));
                        $(".xheditor").val("");
                    }
                    else if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                    else { $("#commenterror").html(Msg); }
                });
                NetHome.PostMessage.posting = false;
            }
            else {
                $("#posterrorlabel").html("请等待上一条信息的发送~");
                $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
            }
        },
        //评论/>
        //<发送状态
        posting: false,
        //发送状态/>
        //<发送成功后增加在页面上
        appendcomment: function (pid, floor, nickname, icon, time, content, rid, uid) {
            var date = new Date();
            var str = '<dl class="comment_item comment_topic" id="comment_item_' + rid + '">';
            str += '<dt class="comment_head" floor="' + floor + '">#' + floor + '楼';
            str += '<span class="user"><a class="username" href="/U/' + nickname + '" target="_blank">' + nickname + '</a><span class="ptime m_r20">' + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + '</span> <a href="javascript:void(0)" onclick="NetHome.PostMessage.delecomment(' + uid + ',' + uid + ',' + pid + ',' + rid + ')" class="cmt_btn reply" title="删除">删除</a> </span></dt>';
            str += '<dd class="comment_userface">';
            str += '<a href="/U/' + nickname + '" target="_blank"><img src="' + icon + '" alt="' + nickname + '" title="' + nickname + '" width="40" height="40"></a></dd>';
            str += '<dd class="comment_body">' + content + '</dd></dl>';
            if (floor == 1) { $("#nocontent").remove(); }
            return str;
        },
        //发送成功后增加在页面上/>
        delecomment: function (uid, ruid, pid, rid) {
            if (uid != ruid) {
                $("#posterrorlabel").html("您无权删除该条评论~");
                $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox(); return false;
            }
            $.post("/Content/DeleComment", { Uid: uid, Ruid: ruid, Rid: rid, Pid: pid }, function (Msg) {
                if (Msg == "OK") { $("#comment_item_" + rid).hide("slow"); }
                else if (Msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                else {
                    $("#posterrorlabel").html(Msg);
                    $("#wbox").wBox({ target: "#posterror", noTitle: true, timeout: 3000 }).showBox();
                }
            });
        },
        huifu: function (rid) {
            var huifucontent = $("#comment_item_" + rid + " .comment_body").html();
            var huifuuser = $("#comment_item_" + rid + " .user .username").html();
            $(".xheditor").val("回复：" + huifuuser + "<br/>" + "<div style='width:400px;display: block;overflow: hidden;margin:0 0 0 15px;line-height:25px;border: solid 1px #DDD;'>" + huifucontent + "</div><br/><label id='textlabel'></label>");
            top.location.href = "#tiaohere";
            $("#textlabel").focus();
        }
    },
    //发表信息,提交内容/>
    Profile: {
        CheckOldPa: function () {
            var OldPa = $("#oldpassword").val();
            if (OldPa == "") { $("#oldpassworderror").html("请输入旧密码~"); return false; } else { $("#oldpassworderror").html(""); }
            $.post("/Profile/CheckOldPa", { OldPassWord: OldPa }, function (Msg) {
                $("#oldpassworderror").html(Msg); if (Msg != "") { return false; }
            });
        },
        AlterPa: function () {
            if ($("#oldpassword").val() == "") { $("#passwordtab").html("请输入旧密码~"); return false; } else { $("#passwordtab").html(""); }
            if ($("#oldpassworderror").html() != "") { $("#passwordtab").html("请正确输入旧密码~"); return false; } else { $("#passwordtab").html(""); }
            if ($("#password").val() == "") { $("#passwordtab").html("请输入新密码~"); return false; } else { $("#passwordtab").html(""); }
            if ($("#password").val().length < 6) { $("#passwordtab").html("密码不能小于6位~"); return false; } else { $("#passwordtab").html(""); }
            if ($("#password").val() != $("#password2").val()) { $("#passwordtab").html("两次密码输入不一致~"); return false; } else { $("#passwordtab").html(""); }
            return true;
        }
    },
    //<收藏
    CollectionPosts: {
        Collection: function (pid, uid) {
            $.post("/Content/Collection", { Pid: pid, Uid: uid }, function (msg) {
                if (msg == "OK") { $("#collectionpost_" + pid).html('<a href="javascript:void(0)" onclick="NetHome.CollectionPosts.AbolishCollection(' + pid + ',' + uid + ')">取消收藏</a>'); }
                else if (msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                else {
                    NetHome.Utility.ShowTipBox(msg);
                }
            });
        },
        AbolishCollection: function (pid, uid) {
            $.post("/Content/AbolishCollection", { Pid: pid, Uid: uid }, function (msg) {
                if (msg == "OK") { $("#collectionpost_" + pid).html('<a href="javascript:void(0)" onclick="NetHome.CollectionPosts.Collection(' + pid + ',' + uid + ')">收藏</a>'); }
                else if (msg == "未登录") { NetHome.Utility.ShowLoginBox(); }
                else { NetHome.Utility.ShowTipBox(msg); }
            });
        }
    }
    //收藏/>
}
