CommonStoreFooter.vue 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view class="div home-base">
  3. <view class='div common-footer-wrap'>
  4. <view fixed class="common-footer">
  5. <view class='item-wrap' :class="{'active':page.route=='pages/home/storedetail/Storedetail'}"><navigator :url="'/pages/home/storedetail/Storedetail?id='+store_id" class='item'><image mode="aspectFit" src="../../../static/image/tab/icon_home_pre.png" class="img image" v-if="page.route=='pages/home/storedetail/Storedetail'"><image mode="aspectFit" v-else src="../../../static/image/tab/icon_home_nor.png" class="img image" /><text class='span text'>店铺首页</text></navigator></view>
  6. <view class='item-wrap' :class="{'active':page.route=='pages/home/storegoodslist/Goodslist'}"><navigator :url="'/pages/home/storegoodslist/Goodslist?id='+store_id" class='item'><image mode="aspectFit" src="../../../static/image/tab/icon_allgoodf_selfshop_pre.png" class="img image" v-if="page.route=='pages/home/storegoodslist/Goodslist'"><image mode="aspectFit" v-else src="../../../static/image/tab/icon_allgoodf_selfshop_nor.png" class="img image" /><text class='span text'>全部商品</text></navigator></view>
  7. <view class='item-wrap' :class="{'active':page.route=='pages/home/storegoodsclass/Goodsclass'}"><navigator :url="'/pages/home/storegoodsclass/Goodsclass?id='+store_id" class='item'><image mode="aspectFit" src="../../../static/image/tab/icon_seek_pre.png" class="img image" v-if="page.route=='pages/home/storegoodsclass/Goodsclass'"><image mode="aspectFit" v-else src="../../../static/image/tab/icon_seek_nor.png" class="img image" /><text class='span text'>店内搜索</text></navigator></view>
  8. <view class='item-wrap' :class="{'active':page.route=='pages/member/cart/Cart'}"><navigator :url="'/pages/member/cart/Cart'" class='item'><image mode="aspectFit" src="../../../static/image/tab/icon_shopping_pre.png" class="img image" v-if="page.route=='pages/member/cart/Cart'"><image mode="aspectFit" v-else src="../../../static/image/tab/icon_shopping_nor.png" class="img image" /><text class='span text'>购物车</text></navigator></view>
  9. <view class='item-wrap' :class="{'active':page.route=='pages/member/index/Index'}"><navigator :url="'/pages/member/index/Index'" class='item'><image mode="aspectFit" src="../../../static/image/tab/icon_mine_pre.png" class="img image" v-if="page.route=='pages/member/index/Index'"><image mode="aspectFit" v-else src="../../../static/image/tab/icon_mine_nor.png" class="img image" /><text class='span text'>我的</text></navigator></view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'CommonStoreFooter',
  17. data () {
  18. return {
  19. page: '',
  20. }
  21. },
  22. props: ['store_id'],
  23. computed: {
  24. },
  25. mounted: function() {
  26. var pages = getCurrentPages()
  27. var page = pages[pages.length - 1]
  28. this.page = {
  29. route: page.route,
  30. options: page.options
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .image{
  37. width:1rem;
  38. height:1rem;
  39. display:block;
  40. margin-left:auto;
  41. margin-right:auto;
  42. margin-top:.2rem;
  43. margin-bottom:.2rem;
  44. }
  45. </style>