2
2
* @Author : czy0729
3
3
* @Date : 2019-05-11 17:19:56
4
4
* @Last Modified by: czy0729
5
- * @Last Modified time: 2019-06-03 01: 00:07
5
+ * @Last Modified time: 2019-06-18 00:34:38
6
6
*/
7
7
import React from 'react'
8
8
import { StyleSheet , View } from 'react-native'
@@ -14,7 +14,9 @@ import {
14
14
Image ,
15
15
HeaderPlaceholder ,
16
16
RenderHtml ,
17
- Divider
17
+ Divider ,
18
+ Touchable ,
19
+ Iconfont
18
20
} from '@components'
19
21
import { SectionTitle } from '@screens/_'
20
22
import { IOS } from '@constants'
@@ -25,9 +27,9 @@ import Jobs from './jobs'
25
27
26
28
const maxSize = _ . window . width - _ . wind * 2
27
29
28
- const Info = ( props , { $ } ) => {
30
+ const Info = ( props , { $, navigation } ) => {
29
31
const { name, nameCn, cover, info, detail } = $ . mono
30
- const { _name, _image } = $ . params
32
+ const { monoId , _name, _image } = $ . params
31
33
return (
32
34
< >
33
35
{ ! IOS && < HeaderPlaceholder /> }
@@ -59,15 +61,33 @@ const Info = (props, { $ }) => {
59
61
< Voice style = { _ . mt . md } />
60
62
< Works style = { _ . mt . md } />
61
63
< Jobs style = { _ . mt . md } />
62
- < SectionTitle style = { [ styles . title , _ . mt . lg , _ . mb . md ] } >
64
+ < SectionTitle
65
+ style = { [ styles . title , _ . mt . lg , _ . mb . md ] }
66
+ right = {
67
+ < Touchable
68
+ onPress = { ( ) => {
69
+ const type = monoId . includes ( 'character/' ) ? 'crt' : 'prsn'
70
+ navigation . push ( 'Topic' , {
71
+ topicId : `${ type } /${ monoId . match ( / \d + / g) [ 0 ] } `
72
+ } )
73
+ } }
74
+ >
75
+ < Flex >
76
+ < Text type = 'sub' > 去吐槽</ Text >
77
+ < Iconfont name = 'right' size = { 16 } />
78
+ </ Flex >
79
+ </ Touchable >
80
+ }
81
+ >
63
82
吐槽箱
64
83
</ SectionTitle >
65
84
</ >
66
85
)
67
86
}
68
87
69
88
Info . contextTypes = {
70
- $ : PropTypes . object
89
+ $ : PropTypes . object ,
90
+ navigation : PropTypes . object
71
91
}
72
92
73
93
export default observer ( Info )
0 commit comments