美文网首页
关于Hexo Valine 国际版 LeandCloud 评论失

关于Hexo Valine 国际版 LeandCloud 评论失

作者: 子瞻是也 | 来源:发表于2021-12-08 21:10 被阅读0次

    传送门 : 原文详细链接

    no_valine_list.jpg

    如图所示 , 这里并没有加载和渲染 valine 评论数据 , 但在 LeanCloud 数据存储中 是存在评论数据的。

    打开控制台 发现 https://us.avoscloud.com/1.1/classes/Comment?xxxxx 已经请求失败(net::ERR_NAME_NOT_RESOLVED), 域名也无法ping通。

    valine_error.jpg

    解决办法:

    将 Valine 指定 自定义服务器URL。在主题配置里的 Valine 的 serverURLs 填入 https://xxxxxxxx.api.lncldglobal.com 。自定义服务器的URL需要到 LeanCloud后台 查看。打开后台之后进入 Settings - App Keys ,Request domain 里面的 xxxxxxxx.api.lncldglobal.com 就是你需要指定的服务器URL。xxxxxxxx 就是 AppID的前8位字符。

    如下图:

    valine_server_url.jpg

    经 postman 测试 ,https://xxxxxxxx.api.lncldglobal.com/1.1/classes/Comment?x=x&xx=xx 该接口会正常返回评论数据。

    valine_ok.jpg

    改完重新编译打包 , 即可看到已经加载评论数据。

    1638968949(1).jpg

    相关文章

      网友评论

          本文标题:关于Hexo Valine 国际版 LeandCloud 评论失

          本文链接:https://www.haomeiwen.com/subject/eexxfrtx.html