| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <div id="deFooter" class="de-footer">
- <div class="btn-list-wrap">
- <div class="btn_list" v-for="(item, index) in btnData" :key="index" @click="pageTo(item)" v-show="item.judge()">
- <div class="btn_blo active" v-if="index == activeIndex">
- <div class="btn-img-wrap">
- <img class="btn_img" :src="constant.imgUrl + item.activeImg" alt mode="widthFix" />
- </div>
- <div class="btn_text">{{ item.text }}</div>
- <!-- <img class="btn_img" :src="constant.imgUrl + item.activeImg" alt mode="widthFix" /> -->
- </div>
- <div class="btn_blo" v-else>
- <div class="btn-img-wrap">
- <img class="btn_img" :src="constant.imgUrl + item.img" alt mode="widthFix" />
- </div>
- <div class="btn_text">{{ item.text }}</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters, mapState } from 'vuex'
- import { jumpShop } from '@/utils/common'
- export default {
- name: 'Defooter',
- components: {},
- props: {
- activeIndex: {
- type: Number,
- default: 0
- }
- },
- data() {
- return {
- constant: this.$constant,
- btnData: [
- {
- text: '首页',
- url: '/pages/home/index',
- img: 'common/tool_no.png',
- activeImg: 'common/tool_is.png',
- judge: () => true
- },
- {
- text: '分类',
- url: '/pages/category/index',
- img: 'common/tool_no.png',
- activeImg: 'common/tool_is.png',
- judge: () => true
- },
- {
- text: '门店',
- url: '/pages/shop/index',
- img: 'common/member_no.png',
- activeImg: 'common/member_is.png',
- judge: () => true
- },
- {
- text: '我的',
- url: '/pages/center/index',
- img: 'common/center_no.png',
- activeImg: 'common/center_is.png',
- judge: () => true
- }
- ]
- }
- },
- computed: {
- ...mapGetters({ userInfo: 'getUser' })
- },
- mounted() {
- },
- methods: {}
- }
- </script>
- <style scoped lang="scss">
- .de-footer {
- // height: 100%;
- position: fixed;
- left: 0;
- bottom: 0;
- display: flex;
- align-items: center;
- width: 100%;
- height: 100px;
- background-color: #fff;
- box-shadow: -1px -1px 10px #cccccc; /*no*/
- z-index: 100;
- .btn-list-wrap {
- width: 100%;
- @include disFlex(center, space-around);
- .btn_list {
- width: 30%;
- }
- .btn_blo {
- color: $fontColor3;
- .btn-img-wrap {
- width: 44px !important;
- margin: 0 auto;
- }
- .btn_img {
- width: 100%;
- height: auto;
- }
- .btn_text {
- transform: scale(0.8);
- text-align: center;
- }
- }
- .active {
- .btn_text {
- color: $mainColor;
- }
- }
- }
- }
- </style>
|