about.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <route lang="json5">
  2. {
  3. style: {
  4. navigationBarTitleText: '关于',
  5. },
  6. }
  7. </route>
  8. <template>
  9. <view
  10. class="bg-white overflow-hidden pt-2 px-4"
  11. :style="{ marginTop: safeAreaInsets?.top + 'px' }"
  12. >
  13. <view class="text-center text-3xl mt-4">关于页面</view>
  14. <view class="text-center text-3xl mt-8">
  15. 鸽友们好,我是
  16. <text class="text-red-500">菲鸽</text>
  17. </view>
  18. <view class="text-center mt-8">
  19. <wd-button type="primary">wot 组件库测试</wd-button>
  20. </view>
  21. <view class="text-center py-4">
  22. 当前平台是:
  23. <text class="text-red-500">{{ platform }}</text>
  24. </view>
  25. <view class="desc">测试设计稿样式</view>
  26. <view class="desc">设计稿是750px,css里面全部写rpx 即可</view>
  27. </view>
  28. </template>
  29. <script lang="ts" setup>
  30. // 获取屏幕边界到安全区域距离
  31. const { safeAreaInsets } = uni.getSystemInfoSync()
  32. const platform = __UNI_PLATFORM__
  33. const isH5 = __UNI_PLATFORM__ === 'h5'
  34. const isApp = __UNI_PLATFORM__ === 'app'
  35. const isMp = __UNI_PLATFORM__.startsWith('mp-')
  36. console.log(platform, isH5, isApp, isMp)
  37. </script>
  38. <style lang="scss" scoped>
  39. .desc {
  40. width: 700rpx;
  41. }
  42. </style>