detail.js
9.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/**
* Created by Cassie on 2018/03/06
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
Image,
ScrollView,
TextInput
} from 'react-native';
import Video from 'react-native-video';
import InputPage from 'xn-input-img';
import {height,zoomW,zoomH} from '../../utils/getSize';
import {xnBorderWidth} from "../../utils/utils";
const back = require('../../img/back.png');
const close = require('../../img/close.png');
const ddd = require('../../img/ddd.png');
const eachMore = require('../../img/eachMore.png');
const video = require('../../img/video.png');
export default class Detail extends Component {
static navigationOptions = ({ navigation, screenProps })=>({
title: '详情',
headerLeft:(<View style={{display:'flex',flexDirection:'row'}}>
<TouchableOpacity style={styles.leftIcon}>
<Image source={back} style={styles.backIcon} resizeMode="contain" />
</TouchableOpacity>
<TouchableOpacity style={styles.leftIcon}>
<Image source={close} style={styles.closeIcon} resizeMode="contain" />
</TouchableOpacity>
</View>),
headerRight:(<View style={styles.rightTop}>
<TouchableOpacity style={styles.rightIcon} onPress={navigation.state.params?navigation.state.params.showRight:null}>
<Image source={ddd} style={styles.moreIcon} resizeMode="contain" />
</TouchableOpacity>
</View>)
});
constructor(props) {
super(props);
this.state={}
}
componentDidMount(){
};
render() {
return (
<View style={{display:'flex',flex:1}}>
<ScrollView style={styles.background}>
<View style={styles.title}>
<Text style={{color:"#333",fontSize:24,fontWeight:'600'}}>
<Text style={{color:"#576b95",lineHeight:30}}>【置顶】</Text>怎么看金蝶投资「纷享销客」5000万美元?
</Text>
</View>
<View style={styles.content}>
<View style={styles.author}>
<Image source={video} style={styles.avatar} resizeMode="cover" />
<View style={{height:(32/zoomH),display:'flex',justifyContent:'space-between'}}>
<Text style={{fontSize:16,color:'#576b95'}}>张丽</Text>
<Text style={{fontSize:12,color:'#999'}}>灌水区 | 01-20</Text>
</View>
</View>
<Text style={{fontSize:18,color:'#000',lineHeight:35}}>日前,36氪由内部消息获悉,猫眼与微影相关业务整合已经完成,并在近期获得腾讯10亿人民币的投资。投资完成之后,腾讯依然是猫眼第二大股东。{"\n"}{"\n"}
一个多月前,猫眼和微影时代宣布达成战略合作,组建新公司猫眼微影。随后,新猫眼开始业务重整,将相关团队和资产以业务单元为基础进行了调整。10月中旬,猫眼总部迁入新址,两班人马合署办公,团队整合基本完成。</Text>
<Image source={video} style={styles.contentPic} resizeMode="cover" />
<Text style={{fontSize:12,color:'#333'}}>来源板块:灌水区</Text>
</View>
<View style={{height:(8/zoomW),backgroundColor:'#f3f3f3'}} />
<View style={styles.tab}>
<View style={[styles.barItem,{borderBottomWidth:2}]}>
<Text style={{fontSize:16,color:'#000'}}>全部回复</Text>
</View>
<View style={styles.barItem}>
<Text style={{fontSize:16,color:'#666'}}>只看楼主</Text>
</View>
</View>
<View style={styles.replayItem}>
<View style={styles.replay}>
<Image source={video} style={styles.avatar} resizeMode="cover" />
<View style={styles.nameBox}>
<View>
<View style={{display:'flex',flexDirection:'row',alignItems:'center'}}>
<Text style={{fontSize:16,color:'#576b95'}}>张丽</Text>
<View style={styles.landlord}>
<Text style={{color:'#808080',fontSize:10}}>楼主</Text>
</View>
</View>
<Text style={{fontSize:12,color:'#999'}}>1楼 | 01-20</Text>
</View>
<View>
<Image source={eachMore} style={styles.moreIcon} resizeMode="contain" />
</View>
</View>
</View>
<View style={styles.replayContent}>
<Text style={{fontSize:18,color:'#000',lineHeight:35}}>真是很好的学习资料!学习了,这样的资料应该多一些!</Text>
<Image source={video} style={styles.contentPic} resizeMode="cover" />
<View style={styles.reMark}>
<Text style={{fontSize:14,color:'#333',lineHeight:25}}><Text style={{color:'#4a6d9f'}}>张三:</Text>给力!</Text>
<Text style={{fontSize:14,color:'#333',lineHeight:25}}><Text style={{color:'#4a6d9f'}}>李斯:</Text> 回复张三:一个多月前,猫眼和微影时代宣布达成战略合作,组建新公司猫眼微影。随后,新猫眼开始业务重整,将相关团队和资产以业务单元为基础进行了调整。</Text>
<Text style={{fontSize:14,color:'#333',lineHeight:25}}><Text style={{color:'#4a6d9f'}}>张丽 | 楼主:</Text>给力!</Text>
<Text style={{fontSize:14,color:'#4a6d9f',lineHeight:25}}>查看全部60条回复</Text>
</View>
</View>
</View>
</ScrollView>
<View style={styles.bottomInput}>
<TextInput multiline={true} style={styles.replayInput} placeholder="发表回复…" underlineColorAndroid="transparent" />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
leftIcon:{
width:(50/zoomW),
height:'100%',
display:'flex',
flexDirection:'row',
alignItems:'center'
},
backIcon:{
width:(10/zoomW),
height:(18/zoomH),
marginLeft:(10/zoomW)
},
closeIcon:{
width:(18/zoomW),
height:(18/zoomH)
},
rightTop:{
display:'flex',
flexDirection:'row',
alignItems:'center',
},
rightIcon:{
height:'100%',
width:(34/zoomW),
display:'flex',
justifyContent:'center',
},
moreIcon:{
width:(20/zoomW),
height:(20/zoomW)
},
background:{
flex:15,
width:'100%',
height:'100%',
backgroundColor:'#fff'
},
title:{
marginTop:(20/zoomH),
marginBottom:(20/zoomH),
paddingLeft:(15/zoomW),
paddingRight:(15/zoomW),
},
content:{
paddingLeft:(25/zoomW),
paddingRight:(25/zoomW),
paddingBottom:(15/zoomH)
},
author:{
display:'flex',
flexDirection:'row',
alignItems:'center',
marginBottom:(25/zoomH),
marginLeft:-(10/zoomW)
},
avatar:{
width:(36/zoomW),
height:(36/zoomW),
marginRight:(10/zoomW),
borderRadius:2
},
contentPic:{
width:'100%',
marginTop:(20/zoomH),
marginBottom:(20/zoomH)
},
tab:{
width:'100%',
height:(45/zoomH),
borderBottomWidth:xnBorderWidth(),
borderBottomColor:'#eee',
borderStyle:'solid',
display:'flex',
flexDirection:'row',
alignItems:'center',
paddingLeft:(18/zoomW),
},
barItem:{
marginRight:(30/zoomW),
height:'100%',
display:'flex',
justifyContent:'center'
},
replayItem:{
paddingBottom:(20/zoomH),
borderBottomWidth:xnBorderWidth(),
borderBottomColor:'#eee',
borderStyle:'solid'
},
replay:{
display:'flex',
flexDirection:'row',
padding:(15/zoomW)
},
nameBox:{
width:(295/zoomW),
display:'flex',
flexDirection:'row',
justifyContent:'space-between'
},
landlord:{
width:(30/zoomW),
height:(15/zoomH),
borderWidth:1,
borderColor:'#808080',
borderStyle:'solid',
display:'flex',
justifyContent:'center',
alignItems:'center',
marginLeft:(5/zoomW),
borderRadius:2
},
replayContent:{
paddingLeft:(62/zoomW),
paddingRight:(16/zoomW)
},
reMark:{
backgroundColor:'#f4f4f4',
padding:(10/zoomW)
},
bottomInput:{
width:'100%',
height:(44/zoomH),
borderTopWidth:xnBorderWidth(),
borderTopColor:'#ddd',
borderStyle:'solid',
backgroundColor:'#fff',
paddingLeft:(15/zoomW),
paddingRight:(15/zoomW),
display:'flex',
flexDirection:'row'
},
replayInput:{
width:(200/zoomW),
}
});