component-shipinlv 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/AuthClient/qr/index.css.js +1 -1
  2. package/dist/UI/DialogDrawerFooter.css.js +1 -1
  3. package/dist/UI/FileSize.css.d.ts +5 -0
  4. package/dist/UI/FileSize.css.js +6 -0
  5. package/dist/UI/FileSize.d.ts +10 -0
  6. package/dist/UI/FileSize.js +63 -0
  7. package/dist/UI/LoadError.css.js +1 -1
  8. package/dist/UI/Time.d.ts +8 -0
  9. package/dist/UI/Time.js +19 -0
  10. package/dist/UI/duration.css.d.ts +5 -0
  11. package/dist/UI/duration.css.js +6 -0
  12. package/dist/UI/duration.d.ts +6 -0
  13. package/dist/UI/duration.js +49 -0
  14. package/dist/UI/text-input.d.ts +13 -0
  15. package/dist/UI/text-input.js +108 -0
  16. package/dist/UI/text-input.less +19 -0
  17. package/dist/VideoPublish/creat-task/index.css.d.ts +5 -0
  18. package/dist/VideoPublish/creat-task/index.css.js +6 -0
  19. package/dist/VideoPublish/creat-task/index.d.ts +8 -0
  20. package/dist/VideoPublish/creat-task/index.js +454 -0
  21. package/dist/VideoPublish/creat-task/select-list.css.d.ts +5 -0
  22. package/dist/VideoPublish/creat-task/select-list.css.js +6 -0
  23. package/dist/VideoPublish/creat-task/select-list.d.ts +8 -0
  24. package/dist/VideoPublish/creat-task/select-list.js +258 -0
  25. package/dist/VideoPublish/creat-task/task-list.css.d.ts +5 -0
  26. package/dist/VideoPublish/creat-task/task-list.css.js +6 -0
  27. package/dist/VideoPublish/creat-task/task-list.d.ts +9 -0
  28. package/dist/VideoPublish/creat-task/task-list.js +300 -0
  29. package/dist/VideoPublish/index.css.d.ts +5 -0
  30. package/dist/VideoPublish/index.css.js +6 -0
  31. package/dist/VideoPublish/index.d.ts +9 -0
  32. package/dist/VideoPublish/index.js +106 -0
  33. package/dist/VideoPublish/index.less +38 -0
  34. package/dist/VideoPublish/task-list/index.d.ts +7 -0
  35. package/dist/VideoPublish/task-list/index.js +120 -0
  36. package/dist/VideoPublish/task-list/index.less +5 -0
  37. package/dist/VideoPublish/video-account/index.d.ts +7 -0
  38. package/dist/VideoPublish/video-account/index.js +109 -0
  39. package/dist/VideoPublish/video-account/index.less +5 -0
  40. package/dist/asset/image/platform/bilibili.png +0 -0
  41. package/dist/asset/image/platform/douyin.png +0 -0
  42. package/dist/asset/image/platform/douyu.png +0 -0
  43. package/dist/asset/image/platform/huya.png +0 -0
  44. package/dist/asset/image/platform/kuaishou.png +0 -0
  45. package/dist/asset/image/platform/youtube.png +0 -0
  46. package/dist/component/media-kind.d.ts +10 -0
  47. package/dist/component/media-kind.js +24 -0
  48. package/dist/component/media-show.d.ts +13 -0
  49. package/dist/component/media-show.js +84 -0
  50. package/dist/component/media-show.less +53 -0
  51. package/dist/component/video-platform/logo.d.ts +22 -0
  52. package/dist/component/video-platform/logo.js +72 -0
  53. package/dist/component/video-platform/logo.less +42 -0
  54. package/dist/component/videoKindTag/index.d.ts +13 -0
  55. package/dist/component/videoKindTag/index.js +44 -0
  56. package/dist/global.less +4 -0
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.js +5 -0
  59. package/dist/join-client/index.css.js +1 -1
  60. package/dist/lib/Tool.d.ts +4 -1
  61. package/dist/lib/Tool.js +39 -0
  62. package/dist/lib/component/getImageUrl.d.ts +2 -0
  63. package/dist/lib/component/getImageUrl.js +8 -0
  64. package/dist/lib/component/getSoundUrl.d.ts +2 -0
  65. package/dist/lib/component/getSoundUrl.js +9 -0
  66. package/dist/lib/component/getVideoUrl.d.ts +2 -0
  67. package/dist/lib/component/getVideoUrl.js +9 -0
  68. package/dist/lib/isInClient.js +2 -1
  69. package/dist/lib/request.js +1 -1
  70. package/dist/lib/updateUserInfo.js +1 -0
  71. package/dist/renewal-vip/index.js +2 -1
  72. package/dist/service/api/VideoPublishController.d.ts +11 -0
  73. package/dist/service/api/VideoPublishController.js +85 -0
  74. package/dist/service/api/VideoPublishTaskController.d.ts +8 -0
  75. package/dist/service/api/VideoPublishTaskController.js +29 -0
  76. package/dist/types/VideoPublish.d.ts +112 -0
  77. package/dist/types/VideoPublish.js +0 -0
  78. package/dist/typings.d.ts +3 -0
  79. package/package.json +1 -1
