mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 09:59:31 +08:00
修复bug:
1. 用户页面锚在简介 2. 日记本日记列表图片可点击
This commit is contained in:
parent
654fc227d1
commit
2da961b2cc
2 changed files with 13 additions and 1 deletions
|
@ -194,6 +194,17 @@ export default class NotebookDiaryList extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onPhotoPress(photoUrl) {
|
||||||
|
Navigation.push(this.props.componentId, {
|
||||||
|
component: {
|
||||||
|
name: 'Photo',
|
||||||
|
passProps: {
|
||||||
|
url: photoUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if(!this.notebook) {
|
if(!this.notebook) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -221,6 +232,7 @@ export default class NotebookDiaryList extends Component {
|
||||||
isMine={isMine}
|
isMine={isMine}
|
||||||
|
|
||||||
onDiaryPress={this._onDiaryPress.bind(this, rowData.index)}
|
onDiaryPress={this._onDiaryPress.bind(this, rowData.index)}
|
||||||
|
onPhotoPress={() => this._onPhotoPress(rowData.item.photoUrl)}
|
||||||
|
|
||||||
refreshBack={this.refreshOne.bind(this, rowData.index)}
|
refreshBack={this.refreshOne.bind(this, rowData.index)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default class UserPage extends Component {
|
||||||
this.dataSource = new UserDiaryData(this.userId);
|
this.dataSource = new UserDiaryData(this.userId);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
index: 1,
|
index: this.user ? 0 : 1,
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'userIntro', title: '简介' },
|
{ key: 'userIntro', title: '简介' },
|
||||||
{ key: 'diary', title: '日记' },
|
{ key: 'diary', title: '日记' },
|
||||||
|
|
Loading…
Reference in a new issue