Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
h5-communicate
frontend
Commits
f124542a
Commit
f124542a
authored
Jun 08, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
c36fc4a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
127 deletions
+184
-127
workspace.xml
.idea/workspace.xml
+122
-91
Backlog.jsx
src/pages/Backlog/Backlog.jsx
+17
-5
Notice.jsx
src/pages/Notice/Notice.jsx
+42
-4
Work.jsx
src/pages/Work/Work.jsx
+3
-27
No files found.
.idea/workspace.xml
View file @
f124542a
...
...
@@ -3,9 +3,9 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"a6d092de-b4f8-454d-99f5-4dac3ce112e5"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.tmp/"
/>
<ignored
path=
"$PROJECT_DIR$/temp/"
/>
...
...
@@ -21,8 +21,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-627
"
>
<caret
line=
"
79"
column=
"55"
selection-start-line=
"79"
selection-start-column=
"7"
selection-end-line=
"79"
selection-end-column=
"55
"
/>
<state
relative-caret-position=
"
423
"
>
<caret
line=
"
49"
column=
"49"
selection-start-line=
"49"
selection-start-column=
"41"
selection-end-line=
"49"
selection-end-column=
"49
"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
...
...
@@ -33,10 +33,31 @@
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
248
"
>
<caret
line=
"
22"
column=
"37"
selection-start-line=
"22"
selection-start-column=
"25"
selection-end-line=
"22"
selection-end-column=
"37
"
/>
<state
relative-caret-position=
"
375
"
>
<caret
line=
"
42"
column=
"29"
selection-start-line=
"42"
selection-start-column=
"29"
selection-end-line=
"42"
selection-end-column=
"29
"
/>
<folding>
<element
signature=
"e#0#38#0"
expanded=
"true"
/>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"225"
>
<caret
line=
"12"
column=
"27"
lean-forward=
"true"
selection-start-line=
"12"
selection-start-column=
"27"
selection-end-line=
"12"
selection-end-column=
"27"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/utils/instance.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"350"
>
<caret
line=
"41"
column=
"32"
selection-start-line=
"41"
selection-start-column=
"32"
selection-end-line=
"41"
selection-end-column=
"32"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
@@ -51,14 +72,26 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Work/Work.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"100"
>
<caret
line=
"37"
column=
"29"
lean-forward=
"true"
selection-start-line=
"37"
selection-start-column=
"29"
selection-end-line=
"37"
selection-end-column=
"29"
/>
<folding>
<element
signature=
"e#0#40#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component
name=
"FileTemplateManagerImpl"
>
<option
name=
"RECENT_TEMPLATES"
>
<list>
<option
value=
"JavaScript File"
/>
<option
value=
"Less File"
/>
<option
value=
"React jsx"
/>
<option
value=
"JavaScript File"
/>
</list>
</option>
</component>
...
...
@@ -108,7 +141,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/src/components/List/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Adjunct.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Option.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Flow.jsx"
/>
...
...
@@ -147,10 +179,8 @@
<option
value=
"$PROJECT_DIR$/src/components/AddressList/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/SubmitDetail.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/AddressList/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/Pro.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/NoticeTab/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/StepCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/TopSearch/index.jsx"
/>
...
...
@@ -158,6 +188,9 @@
<option
value=
"$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/utils/urlQuery.js"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
/>
</list>
</option>
...
...
@@ -200,6 +233,13 @@
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"components"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"components"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"TopSearch"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
...
...
@@ -212,6 +252,13 @@
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"pages"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"pages"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Backlog"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
...
...
@@ -279,12 +326,12 @@
<workItem
from=
"1591406085733"
duration=
"5474000"
/>
<workItem
from=
"1591419899087"
duration=
"268000"
/>
<workItem
from=
"1591493817957"
duration=
"11217000"
/>
<workItem
from=
"1591579020550"
duration=
"
23731
000"
/>
<workItem
from=
"1591579020550"
duration=
"
31796
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"1
26546
000"
/>
<option
name=
"totallyTimeSpent"
value=
"1
34611
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-8"
y=
"-8"
width=
"1382"
height=
"784"
extended-state=
"6"
/>
...
...
@@ -315,33 +362,6 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Basic.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"198"
>
<caret
line=
"25"
column=
"12"
selection-start-line=
"25"
selection-start-column=
"12"
selection-end-line=
"25"
selection-end-column=
"12"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Flow.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
<caret
line=
"5"
column=
"12"
selection-start-line=
"5"
selection-start-column=
"12"
selection-end-line=
"5"
selection-end-column=
"12"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/Adjunct/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"520"
>
<caret
line=
"22"
column=
"20"
selection-start-line=
"22"
selection-start-column=
"20"
selection-end-line=
"22"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/Adjunct/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-125"
>
...
...
@@ -365,16 +385,6 @@
<entry
file=
"file://$PROJECT_DIR$/src/resize.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/layout/BlankLayout.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"7"
column=
"14"
lean-forward=
"true"
selection-start-line=
"7"
selection-start-column=
"14"
selection-end-line=
"7"
selection-end-column=
"14"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/index.css"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"475"
>
...
...
@@ -534,23 +544,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Work/Work.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
<caret
line=
"5"
lean-forward=
"true"
selection-start-line=
"5"
selection-end-line=
"5"
/>
<folding>
<element
signature=
"e#0#39#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"50"
>
<caret
line=
"5"
selection-start-line=
"5"
selection-end-line=
"5"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"400"
>
...
...
@@ -593,16 +586,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopSearch/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"275"
>
<caret
line=
"14"
column=
"25"
lean-forward=
"true"
selection-start-line=
"14"
selection-start-column=
"25"
selection-end-line=
"14"
selection-end-column=
"25"
/>
<folding>
<element
signature=
"e#0#39#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/config-overrides.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
...
...
@@ -658,48 +641,96 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
src/layout/CommonLayout.jsx
"
>
<entry
file=
"file://$PROJECT_DIR$/
package.json
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"22"
column=
"21"
lean-forward=
"true"
selection-start-line=
"22"
selection-start-column=
"21"
selection-end-line=
"22"
selection-end-column=
"21"
/>
<caret
line=
"7"
column=
"23"
selection-start-line=
"7"
selection-start-column=
"23"
selection-end-line=
"7"
selection-end-column=
"23"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Work/Work.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"100"
>
<caret
line=
"37"
column=
"29"
lean-forward=
"true"
selection-start-line=
"37"
selection-start-column=
"29"
selection-end-line=
"37"
selection-end-column=
"29"
/>
<folding>
<element
signature=
"e#0#4
9
#0"
expanded=
"true"
/>
<element
signature=
"e#0#4
0
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<entry
file=
"file://$PROJECT_DIR$/src/utils/urlQuery.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopSearch/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"10"
column=
"18"
selection-start-line=
"10"
selection-start-column=
"18"
selection-end-line=
"10"
selection-end-column=
"18"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils/utils.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils/request.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"350"
>
<caret
line=
"14"
column=
"15"
selection-start-line=
"14"
selection-start-column=
"15"
selection-end-line=
"14"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils/instance.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"350"
>
<caret
line=
"41"
column=
"32"
selection-start-line=
"41"
selection-start-column=
"32"
selection-end-line=
"41"
selection-end-column=
"32"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-627"
>
<caret
line=
"79"
column=
"55"
selection-start-line=
"79"
selection-start-column=
"7"
selection-end-line=
"79"
selection-end-column=
"55"
/>
<state
relative-caret-position=
"225"
>
<caret
line=
"12"
column=
"27"
lean-forward=
"true"
selection-start-line=
"12"
selection-start-column=
"27"
selection-end-line=
"12"
selection-end-column=
"27"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/layout/CommonLayout.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"148"
>
<caret
line=
"41"
column=
"35"
selection-start-line=
"41"
selection-start-column=
"21"
selection-end-line=
"41"
selection-end-column=
"35"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/
utils/instance.js
"
>
<entry
file=
"file://$PROJECT_DIR$/src/
layout/BlankLayout.jsx
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-2141"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"7"
column=
"14"
lean-forward=
"true"
selection-start-line=
"7"
selection-start-column=
"14"
selection-end-line=
"7"
selection-end-column=
"14"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
package.json
"
>
<entry
file=
"file://$PROJECT_DIR$/
src/pages/EventProcessing/Process.jsx
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"7"
column=
"23"
selection-start-line=
"7"
selection-start-column=
"23"
selection-end-line=
"7"
selection-end-column=
"23"
/>
<state
relative-caret-position=
"423"
>
<caret
line=
"49"
column=
"49"
selection-start-line=
"49"
selection-start-column=
"41"
selection-end-line=
"49"
selection-end-column=
"49"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
248
"
>
<caret
line=
"
22"
column=
"37"
selection-start-line=
"22"
selection-start-column=
"25"
selection-end-line=
"22"
selection-end-column=
"37
"
/>
<state
relative-caret-position=
"
375
"
>
<caret
line=
"
42"
column=
"29"
selection-start-line=
"42"
selection-start-column=
"29"
selection-end-line=
"42"
selection-end-column=
"29
"
/>
<folding>
<element
signature=
"e#0#
38
#0"
expanded=
"true"
/>
<element
signature=
"e#0#
49
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
src/pages/Backlog/Backlog.jsx
View file @
f124542a
...
...
@@ -4,7 +4,8 @@ import TodoCard from '../../components/LogCard'
import
TopSearch
from
'../../components/TopSearch'
const
Backlog
=
(
props
)
=>
{
const
[
current
,
setCurrent
]
=
useState
()
const
[
current
,
setCurrent
]
=
useState
(
1
);
const
[
searchWord
,
setSearchWord
]
=
useState
()
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
...
@@ -13,6 +14,13 @@ const Backlog = (props) => {
const
checkLog
=
()
=>
{
props
.
history
.
push
(
`/blank/info/example/1`
)
};
const
getData
=
()
=>
{
setLoading
(
false
)
const
pageMap
=
{
searchWord
,
nowPage
:
current
,
pageSize
:
10
}
let
result
=
data
.
concat
([{},
{},
{},
{},
{},
{}])
setData
(
result
)
setCurrent
(
current
+
1
)
};
//下拉加载
const
handleScroll
=
()
=>
{
...
...
@@ -20,15 +28,19 @@ const Backlog = (props) => {
const
top
=
event
.
scrollTop
;
const
scrollHeight
=
event
.
scrollHeight
;
const
clientHeight
=
event
.
clientHeight
;
console
.
log
(
top
,
scrollHeight
,
clientHeight
);
if
(
top
+
clientHeight
===
scrollHeight
)
{
set
Data
([...
data
,
{},
{},
{},
{},
{},
{}])
// setCurrent(current + 1
)
set
Loading
(
true
);
getData
(
)
}
};
useEffect
(()
=>
{
window
.
addEventListener
(
'scroll'
,
handleScroll
,
true
);
return
()
=>
window
.
removeEventListener
(
'scroll'
,
handleScroll
,
true
);
},
[
data
]);
useEffect
(()
=>
{
const
element
=
document
.
getElementById
(
'common-content'
)
element
.
scrollTo
(
0
,
0
)
},
[])
return
(
...
...
@@ -39,7 +51,7 @@ const Backlog = (props) => {
animating=
{
loading
}
/>
<
WhiteSpace
/>
<
TopSearch
onSearch=
{
val
=>
console
.
log
(
val
)
}
/>
<
TopSearch
onSearch=
{
setSearchWord
}
/>
{
data
.
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
...
...
src/pages/Notice/Notice.jsx
View file @
f124542a
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
ActivityIndicator
,
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
import
TodoCard
from
'../../components/LogCard'
import
TopNotice
from
'../../components/NoticeTab'
const
Notice
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
current
,
setCurrent
]
=
useState
(
1
);
const
[
searchWord
,
setSearchWord
]
=
useState
()
const
[
data
,
setData
]
=
useState
([{},{},{},{},{},{}]);
const
getData
=
()
=>
{
setLoading
(
false
)
const
pageMap
=
{
searchWord
,
nowPage
:
current
,
pageSize
:
10
}
let
result
=
data
.
concat
([{},
{},
{},
{},
{},
{}])
setData
(
result
)
setCurrent
(
current
+
1
)
};
//下拉加载
const
handleScroll
=
()
=>
{
const
event
=
document
.
getElementById
(
"common-content"
)
const
top
=
event
.
scrollTop
;
const
scrollHeight
=
event
.
scrollHeight
;
const
clientHeight
=
event
.
clientHeight
;
if
(
top
+
clientHeight
===
scrollHeight
)
{
setLoading
(
true
);
getData
()
}
};
useEffect
(()
=>
{
window
.
addEventListener
(
'scroll'
,
handleScroll
,
true
);
return
()
=>
window
.
removeEventListener
(
'scroll'
,
handleScroll
,
true
);
},
[
data
]);
const
checkLog
=
()
=>
{
props
.
history
.
push
(
`/blank/info/example/1`
)
};
return
(
<
WingBlank
>
<
ActivityIndicator
...
...
@@ -15,8 +46,15 @@ const Notice = (props) => {
/>
<
WhiteSpace
/>
<
TopNotice
/>
<
WhiteSpace
/>
<
TodoCard
/>
{
data
.
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
WhiteSpace
/>
<
TodoCard
data=
{
item
}
onClick=
{
checkLog
}
/>
</
div
>
))
}
</
WingBlank
>
);
};
...
...
src/pages/Work/Work.jsx
View file @
f124542a
...
...
@@ -16,36 +16,21 @@ const Work = () => {
const
commonEdit
=
()
=>
{
setAddStatus
(
!
addStatus
);
};
const
workSearch
=
(
val
)
=>
{
console
.
log
(
val
)
};
const
itemAdd
=
(
id
,
arr
,
arr2
)
=>
{
// const item = arr2.filter(item => item.id === id);
// arr.splice(arr.length - 1, 0, item[0]);
};
const
itemSlice
=
(
id
,
arr
,
arr2
)
=>
{
// const index = arr.findIndex(item => item.id == id);
// index > -1 && arr.splice(index, 1);
};
//测试数据
const
data222
=
Array
.
from
(
new
Array
(
7
)).
map
((
_val
,
i
)
=>
({
id
:
`name
${
i
}
`
,
icon
:
'/img/test/test.png'
,
text
:
`name
${
i
}
`
,
}));
const
data22222
=
Array
.
from
(
new
Array
(
7
)).
map
((
_val
,
i
)
=>
({
id
:
`name2
${
i
}
`
,
icon
:
'/img/test/test-1.png'
,
text
:
`name
${
i
}
`
,
}));
console
.
log
(
data
);
return
(
<
WingBlank
>
<
ActivityIndicator
...
...
@@ -56,15 +41,6 @@ const Work = () => {
<
WhiteSpace
/>
<
TopSearch
onSearch=
{
workSearch
}
/>
<
WhiteSpace
/>
<
WorkCard
type=
"edit"
title=
"常用板块"
addCommon=
{
commonEdit
}
addStatus=
{
addStatus
}
data=
{
data222
}
iconAction=
{
itemSlice
}
/>
<
WhiteSpace
/>
<
WorkCard
title=
"事物管理"
addCommon=
{
commonEdit
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment