当前位置:网站首页>Wechat applet 04 route jump and life cycle function
Wechat applet 04 route jump and life cycle function
2022-07-21 11:25:00 【Mu Quanyu [dark cat]】
4.1 Routing jump
- First, what is routing ?
answer : Routing refers to the route that network packets are sent to the destination address , If the route planning is reasonable , Then the data will go faster , The delay is lower , The online experience is better .
- What is? Named route ?
answer : So-called “ Named route ”(Named Route) That is, routes with names , We can give the route a name first , Then you can go through The route name directly opens the new route , This brings a kind of intuition for route management 、 In a simple way .
- What is a route jump ?
answer : be-all page We Fine Take a name As identifier , Store in In a watch . then direct according to Provided name Conduct Page jump operation . This process A little bit Be similar to Store the routing information in the routing table , then Conduct A -> B transmission . So we be called Routing jump .
wx.navigateTo
: Do not close the current page , then To jump .wx.redirectTo
: Close current page , Jump to the target page .wx.reLaunch
: close Including home page All pages of , then Jump to the target page .
<view class="mainContext">
<image class="img" src="/ Head portrait .jpg"></image>
<text class="textA">{
{msg}}</text>
<!-- <view class="showText" catchtap="fatherText"> <text catchtap="childText">Hello World</text> </view>-->
<view class="showText" catchtap="navigateToLog">
<text>Hello World</text>
</view>
</view>
navigateToLog(){
wx.navigateTo({
url: '/pages/log/log',
})
},
- Local configuration json priority than overall situation app.json high .
Modify the Local configuration , On the spot Just To change the . So priority It's better than overall situation high .
4.2 Life cycle
Life cycle is a comparison Simply understand the concept .
then each Method function of life cycle , All are Be similar to Corresponding event .
onShow
: Always want Over and over again Called , When one page To be displayed will call .
onHide
: When hiding a page Will execute this .
onReady
: initialization What? , Rendering What? When it's all over , Meeting perform This .
onUnload
: uninstall One On the page , Will execute this .
onLoad
: When loading , Will execute this .
stay onLoad Before Actually Yes, there is The rest of the Business Executes , But we can't see . We Also known as Initialization of applet operation !
边栏推荐
- 张小泉,冤吗?
- Kettle Job实现每6s就运行一个Kettle的转换任务
- Detailed explanation of redis cluster construction and configuration optimization
- AI helps double carbon goal: let every kilowatt hour be optimized by us
- ICASSP 2022 | 用于多模态情感识别的KS-Transformer
- find_var.sh
- 网络安全学习(五)DHCP
- 在同花顺上登录证券账号安全吗
- Image and Pattern Classification with Scattering
- acmStreamOpen返回值问题
猜你喜欢
马斯克:我把大脑上传云端啦,不好意思,404了
For the IT Internet industry, does family think education is important or ability?
微信小程序 25 npm模块和PubSubJS实现页面通讯
網絡安全學習(七)IIS
李宏毅老师2020年深度学习系列讲座笔记6
VC all rested? In the first half of the year, Hillhouse venture capital made nearly 80 shots, 60% before the a-round
氢创未来,中国氢能联盟举办2022氢能专精特新创业大赛启动仪式
网络安全学习(四)用户与组管理,NTFS
2021/7/24 SVM 2021/7/26 后门学习&对抗神经网络
Debezium grabs data from Oracle to Kafka
随机推荐
Sigmoid of the action of excitation function
需研究的东东
kubernetes调度概念与工作流程
VIM development environment configuration
MNN tutorials
C中的连接符##
vc 每次按F5运行都提示重新编译
wpf 打开外部程序并在需要时激活
Pycharm configuration
Development direction and problems of optaplanner
视频物体分割VOS
网络安全学习(十)渗透简单测试流程
炒股开户哪家证券公司佣金最低呢手机上开户安全吗
Network Security Learning (VII) IIS
Which securities company has the lowest Commission for opening an account for stock speculation? Is it safe to open an account on your mobile phone
稳定的三方支付通道优势
BackGroundWorker 使耗时的操作不影响界面响应
腾讯音视频服务的使用体验
关于开放封闭原则
Musk: I uploaded my brain to the cloud. Sorry, 404