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

不显示内容 #10

Open
Aotuman-bo opened this issue Apr 2, 2019 · 13 comments
Open

不显示内容 #10

Aotuman-bo opened this issue Apr 2, 2019 · 13 comments

Comments

@Aotuman-bo
Copy link

thirdScriptError
Cannot read property 'map' of undefined;at page/index/index fetchallcats function;at api request success callback function
TypeError: Cannot read property 'map' of undefined

@idealclover
Copy link
Collaborator

  1. 域名是否备案
  2. 是否已安装WeTypecho插件并设置正常
  3. 是否开启https

@Aotuman-bo
Copy link
Author

按照教程全都配置好了。
域名/api/... 都是404

@idealclover
Copy link
Collaborator

试着请求一下 域名/api/getaboutcid 看看是否工作正常
之前是否安装过其他插件

@Aotuman-bo
Copy link
Author

@idealclover
Copy link
Collaborator

404的话应该是typecho端的问题,建议禁用插件后重新启动或重新安装等方法

@Aotuman-bo
Copy link
Author

https://s2.ax1x.com/2019/04/02/AcPiWR.png
配置应该没错吧,唉迷。插件都禁用了

@idealclover
Copy link
Collaborator

之前是否使用过其他占用 /api 接口的插件?

@Aotuman-bo
Copy link
Author

Links
TEDUriReplace
UEditor for Typecho就这几个插件

@idealclover
Copy link
Collaborator

如果可以查看数据库的话可以查看 options 表中的 routingTable 项,将其中的内容呈现出来查看 /api 路由是否被占用

@Aotuman-bo
Copy link
Author

启用wetypecho routingTable项能搜到api关键字,禁用routingTable搜不到api关键字

@Aotuman-bo
Copy link
Author

和typecho永久链接中的伪静态有关系没

@bing-zhub
Copy link

可以尝试一下GET YOUR_DOMAIN/index.php/api/getaboutcid 如果可以访问并能获得如下数据.

{
  status: 200,
  data: "1"
}

则将小程序端config.js中的domain设置为YOUR_DOAMIN/index.php即可.
未做过Typecho插件开发, 推测应该是版本兼容问题.

@cklx0719
Copy link

还真的是这个问题,我是使用oneinstack搭的环境,碰到的问题与楼主一样。你最后这条,就是解决办法。

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

4 participants