From d7866bf6b327018b67bcd6c01726c08c25a733a7 Mon Sep 17 00:00:00 2001 From: ly525 Date: Mon, 13 Jan 2020 00:44:46 +0800 Subject: [PATCH] remove pixabay library from video gallery --- .../core/support/video-gallery/gallery.js | 9 --- .../support/video-gallery/tabs/pixabay.js | 77 ------------------- 2 files changed, 86 deletions(-) delete mode 100644 front-end/h5/src/components/core/support/video-gallery/tabs/pixabay.js diff --git a/front-end/h5/src/components/core/support/video-gallery/gallery.js b/front-end/h5/src/components/core/support/video-gallery/gallery.js index fbf6014d..7bf17d8e 100644 --- a/front-end/h5/src/components/core/support/video-gallery/gallery.js +++ b/front-end/h5/src/components/core/support/video-gallery/gallery.js @@ -1,6 +1,5 @@ import './gallery.scss' import PersonalTab from './tabs/personal.js' -import PixabayTab from './tabs/pixabay.js' export default { name: 'lbs-video-gallery', @@ -22,10 +21,6 @@ export default { value: 'personal', label: '我的视频' } - // { - // value: 'pixabay', - // label: 'Pixabay图库' - // } ], activeTab: 'personal', innerVisible: false, @@ -58,10 +53,6 @@ export default { return { this.handleSelectImage(item) }}/> - case 'pixabay': - return { - this.handleSelectImage(item) - }}/> } }, renderDefaultActivator () { diff --git a/front-end/h5/src/components/core/support/video-gallery/tabs/pixabay.js b/front-end/h5/src/components/core/support/video-gallery/tabs/pixabay.js deleted file mode 100644 index 005bfcb7..00000000 --- a/front-end/h5/src/components/core/support/video-gallery/tabs/pixabay.js +++ /dev/null @@ -1,77 +0,0 @@ -import axios from 'axios' -import ImageItem from '../components/image-item.js' - -export default { - data: () => ({ - items: [], - loading: false, - options: { - key: '12120348-2ad26e4cc05d9bc068097ab3b', // pixabay demo key from https://pixabay.com/zh/service/about/api/ - image_type: 'photo', - pretty: true, - q: 'yellow+flowers', - orientation: 'all' // "all", "horizontal", "vertical" - } - }), - computed: { - isVertial () { - return this.options.orientation === 'vertical' - } - }, - methods: { - queryAPI () { - axios - .get('https://pixabay.com/api/', { params: this.options }) - .then(res => { - this.items = res.data.hits - }) - } - }, - render (h) { - return ( -
- - -
- - { - this.options.orientation = key - this.queryAPI() - }}> - 任意方位 - 水平 - 竖直 - - - 图片方向 - - - { - this.options.q = value - this.queryAPI() - }} - /> -
- ( - { - this.$emit('changeItem', item) - }}> - - - )} - > - -
-
-
- ) - }, - mounted () { - this.queryAPI() - } -}