@@ -0,0 +1,106 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useEffect, useState } from "react";
3
+ import "./index.less";
4
+ import { Menu, Tabs } from "antd";
5
+ import VideoPublishCreateTask from "./creat-task";
6
+ import isInClient from "../lib/isInClient";
7
+ import { ClockCircleOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
8
+ import VideoPublishVideoAccount from "./video-account";
9
+ import VideoPublishTaskList from "./task-list";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var VideoPublish = function VideoPublish(_ref) {
13
+ var productType = _ref.productType,
14
+ apiUrl = _ref.apiUrl,
15
+ env = _ref.env;
16
+ var _useState = useState([]),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ menuList = _useState2[0],
19
+ setMenuList = _useState2[1];
20
+ var _useState3 = useState(''),
21
+ _useState4 = _slicedToArray(_useState3, 2),
22
+ activeKey = _useState4[0],
23
+ setActiveKey = _useState4[1];
24
+ var _useState5 = useState([]),
25
+ _useState6 = _slicedToArray(_useState5, 2),
26
+ tabsItems = _useState6[0],
27
+ setTabsItems = _useState6[1];
28
+ var MenuAllList = [{
29
+ key: 'creat-task',
30
+ icon: /*#__PURE__*/_jsx(VideoCameraAddOutlined, {}),
31
+ label: '定时发布',
32
+ children: /*#__PURE__*/_jsx(VideoPublishCreateTask, {
33
+ productType: productType,
34
+ apiUrl: apiUrl,
35
+ env: env
36
+ })
37
+ }, {
38
+ key: 'task-list',
39
+ icon: /*#__PURE__*/_jsx(ClockCircleOutlined, {}),
40
+ label: '发布任务',
41
+ children: /*#__PURE__*/_jsx(VideoPublishTaskList, {
42
+ env: env
43
+ })
44
+ }, {
45
+ key: 'video-account',
46
+ icon: /*#__PURE__*/_jsx(UsergroupAddOutlined, {}),
47
+ label: '短视频账户',
48
+ children: /*#__PURE__*/_jsx(VideoPublishVideoAccount, {
49
+ env: env
50
+ })
51
+ }];
52
+ var onMenu = function onMenu(key) {
53
+ setActiveKey(key);
54
+ };
55
+ var onInit = function onInit() {
56
+ var _menuList$;
57
+ var tabsItems = [];
58
+ var menuList = [];
59
+ var isClient = isInClient();
60
+ MenuAllList.forEach(function (items) {
61
+ // 不渲染
62
+ if (isClient && items.key === 'media-space') {
63
+ return;
64
+ }
65
+ tabsItems.push(items);
66
+ menuList.push({
67
+ key: items.key,
68
+ icon: items.icon,
69
+ label: items.label
70
+ });
71
+ });
72
+ setTabsItems([].concat(tabsItems));
73
+ setMenuList([].concat(menuList));
74
+ setActiveKey(((_menuList$ = menuList[0]) === null || _menuList$ === void 0 ? void 0 : _menuList$.key) || '');
75
+ };
76
+ useEffect(function () {
77
+ onInit();
78
+ }, []);
79
+ return /*#__PURE__*/_jsxs("div", {
80
+ className: "videoPublish",
81
+ children: [/*#__PURE__*/_jsx("div", {
82
+ className: "menu",
83
+ children: /*#__PURE__*/_jsx(Menu, {
84
+ onClick: function onClick(e) {
85
+ return onMenu(e.key);
86
+ },
87
+ style: {
88
+ width: '100%'
89
+ },
90
+ mode: "inline"
91
+ // defaultSelectedKeys={[ activeKey ]}
92
+ ,
93
+ selectedKeys: [activeKey],
94
+ items: menuList
95
+ })
96
+ }), /*#__PURE__*/_jsx("div", {
97
+ className: "pageContents",
98
+ children: /*#__PURE__*/_jsx(Tabs, {
99
+ activeKey: activeKey,
100
+ className: "my-tabs",
101
+ items: tabsItems
102
+ })
103
+ })]
104
+ });
105
+ };
106
+ export default VideoPublish;
@@ -0,0 +1,38 @@
1
+ .videoPublish {
2
+ display: flex;
3
+ flex-direction: row;
4
+ height: 100%;
5
+
6
+ .menu {
7
+ display: flex;
8
+ flex-direction: column;
9
+ width: 180px;
10
+ margin: 0 12px 0 0;
11
+ padding: 0 10px 0 0;
12
+ min-height: 100%;
13
+ border-right: 1px solid #E8E8E8;
14
+
15
+ .ant-menu {
16
+ margin: 10px 0 0;
17
+ }
18
+
19
+ .ant-menu-light {
20
+ background-color: transparent !important;
21
+ border-right: none !important;
22
+ }
23
+ }
24
+
25
+ .pageContents {
26
+ flex: 1;
27
+ padding: 10px 0 0 0;
28
+ overflow-y: auto;
29
+
30
+ .my-tabs {
31
+ width: 100%;
32
+
33
+ > .ant-tabs-nav {
34
+ display: none;
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface Props {
4
+ env?: Global.Env;
5
+ }
6
+ declare const VideoPublishTaskList: React.FC<Props>;
7
+ export default VideoPublishTaskList;
@@ -0,0 +1,120 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from "react";
3
+ import "./index.less";
4
+ import PageContentWarp from "../../UI/PageContentWarp";
5
+ import { useRequest } from "@umijs/hooks";
6
+ import * as VideoPublishController from "../../service/api/VideoPublishController";
7
+ import { Popover, Table, Tag } from "antd";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { Fragment as _Fragment } from "react/jsx-runtime";
11
+ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
12
+ var env = _ref.env;
13
+ var _useState = useState([]),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ listData = _useState2[0],
16
+ setListData = _useState2[1];
17
+ var _useState3 = useState({
18
+ current: 1,
19
+ pageSize: 20,
20
+ total: 0,
21
+ simple: true
22
+ }),
23
+ _useState4 = _slicedToArray(_useState3, 2),
24
+ pagination = _useState4[0],
25
+ setPagination = _useState4[1];
26
+ var columns = [{
27
+ title: '序号',
28
+ dataIndex: '-',
29
+ key: '-',
30
+ render: function render(_, _1) {
31
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
32
+ return index + 1;
33
+ }
34
+ }, {
35
+ title: '编号',
36
+ dataIndex: 'id',
37
+ key: 'id'
38
+ }, {
39
+ title: '平台',
40
+ dataIndex: 'platform',
41
+ key: 'platform'
42
+ }, {
43
+ title: '名称',
44
+ dataIndex: 'nickname',
45
+ key: 'nickname',
46
+ render: function render(nickname, record) {
47
+ return /*#__PURE__*/_jsx(Popover, {
48
+ title: "\u6807\u9898",
49
+ content: nickname,
50
+ children: /*#__PURE__*/_jsxs("div", {
51
+ className: "title",
52
+ children: [nickname, /*#__PURE__*/_jsx("div", {
53
+ children: record === null || record === void 0 ? void 0 : record.accountId
54
+ })]
55
+ })
56
+ });
57
+ }
58
+ }, {
59
+ title: /*#__PURE__*/_jsx(_Fragment, {
60
+ children: "\u662F\u5426\u767B\u5F55"
61
+ }),
62
+ dataIndex: 'isLoginValid',
63
+ key: 'isLoginValid',
64
+ render: function render(isLoginValid, record) {
65
+ return isLoginValid ? /*#__PURE__*/_jsx(Tag, {
66
+ color: "green",
67
+ children: "\u5DF2\u767B\u5F55"
68
+ }) : /*#__PURE__*/_jsx(Tag, {
69
+ color: "red",
70
+ children: "\u672A\u767B\u5F55"
71
+ });
72
+ }
73
+ }, {
74
+ title: /*#__PURE__*/_jsx(_Fragment, {
75
+ children: "\u89C6\u9891\u6570\u91CF"
76
+ }),
77
+ dataIndex: 'videoCount',
78
+ key: 'videoCount'
79
+ }, {
80
+ title: '粉丝数',
81
+ dataIndex: 'followerCount',
82
+ key: 'followerCount'
83
+ }];
84
+ var _useRequest = useRequest(function () {
85
+ var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pagination.current;
86
+ return VideoPublishController.taskList({
87
+ current: 1,
88
+ pageSize: pagination.pageSize
89
+ }, {
90
+ env: env
91
+ });
92
+ }, {
93
+ onSuccess: function onSuccess(result) {
94
+ setListData(result.list);
95
+ setPagination(result.pagination);
96
+ }
97
+ }),
98
+ runTaskList = _useRequest.run,
99
+ loadingTaskList = _useRequest.loading,
100
+ errorTaskList = _useRequest.error;
101
+ return /*#__PURE__*/_jsx(PageContentWarp, {
102
+ loading: loadingTaskList,
103
+ error: errorTaskList,
104
+ onReload: runTaskList,
105
+ title: "\u53D1\u5E03\u4EFB\u52A1",
106
+ className: "videoPublishTaskList",
107
+ children: /*#__PURE__*/_jsx(Table, {
108
+ size: "small",
109
+ bordered: true,
110
+ rowKey: function rowKey(record) {
111
+ return "".concat(record.id);
112
+ },
113
+ loading: false,
114
+ columns: columns,
115
+ dataSource: listData,
116
+ pagination: false
117
+ })
118
+ });
119
+ };
120
+ export default VideoPublishTaskList;
@@ -0,0 +1,5 @@
1
+ .videoPublishVideoAccountList{
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface Props {
4
+ env?: Global.Env;
5
+ }
6
+ declare const VideoPublishVideoAccount: React.FC<Props>;
7
+ export default VideoPublishVideoAccount;
@@ -0,0 +1,109 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from "react";
3
+ import "./index.less";
4
+ import PageContentWarp from "../../UI/PageContentWarp";
5
+ import { useRequest } from "@umijs/hooks";
6
+ import * as VideoPublishController from "../../service/api/VideoPublishController";
7
+ import { Popover, Table, Tag } from "antd";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { Fragment as _Fragment } from "react/jsx-runtime";
11
+ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
12
+ var env = _ref.env;
13
+ var _useState = useState([]),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ listData = _useState2[0],
16
+ setListData = _useState2[1];
17
+ var columns = [{
18
+ title: '序号',
19
+ dataIndex: '-',
20
+ key: '-',
21
+ render: function render(_, _1) {
22
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
23
+ return index + 1;
24
+ }
25
+ }, {
26
+ title: '编号',
27
+ dataIndex: 'id',
28
+ key: 'id'
29
+ }, {
30
+ title: '平台',
31
+ dataIndex: 'platform',
32
+ key: 'platform'
33
+ }, {
34
+ title: '名称',
35
+ dataIndex: 'nickname',
36
+ key: 'nickname',
37
+ render: function render(nickname, record) {
38
+ return /*#__PURE__*/_jsx(Popover, {
39
+ title: "\u6807\u9898",
40
+ content: nickname,
41
+ children: /*#__PURE__*/_jsxs("div", {
42
+ className: "title",
43
+ children: [nickname, /*#__PURE__*/_jsx("div", {
44
+ children: record === null || record === void 0 ? void 0 : record.accountId
45
+ })]
46
+ })
47
+ });
48
+ }
49
+ }, {
50
+ title: /*#__PURE__*/_jsx(_Fragment, {
51
+ children: "\u662F\u5426\u767B\u5F55"
52
+ }),
53
+ dataIndex: 'isLoginValid',
54
+ key: 'isLoginValid',
55
+ render: function render(isLoginValid, record) {
56
+ return isLoginValid ? /*#__PURE__*/_jsx(Tag, {
57
+ color: "green",
58
+ children: "\u5DF2\u767B\u5F55"
59
+ }) : /*#__PURE__*/_jsx(Tag, {
60
+ color: "red",
61
+ children: "\u672A\u767B\u5F55"
62
+ });
63
+ }
64
+ }, {
65
+ title: /*#__PURE__*/_jsx(_Fragment, {
66
+ children: "\u89C6\u9891\u6570\u91CF"
67
+ }),
68
+ dataIndex: 'videoCount',
69
+ key: 'videoCount'
70
+ }, {
71
+ title: '粉丝数',
72
+ dataIndex: 'followerCount',
73
+ key: 'followerCount'
74
+ }];
75
+ var _useRequest = useRequest(function () {
76
+ return VideoPublishController.videoAccountList({
77
+ current: 1,
78
+ pageSize: 300 // 服务器 固定死了 300;
79
+ }, {
80
+ env: env
81
+ });
82
+ }, {
83
+ onSuccess: function onSuccess(result) {
84
+ setListData(result.list);
85
+ }
86
+ }),
87
+ runVideoAccount = _useRequest.run,
88
+ loadingVideoAccount = _useRequest.loading,
89
+ errorVideoAccount = _useRequest.error;
90
+ return /*#__PURE__*/_jsx(PageContentWarp, {
91
+ loading: loadingVideoAccount,
92
+ error: errorVideoAccount,
93
+ onReload: runVideoAccount,
94
+ title: "\u77ED\u89C6\u9891\u8D26\u6237",
95
+ className: "videoPublishVideoAccountList",
96
+ children: /*#__PURE__*/_jsx(Table, {
97
+ size: "small",
98
+ bordered: true,
99
+ rowKey: function rowKey(record) {
100
+ return "".concat(record.id);
101
+ },
102
+ loading: false,
103
+ columns: columns,
104
+ dataSource: listData,
105
+ pagination: false
106
+ })
107
+ });
108
+ };
109
+ export default VideoPublishVideoAccount;
@@ -0,0 +1,5 @@
1
+ .videoPublishVideoAccountList{
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ }
@@ -0,0 +1,10 @@
1
+ export declare const MediaSourceMineTypeList: {
2
+ image: string[];
3
+ video: string[];
4
+ audio: string[];
5
+ font: string[];
6
+ subtitle: string[];
7
+ };
8
+ type TypeKind = '' | 'image' | 'video' | 'audio' | 'font';
9
+ export declare const GetMineTypeByUrl: (url: string) => TypeKind;
10
+ export {};
@@ -0,0 +1,24 @@
1
+ import Tool from "../lib/Tool";
2
+ export var MediaSourceMineTypeList = {
3
+ image: ['image/jpeg', 'image/jpg', 'image/png', 'image/webp', 'image/gif', '.png', '.jpg', '.webp', '.gif'],
4
+ video: ['video/mp4', 'video/webm', '.mp4', '.webm', '.wmv', '.mov', '.mpeg', '.avi', '.mv4'],
5
+ audio: ['audio/mp3', '.mp3', '.wav', '.wma', '.aac', '.ogg', '.ape', '.flac'],
6
+ font: ['.ttf'],
7
+ subtitle: ['.txt'
8
+ // '.srt',
9
+ ]
10
+ };
11
+
12
+ export var GetMineTypeByUrl = function GetMineTypeByUrl(url) {
13
+ var fileExt = '.' + Tool.getFileExt(url).toLocaleLowerCase();
14
+ var typeKind = '';
15
+ for (var kind in MediaSourceMineTypeList) {
16
+ // @ts-ignore
17
+ var item = MediaSourceMineTypeList[kind];
18
+ if (item !== null && item !== void 0 && item.includes(fileExt)) {
19
+ // @ts-ignore
20
+ typeKind = kind;
21
+ }
22
+ }
23
+ return typeKind;
24
+ };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import './media-show.less';
3
+ interface Prop {
4
+ title?: string;
5
+ className?: string;
6
+ url: string;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ type TypeKind = 'video' | "image" | "font" | 'audio';
11
+ export declare const onMediaShowView: (title: string, url: string, typeKind: '' | TypeKind) => void;
12
+ declare const MediaShow: React.FC<Prop>;
13
+ export default MediaShow;
@@ -0,0 +1,84 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from "react";
3
+ import "./media-show.less";
4
+ import Tool from "../lib/Tool";
5
+ import { PlayCircleOutlined, SoundOutlined } from "@ant-design/icons";
6
+ import { GetMineTypeByUrl } from "./media-kind";
7
+ import getVideoUrl from "../lib/component/getVideoUrl";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ export var onMediaShowView = function onMediaShowView(title, url, typeKind) {
11
+ var mediaUrl = getVideoUrl(url);
12
+ Tool.drawer({
13
+ title: title,
14
+ content: /*#__PURE__*/_jsxs("div", {
15
+ className: "mediaShow",
16
+ children: [["image", "font"].includes(typeKind) && /*#__PURE__*/_jsx("div", {
17
+ className: "image",
18
+ style: {
19
+ backgroundImage: "url(\"".concat(mediaUrl, "\")")
20
+ }
21
+ }), typeKind === "audio" && /*#__PURE__*/_jsx("div", {
22
+ className: "audio",
23
+ children: /*#__PURE__*/_jsx("audio", {
24
+ controls: true,
25
+ autoPlay: true,
26
+ children: /*#__PURE__*/_jsx("source", {
27
+ src: mediaUrl
28
+ })
29
+ })
30
+ }), typeKind === "video" && /*#__PURE__*/_jsx("div", {
31
+ className: "video",
32
+ children: /*#__PURE__*/_jsx("video", {
33
+ width: "100%",
34
+ height: "100%",
35
+ controls: true,
36
+ autoPlay: true,
37
+ children: /*#__PURE__*/_jsx("source", {
38
+ src: mediaUrl
39
+ })
40
+ })
41
+ })]
42
+ }),
43
+ width: 580
44
+ });
45
+ };
46
+ var MediaShow = function MediaShow(_ref) {
47
+ var _ref$title = _ref.title,
48
+ title = _ref$title === void 0 ? '' : _ref$title,
49
+ className = _ref.className,
50
+ url = _ref.url,
51
+ width = _ref.width,
52
+ height = _ref.height;
53
+ var _useState = useState(GetMineTypeByUrl(url)),
54
+ _useState2 = _slicedToArray(_useState, 1),
55
+ typeKind = _useState2[0];
56
+ var ThumbUrlQuery = "?imageView2/0/w/".concat(width * 2);
57
+ return /*#__PURE__*/_jsxs("div", {
58
+ className: "mediaShow ".concat(className, " ").concat(url === '' ? 'hidden' : '', " "),
59
+ style: {
60
+ width: width,
61
+ height: height
62
+ },
63
+ onClick: function onClick() {
64
+ return onMediaShowView(title, url, typeKind);
65
+ },
66
+ children: [typeKind === "image" && /*#__PURE__*/_jsx("div", {
67
+ className: "image",
68
+ style: {
69
+ backgroundImage: "url(\"".concat(url).concat(ThumbUrlQuery, "\")")
70
+ }
71
+ }), typeKind === "audio" && /*#__PURE__*/_jsx("div", {
72
+ className: "audio",
73
+ children: /*#__PURE__*/_jsx(SoundOutlined, {
74
+ className: "icon"
75
+ })
76
+ }), typeKind === "video" && /*#__PURE__*/_jsx("div", {
77
+ className: "video",
78
+ children: /*#__PURE__*/_jsx(PlayCircleOutlined, {
79
+ className: "icon"
80
+ })
81
+ })]
82
+ });
83
+ };
84
+ export default MediaShow;
@@ -0,0 +1,53 @@
1
+ .mediaShow{
2
+ background-color: #F2F2F2;
3
+ display: flex;
4
+ flex-direction: column;
5
+ height: 100%;
6
+ cursor: pointer;
7
+ &.hidden{
8
+ display: none;
9
+ }
10
+ .image{
11
+ background-position: center;
12
+ background-repeat: no-repeat;
13
+ background-size: contain;
14
+ display: flex;
15
+ flex-direction: column;
16
+ height: 100%;
17
+ justify-content: center;
18
+ }
19
+
20
+ .audio{
21
+ position: relative;
22
+ display: flex;
23
+ flex-direction: column;
24
+ justify-content: center;
25
+ text-align: center;
26
+ border-radius: 3px;
27
+ margin: auto 0;
28
+ .icon{
29
+ margin: 0 auto;
30
+ color: #000;
31
+ font-size: 30px;
32
+ padding: 6px 0;
33
+ opacity: 0.8;
34
+ }
35
+ }
36
+
37
+ .video{
38
+ position: relative;
39
+ display: flex;
40
+ flex-direction: column;
41
+ height: 100%;
42
+ justify-content: center;
43
+ text-align: center;
44
+ background-color: #000;
45
+ border-radius: 3px;
46
+ .icon{
47
+ margin: 0 auto;
48
+ color: #FFF;
49
+ font-size: 28px;
50
+ opacity: 0.8;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import './logo.less';
3
+ interface Props {
4
+ platform: Global.VideoPlatformKind | '';
5
+ size?: number | string;
6
+ showName?: boolean;
7
+ className?: string;
8
+ disabled?: boolean;
9
+ }
10
+ interface VideoPlatformLogoList {
11
+ platform: Global.VideoPlatformKind;
12
+ name: string;
13
+ videoWebSiteUrl: string;
14
+ allowMainDomainList: string[];
15
+ }
16
+ interface VideoPlatformLogoDict {
17
+ [name: string]: VideoPlatformLogoList;
18
+ }
19
+ export declare const VideoPlatformLogoList: VideoPlatformLogoList[];
20
+ export declare const VideoPlatformLogoDict: VideoPlatformLogoDict;
21
+ declare const VideoPlatformLogo: React.FC<Props>;
22
+ export default VideoPlatformLogo;