Authored by chenl

Merge branch 'local' into 5.4

@@ -45,26 +45,6 @@ export default class CategoryBList extends Component { @@ -45,26 +45,6 @@ export default class CategoryBList extends Component {
45 } 45 }
46 46
47 } 47 }
48 - // _pressLeftRow(value,rowID){  
49 - // if(value.sub.length==1){  
50 - // this.props.pressSubCateRow(value.sub[0], 0);  
51 - // return;  
52 - // }  
53 - // this.props.pressLeftRow(value,rowID);  
54 - // this.refs.subCategoryList && this.refs.subCategoryList.scrollTo({x: 0, y: 0, animated: false});  
55 - // if(rowID==this.props.currentCateId){  
56 - // LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);  
57 - // if(this.state.offsetx<0){  
58 - // this.setState({offsetx:0});  
59 - // }else{  
60 - // this.setState({offsetx: -width/2});  
61 - // }  
62 - // }else{  
63 - // if(this.state.offsetx==0){  
64 - // this.setState({offsetx: -width/2});  
65 - // }  
66 - // }  
67 - // }  
68 48
69 subRenderRow(rowData, sectionID, rowID, highlightRow) { 49 subRenderRow(rowData, sectionID, rowID, highlightRow) {
70 50
@@ -208,7 +188,7 @@ let styles = StyleSheet.create({ @@ -208,7 +188,7 @@ let styles = StyleSheet.create({
208 }, 188 },
209 separator: { 189 separator: {
210 width: width, 190 width: width,
211 - height: 0.5, 191 + height: 0.5 * DEVICE_WIDTH_RATIO,
212 backgroundColor: '#e0e0e0', 192 backgroundColor: '#e0e0e0',
213 }, 193 },
214 title: { 194 title: {
@@ -72,9 +72,6 @@ export default class HotBrandList extends Component{ @@ -72,9 +72,6 @@ export default class HotBrandList extends Component{
72 render(){ 72 render(){
73 let {data} = this.props; 73 let {data} = this.props;
74 74
75 - console.log("chenlin", "data数据长度:" + data.length);  
76 -  
77 -  
78 return( 75 return(
79 <View style={styles.container}> 76 <View style={styles.container}>
80 <ListView 77 <ListView
@@ -56,16 +56,16 @@ export default class HotCategoryList extends Component{ @@ -56,16 +56,16 @@ export default class HotCategoryList extends Component{
56 } 56 }
57 57
58 let imageUrl = getSlicedUrl(rowData.get("default_images"), 82, 110, 2); 58 let imageUrl = getSlicedUrl(rowData.get("default_images"), 82, 110, 2);
59 - let categoryName = rowData.get("category_name"); 59 + // let categoryName = rowData.get("category_name");
60 60
61 //数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE 61 //数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE
62 let dataType = rowData.get("data_type"); 62 let dataType = rowData.get("data_type");
63 63
64 if(dataType && dataType == 'text') 64 if(dataType && dataType == 'text')
65 return ( 65 return (
66 - <TouchableOpacity onPress={() => this.props.onPressHotCategoryItem && this.props.onPressHotCategoryItem(rowData.toJS(),rowID)}> 66 + <TouchableOpacity activeOpacity={1} onPress={() => this.props.onPressHotCategoryItem && this.props.onPressHotCategoryItem(rowData.toJS(),rowID)}>
67 <View style={styles.rowContainer}> 67 <View style={styles.rowContainer}>
68 - <Text style={styles.rowText} numberOfLines={1}>{categoryName}</Text> 68 + <Text style={styles.rowText} numberOfLines={1}>{rowData.get("show_category_name")}</Text>
69 </View> 69 </View>
70 </TouchableOpacity> 70 </TouchableOpacity>
71 ); 71 );
@@ -74,7 +74,7 @@ export default class HotCategoryList extends Component{ @@ -74,7 +74,7 @@ export default class HotCategoryList extends Component{
74 <TouchableOpacity onPress={() => this.props.onPressHotCategoryItem && this.props.onPressHotCategoryItem(rowData.toJS(),rowID)}> 74 <TouchableOpacity onPress={() => this.props.onPressHotCategoryItem && this.props.onPressHotCategoryItem(rowData.toJS(),rowID)}>
75 <View style={styles.rowContainer}> 75 <View style={styles.rowContainer}>
76 <Image style={styles.rowThumbnail} source={{uri: imageUrl}}/> 76 <Image style={styles.rowThumbnail} source={{uri: imageUrl}}/>
77 - <Text style={styles.rowText} numberOfLines={1}>{categoryName}</Text> 77 + <Text style={styles.rowText} numberOfLines={1}>{rowData.get("category_name")}</Text>
78 </View> 78 </View>
79 </TouchableOpacity> 79 </TouchableOpacity>
80 ); 80 );
@@ -107,7 +107,6 @@ class CategoryBContainer extends Component { @@ -107,7 +107,6 @@ class CategoryBContainer extends Component {
107 } 107 }
108 108
109 _onPressHotBrandItem(data){ 109 _onPressHotBrandItem(data){
110 - console.log("chenlin", "调用点击事件:_onPressHotBrandItem,参数:" + JSON.stringify(data));  
111 ReactNative.NativeModules.YH_CommonHelper.pushBrandVC(data); 110 ReactNative.NativeModules.YH_CommonHelper.pushBrandVC(data);
112 } 111 }
113 112
@@ -63,12 +63,10 @@ export function getCategoryBSubCategoryDetail(category_id, category_value){ @@ -63,12 +63,10 @@ export function getCategoryBSubCategoryDetail(category_id, category_value){
63 63
64 //未命中,访问网络数据 64 //未命中,访问网络数据
65 if (!categoryData) { 65 if (!categoryData) {
66 - // console.log("chenlin", "未命中缓存,调用接口访问数据:" + key);  
67 dispatch(getCategoryBSubDetail(currentChannelId, category_id)); 66 dispatch(getCategoryBSubDetail(currentChannelId, category_id));
68 } 67 }
69 //已命中,展示缓存数据 68 //已命中,展示缓存数据
70 else{ 69 else{
71 - // console.log("chenlin", "命中缓存:" + JSON.stringify(categoryData));  
72 dispatch(getCategoryBSubDetailData(categoryData)); 70 dispatch(getCategoryBSubDetailData(categoryData));
73 } 71 }
74 72
@@ -156,7 +154,7 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop @@ -156,7 +154,7 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop
156 } 154 }
157 155
158 //分类信息不为空时,添加more 156 //分类信息不为空时,添加more
159 - if(subcategory_data.sortInfo){ 157 + if(subcategory_data.sortInfo && subcategory_data.sortInfo.length > 0){
160 158
161 //获取当前频道下一级分类列表信息 159 //获取当前频道下一级分类列表信息
162 let categoryData = props_data.categoryList.get(props_data.currentChannelValue); 160 let categoryData = props_data.categoryList.get(props_data.currentChannelValue);
@@ -170,7 +168,8 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop @@ -170,7 +168,8 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop
170 }); 168 });
171 169
172 let more = { 170 let more = {
173 - category_name: 'more', 171 + show_category_name: 'more',
  172 + category_name: "全部" + (category ? category.get('category_name') : ''),
174 parent_id: category_id, 173 parent_id: category_id,
175 relation_parameter: category ? category.get('relation_parameter') : {}, 174 relation_parameter: category ? category.get('relation_parameter') : {},
176 node_count: category ? category.get('node_count') : 0, 175 node_count: category ? category.get('node_count') : 0,
@@ -183,9 +182,6 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop @@ -183,9 +182,6 @@ function parseCategoryBSubDetail(channel_id, category_id, subcategory_data, prop
183 182
184 let key = getSubDetailCacheKey(channel_id, category_id); 183 let key = getSubDetailCacheKey(channel_id, category_id);
185 184
186 - // console.log("chenlin", "parseCategoryBSubDetail处理后的JSON数据:" + JSON.stringify(data));  
187 -  
188 -  
189 return {key: key, data: subcategory_data}; 185 return {key: key, data: subcategory_data};
190 186
191 } 187 }
@@ -42,7 +42,6 @@ export default class CategoryBService { @@ -42,7 +42,6 @@ export default class CategoryBService {
42 } 42 }
43 }) 43 })
44 .then((json) => { 44 .then((json) => {
45 - // console.log("chenlin", "app.sort.fromBigData返回JSON数据:" + JSON.stringify(json));  
46 return json; 45 return json;
47 }) 46 })
48 .catch((error) => { 47 .catch((error) => {