index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <!-- 状态栏高度 -->
  4. <view :style="{ height: `${statusBarHeight}px`, backgroundColor: '#FF6702' }"></view>
  5. <!-- 导航栏 -->
  6. <view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
  7. <!-- <view class="back-button" @tap="handBack()"></view> -->
  8. 我的
  9. </view>
  10. <view></view>
  11. <!-- 底部导航 -->
  12. <view class="page-footer">
  13. <view class="foot-item" :class="item.pagePath == activeRouter?'active':''" v-for="(item,index) in footerList" :key="index"
  14. @click="goRouter(item)">
  15. <block v-if="item.pagePath == activeRouter">
  16. <image :src="item.selectedIconPath"></image>
  17. <view class="txt">{{item.text}}</view>
  18. </block>
  19. <block v-else>
  20. <image :src="item.iconPath"></image>
  21. <view class="txt">{{item.text}}</view>
  22. </block>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import {
  29. registerVerify,
  30. } from '@/api/api.js';
  31. import {
  32. Debounce
  33. } from '@/utils/validate.js'
  34. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  35. let app = getApp();
  36. export default {
  37. data() {
  38. return {
  39. statusBarHeight: app.globalData.statusBarHeight,
  40. navigationBarHeight: 112
  41. }
  42. },
  43. methods: {
  44. },
  45. onLoad(options) {},
  46. mounted() {
  47. },
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. .order-nav {
  52. font-weight: 500;
  53. font-size: 35rpx;
  54. color: #FFFFFF;
  55. position: relative;
  56. background-color: #FF6702;
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. .back-button {
  61. position: absolute;
  62. left: 20rpx;
  63. }
  64. }
  65. .page-footer {
  66. position: fixed;
  67. bottom: 0;
  68. z-index: 9;
  69. display: flex;
  70. align-items: center;
  71. justify-content: space-around;
  72. width: 100%;
  73. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  74. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  75. box-sizing: border-box;
  76. border-top: solid 1rpx #F3F3F3;
  77. background-color: #fff;
  78. // box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  79. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  80. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  81. .foot-item {
  82. display: flex;
  83. width: max-content;
  84. align-items: center;
  85. justify-content: center;
  86. flex-direction: column;
  87. position: relative;
  88. padding: 0 20rpx;
  89. margin-top: 18rpx;
  90. &.active {
  91. color: $bg-color-primary
  92. }
  93. }
  94. .foot-item image {
  95. height: 50rpx;
  96. width: 50rpx;
  97. text-align: center;
  98. margin: 0 auto;
  99. }
  100. .foot-item .txt {
  101. font-size: 27rpx;
  102. margin-top: 8rpx;
  103. }
  104. }
  105. </style>