var id;

var toast = new auiToast();

$(function(){
    id = GetQueryString('id');
    getData();
})

function getData(){
    toast.loading({
        title:"加载中",
        duration:2000
    })
    _vp.participationDetails(
        {
            p_id: id,
        },
        function(res) {
            toast.hide();
            if (res.status == 2001) {
                //需要登录
                top.location.href = "login.html";
                return;
            }else if(res.status == -1) {
                toast.fail({
                    title:"系统繁忙",
                    duration:2000
                });
                return;
            }
            var html = '<span>上架时间 :</span>'+timestampToTime(res.data.mapProduct.start_time);
            $('.name').text(res.data.mapProduct.product_name);
            $('.peopleNum').text(res.data.listNumber.length);
            $('.time').html(html);
            var ele = $(".canyu_box");
            var result = res.data.listNumber;
            ele.html("");
            for (var i = 0; i < result.length; i++) {
                ele.append(
                    '<span>'+result[i].lucky_number+" x"+result[i].number+"人次"+'</span>'
                )
            }
        }
    )
}
