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

创建菜单出错 #5

Open
wongvio opened this issue Mar 20, 2020 · 10 comments
Open

创建菜单出错 #5

wongvio opened this issue Mar 20, 2020 · 10 comments

Comments

@wongvio
Copy link

wongvio commented Mar 20, 2020

创建公众号菜单,提示修改成功,点击提交以后,没有报错,没有提示,再次刷新后发现没有保存住

@wongvio
Copy link
Author

wongvio commented Mar 20, 2020

network里提示 http://c.foo.cn/admin/wechat/official-account/menu 这个页面404

@wongvio
Copy link
Author

wongvio commented Mar 20, 2020

我的后台地址,我自己改过,不是admin了,在哪修改

@wongvio
Copy link
Author

wongvio commented Mar 20, 2020

你有两个文件写死了 admin 路径,但是我改成 admin_url('wechat/official-account/menu') 以后,保存菜单又莫名其妙的在上传一个图片

@Hanson
Copy link
Owner

Hanson commented Mar 20, 2020

可以通过 route:list 先查看路由

@wongvio
Copy link
Author

wongvio commented Mar 21, 2020

看路由什么意思??保存公众号菜单那一步,你的保存按钮,setAction写的就是 “/admin/wechat/xxx” , 还有提示没有配置公众号,先配置公众号那里,跳转的链接也是 “/admin/wechat/xxx”

@wongvio
Copy link
Author

wongvio commented Mar 21, 2020

虽然你配置了读取prefix,这两个地方好像导致出错了,我修改了一下,但是依然不能保存菜单

@Hanson
Copy link
Owner

Hanson commented Mar 21, 2020

404 请先看路由是否存在

没有配置公众号按理说是先跳到添加公众号那里去的

因为也不知道你做了什么改动,无法判断

@wongvio
Copy link
Author

wongvio commented Mar 21, 2020

404是因为form提交的地址不对,我的后台地址自定义了,但是点击提交的地址是 admin 开头的,如果没有自定义过后台地址是没有问题的,另外,公众号的服务器地址应该填什么?什么都不用填吗?如果后台地址改为admin是可以读取到自定义菜单的,但是无法编辑

@Hanson
Copy link
Owner

Hanson commented Mar 21, 2020

php artisan route:list --path=menu

通过此命令查看菜单的路由,然后可以通过重写路由,控制器继承覆盖的方式进行自定义

@zhenxuanxin
Copy link

我在这个 PR #21 做了下修复。

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

3 participants