index.vue 781 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. }
  15. },
  16. onLoad() {
  17. this.$request.get('/').then(res => {
  18. console.log('请求后台:', res)
  19. })
  20. },
  21. methods: {
  22. }
  23. }
  24. </script>
  25. <style>
  26. .content {
  27. display: flex;
  28. flex-direction: column;
  29. align-items: center;
  30. justify-content: center;
  31. }
  32. .logo {
  33. height: 200rpx;
  34. width: 200rpx;
  35. margin-top: 200rpx;
  36. margin-left: auto;
  37. margin-right: auto;
  38. margin-bottom: 50rpx;
  39. }
  40. .text-area {
  41. display: flex;
  42. justify-content: center;
  43. }
  44. .title {
  45. font-size: 36rpx;
  46. color: #8f8f94;
  47. }
  48. </style>