Skip to content

Commit dd65b51

Browse files
committed
判读登录点赞跳转
1 parent 77f72e4 commit dd65b51

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/views/Detail/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ import { connect } from 'react-redux'
7676
// this.setState({ source: { uri: this.props.navigation.state.params.url } })
7777
})
7878
}
79+
isLogin = () => {
80+
let { login, navigation } = this.props
81+
if (login === '') {
82+
navigation.navigate('Mine')
83+
}
84+
// console.log(this.props.lohi);
85+
86+
}
7987
allDetail (props) {
8088
let id = this.props.navigation.state.params.data.id
8189
getDetail(id).then((res) => {
@@ -131,9 +139,7 @@ import { connect } from 'react-redux'
131139
</View>
132140
</View>
133141
<View style={styles.share}>
134-
<TouchableOpacity onPress={() => {
135-
// this.onPress(data)
136-
}}>
142+
<TouchableOpacity onPress={this.isLogin}>
137143
<Text style={{color: '#009688'}}>回复</Text>
138144
</TouchableOpacity>
139145
<TouchableOpacity>

src/views/Publish/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ this.inputRefs = {
110110
textAlignVertical: 'top'}}
111111
multiline={true}></TextInput>
112112
</View>
113-
<View style={{marginTop: 10}}>
114-
<TouchableOpacity style={{backgroundColor: '#009688', borderRadius: 4}}>
113+
<View style={{marginTop: 10, fontSize: 12}}>
114+
<TouchableOpacity style={{backgroundColor: '#009688',
115+
borderRadius: 4}}>
115116
{/* <Image source={require('../../assets/time.png')}></Image> */}
116117
<Button
117118
title="发布话题"

0 commit comments

Comments
 (0)