12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <script>
- import md5Libs from '@/uni_modules/uview-ui/libs/function/md5';
- import Vue from 'vue';
- import { getConfig } from '@/service/api/common.js';
- export default {
- created() {
- // #ifdef APP-PLUS
- plus.navigator.closeSplashscreen();
- // #endif
- },
- onLaunch: async function () {
- // console.log('App Launch');
- /* 隐藏默认tabBar */
- uni.hideTabBar();
- //加载配置
- uni.getSystemInfo({
- success: function (e) {
- // #ifndef MP
- Vue.prototype.StatusBar = e.statusBarHeight;
- if (e.platform == 'android') {
- Vue.prototype.CustomBar = e.statusBarHeight + 50;
- } else {
- Vue.prototype.CustomBar = e.statusBarHeight + 45;
- }
- // #endif
- // #ifdef MP-WEIXIN
- Vue.prototype.StatusBar = e.statusBarHeight;
- let custom = wx.getMenuButtonBoundingClientRect();
- Vue.prototype.Custom = custom;
- Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
- // #endif
- // #ifdef MP-ALIPAY
- Vue.prototype.StatusBar = e.statusBarHeight;
- Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
- // #endif
- }
- });
- // getConfig().then(([err, res]) => {
- // // console.log('getConfig', err, res);
- // if (!err) {
- // this.$store.commit('setGlobalConfig', res);
- // // 当前活动无效
- // if (res.activity_invalid) {
- // this.$store.commit('delActivityId'); // 删除活动ID
- // // 重新加载配置
- // getConfig().then(([err, res]) => {
- // // console.log('getConfig reload', err, res);
- // if (!err) {
- // this.$store.commit('setGlobalConfig', res);
- // }
- // });
- // }
- // }
- // });
- // let res = await this.$api.getConfig();
- //console.log(res);
- // if (!res.code) {
- // return;
- // }
- // Vue.prototype.vuex_config = res.data;
- // this.vuex_config = res.data;
- },
- onShow: function () {
- // console.log('App 开启');
- },
- onHide: function () {
- // console.log('App 关闭');
- },
- /* 隐藏默认tabBar */
- onLoad: function () {
- uni.hideTabBar();
- }
- };
- </script>
- <style lang="scss">
- @import 'colorui/main.css';
- @import 'colorui/icon.css';
- // @import '@/uni_modules/uview-ui/index.scss';
- // // @import './GraceUI5/css/graceUI.css';
- // // @import './GraceUI5/skin/black.css';
- // /* 加载图标字体 - 条件编译模式 */
- // /* #ifdef APP-PLUS-NVUE */
- // // .gui-icons {
- // // font-family: graceIconfont;
- // // }
- // /* #endif */
- </style>
|