/** * 关于页面 - 外部链接 * @邠心vbe on 2021/4/7 */ import React from 'react'; import { View, Text, Image, StyleSheet, Linking } from 'react-native'; import app from '../../../app.json'; import TextView from '../../components/TextView'; import { PageList } from '../Router'; const author = 2023; const policyList = [{ name: "Terms of Use", url: app.storeUrl.termsUseUrl }, { name: "Privacy Policy", url: app.storeUrl.privacyPolicyUrl }, { name: "Refund Policy", url: app.storeUrl.refundUrl }] export default About = () => { return ( {/* {app.displayName} */} {app.versionName} { policyList.map((item, index) => ( Linking.openURL(item.url)}> {item.name} ) )} {/*app.versionName + ' Build ' + app.versionCode + */} {'Copyright ' + getYearRange() + ' ' + app.company} ); } const getYearRange = () => { const y = new Date().getFullYear(); var r = '©' + author; if (y > author) { r += '-' + y } return r; } const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', backgroundColor: colorLight }, logo: { width: 215, height: 70, marginTop: $vw(25), marginBottom: 12 }, appName: { color: '#000', fontSize: 20, paddingTop: 5, textAlign: 'center' }, versionName: { color: '#999', fontSize: 11, paddingTop: 4, textAlign: 'center', }, copyright: { color: '#aaa', fontSize: 10, lineHeight: 14, marginBottom: 16, textAlign: 'center' }, linkView: { width: $vw(90), alignItems: 'center', flexDirection: 'row', justifyContent: 'space-around' }, linkText: { ...ui.link, fontSize: 11, padding: 2, marginLeft: 4, marginRight: 4 } })