App.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <script>
  2. import Vue from 'vue'
  3. export default {
  4. onLaunch: function(options) {
  5. uni.getSystemInfo({
  6. success: function(e) {
  7. // #ifndef MP
  8. Vue.prototype.StatusBar = e.statusBarHeight;
  9. if (e.platform == 'android') {
  10. Vue.prototype.CustomBar = e.statusBarHeight + 50;
  11. } else {
  12. Vue.prototype.CustomBar = e.statusBarHeight + 45;
  13. };
  14. // #endif
  15. // #ifdef MP-WEIXIN
  16. Vue.prototype.StatusBar = e.statusBarHeight;
  17. let custom = wx.getMenuButtonBoundingClientRect();
  18. Vue.prototype.Custom = custom;
  19. Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
  20. // #endif
  21. // #ifdef MP-ALIPAY
  22. Vue.prototype.StatusBar = e.statusBarHeight;
  23. Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
  24. // #endif
  25. }
  26. });
  27. // if(!uni.getStorageSync('claims'))
  28. // {
  29. // window.location.href="https://server.uxianxin.com/%23/pages/login/index";
  30. // }
  31. },
  32. onShow: function() {
  33. console.log('App Show')
  34. },
  35. onHide: function() {
  36. console.log('App Hide')
  37. },
  38. methods: {
  39. }
  40. }
  41. </script>
  42. <style>
  43. @import "colorui/main.css";
  44. @import "colorui/icon.css";
  45. @import "common/common.scss";
  46. @import "uview-ui/index.scss";
  47. /* @import "uview-ui/index.scss"; */
  48. /*每个页面公共css */
  49. .uni-input-placeholder{
  50. color: #B1B1B1!important;
  51. }
  52. uni-checkbox .uni-checkbox-input {
  53. border-color: #CCCCCC!important;
  54. border-radius: 20px!important;
  55. color: #FC6035!important;
  56. width: 20px!important;
  57. height: 20px!important;
  58. margin-right: 5px!important;
  59. }
  60. </style>