import React, { Component } from 'react' import { StyleSheet, View, Dimensions, Platform, ScrollView, } from 'react-native' import {WebView} from 'react-native-webview'; import { connect } from 'react-redux' import { ImageBaseUrl } from '../../../utils/fetch/Fetchx' const { width, height } = Dimensions.get('window') @connect(({ detail }) => ({ ...detail })) class Details extends Component { gotoDetail = () => { this.props.dispatch(NavigationActions.navigate({ routeName: 'Detail' })) } constructor() { super() this.state = { WebViewHeight: 0, } } render() { const { detailDatas } = this.props let html = detailDatas.description html = html ? html.replace( /src=\"\/g1\//g, `style="max-width:${width - 20}px; max-height:${height - 100}px;" src="${ImageBaseUrl}/g1/` ) : '' let html5 = `
${html}` let source = {html: html5} if(Platform.OS !== 'ios'){ source.baseUrl = '' } return (