app.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div class="hc-app-body h-full w-full">
  3. <img class="bg-img h-full w-full" :src="bgImg" alt="">
  4. <div class="app-body h-full w-full">
  5. <div class="app-company-name hc-flex-center">
  6. <img :src="companyName" alt="">
  7. </div>
  8. <div class="app-title">
  9. <div class="icon-box hc-flex-center">
  10. <img :src="appIcon" alt="">
  11. </div>
  12. <div class="title-box">
  13. <div class="name">工程云家</div>
  14. <div class="version">当前版本:1.0.0</div>
  15. <div class="time">更新时间:2023-04-23</div>
  16. </div>
  17. </div>
  18. <div class="app-img hc-flex-center">
  19. <img :src="appImg" alt="">
  20. </div>
  21. <div class="app-btn">
  22. <el-row :gutter="20">
  23. <el-col :span="12">
  24. <el-button type="success">
  25. <i class="i-ic-baseline-android"/>
  26. <span class="ml-1">下载安卓APP</span>
  27. </el-button>
  28. </el-col>
  29. <el-col :span="12">
  30. <el-button type="success">
  31. <i class="i-ic-baseline-apple"/>
  32. <span class="ml-1">下载苹果APP</span>
  33. </el-button>
  34. </el-col>
  35. </el-row>
  36. </div>
  37. <div class="h-100px"/>
  38. </div>
  39. </div>
  40. </template>
  41. <script setup>
  42. import {onMounted, onUnmounted} from "vue";
  43. import bgImg from '~src/assets/archives/topHead.png'
  44. import companyName from '~src/assets/index/companyName.png'
  45. import appIcon from '~src/assets/index/app-icon.png'
  46. import appImg from '~src/assets/index/1242_2208.png'
  47. //渲染完成
  48. onMounted(() => {
  49. const dom = document.documentElement
  50. dom.setAttribute('class', `${dom.offsetWidth > 700 ?'hc-app-pc':'hc-app-mobile'}`)
  51. })
  52. //页面卸载
  53. onUnmounted(() => {
  54. document.documentElement.removeAttribute('class')
  55. })
  56. </script>
  57. <style lang="scss">
  58. html.hc-app-mobile,
  59. html.hc-app-mobile body,
  60. html.hc-app-mobile body #app {
  61. position: relative;
  62. padding: 0;
  63. margin: 0;
  64. width: 100%;
  65. height: 100%;
  66. }
  67. .hc-app-body {
  68. position: relative;
  69. .bg-img {
  70. position: fixed;
  71. inset: 0;
  72. object-fit: cover;
  73. }
  74. .app-body {
  75. position: relative;
  76. .app-company-name {
  77. position: relative;
  78. padding: 20px;
  79. height: 30px;
  80. img {
  81. height: 100%;
  82. }
  83. }
  84. .app-title {
  85. position: relative;
  86. padding: 0 20px;
  87. color: white;
  88. display: flex;
  89. .icon-box {
  90. position: relative;
  91. width: 80px;
  92. img {
  93. width: 100%;
  94. }
  95. }
  96. .title-box {
  97. position: relative;
  98. width: calc(100% - 80px);
  99. padding-left: 14px;
  100. font-size: 13px;
  101. .name {
  102. font-size: 18px;
  103. margin-top: 6px;
  104. margin-bottom: 2px;
  105. }
  106. }
  107. }
  108. .app-img {
  109. position: relative;
  110. margin-top: 20px;
  111. padding: 0 24px;
  112. img {
  113. width: 100%;
  114. border-radius: 5px;
  115. }
  116. }
  117. .app-btn {
  118. position: relative;
  119. padding: 24px;
  120. overflow: hidden;
  121. .el-button {
  122. width: 100%;
  123. height: 40px;
  124. font-size: 16px;
  125. i {
  126. font-size: 18px;
  127. }
  128. }
  129. }
  130. }
  131. }
  132. </style>