当先锋百科网

首页 1 2 3 4 5 6 7

搜索createRemarkContent方法,然后替换成下边这一段function


function createRemarkContent(id, text, pageIndex, isClick) {
  var str2 = '<div class="my-tip-box bubble-form">' + '<div class="bubble-content"><div calss="action-copy" style="text-align:right;">' // +'<div class="copyText" data-id='+id+'>'+text+'</div>'
  + '<span class="cancel_btn" type=""  data-id=' + id + '  data-click=' + isClick + '></span>' + '</div>' + '<form class="note-form">' + '<div class="textarea-shell">' + '<textarea class="textarea_con" data-id=' + id + ' placeholder="请输入批注" name="text" >' + '</textarea></div><div class="form-actions">' // +'<span class="cancel_btn" type=""  data-id=' + id + '  data-click='+isClick+'>取消</span>'
  + '<span class="confirm_btn" type="submit" data-id=' + id + ' data-pageIndex=' + pageIndex + '>批注</span>' + '<span class="copy_btn" data-clipboard-text="' + text + '" data-id=' + id + ' data-pageIndex=' + pageIndex + '>文摘</span>' // +'<span class="delete_btn" type="submit" data-id=' + id + ' data-pageIndex='+pageIndex+'>删除</span>'
  + '</div></form></div></div>';
  $(".remark_box").attr({
    'id': id
  }).empty().html(str2);
}

 

搜索/api/Annotation/QueryByPageNumber,替换下边的ajax方法

$.ajax({
    method: 'get',
    url: '/aerNotes/queryByPageNumber',

    dataType: 'json',
    async: false,
    data: {
      'fileId': getQueryString('fileID'),
      'pageNumber': pageNumber
    },
    success: function success(res) {
      // console.log('res====',res);
      if (res.code == 0) {
        if (res.content.length > 0) {
          for (var i = 0; i < res.content.length; i++) {
            highlighter.fromOnePageWrap([res.content[i].content], pageNumber);
            $(".highlight-mengshou-wrap[data-highlight-id=" + res.content[i].sourcesId + "]").attr('data-ifsave', true); //表示该条批注是已经保存过的
          }

          loadPageObj.loadPageindex = evt.detail.pageNumber;
          loadPageObj.ifLoad = true;
        }
      } else {
        alert(res.message);
      }
    }

 搜索/aerNotes/load?fileId=' + getQueryString('fileID'),替换 if 里面的方法

      if (res.code == 0) {
        if (res.content.length > 0) {
          var strTag = "";
          for (var i = 0; i < res.content.length; i++) {
            var listItem = res.content[i];
            // var userInfoItem = JSON.parse(listItem.UserInfoStr || "");
            console.log(listItem);
            strTag += '<li class="list_item" data-id=' + listItem.sourcesId + ' data-pageindex=' + listItem.pageNumber + '>' + '<div class="tip_li_title">' +'<span class="addTime">' + '<span class="delete_btn" style="" type="submit" data-id=' + listItem.sourcesId + ' data-pageIndex=' + listItem.pageNumber + '>|删除</span></span>' + '</div>' // + '<div>'
            // + '<span>id:</spanitem_id><span class="item_id">' + nowClickId + '</span>'
            // + '</div>'
            + '<div class="tip_li_con smooth_btn item_con"  data-id="' + listItem.sourcesId + '"> ' + '<img class="yinhao_img" src="web/images/yinhao_left.png">' + listItem.orginalText + '<img class="yinhao_img" src="web/images/yinhao_right.png">' + '</div>' + '<div class="tag_box">' + '<img class="sanjiao_img" src="web/images/sanjiao_icon.png">' + '<div class="tip_tag_box"><div class="tip_li_tag" style="padding-bottom:10px;">' // +'<span class="sanjiao"></span>'
            + '<span class="item_tag">' + listItem.comment + '</span>' + '</div></div></div>' //+'<div class="delete_box" style="height: 25px;padding-right: 10px;">'
            // +'<span class="delete_btn" style="" type="submit" data-id=' + listItem.SourcesID  + ' data-pageIndex='+listItem.pageNumber+'></span>'
            //+'</div>'
            + '</li>';
          }

          $(".list_ul").html(strTag);

          if (user_write_privilege == 0) {
            $(".delete_box .delete_btn").hide();
          }
        } else {
          $(".list_ul").html("");
        }
      } else {
        alert(res.Message);
      }

 搜索api/Annotation/DelBySourcesID,替换下边的代码块

layer.confirm("确定删除该批注吗?", {
    btn: ["确定", "取消"]
  }, function (comIndex) {
    $.ajax({
      method: 'post',
      url: '/aerNotes/deleteBySourcesId',

      dataType: 'json',
      data: {
        'sourcesId': dataID
      },
      success: function success(res) {
        // console.log('res====',res);
        if (res.code == 0) {
          $(".remark_box").hide();
          layer.close(comIndex);
          layer.msg("删除成功!", {
            time: 3000,
            icon: 1
          });
          highlighter.remove(dataID, dataPageIndex);
          getTagList(); // PDFViewerApplication.page = dataPageIndex;
        } else {
          alert(res.message);
        }
      }
    });
  });

搜索wenzhaiParams,代码在下边

//增加一个这个
wenzhaiParams.noteOrDigest = "1";


//下边红框需要修改的
res.code == 0

搜索saveParams,代码在下边

//增加的
saveParams.noteOrDigest = "0";

//res修改的
res.code == 0

loginIndex.js也得改俩地方

这个在页面顶端,直接粘贴下边代码替换进行

window.location.href = "/pdf/index.html?dataVal="+dataVal+"";

这个在最下边

window.location.href = "/pdf/index.html?file=https://mozilla.github.io/pdf.js/legacy/web/compressed.tracemonkey-pldi-09.pdf&locale=zh-CN&fileID=000";

 login.html

直接把我框里面的换了

<div>
    <!-- <h1>登录页</h1> -->
    <h1 style="width:50px;margin:0 auto;">
        <!-- <img style="width:50px;" class="img_sty" src="images/loading-icon.gif" alt=""> -->
    </h1>
    <div style="text-align: center;">
        <img src="/images/loadding_login.gif" alt="">
    </div>

</div>
<script src="/pdf/web/jquery.min.js"></script>
<script src="/pdf/web/util.js"></script>
<script src="/pdf/web/loginIndex.js"></script>