当前位置:网站首页>Wechat applet session holding
Wechat applet session holding
2022-07-27 12:23:00 【gacellk】
Wechat applet servlet When communication wx.request Don't hold sessioid. So every time I ask servlet Of sessionid Dissimilarity , In this way, we can't store user information in the backend session in .
It's like every time we close the page after browsing in the browser , The browser will not remember the last time servlet Deposited session Content . And the little program wx.request At the end of each request servlet The page will “ Close the browser ” So our backend UserController and PaperController Can't be used between session Incoming data .
resolvent :
First of all, we should think of wechat applet global data :globalData To access sessionid Simulated browser session Storage . After I use Fiddler Catch wechat applet HTTP Bag, come and see sessionid Usually put it in the bag headr Inside .
Therefore, establish data storage
stay app.js Inside
|
Okay , With , You can use it
stay login.wxml Inside |
|
This is what we see sessionid

And the server sessionid Agreement 
边栏推荐
- go入门篇 (2)
- Solution: can not issue executeupdate() or executelargeupdate() for selections
- Wechat applet must use interface "suggestions collection"
- Alibaba cloud RDS exception during pool initialization
- go 用本地代码replace
- Chapter 13 IO flow
- Multi activity disaster recovery construction after station B 713 accident | takintalks share
- A personal blog integrating technology, art and sports.
- Packet transmission: application layer - kernel - hardware
- Go Beginner (3)
猜你喜欢

Principle, concept and construction process of MySQL database master-slave replication cluster

JS parasitic combinatorial inheritance
![[product] about wechat product analysis](/img/b2/e1b32e86e2c991ae5c8f8a71f692fe.png)
[product] about wechat product analysis

20210419 combined sum

How to make a graph? Multiple subgraphs in a graph are histogram (or other graphs)

图像分割 vs Adobephotoshop(PS)

Idea: can't use subversion command line client: SVN solution
Do you really understand the underlying data structure skip list of Zset in redis?

Makefile template

Bishi journey
随机推荐
Unity Shader 一 激光特效Shader[通俗易懂]
Solution: the idea project does not display a tree view
浪潮之巅——读书笔记+摘录+感悟
查看系统下各个进程打开的文件描述符数量
评价自动化测试优劣的隐性指标
V-show失效问题
二分查找判定树(二分查找树平均查找长度)
Sword finger offer note: T39. Numbers that appear more than half of the time in the array
Chapter 7 exception handling
Plus版SBOM:流水线物料清单PBOM
mysql分页查询实例_mysql分页查询实例讲解「建议收藏」
STS download tutorial (the solution cannot be downloaded on the include official website)
Redistemplate cannot get the value according to the key
Multi activity disaster recovery construction after station B 713 accident | takintalks share
V-show failure
JS-寄生组合式继承
Shutter project scrollcontroller attached to multiple scroll views, failed assertion: line 109 POS 12 error handling
When the script runs in the background, it redirects the log from the console to its own named file
【数据库数据恢复】SQL Server数据库所在磁盘分区空间不足报错的数据恢复案例
孤独的年轻人,戒不了Jellycat


