当前位置:网站首页>Wechat applet startup page automatically jumps
Wechat applet startup page automatically jumps
2022-06-11 12:18:00 【dq0817_】
wxml
Picture customization
It should be noted that the startup page image If the width and height of the box are not defined, the width and height are set to 100% The picture will not be displayed You need to use image Self contained mode Method
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<text style="position: absolute;top: 10px;right: 10px;color: #fff;width: 60px;height: 25px;background-color:rgba(255,255,255,0.1);text-align: center;border-radius: 15px;" bindtap="home"> skip {
{time}}</text>
<image mode="widthFix" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.XbWs5KyqKjDjcO_RXx4aKAAAAA?w=187&h=332&c=7&r=0&o=5&dpr=1.05&pid=1.7" style="width: 100%;"></image>js
js We need to give them in class “ skip ” Bind click event Click skip to jump to the page Auto jump is used in page loading events
Click event Name custom
home:function(){
wx.switchTab({
url: '/pages/home/home'
})
}Loading event here time Need to be in data Jump time is defined in
It should be noted that the assignment of the applet needs to be in setData In function
onLoad() {
// Jump time
var time = this.data.time,that = this
// Timer pair time Reassign 1000=1s
setInterval(function(){
time--
//time=0 Of Auto jump page
if(time==0){
wx.switchTab({
url: '/pages/home/home'
})
}
that.setData({
time:time
})
},1000)
}边栏推荐
- Sulley fuzzer learning
- Record a troubleshooting of MySQL master-slave asynchrony
- General O & M structure diagram
- 14、课程总结与回顾
- Acwing50+acwing51 weeks +acwing3493 Maximum sum (open)
- 你管这破玩意儿叫 MQ?
- Format of Jerrys at protocol package [chapter]
- ObjectInputStream读取文件对象ObjectOutputStream写入文件对象
- 阶乘后的零(C语言)
- Software project management 7.1 Basic concept of project schedule
猜你喜欢

Some common websites

阶乘后的零(C语言)

Hang up the interviewer

Flink deployment mode and runtime architecture (session mode, single job mode, application mode, jobmanager, taskmanager, yarn mode deployment and runtime architecture)

7、CAS

解决Splunk kvstore “starting“ 问题

Workload management of Splunk best practices

【LeetCode】1049. Weight of the last stone II (wrong question 2)

Serveur FTP: téléchargement et utilisation de Serv - U

Yarn switch ResourceManager (failed to connect to server:8032 retries get failed due to exceeded maximum)
随机推荐
Jerry's aicmd command [chapter]
程序员常用的命令符
How does data age in Splunk?
Installation and use of saltstack
Splunk Bucket 背後的秘密
Wechat web developers, how to learn web development
Live source code, floating window rolling gradient effect
你管这破玩意儿叫 MQ?
解决Splunk kvstore “starting“ 问题
11. Synchronized and lock escalation
mysql 导入宝塔中数据库data为0000-00-00,enum为null出错
Splunk 最佳实践-减轻captain 负担
Linux changes the MySQL password after forgetting it
splunk 证书过期 使KV-store不能启动
What is a Gerber file? Introduction to PCB Gerber file
合并两个有序数组(C语言)
Flip window join, interval join, window cogroup
China Unicom 22 spring Games Group
Live app source code, and the status bar and navigation bar are set to transparent status
Serveur FTP: téléchargement et utilisation de Serv - U