|
|
'use strict';
|
|
|
import React from 'react';
|
|
|
import ReactNative, {
|
|
|
View,
|
|
|
Text,
|
|
|
Image,
|
|
|
StyleSheet,
|
|
|
Dimensions,
|
|
|
PixelRatio,
|
|
|
TouchableOpacity,
|
|
|
Platform,
|
|
|
} from 'react-native';
|
|
|
|
|
|
import Immutable, {Map} from 'immutable';
|
|
|
import Announcement from './Announcement';
|
|
|
import YH_Image from '../../../common/components/YH_Image';
|
|
|
|
|
|
export default class MineListHeader extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this._renderNumberPoint = this._renderNumberPoint.bind(this);
|
|
|
this._renderVip = this._renderVip.bind(this);
|
|
|
/*this.state = {
|
|
|
offsetHigh: 0,
|
|
|
};*/
|
|
|
}
|
|
|
|
|
|
/*componentWillReceiveProps(nextProps){
|
|
|
//计算高度
|
|
|
let oHigh=0;
|
|
|
if(nextProps.certificationInfo&&nextProps.certificationInfo.isBindedOrRelated==='N'){
|
|
|
oHigh=oHigh+subRowHeight;
|
|
|
}
|
|
|
if(nextProps.announcement&&nextProps.announcement.open==='Y'){
|
|
|
oHigh=oHigh+subRowHeight;
|
|
|
}
|
|
|
if((nextProps.certificationInfo.isBindedOrRelated==='N')||(nextProps.announcement&&nextProps.announcement.open==='Y')){
|
|
|
oHigh=oHigh+10;
|
|
|
}
|
|
|
if(nextProps.globalOrderData&&nextProps.globalOrderData.hasOrder==='Y'){
|
|
|
oHigh=oHigh+rowheight;
|
|
|
}
|
|
|
if(nextProps.memberBill&&nextProps.memberBill.bill.open==='Y'){
|
|
|
oHigh=oHigh+rowheight;
|
|
|
}
|
|
|
|
|
|
if(nextProps.activityListInfo&&nextProps.activityListInfo.list&&nextProps.activityListInfo.list.toArray().length>0){
|
|
|
console.log('=====');
|
|
|
oHigh=oHigh+rowheight*nextProps.activityListInfo.list.length;
|
|
|
}
|
|
|
|
|
|
this.setState({
|
|
|
offsetHigh: oHigh,
|
|
|
});
|
|
|
}*/
|
|
|
|
|
|
|
|
|
_renderNumberPoint(num) {
|
|
|
let offset = 0;
|
|
|
if (isNaN(num)) {
|
|
|
//兼容非数字
|
|
|
} else if (num <= 0) {
|
|
|
//0不显示
|
|
|
return null;
|
|
|
} else if (num < 10) {
|
|
|
offset = 15;
|
|
|
} else if (num < 100) {
|
|
|
offset = 15;
|
|
|
} else if (num < 1000) {
|
|
|
offset = 10;
|
|
|
} else if (num < 10000) {
|
|
|
offset = 5;
|
|
|
} else {
|
|
|
offset = 1;
|
|
|
num = '9999+';
|
|
|
}
|
|
|
return (
|
|
|
<Text style={{
|
|
|
position:'absolute',
|
|
|
right:offset,
|
|
|
top:0,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:10,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
backgroundColor:'black',
|
|
|
paddingLeft:num<10?4:1,
|
|
|
paddingRight:num<10?4:1,
|
|
|
borderRadius: 10,
|
|
|
borderWidth: (Platform.OS==='ios' ? 3 : 5) / PixelRatio.get(),
|
|
|
}}>{num}</Text>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
_renderVip() {
|
|
|
let num = this.props.profile.vip_info.cur_level;
|
|
|
if (num <= 0) {
|
|
|
return null;
|
|
|
}
|
|
|
let vipPic = [
|
|
|
require('../../image/mine_vip_1.png'),
|
|
|
require('../../image/mine_vip_2.png'),
|
|
|
require('../../image/mine_vip_3.png'),
|
|
|
]
|
|
|
if (num > 3) {
|
|
|
num = 3;
|
|
|
}
|
|
|
|
|
|
return (<Image style={styles.user_level} resizeMode={'stretch'} source={vipPic[num-1]}/>);
|
|
|
}
|
|
|
|
|
|
|
|
|
render() {
|
|
|
let fontFamilyStyle = {};
|
|
|
let {
|
|
|
profile,
|
|
|
mineInfoNum,
|
|
|
redPackageNum,
|
|
|
activityListInfo, memberBill, showRedPacket, certificationInfo, announcement, globalOrderData
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
|
if (Platform.OS === 'ios') {
|
|
|
let systemVersion = DeviceInfo.getSystemVersion();
|
|
|
systemVersion = parseFloat(systemVersion);
|
|
|
if (systemVersion >= 9.0) {
|
|
|
fontFamilyStyle = {fontFamily: 'PingFang SC'};
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let oHigh = 0;
|
|
|
if (this.props.certificationInfo && this.props.certificationInfo.isBindedOrRelated === 'N') {
|
|
|
oHigh = oHigh + subRowHeight;
|
|
|
}
|
|
|
if (this.props.announcement && this.props.announcement.open === 'Y') {
|
|
|
oHigh = oHigh + subRowHeight;
|
|
|
}
|
|
|
if ((this.props.certificationInfo.isBindedOrRelated === 'N') || (this.props.announcement && this.props.announcement.open === 'Y')) {
|
|
|
oHigh = oHigh + 10;
|
|
|
}
|
|
|
if (this.props.globalOrderData && this.props.globalOrderData.hasOrder === 'Y') {
|
|
|
oHigh = oHigh + rowheight;
|
|
|
}
|
|
|
if (this.props.memberBill && this.props.memberBill.bill.open === 'Y') {
|
|
|
oHigh = oHigh + rowheight;
|
|
|
}
|
|
|
|
|
|
if (this.props.activityListInfo && this.props.activityListInfo.list && this.props.activityListInfo.list.size > 0) {
|
|
|
console.log('=====');
|
|
|
console.log(this.props.activityListInfo.list.size);
|
|
|
oHigh = oHigh + rowheight * this.props.activityListInfo.list.size;
|
|
|
}
|
|
|
console.log("liben000000");
|
|
|
console.log(topHeight);
|
|
|
console.log(oHigh);
|
|
|
oHigh = topHeight + oHigh;
|
|
|
console.log(oHigh);
|
|
|
return (
|
|
|
<View style={[styles.container,{height:oHigh}]}>
|
|
|
<Image source={require('../../image/mine_banner_boy.jpg')}
|
|
|
style={{width: width, height: 175,paddingTop:45, }}
|
|
|
resizeMode={'stretch'}>
|
|
|
|
|
|
{
|
|
|
profile.uid != '0' ?
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineInfo','')}>
|
|
|
<View style={styles.icon_container}>
|
|
|
<View style={{
|
|
|
flexDirection:'row',
|
|
|
flex:1,
|
|
|
alignItems:'center',
|
|
|
}}>
|
|
|
<Image style={styles.user_img}
|
|
|
source={{uri: YH_Image.getSlicedUrl(profile.head_ico, 90, 90, 2)}}
|
|
|
resizeMode={'cover'}/>
|
|
|
<View style={{
|
|
|
flexDirection:'column',
|
|
|
flex:1,
|
|
|
marginLeft:8,
|
|
|
}}>
|
|
|
<Text style={{
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
}} numberOfLines={1}>
|
|
|
{profile.profile_name}
|
|
|
</Text>
|
|
|
<View style={{
|
|
|
flexDirection:'row',
|
|
|
marginTop:3,
|
|
|
}}>
|
|
|
{this._renderVip()}
|
|
|
{
|
|
|
profile.vip_info.is_student == 0 ? null :
|
|
|
<Image style={{
|
|
|
width: 30,
|
|
|
height: 20,
|
|
|
marginLeft:4,
|
|
|
}} resizeMode={'stretch'}
|
|
|
source={require('../../image/mine_vip_stu.png')}/>
|
|
|
}
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
flexDirection:'column',
|
|
|
width: 120,
|
|
|
alignItems:'flex-end',
|
|
|
marginTop:1,
|
|
|
}}>
|
|
|
|
|
|
<TouchableOpacity
|
|
|
onPress={() => this.props.onPressItem('mineCertification','')}>
|
|
|
<Image style={styles.renzheng} resizeMode={'stretch'}
|
|
|
source={require('../../image/renzheng_bg.png')}>
|
|
|
<Text style={styles.renzheng_text} numberOfLines={1}>
|
|
|
学生认证
|
|
|
</Text>
|
|
|
</Image>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
flexDirection:'row',
|
|
|
marginTop:15,
|
|
|
}}>
|
|
|
<Text style={{
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:14,
|
|
|
marginRight:4,
|
|
|
}} numberOfLines={1}>
|
|
|
设置收货地址
|
|
|
</Text>
|
|
|
<Image style={styles.arrow}
|
|
|
source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
</TouchableOpacity> :
|
|
|
<View style={{
|
|
|
flexDirection:'column',
|
|
|
width: width,
|
|
|
height: 80,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
}}>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineLogin','')}>
|
|
|
<Text style={styles.login_text} numberOfLines={1}>
|
|
|
登陆/注册
|
|
|
</Text>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
}
|
|
|
|
|
|
|
|
|
<View style={styles.fav_container}>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineFavProduct','')}>
|
|
|
<View style={styles.topnum_content}>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.product_favorite_total > 0) ?
|
|
|
<Text
|
|
|
style={styles.top_number_text}>{mineInfoNum.product_favorite_total < 100 ? mineInfoNum.product_favorite_total : '99+'}</Text> : null
|
|
|
}
|
|
|
<Text style={styles.top_text}>收藏的商品</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
width: 0.5,
|
|
|
height: 30,
|
|
|
marginTop:6,
|
|
|
marginBottom:6,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineFavBrand','')}>
|
|
|
<View style={styles.topnum_content}>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.brand_favorite_total > 0) ?
|
|
|
<Text
|
|
|
style={styles.top_number_text}>{mineInfoNum.brand_favorite_total < 100 ? mineInfoNum.brand_favorite_total : '99+'}</Text> : null
|
|
|
}
|
|
|
<Text style={styles.top_text}>收藏的品牌</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
width: 0.5,
|
|
|
height: 30,
|
|
|
marginTop:6,
|
|
|
marginBottom:6,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineBrowseHis','')}>
|
|
|
<View style={styles.topnum_content}>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.product_browse > 0) ?
|
|
|
<Text
|
|
|
style={styles.top_number_text}>{mineInfoNum.product_browse < 100 ? mineInfoNum.product_browse : '99+'}</Text> : null
|
|
|
}
|
|
|
<Text style={styles.top_text}>浏览记录</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
</Image>
|
|
|
|
|
|
{certificationInfo && certificationInfo.isBindedOrRelated === 'N' ?
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineSetPhone','')}>
|
|
|
<View style={styles.sub_row}>
|
|
|
<Image style={styles.row_icon} resizeMode={'contain'}
|
|
|
source={require('../../image/bindTipsIcon.png')}/>
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
fontSize:12,
|
|
|
marginLeft:4,
|
|
|
}} numberOfLines={1}>
|
|
|
账号安全等级较低,建议您绑定手机号
|
|
|
</Text>
|
|
|
<Text style={{
|
|
|
color:'red',
|
|
|
fontSize:12,
|
|
|
marginRight:2,
|
|
|
}} numberOfLines={1}>
|
|
|
去绑定
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/persona_icon_go.png')}/>
|
|
|
</View>
|
|
|
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 0.5,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
</TouchableOpacity> : null
|
|
|
}
|
|
|
{(announcement && announcement.open === 'Y') ?
|
|
|
<Announcement
|
|
|
data={announcement.list}
|
|
|
onPressAnnounceItem={(url, i) => this.props.onPressItem('mineAnnounce',url)}/> : null
|
|
|
}
|
|
|
{((certificationInfo.isBindedOrRelated === 'N') || (announcement && announcement.open === 'Y')) ?
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/> : null
|
|
|
}
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineOrder','')}>
|
|
|
<View style={styles.row}>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
我的订单
|
|
|
</Text>
|
|
|
<Text style={{
|
|
|
marginRight: 2,
|
|
|
fontSize:14,
|
|
|
color:'#b0b0b0',
|
|
|
}} numberOfLines={1}>
|
|
|
查看全部订单
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 0.5,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<View style={styles.order_container}>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('dfkOrder','')}>
|
|
|
<View style={styles.order_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/dd_icon_dfk.png')}/>
|
|
|
<Text style={styles.order_text}>待付款</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.wait_pay_num > 0) ?
|
|
|
<Image style={{
|
|
|
position:'absolute',
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 14,
|
|
|
right:13,
|
|
|
top:2,
|
|
|
width:14,
|
|
|
}} source={require('../../image/mine_message_new_icon.png')}>
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:12,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
}}>{mineInfoNum.wait_pay_num}</Text>
|
|
|
</Image> : null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('dfhOrder','')}>
|
|
|
<View style={styles.order_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/dd_icon_dfh.png')}/>
|
|
|
<Text style={styles.order_text}>待发货</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.send_cargo_num > 0) ?
|
|
|
<Image style={{
|
|
|
position:'absolute',
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 14,
|
|
|
right:13,
|
|
|
top:2,
|
|
|
width:14,
|
|
|
}} source={require('../../image/mine_message_new_icon.png')}>
|
|
|
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:12,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
}}>{mineInfoNum.send_cargo_num}</Text>
|
|
|
</Image> : null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('dshOrder','')}>
|
|
|
<View style={styles.order_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/dd_icon_dsh.png')}/>
|
|
|
<Text style={styles.order_text}>待收货</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.wait_cargo_num > 0) ?
|
|
|
<Image style={{
|
|
|
position:'absolute',
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 14,
|
|
|
right:13,
|
|
|
top:2,
|
|
|
width:14,
|
|
|
}} source={require('../../image/mine_message_new_icon.png')}>
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:12,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
}}>{mineInfoNum.wait_cargo_num}</Text>
|
|
|
</Image> : null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('dsdOrder','')}>
|
|
|
<View style={styles.order_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/wddd_icon_dpj.png')}/>
|
|
|
<Text style={styles.order_text}>待晒单</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.toShareOrderNum > 0) ?
|
|
|
<Image style={{
|
|
|
position:'absolute',
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 14,
|
|
|
right:13,
|
|
|
top:2,
|
|
|
width:14,
|
|
|
}} source={require('../../image/mine_message_new_icon.png')}>
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:12,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
}}>{mineInfoNum.toShareOrderNum}</Text>
|
|
|
</Image> : null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('thhOrder','')}>
|
|
|
<View style={styles.order_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/dd_icon_thh.png')}/>
|
|
|
<Text style={styles.order_text}>退/换货</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum.refund_exchange_num > 0) ?
|
|
|
<Image style={{
|
|
|
position:'absolute',
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 14,
|
|
|
right:13,
|
|
|
top:2,
|
|
|
width:14,
|
|
|
}} source={require('../../image/mine_message_new_icon.png')}>
|
|
|
<Text style={{
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize:12,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
}}>{mineInfoNum.refund_exchange_num}</Text>
|
|
|
</Image> : null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
{(globalOrderData && globalOrderData.hasOrder === 'Y') ?
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineGlobalOrder','')}>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon}
|
|
|
source={require('../../image/mine_globalpurchase_icon.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
境外发货订单
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
</TouchableOpacity> : null
|
|
|
}
|
|
|
|
|
|
<View style={styles.row}>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
我的资产
|
|
|
</Text>
|
|
|
<Text style={{
|
|
|
marginRight: 25,
|
|
|
height: 15,
|
|
|
width: 70,
|
|
|
fontSize:18,
|
|
|
}}>
|
|
|
</Text>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 0.5,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
|
|
|
<View style={styles.order_container}>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineCoupon','')}>
|
|
|
<View style={styles.asset_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/yh_mine_coupon_icon.png')}/>
|
|
|
<Text style={styles.order_text}>优惠券</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum) ? this._renderNumberPoint(mineInfoNum.coupon_num) : null
|
|
|
}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineYohoCoin','')}>
|
|
|
<View style={styles.asset_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/yh_mine_yoho_coin.png')}/>
|
|
|
<Text style={styles.order_text}>有货币</Text>
|
|
|
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum) ? this._renderNumberPoint(mineInfoNum.yoho_coin_num) : null
|
|
|
}
|
|
|
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineLimitCode','')}>
|
|
|
<View style={styles.asset_content}>
|
|
|
<Image style={styles.icon_image}
|
|
|
source={require('../../image/yh_mine_limitcode_icon.png')}/>
|
|
|
<Text style={styles.order_text}>限购码</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && mineInfoNum) ? this._renderNumberPoint(mineInfoNum.limitCodeNum) : null
|
|
|
}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineInstallment','')}>
|
|
|
<View style={styles.asset_content}>
|
|
|
<Image style={styles.icon_image} source={require('../../image/yh_mine_fenqi_icon.png')}/>
|
|
|
<Text style={styles.order_text}>有货分期</Text>
|
|
|
{
|
|
|
(profile.uid != '0') ? this._renderNumberPoint(0) : this._renderNumberPoint('去开通')
|
|
|
}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
{showRedPacket && showRedPacket.open === 'Y' ?
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineRedPackage','')}>
|
|
|
<View style={styles.asset_content}>
|
|
|
<Image style={styles.icon_image}
|
|
|
source={require('../../image/yh_mine_redbag_icon.png')}/>
|
|
|
<Text style={styles.order_text}>红包</Text>
|
|
|
{
|
|
|
(profile.uid != '0' && redPackageNum) ? this._renderNumberPoint(redPackageNum.redpacket_num) : null
|
|
|
}
|
|
|
</View>
|
|
|
</TouchableOpacity> : null
|
|
|
}
|
|
|
</View>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineGuang','')}>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon} source={require('../../image/mine_collectionTiezi_icon.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
我的逛
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
width: width-50,
|
|
|
height: 0.5,
|
|
|
marginLeft:50,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineShareOrder','')}>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon} source={require('../../image/shaidan.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
我的晒单
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
{(memberBill && memberBill.bill && memberBill.bill.open === 'Y') ?
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineMemberInfo','')}>
|
|
|
<View style={{
|
|
|
width: width-50,
|
|
|
height: 0.5,
|
|
|
marginLeft:50,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon} resizeMode={'contain'}
|
|
|
source={require('../../image/mine_bill_icon.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
会员账单信息
|
|
|
</Text>
|
|
|
<Image style={styles.dot} source={require('../../image/mine_message_new_icon.png')}/>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</TouchableOpacity> : null
|
|
|
}
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
paddingLeft:30,
|
|
|
}}/>
|
|
|
|
|
|
{activityListInfo.list.map((item, i) => {
|
|
|
return (
|
|
|
<TouchableOpacity key={i} onPress={() => this.props.onPressItem('mineActivity',item.get('url'))}>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon} source={require('../../image/mine_activity_icon.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
{item.get('act_name')}
|
|
|
</Text>
|
|
|
<Image style={styles.dot} source={require('../../image/mine_message_new_icon.png')}/>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
width: width-50,
|
|
|
height: 0.5,
|
|
|
marginLeft:50,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
</TouchableOpacity>
|
|
|
);
|
|
|
})}
|
|
|
|
|
|
|
|
|
{(activityListInfo && (activityListInfo.list.size > 0)) ? <View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/> : null
|
|
|
}
|
|
|
|
|
|
<TouchableOpacity onPress={() => this.props.onPressItem('mineFeedback','')}>
|
|
|
<View style={styles.row}>
|
|
|
<Image style={styles.row_icon} resizeMode={'contain'}
|
|
|
source={require('../../image/mine_servicefeedback_icon.png')}/>
|
|
|
<Text style={styles.icon_text} numberOfLines={1}>
|
|
|
服务与反馈
|
|
|
</Text>
|
|
|
<Image style={styles.arrow} source={require('../../image/category_arrow.png')}/>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{
|
|
|
width: width,
|
|
|
height: 10,
|
|
|
backgroundColor: '#e5e5e5',
|
|
|
}}/>
|
|
|
<Text style={[styles.icon_text, {marginTop:15}]} numberOfLines={1}>
|
|
|
为您优选新品
|
|
|
</Text>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
const DEVICE_WIDTH_RATIO = width / 320;
|
|
|
let subRowHeight = Math.ceil(35 * DEVICE_WIDTH_RATIO);//账号安全 通知层的高度
|
|
|
|
|
|
let rowheight = 45;//wo的订单类似的高度,我的逛也用这个高度
|
|
|
let orderContainerHeight = 55;
|
|
|
let topHeight = 175 + rowheight + orderContainerHeight + 10 + rowheight + orderContainerHeight + 1 + 10 + rowheight * 3 + 1 + 20 + 60 + 10;
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
|
|
width: width,
|
|
|
height: topHeight,
|
|
|
backgroundColor: 'white',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
icon_container: {
|
|
|
flexDirection: 'row',
|
|
|
width: width,
|
|
|
height: 80,
|
|
|
},
|
|
|
order_container: {
|
|
|
flexDirection: 'row',
|
|
|
justifyContent: 'space-around',
|
|
|
width: width,
|
|
|
height: orderContainerHeight,
|
|
|
marginTop: 8,
|
|
|
},
|
|
|
fav_container: {
|
|
|
flexDirection: 'row',
|
|
|
justifyContent: 'space-around',
|
|
|
width: width,
|
|
|
height: 50,
|
|
|
paddingTop: 3,
|
|
|
backgroundColor: 'black',
|
|
|
},
|
|
|
mine_row_container: {
|
|
|
flexDirection: 'row',
|
|
|
width: width,
|
|
|
height: 50,
|
|
|
},
|
|
|
order_content: {
|
|
|
flex: 1,
|
|
|
flexDirection: 'column',
|
|
|
width: (width - 10) / 5,
|
|
|
alignItems: 'center',
|
|
|
paddingTop: 4,
|
|
|
paddingBottom: 4,
|
|
|
},
|
|
|
asset_content: {
|
|
|
flexDirection: 'column',
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
width: 70,
|
|
|
paddingTop: 4,
|
|
|
paddingBottom: 4,
|
|
|
},
|
|
|
topnum_content: {
|
|
|
flexDirection: 'column',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
width: (width - 10) / 4,
|
|
|
height: 45,
|
|
|
},
|
|
|
icon_image: {
|
|
|
width: 30,
|
|
|
height: 30,
|
|
|
},
|
|
|
row_icon: {
|
|
|
width: 20,
|
|
|
height: 20,
|
|
|
marginRight: 10,
|
|
|
},
|
|
|
icon_right_arrow: {
|
|
|
width: 10,
|
|
|
height: 10,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
},
|
|
|
icon_text: {
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
marginLeft: 4,
|
|
|
fontSize: 15,
|
|
|
},
|
|
|
order_text: {
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
marginLeft: 4,
|
|
|
fontSize: 11,
|
|
|
},
|
|
|
top_number_text: {
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize: 14,
|
|
|
textAlignVertical: 'center',
|
|
|
textAlign: 'center',
|
|
|
},
|
|
|
top_text: {
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize: 13,
|
|
|
textAlignVertical: 'center',
|
|
|
textAlign: 'center',
|
|
|
},
|
|
|
open_text: {
|
|
|
marginTop: 30,
|
|
|
marginBottom: 30,
|
|
|
width: width - 80,
|
|
|
height: 60,
|
|
|
alignItems: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
backgroundColor: 'black',
|
|
|
textAlign: 'center',
|
|
|
color: "white",
|
|
|
borderRadius: 5,
|
|
|
},
|
|
|
product_text_container: {
|
|
|
width: width,
|
|
|
height: 41,
|
|
|
backgroundColor: 'white',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
product_text: {
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 40,
|
|
|
width: width,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
backgroundColor: 'white',
|
|
|
},
|
|
|
product_thumbnail: {
|
|
|
position: 'absolute',
|
|
|
width: 40,
|
|
|
height: 38,
|
|
|
top: 1,
|
|
|
bottom: 1,
|
|
|
marginLeft: width - 40,
|
|
|
backgroundColor: 'transparent',
|
|
|
justifyContent: 'center',
|
|
|
}, arrow: {
|
|
|
marginRight: 15,
|
|
|
width: 9,
|
|
|
height: 15,
|
|
|
},
|
|
|
row: {
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
height: rowheight,
|
|
|
width: width,
|
|
|
paddingLeft: 15,
|
|
|
backgroundColor: 'white',
|
|
|
},
|
|
|
sub_row: {
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
height: subRowHeight,
|
|
|
width: width,
|
|
|
paddingLeft: 15,
|
|
|
backgroundColor: 'white',
|
|
|
},
|
|
|
user_img: {
|
|
|
marginLeft: 15,
|
|
|
width: 60,
|
|
|
height: 60,
|
|
|
paddingLeft: 4,
|
|
|
paddingRight: 4,
|
|
|
borderRadius: 30,
|
|
|
borderWidth: (Platform.OS === 'ios' ? 1.0 : 1.5) / PixelRatio.get(),
|
|
|
},
|
|
|
user_level: {
|
|
|
width: 45,
|
|
|
height: 20,
|
|
|
}, renzheng: {
|
|
|
width: 80,
|
|
|
height: 27,
|
|
|
},
|
|
|
renzheng_text: {
|
|
|
flex: 1,
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
color: 'white',
|
|
|
fontSize: 13,
|
|
|
textAlignVertical: 'center',
|
|
|
textAlign: 'center',
|
|
|
|
|
|
},
|
|
|
login_text: {
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
height: 45,
|
|
|
width: 120,
|
|
|
textAlign: 'center',
|
|
|
textAlignVertical: 'center',
|
|
|
color: 'white',
|
|
|
fontSize: 15,
|
|
|
borderRadius: 3,
|
|
|
borderWidth: (Platform.OS === 'ios' ? 3 : 5) / PixelRatio.get(),
|
|
|
borderColor: 'white',
|
|
|
},
|
|
|
dot: {
|
|
|
height: 9,
|
|
|
width: 9,
|
|
|
marginRight: 6,
|
|
|
}
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|