Javascript 使用annotator.js的批注工作不正常

Javascript 使用annotator.js的批注工作不正常,javascript,jquery,mysql,node.js,annotations,Javascript,Jquery,Mysql,Node.js,Annotations,我正在使用annotator.js并将范围存储在mysql中。对于突出显示文本,我在代码文件中使用此代码 <script src="/js/pdfjs/annotator.js"></script> <script> $(function(){ var annotation = $('#content').annotator(); annotation.annotator('addPlugin', 'Store', { prefix: '',

我正在使用annotator.js并将范围存储在mysql中。对于突出显示文本,我在代码文件中使用此代码

<script src="/js/pdfjs/annotator.js"></script>
<script>
 $(function(){

  var annotation = $('#content').annotator();

  annotation.annotator('addPlugin', 'Store', {
  prefix: '',
    urls: {
        create:  '/highlighter',
        update:  '/update/:id',
        destroy: '/delete/:id',
        search:  '/highlightersearch'
    }
  });
var comments = {
  "total": 1, 
  "rows": [
    {
      "text": "n thi", 
      "consumer": "d4c108122b51434aab1d27ad4ebd2b02", 
      "permissions": {
        "update": [], 
        "read": [], 
        "admin": [], 
        "delete": []
      }, 
      "updated": "2017-04-07T10:31:55.378772+00:00", 
      "quote": "ffff", 
      "uri": "http://localhost:8124/user/pdf/14396734926770", 
      "id": "AVtH-G9LqWiVDsXRg1jq", 
      "ranges": [
        {
          "endOffset": 6, 
          "startOffset": 1, 
          "end": "/div[1]/div[1]/div[2]/div[4]", 
          "start": "/div[1]/div[1]/div[2]/div[4]"
        }
      ], 
      "created": "2017-04-07T10:31:55.378759+00:00"
    }]};

var arr = $.map(comments, function(el) { return el });
annotation.annotator("loadAnnotations", arr);  

});
</script>

$(函数(){
var annotation=$('#content').annotator();
annotation.annotator('addPlugin','Store','{
前缀:“”,
网址:{
创建:“/highlighter”,
更新:'/update/:id',
销毁:'/delete/:id',
搜索:“/highlightersearch”
}
});
var注释={
“总数”:1,
“行”:[
{
“文本”:“n thi”,
“消费者”:“d4c108122b51434aab1d27ad4ebd2b02”,
“权限”:{
“更新”:[],
“改为:【】,
“管理员”:[],
“删除”:[]
}, 
“更新”:“2017-04-07T10:31:55.378772+00:00”,
“报价”:“ffff”,
“uri”:http://localhost:8124/user/pdf/14396734926770", 
“id”:“AVtH-G9LqWiVDsXRg1jq”,
“范围”:[
{
“内偏移”:6,
“startOffset”:1,
“结束”:“/div[1]/div[1]/div[2]/div[4]”,
“开始”:“/div[1]/div[1]/div[2]/div[4]”
}
], 
“已创建”:“2017-04-07T10:31:55.378759+00:00”
}]};
var arr=$.map(注释,函数(el){return el});
注释器(“loadAnnotations”,arr);
});
错误: 我在控制台日志“类型错误:\u ref1未定义”
如果你知道我做错了什么,请帮我抄近路。

我用这个请求解决了我的问题

annotation.annotator('addPlugin','Store','{ 前缀:prefixUrl, 注释数据:{ “uri”:“/annotations” },

谢谢