当前位置:网站首页>Wechat applet page jump to pass parameters
Wechat applet page jump to pass parameters
2022-08-05 06:13:00 【CrazyQiQi】
First of all, there are APIs that can pass parameters when jumping to the applet page
- wx.navigateTo()
Keep the current page and jump to a page in the app.But can't jump to the tabbar page - wx.reLaunchTo()
Close all pages, open to a page in the app - wx.redirectTo()
Close the current page and jump to a page in the application.But it is not allowed to jump to the tabbar page.
When jumping with wx.navigateTo(), it is necessary to convert the data of the json object into the form of a string
We need to perform a process similar to packing and unpacking the json array through these two functions.
JSON.stringify();//Convert json to string valueJSON.parse();//Convert the string toObject Receive This is the json array we pass across pages
var json = [{"gender": "gender","weight": "weight"}]The next step is to pass the path with parameters, convert the parameters into string format, and pass them to the target page
wx.navigateTo({//url fill in the page you want to jump tourl: './../index/index?json=' + JSON.stringify(json) //Convert json array to stringAfter passing at the same time, we need to take out the passed parameters on the target page
/** * Lifecycle function -- monitor page loading */onLoad: function (options) {var list = JSON.parse(options.json) //The string passed from the first page is converted into a json arrayconsole.log(list)边栏推荐
- IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
- 解决这三大问题,运维效率将超90%的医院
- Getting Started Document 01 series in order
- 错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
- 运维工程师,快来薅羊毛
- Getting Started Doc 08 Conditional Plugins
- 入门文档03 区分开发与生产环境(生产环境才执行‘热更新’)
- Hard Disk Partitioning and Permanent Mounting
- 运维的高光时刻,从智能化开始
- 实力卷王LinkSLA,实现运维工程师快乐摸鱼
猜你喜欢
![[Day1] (Super detailed steps) Build a soft RAID disk array](/img/40/cda8e5522c2795e03c0d47e8a689f8.png)
[Day1] (Super detailed steps) Build a soft RAID disk array

交换机原理

入门文档05-2 使用return指示当前任务已完成
![[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data](/img/29/5b44c016bd11f0c0a9110cf513f4e1.png)
[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
![[Day1] VMware software installation](/img/24/20cc77e904dbe7dc1b5224c64d6329.png)
[Day1] VMware software installation

Getting Started Documentation 10 Resource Mapping

NIO works is analysed

I/O性能与可靠性

The problem of calling ds18b20 through a single bus
![[Day8] (Super detailed steps) Use LVM to expand capacity](/img/ff/d4f06d8b30148496da64360268cf1b.png)
[Day8] (Super detailed steps) Use LVM to expand capacity
随机推荐
7步完成云上监控
传输层协议(TCP3次握手)
To TrueNAS PVE through hard disk
正则表达式小示例--获取重复最多的字符及其数量
IP address and subnet division
【Day8】RAID Disk Array
[Paper Intensive Reading] The relationship between Precision-Recall and ROC curves
Regular expression small example - get number character and repeated the most
入门文档05-2 使用return指示当前任务已完成
spark源码-任务提交流程之-1-sparkSubmit
Getting Started Documentation 12 webserve + Hot Updates
深度 Zabbix 使用指南——来自惨绿少年
Apache configure reverse proxy
海外服务器的优势
static routing
IP数据包格式(ICMP协议与ARP协议)
Spark source code - task submission process - 6-sparkContext initialization
Getting Started Doc 08 Conditional Plugins
Hugo搭建个人博客
spark operator-parallelize operator