123456789101112131415161718192021222324252627282930313233343536 |
- <script>
- export default {
- onLaunch: function() {
- console.log('App Launch')
- },
- onShow: function() {
- console.log('App Show')
- var screenWidth = 0
- var screenHeight = 0
- uni.getSystemInfo({
- success: (res) => {
- screenHeight = res.screenHeight
- screenWidth = res.screenWidth
- console.log(screenHeight, screenWidth)
- }
- })
- if (screenHeight == 768 && screenWidth == 1024) {
- uni.redirectTo({
- url: '/pages/index15/index15'
- })
- }
- if (screenHeight == 1920 && screenWidth == 1080) {
- uni.redirectTo({
- url: '/pages/index32/index32'
- })
- }
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /*每个页面公共css */
- </style>
|