module.exports = function showToast({type, icon, image, title, duration}){ if (this.$refs && this.$refs.toast) { this.$refs.toast.open({type, content:title, duration}) }else { // #ifndef APP-PLUS if (!image){ image = `../static/Common.${type?type:'info'}.png` } uni.showToast({icon, image, title, duration}) // #endif // #ifdef APP-PLUS if (uni.getSystemInfoSync().platform==='android') { uni.showToast({icon:'none', title, duration}) } // #endif } }