From e0726db96a4c163082cbd32da714f33f2fdedcec Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 16 Mar 2020 19:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E8=8F=9C=E5=8D=95=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/Video/video-play/index.jsx | 3 +++ .../tpm/shixuns/shixun-search-bar/A.jsx | 2 +- .../tpm/shixuns/shixun-search-bar/index.jsx | 24 ++++++++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/Video/video-play/index.jsx b/public/react/src/modules/courses/Video/video-play/index.jsx index 8c3a2eb20..e33439dcf 100644 --- a/public/react/src/modules/courses/Video/video-play/index.jsx +++ b/public/react/src/modules/courses/Video/video-play/index.jsx @@ -177,6 +177,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => { el.current.removeEventListener('seeking', onSeeking) el.current.removeEventListener('seeked', onSeeked) el.current.removeEventListener('timeupdate', onTimeupdate) + if(el.current.playing) { + log() + } } }, [el, src]) diff --git a/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx b/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx index 7e933462e..4757cfecf 100644 --- a/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx +++ b/public/react/src/modules/tpm/shixuns/shixun-search-bar/A.jsx @@ -6,6 +6,6 @@ export default ({ callback(id) } return ( - {text} + {text} ) } \ No newline at end of file diff --git a/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx b/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx index c58ae81aa..0430149a7 100644 --- a/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx +++ b/public/react/src/modules/tpm/shixuns/shixun-search-bar/index.jsx @@ -12,13 +12,13 @@ const DiffObject = [ { id: 3, text: '中高级' }, { id: 4, text: '高级' } ] -export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { +export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist,parsedid,newpalce }) => { const [data, setData] = useState({ diff: 0, - searchValue: 'a', + searchValue: newpalce || 'a', navs: [], searchKey: '', - childValue: '' + childValue:parsedid }) const { diff, searchValue, navs, childValue, searchKey } = data function diffSearch(diff) { @@ -28,6 +28,15 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { }) StatusEnquiry([{ 'type': 2 }, { 'value': diff }]) } + useEffect(() => { + setData({ + ...data, + searchValue: newpalce || 'a', + childValue: parsedid + }) + },[ + newpalce,navs,parsedid + ]) function onSearchAll() { if (searchValue !== 'a') { setData({ ...data, searchValue: 'a', childValue: '' }) @@ -61,12 +70,12 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { function overlayMenu(item, id) { return { - item.map((list, k) => -
+ item.map((list, k) => +
{list.name}
{ - list.tags.map((tag, e) => {tag.name} + list.tags.map((tag, e) => {tag.name} ) }
@@ -84,7 +93,6 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => { } init() }, []) - // item.id < 4 ? "bottomRight" : item.id >= 8 ? "bottomLeft" : "bottomCenter" return (
@@ -111,7 +119,7 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
筛选:
- {DiffObject.map(item => )} + {DiffObject.map(item => )}