活动问卷
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

51 righe
1.2 KiB

  1. <script>
  2. import Vue from 'vue';
  3. export default {
  4. onLaunch() {
  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. Vue.mixin({
  26. data() {
  27. return {
  28. StatusBar: Vue.prototype.StatusBar,
  29. CustomBar: Vue.prototype.CustomBar,
  30. };
  31. },
  32. });
  33. }
  34. });
  35. },
  36. onShow() {},
  37. onHide() {}
  38. }
  39. </script>
  40. <style lang="scss">
  41. @import url("./static/css/main.css");
  42. /*每个页面公共css */
  43. * {
  44. margin: 0;
  45. padding: 0;
  46. box-sizing: border-box;
  47. font-family: PingFangSC, PingFang SC;
  48. }
  49. </style>