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
盖剑秋
9 years ago
Commit
ba704a3b7298271e8ac8dd4657f82ca6510d4e79
1 parent
8f92e458
通过sid取section。reviewed by 于良。
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
js/community/Community.js
js/community/containers/PostingContainer.js
js/community/reducers/posting/postingActions.js
js/community/Community.js
View file @
ba704a3
...
...
@@ -320,18 +320,6 @@ export default function community(platform) {
state
.
dispatch
(
startEditPost
(
state
.
getPostingState
()));
},
pushPostingWithUID
(
uid
)
{
new
PostingService
().
getPostUser
(
uid
).
then
(
json
=>
{
if
(
json
.
forbidSpeaking
===
'Y'
)
{
Alert
.
alert
(
'抱歉'
,
'您暂时被禁言,请等待禁言解除哦~'
);
}
else
{
Actions
.
Posting
();
}
}).
catch
(
error
=>
{
Actions
.
Posting
();
});
},
/*
* 自定义导航push动画
*
...
...
js/community/containers/PostingContainer.js
View file @
ba704a3
...
...
@@ -64,14 +64,16 @@ class PostingContainer extends Component{
}
componentDidMount
()
{
if
(
this
.
props
.
section
.
name
.
length
&&
this
.
props
.
section
.
id
>
0
)
{
this
.
boardSelectedWithName
(
this
.
props
.
section
.
name
,
this
.
props
.
section
.
id
);
}
else
{
if
(
this
.
props
.
section
.
sid
>-
1
)
{
let
section
=
this
.
props
.
section
.
items
.
get
(
this
.
sid
);
this
.
boardSelectedWithName
(
section
.
name
,
section
.
id
);
}
else
{
InteractionManager
.
runAfterInteractions
(()
=>
{
this
.
_onGetBordList
();
});
}
if
(
shouldHideTabBar
(
this
.
props
.
navigationState
))
{
NativeModules
.
YH_CommunityHelper
.
hideTabBar
();
}
...
...
@@ -120,6 +122,11 @@ class PostingContainer extends Component{
this
.
props
.
actions
.
contentEdited
(
content
);
}
render
()
{
let
fromSection
=
false
;
if
(
this
.
props
.
section
.
sid
>-
1
)
{
let
section
=
this
.
props
.
section
.
items
.
get
(
this
.
sid
);
fromSection
=
section
.
name
.
length
&&
section
.
id
>
0
;
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
Posting
...
...
@@ -132,7 +139,7 @@ class PostingContainer extends Component{
contentEdited
=
{
this
.
contentEdited
}
titleValue
=
{
this
.
props
.
posting
.
title
}
contentValue
=
{
this
.
props
.
posting
.
content
}
fromSection
=
{
this
.
props
.
section
.
name
.
length
&&
this
.
props
.
section
.
id
>
0
}
fromSection
=
{
fromSection
}
/
>
<
/View
>
);
...
...
js/community/reducers/posting/postingActions.js
View file @
ba704a3
...
...
@@ -70,9 +70,13 @@ function drillToEditPostPage(uid,postingPageFunc) {
if
(
json
.
forbidSpeaking
===
'Y'
)
{
Alert
.
alert
(
'抱歉'
,
'您暂时被禁言,请等待禁言解除哦~'
);
}
else
{
console
.
log
(
'yyyyyyyyyyyyyyyyyyy'
);
Actions
.
Posting
();
}
}).
catch
(
error
=>
{
console
.
log
(
'eeeeeeeeeeeeeee'
);
console
.
log
(
error
);
Actions
.
Posting
();
})
}
...
...
Please
register
or
login
to post a comment