export default {
    methods: {
        getImg(imgs = '', type = '', size = 800) {
            if (!imgs) {
                imgs = ''
            }
            if (!(imgs instanceof Array)) {
                imgs = imgs.split(',')
            }

            imgs = imgs.filter(item => {
                return !!item
            })
            if (imgs.length > 0) {
                let img = type ? imgs[0][type] : imgs[0]
                // console.log(img);
                return img + (/\.gif$/i.test(img) ? '' : `?x-oss-process=image/resize,h_${size},m_lfit`)
            } else {
                return ''
            }
        },
        checkWebDriver(e) {
            if (window.navigator.webdriver == true || e.isTrusted == false) {
                return false
            } else {
                return true
            }
        },
        wait() {
            this.$toast('敬请期待...')
        }
    }
}
