function img_user(user,type) {
    if (type == "1") {
        jq.ajax({ //个人要上传图片的显示
            type: "post",
            url: '/ashx/Dd_image_deal.ashx',
            data: { user_ID: user, type: "user_image", time: new Date().getDate() },
            success: function (data) {
                if (data != "") {
                    jq("#img_personal").attr("src", data);
                    jq("#pb-blog-avatar").css("background-image", "url(" + data + ")");
                }
            }
        });
    }
    else if(type=="2") {
    jq.ajax({ //网页天头上个人小图标的显示
        type: "post",
        url: '/ashx/Dd_image_deal.ashx',
        data: { user_ID: user, type: "user_image", time: new Date().getDate() },
        success: function (data) {
            if (data != "") {
                jq("#img_personal").attr("src",data);
            }
        },
        error: function () {
         
        }
    });
    }
}


//绑头像
function DealUserImg(typeID,userID,orders) {
    jq.ajax({
        type: "post",
        url: '/ashx/Dd_deal_user_image.ashx',
        data: { user_ID: userID, type: "user_image", time: new Date().getDate() },
        success: function (data) {
            if (data != "") {
                jq("#feed-avatar" + userID + typeID + orders).css("background-image", "url(" + data + ")");
            }
            else {
                jq("#feed-avatar" + userID + typeID + orders).css("background-image", "url('/images/avatar_64_64_$1095.png')");
            }
        },
        error: function () {

        }
    });
}


//绑定回应的小头像
function BindSmallPicture(userID, replyID) {
    jq.ajax({
        type: "post",
        url: '/ashx/Dd_image_deal.ashx',
        data: { user_ID: userID, type: "user_image", time: new Date().getTime() },
        success: function (data) {
            if (data != "") {
                jq("#replylist" + replyID).attr("src", (data));
            }
            else {
                jq("#replylist" + replyID).attr("src", "/images/avatar_24_24_$1095.png");
            }
        },
        error: function () {

        }
    });
}

//绑定热度的小头像
function BindSmallPictureOfFever(userID,guid) {
    jq.ajax({
        type: "post",
        url: '/ashx/Dd_image_deal.ashx',
        data: { user_ID: userID, type: "user_image", time: new Date().getTime() },
        success: function (data) {
            if (data != "") {
                jq("#notes-avatar" + guid).attr("src",data);
            }
            else {
                jq("#notes-avatar" + guid).attr("src", "/images/avatar_24_24_$1095.png");
            }
        },
        error: function () {

        }
    });
}
