修复bug:

1. 用户页面锚在简介
2. 日记本日记列表图片可点击
This commit is contained in:
xuwenyang 2019-07-13 19:12:37 +08:00
parent 654fc227d1
commit 2da961b2cc
2 changed files with 13 additions and 1 deletions

View file

@ -194,6 +194,17 @@ export default class NotebookDiaryList extends Component {
});
}
_onPhotoPress(photoUrl) {
Navigation.push(this.props.componentId, {
component: {
name: 'Photo',
passProps: {
url: photoUrl
}
}
});
}
render() {
if(!this.notebook) {
return null;
@ -221,6 +232,7 @@ export default class NotebookDiaryList extends Component {
isMine={isMine}
onDiaryPress={this._onDiaryPress.bind(this, rowData.index)}
onPhotoPress={() => this._onPhotoPress(rowData.item.photoUrl)}
refreshBack={this.refreshOne.bind(this, rowData.index)}
>

View file

@ -30,7 +30,7 @@ export default class UserPage extends Component {
this.dataSource = new UserDiaryData(this.userId);
this.state = {
index: 1,
index: this.user ? 0 : 1,
routes: [
{ key: 'userIntro', title: '简介' },
{ key: 'diary', title: '日记' },