App.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <script>
  2. import Vue from 'vue'
  3. export default {
  4. onLaunch: function() {
  5. // #ifdef APP-PLUS
  6. //plus.screen.lockOrientation('portrait-primary'); //锁定屏幕
  7. // #endif
  8. /*
  9. const dom = weex.requireModule('dom');
  10. dom.addRule('fontFace', {
  11. fontFamily: 'graceIconfont',
  12. src: "url('https://at.alicdn.com/t/font_823462_1p2i18cul3t.ttf')"
  13. });
  14. */
  15. uni.getSystemInfo({
  16. success: function(e) {
  17. // #ifndef MP
  18. Vue.prototype.StatusBar = e.statusBarHeight;
  19. if (e.platform == 'android') {
  20. Vue.prototype.CustomBar = e.statusBarHeight + 50;
  21. } else {
  22. Vue.prototype.CustomBar = e.statusBarHeight + 45;
  23. };
  24. // #endif
  25. // #ifdef MP-WEIXIN || MP-QQ
  26. Vue.prototype.StatusBar = e.statusBarHeight;
  27. let capsule = wx.getMenuButtonBoundingClientRect();
  28. if (capsule) {
  29. Vue.prototype.Custom = capsule;
  30. // Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
  31. Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
  32. } else {
  33. Vue.prototype.CustomBar = e.statusBarHeight + 50;
  34. }
  35. // #endif
  36. // #ifdef MP-ALIPAY
  37. Vue.prototype.StatusBar = e.statusBarHeight;
  38. Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
  39. // #endif
  40. }
  41. })
  42. },
  43. onShow: function() {},
  44. onHide: function() {}
  45. };
  46. </script>
  47. <style>
  48. @import '@/static/dreamland/css/core.css';
  49. @import "./lib/GraceUI5/css/graceUI.css";
  50. @import "./lib/GraceUI5/skin/black.css";
  51. @import './lib/dever/dever.css';
  52. /*body {font-family:"NSimSun"}*/
  53. page{background-color: #ffffff;}
  54. *{
  55. -webkit-overflow-scrolling: touch;
  56. }
  57. .grace-body {
  58. width:100%;
  59. }
  60. .avatar {
  61. width: 150rpx;
  62. height: 150rpx;
  63. border-radius: 100%;
  64. }
  65. .uni-scroll-view, .uni-scroll-view-content {
  66. height:100%;
  67. }
  68. image {
  69. will-change: transform;
  70. height: auto;
  71. }
  72. video {
  73. will-change: transform;
  74. position: relative;
  75. }
  76. /* 重写showModal样式 */
  77. uni-modal .uni-modal__hd {padding:30rpx 0;}
  78. uni-modal .uni-modal__title {font-size: 28rpx;color: #666666;}
  79. uni-modal .uni-modal__bd{font-size: 30rpx;color: #222222;paddings:0 0 30rpx 0}
  80. .uni-mask{z-index: 999;}
  81. </style>