小程序端工程代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5 KiB

  1. <template>
  2. <view>
  3. <view class="footer-bg"></view>
  4. <view id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] ">
  5. <view
  6. class="item"
  7. :class="{ on: footerIndex == tabtarIndex }"
  8. v-for="(item, footerIndex) in footerList"
  9. :key="footerIndex"
  10. >
  11. <view
  12. class="iconfont"
  13. :class="item.icon1 + ' ' + (footerIndex == tabtarIndex ? item.icon2 : '')"
  14. ></view>
  15. <view>{{ item.name }}</view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import { mapState, mapMutations, mapActions } from "vuex";
  22. export default {
  23. name: "Footer",
  24. props: {},
  25. data: function() {
  26. return {
  27. footerList: [
  28. {
  29. name: "首页",
  30. icon1: "icon-shouye-xianxing",
  31. icon2: "icon-shouye",
  32. url: "/pages/home/index"
  33. },
  34. {
  35. name: "分类",
  36. icon1: "icon-yingyongchengxu-xianxing",
  37. icon2: "icon-yingyongchengxu",
  38. url: "/pages/shop/GoodsClass/index"
  39. },
  40. {
  41. name: "购物车",
  42. icon1: "icon-caigou-xianxing",
  43. icon2: "icon-caigou",
  44. url: "/pages/shop/ShoppingCart/index"
  45. },
  46. {
  47. name: "我的",
  48. icon1: "icon-yonghu-xianxing",
  49. icon2: "icon-yonghu",
  50. url: "/pages/user/User/index"
  51. }
  52. ],
  53. isIpx: false
  54. };
  55. },
  56. computed: {
  57. ...mapState(["tabtarIndex"])
  58. },
  59. methods: {
  60. },
  61. mounted() {
  62. }
  63. };
  64. </script>