当前位置:网站首页>uni-app---uni.navigateTo跳转传参使用
uni-app---uni.navigateTo跳转传参使用
2022-07-05 09:26:00 【左手牵**右手】
uni-app有自己语法。我们使用的时候传参,传字符串或对象,
字符串传参数:可以拼接地址
goreportdetails(id) {
uni.navigateTo({
url: '/pages/reportdetails/reportdetails?id=' + id + '&name=edit'
})
},
对象传参数:有些时候参数会丢失,所以借助encodeURIComponent
uni.navigateTo({
url: '/pages/build/build?list=' + encodeURIComponent(JSON.stringify(this.itemList)) + '&name=' + this.name +'&totalScore=' + this.totalScore + '&content=' + this.content+ '&uid=' + this.uid,
})
那么接收参数就:
onLoad(option) {
if (option) {
this.name = option.name
this.uid = option.uid
if (option.list) {
this.list = JSON.parse(decodeURIComponent(option.list));
}
}
}
边栏推荐
- 顶会论文看图对比学习(GNN+CL)研究趋势
- [technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
- OpenGL - Lighting
- Can't find the activitymainbinding class? The pit I stepped on when I just learned databinding
- [ctfhub] Title cookie:hello guest only admin can get flag. (cookie spoofing, authentication, forgery)
- 一文详解图对比学习(GNN+CL)的一般流程和最新研究趋势
- Jenkins Pipeline 方法(函数)定义及调用
- C form click event did not respond
- Nodemon installation and use
- Applet network data request
猜你喜欢

OpenGL - Model Loading

Figure neural network + comparative learning, where to go next?

顶会论文看图对比学习(GNN+CL)研究趋势
![[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization](/img/54/cb1373fbe7b21c5383580e8b638a2c.jpg)
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization

Applet (subcontracting)

Applet data attribute method

Can't find the activitymainbinding class? The pit I stepped on when I just learned databinding

信息与熵,你想知道的都在这里了

OpenGL - Coordinate Systems
![[reading notes] Figure comparative learning gnn+cl](/img/44/2e13d63ef654663852cbccb342b838.png)
[reading notes] Figure comparative learning gnn+cl
随机推荐
【PyTorch Bug】RuntimeError: Boolean value of Tensor with more than one value is ambiguous
生成对抗网络
Understanding of smt32h7 series DMA and DMAMUX
[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details
STM32 simple multi-level menu (array table lookup method)
OpenGL - Model Loading
[Yugong series] go teaching course 003-ide installation and basic use in July 2022
一题多解,ASP.NET Core应用启动初始化的N种方案[上篇]
.NET服务治理之限流中间件-FireflySoft.RateLimit
Explain NN in pytorch in simple terms CrossEntropyLoss
Svg optimization by svgo
Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]
LeetCode 31. 下一个排列
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
2311. 小于等于 K 的最长二进制子序列
Introduction Guide to stereo vision (2): key matrix (essential matrix, basic matrix, homography matrix)
Principle and performance analysis of lepton lossless compression
[reading notes] Figure comparative learning gnn+cl
Transfer learning and domain adaptation
Applet data attribute method