123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <script>
- import Vue from 'vue';
- export default {
- mpType: 'app',
- globalData: {
- NavHeight: 0,
- windowHeight: 0,
- isIPX: false,
- statusBarHeight: 0
- },
- onLaunch: function() {
- // console.log('App Launch');
- this.$nextTick(function() {
- uni.hideTabBar();
- });
- uni.getSystemInfo({
- success: res => {
- console.log(res);
- this.globalData.statusBarHeight = res.statusBarHeight;
- this.globalData.NavHeight = res.statusBarHeight + 42;
- this.globalData.windowHeight = res.windowHeight;
- if (res.statusBarHeight > 20 && res.platform.toUpperCase() === 'IOS') {
- console.log('Device is iPhoneX!!!');
- // 底部安全距离为 68rpx 34px
- this.globalData.isIPX = true;
- }
- }
- });
- },
- onShow: function() {
- // console.log('App Show');
- },
- onHide: function() {
- // console.log('App Hide');
- }
- };
- </script>
- <style lang="scss">
- /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
- @font-face {
- font-family: 'iconfont';
- /* Project id 3695491 */
- src: url('https://at.alicdn.com/t/c/font_3695491_hk38bgiibu.woff2?t=1683873775480') format('woff2'),
- url('https://at.alicdn.com/t/c/font_3695491_hk38bgiibu.woff?t=1683873775480') format('woff'),
- url('https://at.alicdn.com/t/c/font_3695491_hk38bgiibu.ttf?t=1683873775480') format('truetype');
- }
- /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
- @font-face {
- font-family: 'iconfont'; /* Project id 4211324 */
- src: url('https://at.alicdn.com/t/c/font_4211324_j8cypmf8zve.woff2?t=1695089595832') format('woff2'),
- url('https://at.alicdn.com/t/c/font_4211324_j8cypmf8zve.woff?t=1695089595832') format('woff'),
- url('https://at.alicdn.com/t/c/font_4211324_j8cypmf8zve.ttf?t=1695089595832') format('truetype');
- }
-
- /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
- @font-face {
- font-family: 'iconfont'; /* Project id 4805946 */
- src: url('https://at.alicdn.com/t/c/font_4805946_jmfulvedwi.woff2?t=1736847537403') format('woff2'),
- url('https://at.alicdn.com/t/c/font_4805946_jmfulvedwi.woff?t=1736847537403') format('woff'),
- url('https://at.alicdn.com/t/c/font_4805946_jmfulvedwi.ttf?t=1736847537403') format('truetype');
- }
- page {
- background-color: #FAFAFA;
- }
- </style>
|