<template>
    <!-- 裂变浮层 -->
    <view
        v-if="floatFlow && floatFlow.imgUrl"
        class="activity-icon"
        @tap="onTabJump"
    >
        <image class="activity-icon__image" :src="floatFlow.imgUrl"/>
    </view>
</template>

<script>
import {navigate} from '@utils/navigate';
export default {
    config: {
        component: true
    },
    props: {
        floatFlow: {
            type: Object,
            default: () => {}
        }
    },
    methods: {
        onTabJump() {
            if (this.floatFlow && this.floatFlow.unifiUrl) {
                navigate({
                    url: this.floatFlow.unifiUrl
                });
            }
        }
    }
};
</script>

<style lang="less">
.activity-icon {
    width: 0.62rem;
    height: 0.68rem;
    position: fixed;
    right: 0.05rem;
    bottom: 60%;
    z-index: 10;
    &__image {
        width: 100%;
        height: 100%;
    }
}
</style>
