<template>
  <div id="footer" class="acea-row row-middle">
    <router-link
      :to="item.url"
      class="item"
      :class="{ on: item.url === $route.path }"
      v-for="(item, index) in footerList"
      :key="index"
    >
      <div :class="item.url === $route.path ? item.icon2 : item.icon1"></div>
      <div>{{ item.name }}</div>
    </router-link>
  </div>
</template>
<script>
export default {
  name: "Footer",
  props: {},
  data: function() {
    return {
      footerList: [
        {
          name: "首页",
          icon1: "iconfont icon-shouye3 ",
          icon2: "iconfont icon-shouye2",
          url: "/"
        },
        {
          name: "钱包",
          icon1: "addfont icon-qianbao",
          icon2: "addfont icon-qianbao-face",
          url: "/user/account"
        },
        {
          name: "购物车",
          icon1: "addfont icon-gouwuche ",
          icon2: "addfont icon-gouwuche-face",
          url: "/cart"
        },
        {
          name: "我的",
          icon1: "iconfont icon-geren1 ",
          icon2: "iconfont icon-geren",
          url: "/user"
        }
      ]
    };
  },
  methods: {}
};
</script>
