export default {
    methods: {
        goNext(info, props = '') {
            if (info.link && info.linkType === 'collection') {
                this.$router.push(`/productDetail?collectionId=${info.linkContent}${props}`);
            } else if (info.link && info.linkType === 'user') {
                this.$router.push(`/creatorDetail?id=${info.linkContent}${props}`);
            } else if (info.link && info.linkType === 'activity') {
                this.$router.push(`/activityDetail?id=${info.linkContent}${props}`);
            } else if (info.link && info.linkType === 'collections') {
                this.$router.push(`/productSearch?search=${info.linkContent}${props}`);
            } else if(info.link && info.linkType === 'externalLink') {
                if (info.linkContent.indexOf('http') !== -1) {
                    window.location.href = info.linkContent;
                } else {
                    this.$router.push(`${info.linkContent}${props}`);
                }
            }
        }
    }
};
