﻿
//雷蛇 媒体报道
this.getRazerBottomHotNews = function() {
    var requestUrl = "../../Ashx/NewsService.ashx";

    $.ajax({
        url: requestUrl,
        type: "post",
        data: "action=RazerHotAsso&newstype=132&top=8", //
        success: function(retMsg) {
            if (!retMsg) {
                $("<div/>").attr("innerHTML", "暂无热点媒体报道").appendTo("#RazerHotNews");
            }

            var objs = eval("(" + retMsg + ")");
            var HotListStr = "<table width='900'  border='0' cellspacing='7' cellpadding='0' style='background:#333333;'><tr>";
            HotListStr += "<td bgcolor='#000000'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><img src='http://info.16288.com/ScoreCenter/jfsdocom/RazerImagesLeftMenu/flowtitle33.jpg' width='193' height='30' /></td>";
            HotListStr += "<td align='right'><a href='RazerHotNewsList.aspx?RazerNewsType=132'>更多</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table></td>";
            HotListStr += "</tr><tr class='font_2'><td align='center' bgcolor='#000000'><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr>";

            var tempDate = '';
            for (var i = 0; i < objs.length; i++) {

                tempDate = objs[i].RowDate.replace("/Date(", "").replace(")/", "");
                tempDate = new Date(parseInt(tempDate));
                tempDate = tempDate.toLocaleDateString("yyyy-MM-dd").replace("年", "-").replace("月", "-").replace("日", "");

                HotListStr += "<td width='50%' height='24' align='left' ><table width='97%' border='0' cellspacing='0' cellpadding='4'>";
                HotListStr += "<tr><td align='left'><p><a href='" + objs[i].LinkURL + "' target='_blank' title='" + objs[i].Title + "'>◎ " + objs[i].Title.substr(0, 23) + "</a></p></td>";
                HotListStr += "<td align='right'>" + tempDate + "</td></tr></table></td>";

                if (i % 2 == 1) {
                    HotListStr += "</tr><tr>";
                }
            }
            HotListStr += "</tr> </table></td></tr></table>";

            $("<div/>").attr("innerHTML", HotListStr).appendTo("#RazerHotNews");
        }
    });
}


//雷蛇  公会报道
this.getRazerBottomAssoc = function() {
    var requestUrl = "../../Ashx/NewsService.ashx";

    $.ajax({
        url: requestUrl,
        type: "post",
        data: "action=RazerHotAsso&newstype=133&top=2", //newstype
        success: function(retMsg) {
            if (!retMsg) {
                $("<div/>").attr("innerHTML", "暂无访谈信息").appendTo("#RazerAssoc");
            }
            var objs = eval("(" + retMsg + ")");
            var imageListStr = "<table width='900' border='0' cellspacing='7' cellpadding='0' style='background:#333333;'><tr>";
            imageListStr += "<td bgcolor='#000000'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>";
            imageListStr += "<td><img src='http://info.16288.com/ScoreCenter/jfsdocom/RazerImagesLeftMenu/flowtitle34.jpg' width='193' height='30' /></td>";
            imageListStr += "<td align='right'><a href='RazerNewList.aspx?RazerNewsType=133'>更多</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table></td></tr><tr class='font_2'>";
            imageListStr += "<td align='center'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>";

            for (var i = 0; i < objs.length; i++) {               
                imageListStr += " <td width='50%' align='left'><table width='99%' border='0' cellspacing='0' cellpadding='8' style='background:#000;'><tr>";
                imageListStr += "<td width='110' valign='top' align='left'><p>【" + objs[i].LinkTitle + "】</p><img src='" + objs[i].ImgUrl + "' width='100' height='80' /></td>";
                imageListStr += "<td valign='top'><p>◎ " + objs[i].Title + "<br><br><a href='RazerNewsDetail.aspx?rowId=" + objs[i].RowId + "'  target='_blank'>" + objs[i].Content.substr(0, 100) + "</a>";
                imageListStr += "<br /><br /><a href='RazerNewsDetail.aspx?rowId=" + objs[i].RowId + "' target='_blank'>查看详细&gt;&gt;<br /></a></p></td></tr></table></td>";
            }
            imageListStr += "</tr></table></td></tr></table>";

            $("<div/>").attr("innerHTML", imageListStr).appendTo("#RazerAssoc");
        }
    });
}

//this.getRazerBottomHotNews();
this.getRazerBottomAssoc();