";
shareBtnHtml3 =
"";
function changeActivityType(type){
if(type==1){
document.getElementById("activity").className="";
document.getElementById("selected").className="click";
$("#activityType").val("11");
}else if(type==2){
document.getElementById("selected").className="";
document.getElementById("activity").className="click";
$("#activityType").val("00");
}
$("#curpage").val("1");
search_activity();
}
function changeTab(type){
if(type==1){
document.getElementById("tab_01").className="now";
document.getElementById("tab_02").className="";
document.getElementById("tab_03").className="";
$("#underWay").val("");
}else if(type==2){
document.getElementById("tab_01").className="";
document.getElementById("tab_02").className="now";
document.getElementById("tab_03").className="";
$("#underWay").val("1");
}else if(type==3){
document.getElementById("tab_01").className="";
document.getElementById("tab_02").className="";
document.getElementById("tab_03").className="now";
$("#underWay").val("0");
}
$("#curpage").val("1");
search_activity();
}
function previousPage() {
var page = parseInt($("#curpage").val());
page--;
gotoPage(page);
}
function nextPage() {
var page = parseInt( $("#curpage").val());
page++;
gotoPage(page);
}
function gotoPage(pageno){
now = pageno;
if(now<1)
{
$.messager.alert("提示","已经是第一页");
return;
}
var allPage = $("#allPage").val();
if(now>allPage)
{
$.messager.alert("提示","已经是最后一页");
return;
}
$("#curpage").val(now);
search_activity();
}
function formatTime(time)
{
var formatTime = "具体时间电询";
if(time)
{
var date = new Date(time.time);
var month = parseInt(date.getMonth()+1);
var day = date.getDate();
if(month < 10) month ='0'+month;
if(day < 10) day ='0'+day;
formatTime = date.getFullYear()+'-'+month+'-'+day;
}
return formatTime ;
}
function formatUrl(url)
{
var formatUrl = "/index/images/workbench_01/hd.jpg";
if(url)
{
formatUrl = url.replace(/\\/g,'/');
if('/'!=formatUrl.substring(0,1))
formatUrl = "/"+formatUrl;
}
return formatUrl ;
}
function formatPreUrl(url)
{
if(url.substring(0,4)!='http')
url = "eqiyun.cn/cloud"+url;
return url;
}
function openWindow(url){
if(url.substring(0,4)!='http')
window.open('/cloud/'+url);
else
window.open(url);
}
function search_activity(){
var curpage = $("#curpage").val();
var activityType = $("#activityType").val();
var underWay = $("#underWay").val();
if("00"==activityType){
$.ajax({
url : "/cloud/portal/activityPromoteQuery.action?underWay="+underWay+"&rows=6&page="+curpage+"&dt="+(new Date()).getTime(),
success : function(data){
data = eval("(" + data + ")");
var allPage = Math.ceil(data.total/6);
$("#allPage").val(allPage);
$("#pageNum").html("共找到 "+allPage+" 页 当前 第 "+curpage+" 页" );
var html = "";
for(var i=0;i