Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
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
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
02eb0beb
Commit
02eb0beb
authored
Sep 23, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-20190920' into pre
parents
6eb3f339
fe5c1adc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
14 deletions
+43
-14
src/components/bargainMiddlePage/index.js
+2
-2
src/components/classify/courselist.js
+22
-3
src/components/classify/courselist.scss
+2
-1
src/components/search/index.js
+13
-6
src/components/search/searchHead.js
+4
-2
No files found.
src/components/bargainMiddlePage/index.js
View file @
02eb0beb
...
...
@@ -670,7 +670,7 @@ function BargainSecond(props) {
<
div
className
=
'bargain-second'
>
<
img
className
=
'top-img'
src
=
{
require
(
'./image/kanjia_cg_icon.png'
)}
alt
=
""
/>
<
p
className
=
'status-title'
>
厉害了,又帮好友砍掉
<
span
className
=
'ff4'
>
{
props
.
money
}
元
<
/span>!</
p
>
<
Link
className
=
'bargain-href'
to
=
'#bargainCourse'
onClick
=
{
props
.
close
}
>
我也要砍价
<
/Link
>
<
a
className
=
'bargain-href'
href
=
'#bargainCourse'
onClick
=
{
props
.
close
}
>
我也要砍价
<
/a
>
<
/div
>
)
}
...
...
@@ -681,7 +681,7 @@ function NotBargain(props) {
<
img
className
=
'middle-img'
src
=
{
require
(
'./image/kanjia_no_iccon.png'
)}
alt
=
""
/>
<
p
className
=
'status-title'
>
你的好友用【砍价神器】把我砍蒙圈了
<
br
/>
不能再砍了哦
~<
/p
>
<
p
className
=
'status-dec'
>
邀请
{
props
.
limitPeople
}
位以上好友帮忙砍价可获得【砍价神器】
<
/p
>
<
Link
className
=
'bargain-href'
to
=
'#bargainCourse'
onClick
=
{
props
.
close
}
>
我也要砍价
<
/Link
>
<
a
className
=
'bargain-href'
href
=
'#bargainCourse'
onClick
=
{
props
.
close
}
>
我也要砍价
<
/a
>
<
/div
>
)
}
...
...
src/components/classify/courselist.js
View file @
02eb0beb
...
...
@@ -6,7 +6,7 @@ import HeaderSearch from '../../common/HeaderSearch/index'
import
{
http
,
getParam
}
from
"@/utils"
import
Loading
from
'@/common/Loading'
import
{
connect
}
from
'react-redux'
;
import
{
StickyContainer
}
from
"react-sticky"
;
import
{
StickyContainer
,
Sticky
}
from
"react-sticky"
;
function
stopScroll
(
e
)
{
...
...
@@ -149,12 +149,12 @@ class Classify extends Component {
/
>
<
Loading
isLoading
=
{
this
.
state
.
isLoading
}
>
<
div
className
=
'class-content'
>
<
WhiteSpace
/>
{
/* <WhiteSpace/> */
}
<
div
onClick
=
{
this
.
pulldown
.
bind
(
this
)}
>
{
this
.
state
.
ispull
?
top
:
bottom
}
<
/div
>
<
StickyContainer
>
<
Tabs
{
/*
<Tabs
tabs={this.state.allClass}
animated={false}
page={page}
...
...
@@ -162,6 +162,25 @@ class Classify extends Component {
renderTabBar={props => <div className={'custom-render-bar'}>
<Tabs.DefaultTabBar {...props}/>
</div>}
> */
}
<
Tabs
tabs
=
{
this
.
state
.
allClass
}
animated
=
{
false
}
page
=
{
page
}
onChange
=
{(
tab
)
=>
this
.
ontabclick
(
tab
)}
renderTabBar
=
{
props
=>
{
return
(
<
Sticky
>
{({
style
})
=>
{
return
(
<
div
style
=
{{
...
style
,
top
:
'44px'
,
zIndex
:
1
}}
>
<
Tabs
.
DefaultTabBar
{...
props
}
/
>
<
/div
>
)
}}
<
/Sticky
>
)
}}
>
<
div
className
=
'tabs'
>
<
ul
>
...
...
src/components/classify/courselist.scss
View file @
02eb0beb
...
...
@@ -16,7 +16,8 @@ html,body,#root {
}
.class-content
{
padding
:
88px
12px
0
;
padding
:
44px
12px
0
;
// padding: 88px 12px 0;
position
:
relative
;
.custom-render-bar
{
...
...
src/components/search/index.js
View file @
02eb0beb
...
...
@@ -12,16 +12,19 @@ class Search extends PureComponent {
state
=
{
searchHistory
:
JSON
.
parse
(
localStorage
.
getItem
(
'searchHistory'
))
||
[],
hot_words
:
[],
defaultWord
:
''
,
searchList
:
[],
value
:
''
,
isLoading
:
true
}
async
componentDidMount
()
{
const
res
=
await
http
.
get
(
`
${
API
[
'search-api'
]}
/search_hot_word`
)
if
(
res
.
data
.
errno
===
0
)
{
const
res
=
await
http
.
get
(
`
${
API
[
'search-api'
]}
/search_hot_word`
);
const
{
errno
,
data
}
=
res
.
data
;
if
(
errno
===
0
)
{
this
.
setState
({
hot_words
:
res
.
data
.
data
.
info
.
hot_words
,
hot_words
:
data
.
info
.
hot_words
,
defaultWord
:
data
.
info
.
recommend_word
,
isLoading
:
false
})
}
...
...
@@ -39,11 +42,15 @@ class Search extends PureComponent {
}
handleSearch
=
()
=>
{
this
.
state
.
value
&&
this
.
props
.
history
.
push
(
`/search-result?word=
${
encodeURIComponent
(
this
.
state
.
value
)}
`
)
const
{
defaultWord
,
value
}
=
this
.
state
;
const
val
=
value
||
defaultWord
;
val
&&
this
.
props
.
history
.
push
(
`/search-result?word=
${
encodeURIComponent
(
val
)}
`
)
}
storeHistory
=
keyword
=>
{
localStorage
.
setItem
(
'searchHistory'
,
JSON
.
stringify
([...
this
.
state
.
searchHistory
,
keyword
]))
const
{
searchHistory
}
=
this
.
state
;
const
data
=
searchHistory
.
some
(
item
=>
item
===
keyword
)?
searchHistory
:
searchHistory
.
concat
([
keyword
]);
localStorage
.
setItem
(
'searchHistory'
,
JSON
.
stringify
(
data
));
}
...
...
@@ -53,7 +60,7 @@ class Search extends PureComponent {
<
div
className
=
"search-page"
>
<
SearchHead
searchHistory
=
{
this
.
state
.
searchHistory
}
value
=
{
this
.
state
.
value
}
value
=
{
this
.
state
.
value
||
this
.
state
.
defaultWord
}
handleChange
=
{
this
.
handleChange
}
handleSearch
=
{
this
.
handleSearch
}
/
>
...
...
src/components/search/searchHead.js
View file @
02eb0beb
...
...
@@ -25,8 +25,10 @@ class SearchHead extends PureComponent {
}
storeKeyword
=
()
=>
{
let
{
searchHistory
=
[],
value
}
=
this
.
props
value
&&
localStorage
.
setItem
(
'searchHistory'
,
JSON
.
stringify
([...
searchHistory
,
value
]))
const
{
searchHistory
=
[],
value
}
=
this
.
props
;
const
data
=
searchHistory
.
some
(
item
=>
item
===
value
)?
searchHistory
:
searchHistory
.
concat
([
value
]);
// value && localStorage.setItem('searchHistory', JSON.stringify([...searchHistory, value]))
localStorage
.
setItem
(
'searchHistory'
,
JSON
.
stringify
(
data
));
}
changeFontColor
=
(
isFocus
)
=>
{
...
...
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