uniapp,h5

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