Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
于良
8 years ago
Commit
e1d87e2e03055d8ceee6d5c2687312c2802352c4
1 parent
2689915b
首页icon list不更新 fix ,个人中心活动不显示bug fix review by days
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
19 deletions
js/home/components/floor/AppIconList.js
js/home/components/floor/KidsBrandFloor.js
js/mine/reducers/mine/mineActions.js
js/home/components/floor/AppIconList.js
View file @
e1d87e2
...
...
@@ -28,7 +28,9 @@ export default class AppIconList extends React.Component {
}
shouldComponentUpdate
(
nextProps
){
if
(
Immutable
.
is
(
nextProps
.
resource
,
this
.
props
.
resource
))
{
if
(
Immutable
.
is
(
nextProps
.
data
,
this
.
props
.
data
)
&&
nextProps
.
backImage
==
this
.
props
.
backImage
&&
nextProps
.
number
==
this
.
props
.
number
)
{
return
false
;
}
else
{
return
true
;
...
...
js/home/components/floor/KidsBrandFloor.js
View file @
e1d87e2
...
...
@@ -37,7 +37,7 @@ export default class KidsBrandFloor extends Component {
}
shouldComponentUpdate
(
nextProps
)
{
if
(
Immutable
.
is
(
nextProps
.
resource
,
this
.
props
.
resource
))
{
if
(
Immutable
.
is
(
nextProps
.
data
,
this
.
props
.
data
))
{
return
false
;
}
else
{
return
true
;
...
...
js/mine/reducers/mine/mineActions.js
View file @
e1d87e2
...
...
@@ -457,22 +457,27 @@ export function getMineActivity() {
return
new
MineService
(
app
.
host
).
getMineActivity
()
.
then
(
json
=>
{
// 成功获取活动数据后,调用原生的getMineActivityWithClicked方法获取是否点击过该活动,决定页面是否展示小红点
ReactNative
.
NativeModules
.
YH_MineHelper
.
getMineActivityWithClicked
(
json
)
.
then
(
data
=>
{
// 如果成功获取到活动关联的小红点数据,那么就返回由原生方法返回的data数据
let
result
=
data
;
//result = '[{"act_id":28,"act_name":"邀请好友赢福利","isHasClicked":false,"state":1,"url":"http://m.yohobuy.com/activity/invite/index?act_id=28"},{"act_id":29,"act_name":"邀请好友赢福利","isHasClicked":false,"state":1,"url":"http://m.yohobuy.com/activity/invite/index?act_id=29"},{"act_id":30,"act_name":"邀请好友赢福利","isHasClicked":true,"state":0,"url":"http://m.yohobuy.com/activity/invite/index?act_id=30"}]';
if
(
Platform
.
OS
===
'android'
)
{
result
=
JSON
.
parse
(
result
);
}
dispatch
(
getMineActivitySuccess
(
result
));
})
.
catch
(
error
=>
{
// 如果未成功获取到活动关联的小红点数据,那么就返回由服务端成功获取到的json数据
dispatch
(
getMineActivitySuccess
(
json
));
});
if
(
Platform
.
OS
===
'ios'
)
{
dispatch
(
getMineActivitySuccess
(
json
));
}
else
{
// 成功获取活动数据后,调用原生的getMineActivityWithClicked方法获取是否点击过该活动,决定页面是否展示小红点
ReactNative
.
NativeModules
.
YH_MineHelper
.
getMineActivityWithClicked
(
json
)
.
then
(
data
=>
{
// 如果成功获取到活动关联的小红点数据,那么就返回由原生方法返回的data数据
let
result
=
data
;
//result = '[{"act_id":28,"act_name":"邀请好友赢福利","isHasClicked":false,"state":1,"url":"http://m.yohobuy.com/activity/invite/index?act_id=28"},{"act_id":29,"act_name":"邀请好友赢福利","isHasClicked":false,"state":1,"url":"http://m.yohobuy.com/activity/invite/index?act_id=29"},{"act_id":30,"act_name":"邀请好友赢福利","isHasClicked":true,"state":0,"url":"http://m.yohobuy.com/activity/invite/index?act_id=30"}]';
if
(
Platform
.
OS
===
'android'
)
{
result
=
JSON
.
parse
(
result
);
}
dispatch
(
getMineActivitySuccess
(
result
));
})
.
catch
(
error
=>
{
// 如果未成功获取到活动关联的小红点数据,那么就返回由服务端成功获取到的json数据
dispatch
(
getMineActivitySuccess
(
json
));
});
}
})
.
catch
(
error
=>
{
...
...
@@ -574,7 +579,7 @@ export function getMineAllIcon() {
return
(
dispatch
,
getState
)
=>
{
let
{
app
,
mine
}
=
getState
();
let
{
isFetching
,
open
}
=
mine
;
ReactNative
.
NativeModules
.
YH_MineHelper
.
getMineAllIcon
()
.
then
(
data
=>
{
let
result
=
data
;
...
...
Please
register
or
login
to post a comment