index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="content" :class="{'active':active}">
  3. <view class="tabbar-box-wrap">
  4. <view class="tabbar-box">
  5. <view class="tabbar-box-item" @click="goToPage('/pages/webview/report/report')">
  6. <image class="box-image" src="/static/qa.png" mode="aspectFit"></image>
  7. <text class="explain">故障上报</text>
  8. </view>
  9. <view class="tabbar-box-item" @click="goToPage('/pages/webview/report/dangerReport')">
  10. <image class="box-image" src="/static/release.png" mode="aspectFit"></image>
  11. <text class="explain">危险源上报</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import {
  19. BeforeNavigateTo
  20. } from '../../common/utils.js'
  21. export default {
  22. data() {
  23. return {
  24. active: false
  25. };
  26. },
  27. onShow() {
  28. // setTimeout(() => {
  29. this.active = true;
  30. // }, 500);
  31. },
  32. onHide() {
  33. this.active = false;
  34. },
  35. methods: {
  36. goToPage(url) {
  37. if (!url) return;
  38. BeforeNavigateTo({
  39. url:url
  40. },true);
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="scss" scoped>
  46. .content {
  47. display: flex;
  48. align-items: center;
  49. justify-content: center;
  50. width: 100%;
  51. /* #ifdef H5 */
  52. height: calc(100vh - var(--window-bottom) - var(--window-top));
  53. /* #endif */
  54. /* #ifndef H5 */
  55. height: 100vh;
  56. /* #endif */
  57. transition: opacity 0.3s;
  58. background: #E4E7ED;
  59. opacity: 0;
  60. &.active {
  61. opacity: 1;
  62. }
  63. .logo {
  64. position: relative;
  65. margin-top: 100upx;
  66. width: 200upx;
  67. height: 200upx;
  68. // z-index: -1;
  69. opacity: 0;
  70. transition: opacity 0.3s;
  71. &.active {
  72. opacity: 1;
  73. }
  74. }
  75. }
  76. .tabbar-box-wrap {
  77. position: absolute;
  78. width: 100%;
  79. padding: 50upx;
  80. box-sizing: border-box;
  81. bottom: 0;
  82. left: 0;
  83. .tabbar-box {
  84. position: relative;
  85. display: flex;
  86. width: 100%;
  87. background: #fff;
  88. border-radius: 20upx;
  89. padding: 15upx 20upx;
  90. box-sizing: border-box;
  91. z-index: 2;
  92. box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.1);
  93. &:after {
  94. content: '';
  95. position: absolute;
  96. bottom: -16upx;
  97. left: 0;
  98. right: 0;
  99. margin: auto;
  100. width: 50upx;
  101. height: 50upx;
  102. transform: rotate(45deg);
  103. background: #fff;
  104. z-index: 1;
  105. box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.1);
  106. border-radius: 2px;
  107. }
  108. &:before {
  109. content: '';
  110. position: absolute;
  111. top: 0;
  112. left: 0;
  113. width: 100%;
  114. height: 100%;
  115. background: #ffffff;
  116. border-radius: 20upx;
  117. z-index: 2;
  118. }
  119. .tabbar-box-item {
  120. // position: relative;
  121. width: 100%;
  122. z-index: 3;
  123. margin: 10upx;
  124. color: $uni-color-subtitle;
  125. text-align: center;
  126. font-size: $uni-font-size-base;
  127. .box-image {
  128. width: 100%;
  129. height: $uni-img-size-lg;
  130. }
  131. }
  132. }
  133. }
  134. </style>