Comments (7)
首先,扫码后直接跳转链接,微信没有提供这种场景,所以你可以放弃这种想法了。
其次,关注和非关注的问题,你可以写个公用的方法处理,分别在关注和扫码事件里处理,你只需要分别在对应的handler里调用共用方法就可以,根据具体的scene_id去做判断,相信你本地应该做相应的存储了吧?
再者,永久二维码,每个公众号就是只有那10万个,是没办法的,微信规定的。
from wxjava.
那个消息路由的拦截是根据 eventKey去拦截的,未关注的情况: .rule()
.async(false)
.msgType(WxConsts.XML_MSG_EVENT).event(WxConsts.EVT_SUBSCRIBE).eventKey("qrscene_car")
.handler(demo2)
.end()
已关注的情况: .rule()
.async(false)
.msgType(WxConsts.XML_MSG_EVENT).event(WxConsts.EVT_SCAN).eventKey("car")
.handler(demo3)
.end()
这样我不还是要写好多个handler去拦截吗?还有我提到的那个二维码扫码一次就失效的效果如何去实现?@binarywang
from wxjava.
你不会把eventKey的判断放到handler里进行吗?
from wxjava.
扫码一次就失效,你可以在你的程序里控制吧?
from wxjava.
那就是我在用户第一次扫描后插一条记录到数据库,再扫的时候判断是否有这一条记录,没有就推链接消息,有就推文本信息告诉它二维码失效吧?其实二维码一直都可以扫,只是判断后不给他链接消息推送而已吧?
from wxjava.
好吧,我写习惯了,没认真去看源码,好像是可以把eventKey值放到hander拦截器里面再去取出来判断,再根据取出来的eventKey去数据库查询是否有这个eventKey值
from wxjava.
没错,如果问题解决了,就关掉吧
from wxjava.
Related Issues (20)
- com.thoughtworks.xstream.security.ForbiddenClassException HOT 4
- 视频号订单缺失属性AddressInfo.hash_code HOT 1
- 【feature】获取汇报记录详情
- 微信支付多商户号问题
- WxChannel 视频号板块 没有分享员绑定接口通知 HOT 1
- markdown HOT 1
- MP_微信消息路由器,异步出路,收不到回复的消息 HOT 5
- 使用 MybatisPlus 多租户插件疑问 HOT 5
- 微信小程序用户信息解密方法不返回openid吗 HOT 6
- 是否可以加入企业微信文档相关接口 HOT 1
- 支持java21的版本有嘛?
- 企微第三方加好友回调,创建时间一样被判定为重复消息 HOT 2
- 该公众号提供服务出现故障,请稍后重试 HOT 5
- HttpResponseProxy#extractFileNameFromContentString 正则匹配失败
- WxMpHostConfig地址需要支持配置化 HOT 1
- 支付私钥字符串BUG
- TransferCreateResult 商家转账到零钱,新增 batch_status 返回值,版本4.6.0 HOT 1
- https://developer.work.weixin.qq.com/document/path/97126 HOT 1
- weixin-java-cp-solon-plugin redisson配置失败 HOT 3
- 可否增加小程序 生物认证秘钥签名验证 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wxjava.