| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <!--
- http://t-oss-mbh5.colormaprun.com/actMgt/
- https://oss-mbh5.colormaprun.com/actMgt/
- -->
- <script>
- export default {
- globalData: {
- // 默认赛事LOGO
- defaultMatchLogo: "https://oss-mbh5.colormaprun.com/static/logo/default.png",
- // 默认赛事BANNER
- defaultMatchBanner: "https://oss-mbh5.colormaprun.com/static/banner/banner1.png"
- },
- onLaunch: function() {
- console.log('App Launch')
- this.$global.getWindowInfo()
- const style = document.documentElement.style;
- // 通过JS设置CSS变量值
- const defaultMatchLogoUrl = `url("${this.globalData.defaultMatchLogo}")`;
- style.setProperty('--default-matchLogo-url', defaultMatchLogoUrl);
- const defaultMatchBannerUrl = `url("${this.globalData.defaultMatchBanner}")`;
- style.setProperty('--default-matchBanner-url', defaultMatchBannerUrl);
- // 通过JS获取CSS变量值
- // console.log("--default-matchLogo-url:", style.getPropertyValue('--default-matchLogo-url'));
- // console.log("--default-matchBanner-url:", style.getPropertyValue('--default-matchBanner-url'));
- // uni.onWindowResize(res => {
- // // console.log('[APP onWindowResize]', res)
- // this.$global.getWindowInfo(res.size)
- // uni.$emit('windowResize')
- // });
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /*每个页面公共css */
- @import "global.css";
- </style>
|