|
|
|
@ -193,11 +193,32 @@ function InfoVideo (props) {
|
|
|
|
|
}
|
|
|
|
|
// TODO use封装
|
|
|
|
|
function onSortChange(key, index) {
|
|
|
|
|
const _item = _items[index]
|
|
|
|
|
_items.splice(index, 1)
|
|
|
|
|
_items.unshift(_item)
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const _item = _items[index];
|
|
|
|
|
_items.splice(index, 1);
|
|
|
|
|
_items.unshift(_item);
|
|
|
|
|
const keys = key.split('-');
|
|
|
|
|
const sorts = sortKey.split('-');
|
|
|
|
|
if (key === "published_at-desc") {
|
|
|
|
|
if (keys[1] === sorts[1]) {
|
|
|
|
|
setSortKey("published_at-asc")
|
|
|
|
|
} else {
|
|
|
|
|
setSortKey(key)
|
|
|
|
|
}
|
|
|
|
|
} else if (key === "published_at-asc") {
|
|
|
|
|
if (keys[1] === sorts[1]) {
|
|
|
|
|
setSortKey("published_at-desc")
|
|
|
|
|
} else {
|
|
|
|
|
setSortKey(key)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function getCopyText (file_url, cover_url) {
|
|
|
|
|
return `<video src="${file_url}" controls="true" controlslist="nodownload" width="${DEFAULT_VIDEO_WIDTH_IN_MD}" height="${DEFAULT_VIDEO_HEIGHT_IN_MD}" poster="${cover_url}">您的浏览器不支持 video 标签。</video>`
|
|
|
|
|
}
|
|
|
|
@ -264,7 +285,18 @@ function InfoVideo (props) {
|
|
|
|
|
border: 0px solid #4CACFF;
|
|
|
|
|
color: #4CACFF;
|
|
|
|
|
}
|
|
|
|
|
.whitepanelysllisyt {
|
|
|
|
|
width: 70px !important;
|
|
|
|
|
height: 48px !important;
|
|
|
|
|
line-height: 46px !important;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.whitepanelysllisyts {
|
|
|
|
|
width: 80px !important;
|
|
|
|
|
height: 48px !important;
|
|
|
|
|
line-height: 46px !important;
|
|
|
|
|
margin-left: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
@ -272,10 +304,12 @@ function InfoVideo (props) {
|
|
|
|
|
{...props}
|
|
|
|
|
categories={[{
|
|
|
|
|
key: 'all',
|
|
|
|
|
name: '全部视频'
|
|
|
|
|
name: '全部视频',
|
|
|
|
|
id: 1,
|
|
|
|
|
}, {
|
|
|
|
|
key: 'review',
|
|
|
|
|
name: '待审核视频'
|
|
|
|
|
name: '待审核视频',
|
|
|
|
|
id: 2
|
|
|
|
|
}]}
|
|
|
|
|
{...categoryObj}
|
|
|
|
|
|
|
|
|
|