1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <script>
- export default {
- globalData: {
- //全局配置参数
- barHeight: 0,
- screenWidth: 0,
- screenHeight: 0,
- viewHeight: 0,
- },
- onLaunch: function(options) {
- console.log("APP----onLaunch", options);
- if (options.query.code) {
- uni.setStorageSync('code', options.query.code)
- }
- // #ifdef APP-PLUS
- // App平台检测升级,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=2226
- // #endif
- //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
- uni.getSystemInfo({
- success: (res) => {
- this.globalData.barHeight = res.statusBarHeight;
- this.globalData.screenWidth = res.screenWidth;
- this.globalData.screenHeight = res.screenHeight;
- this.globalData.viewHeight = res.windowHeight
- }
- });
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- },
- globalData: {
- test: ''
- }
- }
- </script>
- <style lang="scss">
- @import "uview-ui/index.scss";
- /* #ifndef APP-PLUS-NVUE */
- /* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
- @import './common/style/uni.css';
- /* #endif*/
- /*每个页面公共css */
- @import '@/common/style/common.scss';
- uni-radio .uni-radio-input .uni-radio-input-checked {
- background: #FF0000 !important;
- }
- </style>
|