当前位置:网站首页>Solve the problem that uni app applet obtains routes and route parameters
Solve the problem that uni app applet obtains routes and route parameters
2022-07-25 05:00:00 【Like angels】
solve uni-app The applet inside gets the current route and route parameters
stay uni-appH5 The client can get the route and parameters of the current page , But the small program began to report errors :
Code :
this.type = this.$route.query.type // obtain type Parameters carried
Error reported in applet :
Solution :
// Get the instance of the current page stack , Given as an array in the order of stacks , The first element is the home page , The last element is the current page
let pages = getCurrentPages();
let page = pages[pages.length - 1].$page.fullPath; // Full routing address
this.type = page.split('type=')[1] // Carry the type Parameters
Thank you for reading, your likes and favorites are the biggest motivation for my creation
边栏推荐
- Json.tojsonstring cannot pass Boolean
- [wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)
- Implementation of recommendation system collaborative filtering in spark
- AUTOSAR from getting started to mastering 100 lectures (105) - protection mechanism of AUTOSAR timing for functional safety
- [literature notes] pointmlp
- 搭建私有CA服务器
- Burpsuite爆破之token值替换
- Actual combat | record an attack and defense drill management
- Your technical leader doesn't understand this? Without it, there is no complete thinking process of design
- 教你如何定位不合理的SQL?并优化之
猜你喜欢

二、MySQL数据库基础
![[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)](/img/01/42de6280191b9c32a7f37d7727bd4f.png)
[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)

【基于stm32f103的SHT30温湿度显示】

Pychart configuration pyqt5

I will write some Q & A blogs recently, mainly focusing on the points that are easy to have doubts.

2022-7-18 summary

HMS core discovery Episode 16 live broadcast preview | play AI's new "sound" state with tiger pier

Database design process
![2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f](/img/bf/e38a8fd813f88a83f61a1abfa3b95d.png)
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f

Forwarding and sharing function of wechat applet
随机推荐
[c language] custom type (structure ~ enumeration ~ Union)
[globally unique ID] how to handle the ID primary key after dividing the database and table?
Get the parameters of the browser address bar
How to get the database creation time?
[wechat applet] picker scroll selector (85/100)
Li Kou 731. My schedule II
How can test / development programmers with 5 years of experience break through the technical bottleneck? Common problems in big factories
如何判断是否遭到DDOS攻击
盐粒和冰粒分不清
小红书携手HMS Core,畅玩高清视界,种草美好生活
【浅析STM32之GPIO寄存器(CRL/CRH)配置 】
Token value replacement of burpsuite blasting
Natural state is the best
哪种网站适合物理服务器
Unity LOD
【微信小程序】拍卖商品详情页设计与交互实现(包含倒计时、实时更新出价)
The 6th "Blue Hat Cup" National College Students' Cyber Security Skills Competition writeup
Three must know and know problems of redis
基于云原生的私有化 PaaS 平台交付实践
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f