Skip to content

HEXO-next的Valine评论与自定义页面API访问冲突 #50

Closed

Description

@sli1989

If you want to report a bug, please provide the following information:

  • "ua": "Chrome/63.0.3239.132",

为了快速预览留言,根据hexo的阅读排行榜做了个留言板。通过REST API访问
这个我也不懂,求助

  • 关闭Valine评论,页面正常。应该是评论系统访问API中间有冲突。


已修改了二级服务器还是没有用


<p align="justfly" id="heheda"><br></font></p>

<script src="/static/js/av-core-mini-0.6.4.js"></script>

<script>AV.initialize("uIrzS1i60S024CvU6ATzr4y7-gzGzoHsz", "9o0rnB856nyqXPURwBBncFkR");</script>

<script type="text/javascript">
  var num=50
  var comment=""
  var url=""
  var nick=""
  var query = new AV.Query('Comment');
  query.notEqualTo('id',0); 
  query.descending('createdAt') 
  query.limit(num); 
  query.find().then(function (todo) {
    for (var i=0;i<num;i++){ 
      var result=todo[i].attributes;
      comment=result.comment; 
      url=result.url;  
	  nick=result.nick;  
	  var updatedAt = todo[i].updatedAt;
      var content="<blockquote>"+"<font size=2>"+"<a href='"+"https://sli1989.github.io"+url+"#comments"+"'>"+"<font color='#9932CC'>"+nick+"</font>"+"</a>"+" commented on "+updatedAt+":"+"<br>"+comment+"</font>"+"<blockquote>";
      document.getElementById("heheda").innerHTML+=content
    }
  }, function (error) {
    console.log("error");
  });
</script>

Activity

  1. changed the title [-]leancloud的api访问问题[/-] [+]HEXO的Valine留言板中leancloud的api访问问题[/+] on Jan 19, 2018
  2. changed the title [-]HEXO的Valine留言板中leancloud的api访问问题[/-] [+]HEXO-next的Valine评论与自定义页面API访问冲突[/+] on Jan 19, 2018
  3. stale commented on May 10, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  4. sli1989 commented on May 11, 2018

    @sli1989
    Author

    Hope to be fixed.

  5. sli1989 commented on Jun 24, 2018

    @sli1989
    Author

    Seems a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions