PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

用收藏夹插件失败 [复制链接]

1#
修改新闻中心detail.cshtml如下,一直显示"没有收藏成功"     ps: 已授权用户收藏权限


@{
    dynamic infoData = Html.InfoData();
    CurrentUser user = (CurrentUser)ViewBag.CurrentUser;

    if(user.UserName != "")
    {
        <div class="denglu">欢迎您(user.UserName)。</div>
    }
    else
    {
    <script>alert("请登录");
    window.location.href="http://www.phycai.net/member";
        </script>
    }
}
<script type="text/javascript">
    $.post("/E/InfoData/AddClicks", { ColumnIdinfoData.ColumnId,IdinfoData.Id}, function (data) { $lb_clicks.text(data)})
    $.ajax({
      url:"/E/Api/",
      type:"POST",
      dataType:"json",
      data:{ method:"PACollectInfo.Add",Type:1,Name:"@infoData.Title",InfoIdinfoData.Id,TableName:"@Html.CurrentInfoTable

()",PicPath:"@infoData.Thumbnail"},
      successunction (responseData)
      {
        if(responseData.State==1)
        {
          alert("收藏成功");
        }
        else
        {
           alert("没有收藏成功");
        }
        //业务逻辑自己写
      }
  });
</script>
分享 转发
TOP
2#



TOP
发新话题 回复该主题