1 Star 0 Fork 0

七分钟热度/tingche

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.vue 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
七分钟热度 提交于 2023-09-04 09:18 . 1
<script>
import config from '@/app.config.js'
import { version } from './package.json'
import Vue from 'vue'
export default {
methods: {
},
// 监听 - 页面404
onPageNotFound:function(e) {
uni.redirectTo({
url: config.error.url
})
},
onLaunch: function(options) {
// 注意:config.debug 在正式环境时,值为false,故此{}内的代码只有开发环境才会执行
if (config.debug) {
// #ifndef APP-PLUS
console.log(
`%c vk-client %c v${version} `,
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
);
// #endif
console.log('App Launch');
}
// 注意:以下代码正式和开发环境都会执行
// #ifdef MP
uni.vk.updateManager.updateReady(); // 此代码可以让小程序自动检测最新版本
// #endif
uni.getSystemInfo({
success: function(e) {
Vue.prototype.StatusBar = e.statusBarHeight;
if (e.platform == 'android') {
Vue.prototype.CustomBar = e.statusBarHeight + 48;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 44;
};
}
})
},
onShow: function() {
if(config.debug) console.log('App Show');
},
onHide: function() {
if(config.debug) console.log('App Hide');
}
}
</script>
<style lang="scss">
/*每个页面公共css */
// @import "./uni_modules/vk-uview-ui/index.scss";
@import "./common/css/app.scss";
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zaofeng123/tingche.git
[email protected]:zaofeng123/tingche.git
zaofeng123
tingche
tingche
master

搜索帮助