<template>
	<div class="invite" @click="go"></div>
</template>
<script>
    import {getInfoByInclude} from '@/plugins/API/apiVote'
    import {mapGetters} from 'vuex'

	export default {
		data(){
            return {
                info: {},
            }
        },
        computed: {
            ...mapGetters({
                'type': 'type',
            	'userInfo': 'userInfo',
                'channelInfo': 'channelInfo'
            }),
        },
        mounted() {
        },
        methods: {
        	go(){
        		if(!this.userInfo.id){
                    this.$layer.msg('请先登录');
                    this.$Bus.$emit('bus-showLogin', true);
                }else{
                    let uin = this.channelInfo.uin;
                    let channelId = this.channelInfo.id;
                    let type = this.type;
                    let refererId = this.userInfo.id;
                    // let watchUrl = 
                    window.location.href = `/invote/?id=${channelId}&uin=${uin}&type=${type}&`;
                }
        	}
        },
        beforeDestroy(){
        },
	}
</script>
<style lang="less" scoped>
	.vote{
        position: relative;
        margin-bottom: 5px;
        height: 40px;
        background-size: 100% auto;
        background-image: url(./img/invite.png);
        background-repeat: no-repeat;
        background-position: 0 0;
	}
</style>