From 2da961b2cc3974da830648ae73b8c537976f0f19 Mon Sep 17 00:00:00 2001 From: xuwenyang Date: Sat, 13 Jul 2019 19:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=201.=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=A1=B5=E9=9D=A2=E9=94=9A=E5=9C=A8=E7=AE=80=E4=BB=8B?= =?UTF-8?q?=202.=20=E6=97=A5=E8=AE=B0=E6=9C=AC=E6=97=A5=E8=AE=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=9B=BE=E7=89=87=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/notebook/notebookDiaryList.js | 12 ++++++++++++ src/page/UserPage.js | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/component/notebook/notebookDiaryList.js b/src/component/notebook/notebookDiaryList.js index 2a9e018..11fe531 100644 --- a/src/component/notebook/notebookDiaryList.js +++ b/src/component/notebook/notebookDiaryList.js @@ -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)} > diff --git a/src/page/UserPage.js b/src/page/UserPage.js index 5802557..ac227d9 100644 --- a/src/page/UserPage.js +++ b/src/page/UserPage.js @@ -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: '日记' },