当前位置:网站首页>uni-app---uni. Navigateto jump parameter use
uni-app---uni. Navigateto jump parameter use
2022-07-05 09:29:00 【Left hand holding * * right hand】
uni-app Have their own grammar . When we use it, we pass parameters , Pass string or object ,
String pass parameters : You can splice addresses
goreportdetails(id) {
uni.navigateTo({
url: '/pages/reportdetails/reportdetails?id=' + id + '&name=edit'
})
},
The object passes parameters : Sometimes parameters are lost , So with 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,
})
Then the receiving parameters are :
onLoad(option) {
if (option) {
this.name = option.name
this.uid = option.uid
if (option.list) {
this.list = JSON.parse(decodeURIComponent(option.list));
}
}
}
边栏推荐
- Nodemon installation and use
- 【el-table如何禁用】
- fs. Path module
- Lepton 无损压缩原理及性能分析
- Talking about the difference between unittest and pytest
- It's too difficult to use. Long articles plus pictures and texts will only be written in short articles in the future
- 阿里十年测试带你走进APP测试的世界
- . Net service governance flow limiting middleware -fireflysoft RateLimit
- 【对象数组的排序】
- [beauty of algebra] singular value decomposition (SVD) and its application to linear least squares solution ax=b
猜你喜欢
Unity skframework framework (24), avatar controller third person control
Vs code problem: the length of long lines can be configured through "editor.maxtokenizationlinelength"
Newton iterative method (solving nonlinear equations)
Figure neural network + comparative learning, where to go next?
OpenGL - Coordinate Systems
Creation and reference of applet
Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning
High performance spark_ Transformation performance
C语言-从键盘输入数组二维数组a,将a中3×5矩阵中第3列的元素左移到第0列,第3列以后的每列元素行依次左移,原来左边的各列依次绕到右边
Huber Loss
随机推荐
Alibaba cloud sends SMS verification code
Applet (subcontracting)
fs. Path module
Principle and performance analysis of lepton lossless compression
C language - input array two-dimensional array a from the keyboard, and put 3 in a × 5. The elements in the third column of the matrix are moved to the left to the 0 column, and the element rows in ea
AUTOSAR from getting started to mastering 100 lectures (103) -dbc file format and creation details
MySQL does not take effect in sorting string types
OpenGL - Coordinate Systems
浅谈Label Smoothing技术
一篇文章带你走进cookie,session,Token的世界
Introduction Guide to stereo vision (7): stereo matching
【js 根据对象数组中的属性进行排序】
OpenGL - Model Loading
深入浅出PyTorch中的nn.CrossEntropyLoss
Can't find the activitymainbinding class? The pit I stepped on when I just learned databinding
[beauty of algebra] solution method of linear equations ax=0
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Jenkins pipeline method (function) definition and call
Lepton 无损压缩原理及性能分析
我的一生.