日期:2014-05-17 浏览次数:20482 次
string jsoncallback = myContext.Request["jsoncallback"];
string json = "";
string username = "";
string userpic = "";
try
{
username = Tools.CookiesOperate.getCookie("_u_my");
userpic = Tools.CookiesOperate.getCookie("_u_my_pic");
}
catch { }
if (username == null && userpic == null)
{
json = "[{\"status\":\"user_error\"}]";
}
ResponseData = jsoncallback + "(" + json + ")";
context.Response.Write(ResponseData);
var url = "/Handler/Handler.ashx?action=postmsg&cnt=json&dt=" + datatype + "&id=" + data_id + "&comment=" + comment + "&pic=" + pic + "&callback=" + callback + "&title=" + title + "&repost=" + repost + "&r=" + Math.random() + "&jsoncallback=?";
$.getJSON(url, function (result) {
alert("123");
$.each(result, function (i, json) {
var data = json["status"];
$(".subcomments").html(btn_html);
if (data == "user_error") {
commentsAlert("请先登录.");
show_weibo_login();
$(".loginContainer").html("<a href=\"javascript:;\" onclick=\"openQQ();\" hidefocus=\"hidefocus\"><img src=\"/static/images/login_btn.png\"/></a>");
} else if (data == "true") {
$("#comment").val("");
commentsAlert("评论已提交.", true);
$(".loginContainer").html(htmlVal);
}
&nbs