Authored by 孙凯

修改UI review by hongmo

@@ -45,7 +45,7 @@ export default class DoubleImage extends React.Component { @@ -45,7 +45,7 @@ export default class DoubleImage extends React.Component {
45 let product1 = data1.product; 45 let product1 = data1.product;
46 let salePrice1 = product1?parseFloat(product1.sales_price):0; 46 let salePrice1 = product1?parseFloat(product1.sales_price):0;
47 let originPrice1 = product1?parseFloat(product1.market_price):0; 47 let originPrice1 = product1?parseFloat(product1.market_price):0;
48 - let name1 = product2?product1.product_name:''; 48 + let name1 = product1?product1.product_name:'';
49 let price1 = '¥' + salePrice1.toFixed(2); 49 let price1 = '¥' + salePrice1.toFixed(2);
50 let sale1 = '¥' + originPrice1.toFixed(2); 50 let sale1 = '¥' + originPrice1.toFixed(2);
51 let saleAble1 = salePrice1>0?true:false; 51 let saleAble1 = salePrice1>0?true:false;
@@ -5,6 +5,7 @@ import ReactNative from 'react-native'; @@ -5,6 +5,7 @@ import ReactNative from 'react-native';
5 import Immutable, {Map} from 'immutable'; 5 import Immutable, {Map} from 'immutable';
6 import DeviceInfo from 'react-native-device-info'; 6 import DeviceInfo from 'react-native-device-info';
7 import {getSlicedUrl} from '../../../classify/utils/Utils'; 7 import {getSlicedUrl} from '../../../classify/utils/Utils';
  8 +import {removeHTMLTag} from '../../utils/Helper';
8 9
9 const { 10 const {
10 View, 11 View,
@@ -93,8 +94,9 @@ export default class Header extends React.Component { @@ -93,8 +94,9 @@ export default class Header extends React.Component {
93 return null; 94 return null;
94 } 95 }
95 let data = resource.toJS(); 96 let data = resource.toJS();
96 - let text = data.shop_intro;  
97 - text = '<html><style type="text/css">img {max-width: 100%;}</style><body>' + text + '</body></html>'; 97 + let htmlText = data.shop_intro;
  98 + let text = removeHTMLTag(htmlText);
  99 + htmlText = '<html><style type="text/css">img {max-width: 100%;}</style><body>' + htmlText + '</body></html>';
98 let brandName = data.is_show_shop_name?data.shop_name:''; 100 let brandName = data.is_show_shop_name?data.shop_name:'';
99 let num = data.favoriteCount; 101 let num = data.favoriteCount;
100 let numberOfFav = '粉丝:'+ num; 102 let numberOfFav = '粉丝:'+ num;
@@ -141,7 +143,7 @@ export default class Header extends React.Component { @@ -141,7 +143,7 @@ export default class Header extends React.Component {
141 {!launchProfile ? <Text style={[styles.text, fontFamilyStyle]} numberOfLines={2}>{text}</Text>:null} 143 {!launchProfile ? <Text style={[styles.text, fontFamilyStyle]} numberOfLines={2}>{text}</Text>:null}
142 {launchProfile ?<View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}> 144 {launchProfile ?<View style={{width: width,height: this.state.realContentHeight,backgroundColor: 'white'}}>
143 <WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}} 145 <WebView style={{width: width-40,height: this.state.realContentHeight,backgroundColor: 'white',marginRight: 20,marginLeft: 20}}
144 - source= {{html: codeInject(text)}} 146 + source= {{html: codeInject(htmlText)}}
145 scrollEnabled={false} 147 scrollEnabled={false}
146 javaScriptEnabled={true} 148 javaScriptEnabled={true}
147 decelerationRate="normal" 149 decelerationRate="normal"
@@ -75,20 +75,12 @@ export default class RedBrand extends Component { @@ -75,20 +75,12 @@ export default class RedBrand extends Component {
75 noFilterValue = false; 75 noFilterValue = false;
76 } 76 }
77 }); 77 });
78 -  
79 let productListIsEmpty = !this.props.productList || !this.props.productList.list || this.props.productList.list.size == 0; 78 let productListIsEmpty = !this.props.productList || !this.props.productList.list || this.props.productList.list.size == 0;
80 -  
81 if (productListIsEmpty && noFilterValue) { 79 if (productListIsEmpty && noFilterValue) {
82 return null; 80 return null;
83 } 81 }
84 -  
85 return ( 82 return (
86 - <View  
87 - style={styles.brandFilterContainer}  
88 - onLayout={(evt) => {  
89 - yPosition = evt.nativeEvent.layout.y;  
90 - }}  
91 - > 83 + <View style={styles.brandFilterContainer} onLayout={(evt) => {yPosition = evt.nativeEvent.layout.y;}}>
92 <BrandProductFilter 84 <BrandProductFilter
93 onPressFilter={this._onPressProductFilter} 85 onPressFilter={this._onPressProductFilter}
94 lastSelected={this.props.productList.isFilter} 86 lastSelected={this.props.productList.isFilter}
@@ -108,19 +100,9 @@ export default class RedBrand extends Component { @@ -108,19 +100,9 @@ export default class RedBrand extends Component {
108 if (sectionID == 'ShopBanner') { 100 if (sectionID == 'ShopBanner') {
109 let {launchProfile} = this.props; 101 let {launchProfile} = this.props;
110 return(<Header resource={rowData} launchProfile={launchProfile} onPressLaunchProfile={this._onPressLaunchProfile} onPressCollection={this.props.onPressCollection}/>); 102 return(<Header resource={rowData} launchProfile={launchProfile} onPressLaunchProfile={this._onPressLaunchProfile} onPressCollection={this.props.onPressCollection}/>);
111 - } else if (sectionID == 'productList') {  
112 - let paddingLeft = rowID % 2 == 1 ? rowMarginHorizontal / 2 : rowMarginHorizontal;  
113 - let customStyle = rowID == 0 || rowID == 1 ? {paddingLeft} : {paddingLeft};  
114 - return (  
115 - <BrandProductListCell  
116 - style={[styles.listContainer, customStyle]}  
117 - key={'row' + rowID}  
118 - rowID={rowID}  
119 - data={rowData}  
120 - onPressProduct={this.props.onPressProduct}  
121 - />  
122 - );  
123 - } else{ 103 + } else if (sectionID == 'coupon') {
  104 + return(<CouponCell resource={rowData} onPressCoupon={this.props.onPressCoupon}/>);
  105 + } else if(sectionID == 'brandReource'){
124 if (rowData.get('module_type') == 'CarouselImage') { 106 if (rowData.get('module_type') == 'CarouselImage') {
125 return(<RedBrandSwiper resource={rowData} onPressSlideItem={this.props.onPressProduct}/>); 107 return(<RedBrandSwiper resource={rowData} onPressSlideItem={this.props.onPressProduct}/>);
126 }else if (rowData.get('module_type') == 'Title') { 108 }else if (rowData.get('module_type') == 'Title') {
@@ -134,6 +116,17 @@ export default class RedBrand extends Component { @@ -134,6 +116,17 @@ export default class RedBrand extends Component {
134 }else if (rowData.get('module_type') == 'TripleImage') { 116 }else if (rowData.get('module_type') == 'TripleImage') {
135 return(<TripleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>); 117 return(<TripleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
136 } 118 }
  119 + } else if (sectionID == 'productList') {
  120 + let paddingLeft = rowID % 2 == 1 ? rowMarginHorizontal / 2 : rowMarginHorizontal;
  121 + let customStyle = rowID == 0 || rowID == 1 ? {paddingLeft} : {paddingLeft};
  122 + return (
  123 + <BrandProductListCell
  124 + style={[styles.listContainer, customStyle]}
  125 + key={'row' + rowID}
  126 + rowID={rowID}
  127 + data={rowData}
  128 + onPressProduct={this.props.onPressProduct}/>
  129 + );
137 } 130 }
138 return null; 131 return null;
139 } 132 }
@@ -160,6 +153,7 @@ export default class RedBrand extends Component { @@ -160,6 +153,7 @@ export default class RedBrand extends Component {
160 if (fliter == 0) { 153 if (fliter == 0) {
161 dataSource = { 154 dataSource = {
162 ShopBanner: [shopIntro], 155 ShopBanner: [shopIntro],
  156 + coupon: [coupon],
163 brandReource: shopsdecorator.modules.toArray(), 157 brandReource: shopsdecorator.modules.toArray(),
164 }; 158 };
165 } else if (fliter == 1) { 159 } else if (fliter == 1) {
1 import React, {Component } from 'react' 1 import React, {Component } from 'react'
2 import { Image ,View, StyleSheet, Text, Dimensions} from 'react-native'; 2 import { Image ,View, StyleSheet, Text, Dimensions} from 'react-native';
  3 +import Immutable, {Map} from 'immutable';
3 4
4 export default class RedPersonPicThree extends Component{ 5 export default class RedPersonPicThree extends Component{
5 constructor(props) { 6 constructor(props) {
6 super(props); 7 super(props);
7 } 8 }
  9 +
  10 + shouldComponentUpdate(nextProps){
  11 + if (Immutable.is(nextProps.resource, this.props.resource)) {
  12 + return false;
  13 + } else {
  14 + return true;
  15 + }
  16 + }
  17 +
8 render() { 18 render() {
9 - let pic = {  
10 - uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg'  
11 - };  
12 - let type;  
13 - switch (3) {  
14 - case 1:  
15 - return (  
16 - <View style={styles.container}>  
17 - <View style={styles.container1}>  
18 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.image}>  
19 - <View style={styles.mask}>  
20 - <Text numberOfLines={2} style={styles.titleText}>MADNESS22222222222</Text>  
21 - <Text style={styles.price}>$ 299.0</Text>  
22 - </View>  
23 - </Image>  
24 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.image}>  
25 - <View style={styles.mask}>  
26 - <Text numberOfLines={2} style={styles.titleText}>MADNESS</Text>  
27 - <Text style={styles.price}>$ 299.0</Text>  
28 - </View>  
29 - </Image>  
30 19
31 - </View>  
32 - <View style={styles.container1}>  
33 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.imageBig}>  
34 - <View style={styles.mask}>  
35 - <Text numberOfLines={2} style={styles.titleText}>MADNESS</Text>  
36 - <Text style={styles.price}>$ 299.0</Text> 20 + let {resource} = this.props;
  21 + if (!resource) {
  22 + return null;
  23 + }
  24 +
  25 + let list = resource.get('module_data').get('data').toJS();
  26 + let properties = resource.get('module_data').get('properties').toJS();
  27 + let isModuleMargin = properties.isModuleMargin;
  28 + let displayType = properties.displayType;
  29 +
  30 + let data1 = list?list[0]:null;
  31 + let backgroundImage1 = data1?data1.pic:'';
  32 + let linkType1 = data1.linkType;
  33 + let product1 = data1.product;
  34 + let salePrice1 = product1?parseFloat(product1.sales_price):0;
  35 + let originPrice1 = product1?parseFloat(product1.market_price):0;
  36 + let name1 = product1?product1.product_name:'';
  37 + let price1 = '¥' + salePrice1.toFixed(2);
  38 + let sale1 = '¥' + originPrice1.toFixed(2);
  39 + let saleAble1 = salePrice1>0?true:false;
  40 +
  41 + let data2 = list?list[1]:null;
  42 + let backgroundImage2 = data2.pic;
  43 + let linkType2 = data2.linkType;
  44 + let product2 = data2.product;
  45 + let salePrice2 = product2?parseFloat(product2.sales_price):0;
  46 + let originPrice2 = product2?parseFloat(product2.market_price):0;
  47 + let name2 = product2?product2.product_name:'';
  48 + let price2 = '¥' + salePrice2.toFixed(2);
  49 + let sale2 = '¥' + originPrice2.toFixed(2);
  50 + let saleAble2 = salePrice2>0?true:false;
  51 +
  52 + let data3 = list?list[2]:null;
  53 + let backgroundImage3 = data3.pic;
  54 + let linkType3 = data3.linkType;
  55 + let product3 = data3.product;
  56 + let salePrice3 = product3?parseFloat(product3.sales_price):0;
  57 + let originPrice3= product3?parseFloat(product3.market_price):0;
  58 + let name3 = product3?product3.product_name:'';
  59 + let price3 = '¥' + salePrice3.toFixed(2);
  60 + let sale3 = '¥' + originPrice3.toFixed(2);
  61 + let saleAble3 = salePrice3>0?true:false;
  62 +
  63 + switch (displayType) {
  64 + case '1':
  65 + return (
  66 + <View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth4+nullHeigth:containerHeigth4,backgroundColor: 'white'}}>
  67 + <Image source={{uri: backgroundImage1}} style={styles.imagetype4}>
  68 + {saleAble1?<View style={styles.maskContainer4}>
  69 + <Text numberOfLines={1} style={styles.titleText4}>{name1}</Text>
  70 + <Text style={styles.price4}>{price1}</Text>
  71 + </View>:null}
  72 + </Image>
  73 + <Image source={{uri: backgroundImage2}} style={styles.imagetype4}>
  74 + {saleAble2?<View style={styles.maskContainer4}>
  75 + <Text numberOfLines={1} style={styles.titleText4}>{name2}</Text>
  76 + <Text style={styles.price4}>{price2}</Text>
  77 + </View>:null}
  78 + </Image>
  79 + <Image source={{uri: backgroundImage3}} style={styles.imagetype4}>
  80 + {saleAble3?<View style={styles.maskContainer4}>
  81 + <Text numberOfLines={1} style={styles.titleText4}>{name3}</Text>
  82 + <Text style={styles.price4}>{price3}</Text>
  83 + </View>:null}
  84 + </Image>
  85 + </View>
  86 + )
  87 + break;
  88 + case '2':
  89 + return (
  90 + <View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth3+nullHeigth:containerHeigth3,backgroundColor: 'white'}}>
  91 + <Image source={{uri: backgroundImage1}} style={styles.imagetype3}>
  92 + {saleAble1?<View style={styles.maskContainer3}>
  93 + <Text style={styles.price3}>{price1}</Text>
  94 + </View>:null}
  95 + </Image>
  96 + <Image source={{uri: backgroundImage2}} style={styles.imagetype3}>
  97 + {saleAble2?<View style={styles.maskContainer3}>
  98 + <Text style={styles.price3}>{price2}</Text>
  99 + </View>:null}
  100 + </Image>
  101 + <Image source={{uri: backgroundImage3}} style={styles.imagetype3}>
  102 + {saleAble3?<View style={styles.maskContainer3}>
  103 + <Text style={styles.price3}>{price3}</Text>
  104 + </View>:null}
  105 + </Image>
  106 + </View>
  107 + )
  108 + break;
  109 + case '3':
  110 + return (
  111 + <View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: 'white'}}>
  112 + <View style={styles.subContainer}>
  113 + <Image source={{uri: backgroundImage1}} style={styles.image}>
  114 + {saleAble1?<View style={styles.maskContainer1}>
  115 + <Text numberOfLines={2} style={styles.titleText}>{name1}</Text>
  116 + <Text style={styles.price}>{price1}</Text>
  117 + </View>:null}
  118 + </Image>
  119 + <Image source={{uri: backgroundImage2}} style={styles.image}>
  120 + {saleAble2?<View style={styles.maskContainer1}>
  121 + <Text numberOfLines={2} style={styles.titleText}>{name2}</Text>
  122 + <Text style={styles.price}>{price2}</Text>
  123 + </View>:null}
  124 + </Image>
37 </View> 125 </View>
38 - </Image>  
39 - </View>  
40 - </View>  
41 - )  
42 - break;  
43 - case 2:  
44 - return (  
45 - <View style={styles.container}>  
46 - <View style={styles.container1}>  
47 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.imageBig}>  
48 - <View style={styles.mask}>  
49 - <Text numberOfLines={2} style={styles.titleText}>MADNESS</Text>  
50 - <Text style={styles.price}>$ 299.0</Text>  
51 - </View> 126 + <Image source={{uri: backgroundImage3}} style={styles.imageBig}>
  127 + {saleAble3?<View style={styles.maskContainer2}>
  128 + <Text numberOfLines={2} style={styles.titleText}>{name3}</Text>
  129 + <Text style={styles.price}>{price3}</Text>
  130 + </View>:null}
52 </Image> 131 </Image>
53 </View> 132 </View>
54 - <View style={styles.container1}>  
55 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.image}>  
56 - <View style={styles.mask}>  
57 - <Text numberOfLines={2} style={styles.titleText}>MADNESS22222222222</Text>  
58 - <Text style={styles.price}>$ 299.0</Text>  
59 - </View>  
60 - </Image>  
61 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={styles.image}>  
62 - <View style={styles.mask}>  
63 - <Text numberOfLines={2} style={styles.titleText}>MADNESS</Text>  
64 - <Text style={styles.price}>$ 299.0</Text>  
65 - </View>  
66 - </Image> 133 + )
  134 + break;
  135 + case '4':
  136 + return (
  137 + <View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: 'white'}}>
  138 + <View style={styles.subContainer}>
  139 + <Image source={{uri: backgroundImage1}} style={styles.imageBig}>
  140 + {saleAble1?<View style={styles.maskContainer2}>
  141 + <Text numberOfLines={2} style={styles.titleText}>{name1}</Text>
  142 + <Text style={styles.price}>{price1}</Text>
  143 + </View>:null}
  144 + </Image>
  145 + </View>
  146 + <View style={styles.subContainer}>
  147 + <Image source={{uri: backgroundImage2}} style={styles.image}>
  148 + {saleAble2?<View style={styles.maskContainer1}>
  149 + <Text numberOfLines={2} style={styles.titleText}>{name2}</Text>
  150 + <Text style={styles.price}>{price2}</Text>
  151 + </View>:null}
  152 + </Image>
  153 + <Image source={{uri: backgroundImage3}} style={styles.image}>
  154 + {saleAble3?<View style={styles.maskContainer1}>
  155 + <Text numberOfLines={2} style={styles.titleText}>{name3}</Text>
  156 + <Text style={styles.price}>{price3}</Text>
  157 + </View>:null}
  158 + </Image>
67 159
68 - </View>  
69 - </View>  
70 - )  
71 - break;  
72 - case 3:  
73 - return (  
74 - <View style={styles.container}>  
75 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={{width:width/3 , height:containerHeigth * scale, justifyContent: 'flex-end'}}>  
76 - <View style={styles.mask1}>  
77 - <Text numberOfLines={2} style={styles.titleText1}>MADNESS</Text>  
78 - <Text style={styles.titleText1}>$ 299.0</Text>  
79 - </View>  
80 - </Image>  
81 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={{width:width/3 , height:containerHeigth * scale, justifyContent: 'flex-end'}}>  
82 - <View style={styles.mask1}>  
83 - <Text numberOfLines={1} style={styles.titleText1}>MADNESS22222222222</Text>  
84 - <Text style={styles.titleText1}>$ 299.0</Text>  
85 - </View>  
86 - </Image>  
87 - <Image source={require('../../../brandStore/image/coupons_l_r.png')} style={{width:width/3 , height:containerHeigth * scale, justifyContent: 'flex-end'}}>  
88 - <View style={styles.mask1}>  
89 - <Text numberOfLines={1} style={styles.titleText1}>MADNESS</Text>  
90 - <Text style={styles.titleText1}>$ 299.0</Text>  
91 - </View>  
92 - </Image>  
93 - </View>  
94 - )  
95 - break; 160 + </View>
  161 + </View>
  162 + )
  163 + break;
96 default: 164 default:
  165 + return null;
97 } 166 }
98 } 167 }
99 } 168 }
100 169
101 let {width, height} = Dimensions.get('window'); 170 let {width, height} = Dimensions.get('window');
102 -let containerHeigth = 234; 171 +let containerHeigth = Math.ceil((468/750)*width);
  172 +let containerHeigth3 = Math.ceil(width/3);
  173 +let containerHeigth4 = Math.ceil((333/750)*width);
103 let maskHeight = 30; 174 let maskHeight = 30;
104 -let scale = (width/375.0); 175 +let nullHeigth = 10;
105 176
106 let styles = StyleSheet.create({ 177 let styles = StyleSheet.create({
107 - container:{  
108 - flexDirection: 'row',  
109 - width:width,  
110 - height: containerHeigth * scale,  
111 - },  
112 - container1:{  
113 - width:width / 2,  
114 - flexDirection: 'column',  
115 - },  
116 - image:{  
117 - height: containerHeigth * scale / 2,  
118 - justifyContent: 'flex-end',  
119 - },  
120 - imageBig:{  
121 - height: containerHeigth * scale,  
122 - justifyContent: 'flex-end',  
123 - },  
124 - mask:{  
125 - backgroundColor: 'black',  
126 - opacity:0.3,  
127 - height: maskHeight * scale,  
128 - flexDirection: 'row',  
129 - alignItems: 'center',  
130 - // justifyContent: 'space-around',  
131 - },  
132 - mask1:{  
133 - backgroundColor: 'black',  
134 - opacity:0.3,  
135 - height: maskHeight * scale,  
136 - flexDirection: 'column',  
137 - justifyContent: 'space-around',  
138 - // alignItems: 'center',  
139 - },  
140 - titleText: {  
141 - marginLeft: 10,  
142 - color:'white',  
143 - width : 80,  
144 - fontSize: 12,  
145 - textAlign :'left',  
146 - },  
147 - price: {  
148 - // marginRight: 10,  
149 - color:'white',  
150 - width : 80,  
151 - fontSize: 12,  
152 - textAlign :'right',  
153 - },  
154 - titleText1: {  
155 - width:width/3 ,  
156 - height:maskHeight * scale / 2,  
157 - color: 'white',  
158 - marginLeft: 10,  
159 - fontSize: 12,  
160 - textAlign :'left',  
161 - }, 178 + subContainer:{
  179 + width:width / 2,
  180 + flexDirection: 'column',
  181 + },
  182 + maskContainer1: {
  183 + width: width/2,
  184 + height: maskHeight,
  185 + backgroundColor: 'rgba(0,0,0,0.3)',
  186 + marginTop: containerHeigth/2-maskHeight,
  187 + flexDirection: 'row',
  188 + alignItems: 'center',
  189 + },
  190 + maskContainer2: {
  191 + width: width/2,
  192 + height: maskHeight,
  193 + backgroundColor: 'rgba(0,0,0,0.3)',
  194 + marginTop: containerHeigth-maskHeight,
  195 + flexDirection: 'row',
  196 + alignItems: 'center',
  197 + },
  198 + maskContainer3:{
  199 + width: width/3,
  200 + height: 24,
  201 + backgroundColor: 'rgba(0,0,0,0.3)',
  202 + marginTop: containerHeigth3-24,
  203 + flexDirection: 'row',
  204 + alignItems: 'center',
  205 + },
  206 + maskContainer4: {
  207 + width: width/3,
  208 + height: 40,
  209 + backgroundColor: 'rgba(0,0,0,0.3)',
  210 + marginTop: containerHeigth4-40,
  211 + },
  212 + imagetype3: {
  213 + width:width/3 ,
  214 + height:containerHeigth3,
  215 + },
  216 + imagetype4:{
  217 + width:width/3,
  218 + height:containerHeigth4,
  219 + },
  220 + image:{
  221 + width:width/2,
  222 + height: containerHeigth / 2,
  223 + },
  224 + imageBig:{
  225 + width:width/2,
  226 + height: containerHeigth,
  227 + },
  228 + titleText: {
  229 + marginLeft: 10,
  230 + color:'white',
  231 + width : 80,
  232 + fontSize: 12,
  233 + textAlign :'left',
  234 + },
  235 + price: {
  236 + color:'white',
  237 + width : 80,
  238 + fontSize: 12,
  239 + textAlign :'right',
  240 + },
  241 + price3: {
  242 + width:width/3 ,
  243 + height:maskHeight / 2,
  244 + color: 'white',
  245 + marginLeft: 10,
  246 + fontSize: 12,
  247 + textAlign :'left',
  248 + },
  249 + titleText4: {
  250 + width:width/3 ,
  251 + height:maskHeight / 2,
  252 + color: 'white',
  253 + marginLeft: 10,
  254 + fontSize: 12,
  255 + textAlign :'left',
  256 + marginTop: 4,
  257 + },
  258 + price4: {
  259 + width:width/3 ,
  260 + height:maskHeight / 2,
  261 + color: 'white',
  262 + marginLeft: 10,
  263 + fontSize: 12,
  264 + textAlign :'left',
  265 + marginTop: 2,
  266 + },
162 }); 267 });
1 1
2 'use strict'; 2 'use strict';
  3 +
  4 +
  5 +export function removeHTMLTag(str) {
  6 + str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
  7 + str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
  8 + //str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
  9 + str=str.replace(/&nbsp;/ig,'');//去掉&nbsp;
  10 + str=str.replace(/\s/g,''); //将空格去掉
  11 + return str;
  12 +}