HomeBase.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="div seller-base">
  3. <page-meta
  4. :root-font-size="fontSize+'px'"
  5. >
  6. </page-meta>
  7. <view class="status-holder"></view>
  8. <view class="content">
  9. <slot></slot>
  10. </view>
  11. <view v-if="show" class='div common-footer-wrap'>
  12. <view class="common-footer">
  13. <view class='item-wrap' :class="{'active':page.route=='pages/seller/goods/Goodsonline'}">
  14. <navigator url="/pages/seller/goods/Goodsonline" class='item'>
  15. <image mode="aspectFit" src="@/static/image/seller/icon_home_seller_pre.png" class="image"
  16. v-if="page.route=='pages/seller/goods/Goodsonline'">
  17. <image mode="aspectFit" v-else src="@/static/image/seller/icon_home_seller_nor.png" class="image" />
  18. <text class='span text'>商品管理</text>
  19. </navigator>
  20. </view>
  21. <view class='item-wrap' :class="{'active':page.route=='pages/seller/order/OrderList'}" id='seller_order'>
  22. <navigator url="/pages/seller/order/OrderList" class='item'>
  23. <image mode="aspectFit" src="@/static/image/seller/icon_list_seller_pre.png" class="image"
  24. v-if="page.route=='pages/seller/order/OrderList'">
  25. <image mode="aspectFit" v-else src="@/static/image/seller/icon_list_seller_nor.png" class="image" />
  26. <text class='span text'>订单管理</text>
  27. </navigator>
  28. </view>
  29. <view class='item-wrap' :class="{'active':page.route=='pages/seller/index/Index'}" id='seller_index'>
  30. <navigator url="/pages/seller/index/Index" class='item'>
  31. <image mode="aspectFit" src="@/static/image/seller/icon_mine_seller_pre.png" class="image"
  32. v-if="page.route=='pages/seller/index/Index'">
  33. <image mode="aspectFit" v-else src="@/static/image/seller/icon_mine_seller_nor.png" class="image" />
  34. <text class='span text'>店铺中心</text>
  35. </navigator>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. getFontSize
  44. } from '@/util/common'
  45. export default {
  46. name: 'SellerBase',
  47. data() {
  48. return {
  49. page: '',
  50. }
  51. },
  52. props: {
  53. show: {
  54. type: Boolean,
  55. default: true
  56. }
  57. },
  58. computed: {
  59. fontSize(){
  60. return getFontSize()
  61. },
  62. },
  63. mounted: function() {
  64. var pages = getCurrentPages()
  65. var page = pages[pages.length - 1]
  66. this.page = {
  67. route: page.route,
  68. options: page.options
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .status-holder {
  75. background-color: #fff;
  76. }
  77. .seller-base {
  78. display: flex;
  79. flex-direction: column;
  80. }
  81. .content {
  82. flex: 1
  83. }
  84. .item-wrap {
  85. position: relative
  86. }
  87. .image {
  88. width: 1rem;
  89. height: 1rem;
  90. display: block;
  91. margin-left: auto;
  92. margin-right: auto;
  93. margin-top: .2rem;
  94. margin-bottom: .2rem;
  95. }
  96. .icon {
  97. position: absolute;
  98. right: 0.8rem;
  99. top: 0.2rem;
  100. font-size: $h6;
  101. line-height: 0.7rem;
  102. width: 0.9rem;
  103. height: 0.7rem;
  104. background: #ef3338;
  105. border-radius: 1rem;
  106. text-align: center;
  107. color: #ffffff;
  108. }
  109. </style>