Home > Backend Development > PHP Tutorial > 微信开发自定义菜单点击事件,如何根据条件来跳转还是推送消息

微信开发自定义菜单点击事件,如何根据条件来跳转还是推送消息

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:31:16
Original
1497 people have browsed it

需求说明:

微信菜单上有个我的收藏,如果用户已经绑定账号则跳转到收藏页面,没有绑定则推送一条消息(‘请您先绑定账号’)

我的想法

我试过菜单类型设为点击事件,然后判断账号绑定情况,如果未绑定,则推送提示信息,已经绑定的话,用redirect(url)来跳转,但是redirect(url)好像并没有效,并没有跳到对应页面去,请问大家有什么好的方法吗?

回复内容:

需求说明:

微信菜单上有个我的收藏,如果用户已经绑定账号则跳转到收藏页面,没有绑定则推送一条消息(‘请您先绑定账号’)

我的想法

我试过菜单类型设为点击事件,然后判断账号绑定情况,如果未绑定,则推送提示信息,已经绑定的话,用redirect(url)来跳转,但是redirect(url)好像并没有效,并没有跳到对应页面去,请问大家有什么好的方法吗?

微信一个菜单只能绑定一个事件,你这种需求行不通

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template