/*文章个人列表*/ $(function() { $(".onlogin .headnavbtn li").eq(0).addClass("navcurrent"); loginStatus(); //判断个人是否登录 valUser(); var userid = $.cookie("userid"); var falseno = false; articalList(10, 1, true, 1); $("#articleSearch").on("keyup", function() { var inputval = $(this).val(); var inputlen = inputval.replace(/[^\u0000-\u00ff]/g, "aa").length; if(inputlen > 60) { var value = inputval.substring(0, 60); $(this).val(value); } }) //删除新闻 $("#articalList").on("click", ".deteleThis2", function() { var _this = this; $.MsgBox.Confirm("提示", "确认删除该文章?", function() { newsDelet(_this); }) }) //文章搜索 $(".searchSpan").on("click", function() { articalList(10, 1, true, 2); }) getProfessorData(userid); function getProfessorData(professorId) { $.ajax({ "url": "/ajax/professor/editBaseInfo/" + professorId, "type": "get", "async": true, "success": function(data) { if(data.success) { var oAuthType=data.data.authType; if(oAuthType==0){ $("a:contains('需求')").attr("href","myDemand.html"); }else if(oAuthType==1){ $("a:contains('需求')").attr("href","needList.html"); } } else { $.MsgBox.Alert("消息", "服务器连接失败"); } }, "error": function() { $.MsgBox.Alert('message', '服务器连接失败'); } }) } }); function articalList(pageSize, pageNo, isbind, num) { var $data = {}; if(num == 1) { $data.professorId = userid; $data.pageSize = pageSize; $data.pageNo = pageNo; } else { $data.professorId = userid; $data.pageSize = pageSize; $data.pageNo = pageNo; $data.articleTitle = $("#articleSearch").val(); } $.ajax({ "url": "/ajax/article/pqself", "type": "get", "async": false, "data": $data, "beforeSend": function() { $("#articalList").append(''); }, "success": function(data) { console.log(data); if(data.success && data.data.data != "") { var itemlist = ''; $("#articalList").html(""); $("#noartical").addClass("displayNone"); $(".tcdPageCode").css("display", "block"); for(var i = 0; i < data.data.data.length; i++) { if(data.data.data[i].status == 1) { var li = '