index.vue 897 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="content">
  3. <image class="logo" src="/static/logo.png"></image>
  4. <view class="text-area">
  5. <text class="title">{{title}}</text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. title: 'Hello'
  14. topHight: '',
  15. }
  16. },
  17. onLoad() {
  18. },
  19. mounted() {
  20. let app = uni.getSystemInfoSync()
  21. this.topHight = app.statusBarHeight + 'px'
  22. if (this.topHight == '0px') {
  23. this.topHight = '20px'
  24. }
  25. },
  26. methods: {
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .content {
  32. display: flex;
  33. flex-direction: column;
  34. align-items: center;
  35. justify-content: center;
  36. }
  37. .logo {
  38. height: 200rpx;
  39. width: 200rpx;
  40. margin-top: 200rpx;
  41. margin-left: auto;
  42. margin-right: auto;
  43. margin-bottom: 50rpx;
  44. }
  45. .text-area {
  46. display: flex;
  47. justify-content: center;
  48. }
  49. .title {
  50. font-size: 36rpx;
  51. color: #8f8f94;
  52. }
  53. </style>