Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sli1989 opened this issue Jan 19, 2018 · 3 comments
Closed

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

sli1989 opened this issue Jan 19, 2018 · 3 comments

Comments

@sli1989
Copy link

sli1989 commented Jan 19, 2018

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>
@sli1989 sli1989 changed the title leancloud的api访问问题 HEXO的Valine留言板中leancloud的api访问问题 Jan 19, 2018
@sli1989 sli1989 changed the title HEXO的Valine留言板中leancloud的api访问问题 HEXO-next的Valine评论与自定义页面API访问冲突 Jan 19, 2018
@stale
Copy link

stale bot commented May 10, 2018

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.

@stale stale bot added the wontfix label May 10, 2018
@sli1989
Copy link
Author

sli1989 commented May 11, 2018

Hope to be fixed.

@stale stale bot removed the wontfix label May 11, 2018
@sli1989
Copy link
Author

sli1989 commented Jun 24, 2018

Seems a solution.

@sli1989 sli1989 closed this as completed Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant