1 Star 0 Fork 5

doswhy/58ganji

forked from 韩工/58ganji 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.vue 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
专业App软件开发 提交于 2021-08-02 17:31 . Add files via upload
<script>
import c from 'modules/common.js'
import b from 'modules/bll.js'
import Vue from 'vue'
export default {
globalData: {
baseURL: 'http://localhost:9091'
},
onLaunch: function() {
// console.log('获取appid')
// const accountInfo = uni.getAccountInfoSync();
// console.log(accountInfo.miniProgram.appId); // 小程序 appId
//分享出去的h5页面会自动执行这里,自动弹窗登录页面,暂时不需要
// b.loginAuto();
console.log("onLaunch");
uni.getSystemInfo({
success: function(e) {
console.log(e)
Vue.prototype.screenWidth = e.screenWidth
// #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
}
})
},
onShow: function() {
c.startWebSocketService();
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/* color-ui库 */
@import "colorui/main.css";
@import "colorui/icon.css";
@import "colorui/animation.css";
/*每个页面公共css */
page {
background-color: #FFFFFF;
overflow-x: hidden;
}
.Messange-box {
position: fixed;
right: 0;
top: 50%;
background: #272822;
width: 30px;
height: 50px;
z-index: 99999;
}
</style>
<style lang="scss">
@import "uview-ui/index.scss";
@import 'static/css/base.css';
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/doswhy/ganji58.git
[email protected]:doswhy/ganji58.git
doswhy
ganji58
58ganji
main

搜索帮助