import React, { Component } from 'react' import { StyleSheet, View, Image, Text, StatusBar, Alert, ImageBackground, PixelRatio, TouchableOpacity, ScrollView, } from 'react-native' import { connect } from 'react-redux' import { createAction, NavigationActions } from '../../utils' import AboutLogo from '../../static/images/about-logo.png' import Icon from '../../components/Iconfont/Iconfont' @connect(({ app, theme }) => ({ ...app, ...theme })) class Setting extends Component { constructor(props) { super(props) this.state = {} } logout = () => { this.props.dispatch(createAction('app/logout')()) } touchList() { return ( sss ) } // 头部 header() { return ( this.props.dispatch(NavigationActions.back())} > 返回 关于 ) } TouchList(item) { let returnVal = [] for (let i = 0; i < item.length; i++) { returnVal.push( item[i].onTouch()} style={{ paddingVertical: 10, flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1 / PixelRatio.get(), borderTopColor: '#EEE', }} > {item[i].text} ) } return ( {returnVal} ) } render() { const { login, appTheme } = this.props, basicInfo = [ { text: '特别声明', onTouch: () => {}, }, { text: '使用帮助', onTouch: () => {}, }, { text: '给我评分', onTouch: () => {}, }, { text: '隐私政策', onTouch: () => {}, }, { text: '退出', onTouch: () => this.logout(), }, ] return ( {/* 头部 */} {this.header()} {/* 查看详情 */} {/* 渠道云销 2.0 */} 易下单 {this.TouchList(basicInfo)} Copyright@2017-2018 {/* 京软信科 版权所有 */} 用友 Yonyou.com 版权所有 ) } } const styles = StyleSheet.create({ container: { flex: 1, }, }) export default Setting