merge 5.7.1的热修复,review by 陈林
Showing
11 changed files
with
45 additions
and
14 deletions
@@ -23,6 +23,8 @@ import { | @@ -23,6 +23,8 @@ import { | ||
23 | setPlatform, | 23 | setPlatform, |
24 | setHost, | 24 | setHost, |
25 | setServiceHost, | 25 | setServiceHost, |
26 | + setGlobalHost, | ||
27 | + setSingleHost, | ||
26 | setChannel, | 28 | setChannel, |
27 | } from './reducers/app/appActions'; | 29 | } from './reducers/app/appActions'; |
28 | 30 | ||
@@ -49,6 +51,9 @@ export default function native(platform) { | @@ -49,6 +51,9 @@ export default function native(platform) { | ||
49 | store.dispatch(setPlatform(platform)); | 51 | store.dispatch(setPlatform(platform)); |
50 | store.dispatch(setHost(this.props.host)); | 52 | store.dispatch(setHost(this.props.host)); |
51 | store.dispatch(setServiceHost(this.props.serviceHost)); | 53 | store.dispatch(setServiceHost(this.props.serviceHost)); |
54 | + store.dispatch(setGlobalHost(this.props.globalApiHost)); | ||
55 | + store.dispatch(setSingleHost(this.props.singleHost)); | ||
56 | + | ||
52 | 57 | ||
53 | let channel = this.props.channel; | 58 | let channel = this.props.channel; |
54 | let profilesInfo = this.props.profilesInfo; | 59 | let profilesInfo = this.props.profilesInfo; |
@@ -4,6 +4,9 @@ export default keyMirror({ | @@ -4,6 +4,9 @@ export default keyMirror({ | ||
4 | SET_PLATFORM:null, | 4 | SET_PLATFORM:null, |
5 | SET_HOST: null, | 5 | SET_HOST: null, |
6 | SET_SERVICE_HOST: null, | 6 | SET_SERVICE_HOST: null, |
7 | + SET_GLOBAL_HOST: null, | ||
8 | + SET_SINGLE_HOST: null, | ||
9 | + | ||
7 | SET_CHANNEL:null, | 10 | SET_CHANNEL:null, |
8 | SET_IS_NEED_SHOW_XSRZ:null, | 11 | SET_IS_NEED_SHOW_XSRZ:null, |
9 | SET_IS_DELAY_EXPOSEDATA:null, | 12 | SET_IS_DELAY_EXPOSEDATA:null, |
@@ -255,7 +255,7 @@ class MineContainer extends Component { | @@ -255,7 +255,7 @@ class MineContainer extends Component { | ||
255 | this.props.actions.getMemberBillTaskRedDotSuccess(false); | 255 | this.props.actions.getMemberBillTaskRedDotSuccess(false); |
256 | break; | 256 | break; |
257 | case 'mineActivity': | 257 | case 'mineActivity': |
258 | - url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.mineactivity","params":{"act_name":"${data.get('act_name')}","act_id":"${data.get('act_id')}","url":"${data.get('url')}","link":"${data.get('url')}"}}`; | 258 | + url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.mineactivity","params":{"act_name":"${data.get('act_name')}","act_id":"${data.get('act_id')}","url":"${data.get('url')}"}}`; |
259 | NativeModules.YH_CommonHelper.logEvent('YB_MY_INV', {}); | 259 | NativeModules.YH_CommonHelper.logEvent('YB_MY_INV', {}); |
260 | NativeModules.YH_MineHelper.setMineActivityClicked(data.get('act_id')); | 260 | NativeModules.YH_MineHelper.setMineActivityClicked(data.get('act_id')); |
261 | break; | 261 | break; |
@@ -428,7 +428,7 @@ let styles = StyleSheet.create({ | @@ -428,7 +428,7 @@ let styles = StyleSheet.create({ | ||
428 | container: { | 428 | container: { |
429 | flex: 1, | 429 | flex: 1, |
430 | width, | 430 | width, |
431 | - height: height - 49 | 431 | + height: Platform.OS === 'ios' ? height - 49 : height - 75 |
432 | }, | 432 | }, |
433 | 433 | ||
434 | }); | 434 | }); |
@@ -6,6 +6,8 @@ const { | @@ -6,6 +6,8 @@ const { | ||
6 | SET_PLATFORM, | 6 | SET_PLATFORM, |
7 | SET_HOST, | 7 | SET_HOST, |
8 | SET_SERVICE_HOST, | 8 | SET_SERVICE_HOST, |
9 | + SET_GLOBAL_HOST, | ||
10 | + SET_SINGLE_HOST, | ||
9 | SET_CHANNEL, | 11 | SET_CHANNEL, |
10 | 12 | ||
11 | } = require('../../constants/actionTypes').default; | 13 | } = require('../../constants/actionTypes').default; |
@@ -31,6 +33,20 @@ export function setServiceHost(host) { | @@ -31,6 +33,20 @@ export function setServiceHost(host) { | ||
31 | }; | 33 | }; |
32 | } | 34 | } |
33 | 35 | ||
36 | +export function setGlobalHost(host) { | ||
37 | + return { | ||
38 | + type: SET_GLOBAL_HOST, | ||
39 | + payload: host | ||
40 | + }; | ||
41 | +} | ||
42 | + | ||
43 | +export function setSingleHost(host) { | ||
44 | + return { | ||
45 | + type: SET_SINGLE_HOST, | ||
46 | + payload: host | ||
47 | + }; | ||
48 | +} | ||
49 | + | ||
34 | export function setChannel(channel) { | 50 | export function setChannel(channel) { |
35 | return { | 51 | return { |
36 | type: SET_CHANNEL, | 52 | type: SET_CHANNEL, |
@@ -6,6 +6,8 @@ const { | @@ -6,6 +6,8 @@ const { | ||
6 | SET_PLATFORM, | 6 | SET_PLATFORM, |
7 | SET_HOST, | 7 | SET_HOST, |
8 | SET_SERVICE_HOST, | 8 | SET_SERVICE_HOST, |
9 | + SET_GLOBAL_HOST, | ||
10 | + SET_SINGLE_HOST, | ||
9 | SET_CHANNEL, | 11 | SET_CHANNEL, |
10 | } = require('../../constants/actionTypes').default; | 12 | } = require('../../constants/actionTypes').default; |
11 | 13 | ||
@@ -20,7 +22,11 @@ export default function appReducer(state = initialState, action) { | @@ -20,7 +22,11 @@ export default function appReducer(state = initialState, action) { | ||
20 | case SET_HOST: | 22 | case SET_HOST: |
21 | return state.set('host', action.payload); | 23 | return state.set('host', action.payload); |
22 | case SET_SERVICE_HOST: | 24 | case SET_SERVICE_HOST: |
23 | - return state.set('serviceHost', action.payload); | 25 | + return state.set('serviceHost', action.payload); |
26 | + case SET_GLOBAL_HOST: | ||
27 | + return state.set('globalApiHost', action.payload); | ||
28 | + case SET_SINGLE_HOST: | ||
29 | + return state.set('singleHost', action.payload); | ||
24 | case SET_CHANNEL: | 30 | case SET_CHANNEL: |
25 | return state.set('channel', action.payload); | 31 | return state.set('channel', action.payload); |
26 | } | 32 | } |
@@ -55,7 +55,7 @@ export default class DoubleImage extends React.Component { | @@ -55,7 +55,7 @@ export default class DoubleImage extends React.Component { | ||
55 | let sale1 = '¥' + originPrice1.toFixed(2); | 55 | let sale1 = '¥' + originPrice1.toFixed(2); |
56 | let saleAble1 = false;//salePrice1>0?true:false; | 56 | let saleAble1 = false;//salePrice1>0?true:false; |
57 | let linkReource1 = data1.resource; | 57 | let linkReource1 = data1.resource; |
58 | - let title1 = data1.text; | 58 | + let title1 = data1.text?data1.text:''; |
59 | 59 | ||
60 | let data2 = list?list[1]:null; | 60 | let data2 = list?list[1]:null; |
61 | let backgroundImage2 = data2.pic; | 61 | let backgroundImage2 = data2.pic; |
@@ -73,7 +73,7 @@ export default class DoubleImage extends React.Component { | @@ -73,7 +73,7 @@ export default class DoubleImage extends React.Component { | ||
73 | let sale2 = '¥' + originPrice2.toFixed(2); | 73 | let sale2 = '¥' + originPrice2.toFixed(2); |
74 | let saleAble2 = false;//salePrice2>0?true:false; | 74 | let saleAble2 = false;//salePrice2>0?true:false; |
75 | let linkReource2 = data2.resource; | 75 | let linkReource2 = data2.resource; |
76 | - let title2 = data2.text; | 76 | + let title2 = data2.text?data2.text:''; |
77 | let moduleOrder = resource.get('module_order') + 1; | 77 | let moduleOrder = resource.get('module_order') + 1; |
78 | let moduleType = resource.get('module_type'); | 78 | let moduleType = resource.get('module_type'); |
79 | 79 |
@@ -39,9 +39,10 @@ export default class Recommend extends React.Component { | @@ -39,9 +39,10 @@ export default class Recommend extends React.Component { | ||
39 | renderRow(rowData, sectionID, rowID, highlightRow) { | 39 | renderRow(rowData, sectionID, rowID, highlightRow) { |
40 | let linkType = rowData.get('linkType'); | 40 | let linkType = rowData.get('linkType'); |
41 | let linkReource = rowData.get('resource'); | 41 | let linkReource = rowData.get('resource'); |
42 | + let title = rowData.get('title')?rowData.get('title'):''; | ||
42 | let url = ''; | 43 | let url = ''; |
43 | if (linkType == '0') { | 44 | if (linkType == '0') { |
44 | - url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`; | 45 | + url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}","title":"${title}"}}`; |
45 | } else if (linkType == '1') { | 46 | } else if (linkType == '1') { |
46 | url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`; | 47 | url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`; |
47 | } else if (linkType == '2') { | 48 | } else if (linkType == '2') { |
@@ -71,7 +72,7 @@ export default class Recommend extends React.Component { | @@ -71,7 +72,7 @@ export default class Recommend extends React.Component { | ||
71 | } | 72 | } |
72 | return ( | 73 | return ( |
73 | <TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={1.0} onPress={() => { | 74 | <TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={1.0} onPress={() => { |
74 | - this.props.onPressProduct && this.props.onPressProduct(rowData.get('linkType'), rowData.get('resource'),moduleOrder,moduleType,rowID+1); | 75 | + this.props.onPressProduct && this.props.onPressProduct(url,moduleOrder,moduleType,rowID+1); |
75 | }}> | 76 | }}> |
76 | <View style={[styles.rowContainer,{height: rowContainerHeight}]}> | 77 | <View style={[styles.rowContainer,{height: rowContainerHeight}]}> |
77 | <YH_Image url={rowData.get('pic')} style={styles.thumbnail}/> | 78 | <YH_Image url={rowData.get('pic')} style={styles.thumbnail}/> |
@@ -70,7 +70,7 @@ export default class RedBrandSwiper extends React.Component { | @@ -70,7 +70,7 @@ export default class RedBrandSwiper extends React.Component { | ||
70 | activeOpacity={1} | 70 | activeOpacity={1} |
71 | style={{width: width, height: backgroundHeight,backgroundColor:'#f0f0f0'}} | 71 | style={{width: width, height: backgroundHeight,backgroundColor:'#f0f0f0'}} |
72 | onPress={() => { | 72 | onPress={() => { |
73 | - this.props.onPressSlideItem && this.props.onPressSlideItem(data[0].linkType,data[0].resource,moduleOrder,moduleType,1); | 73 | + this.props.onPressSlideItem && this.props.onPressSlideItem(url,moduleOrder,moduleType,1); |
74 | }} | 74 | }} |
75 | > | 75 | > |
76 | <YH_Image | 76 | <YH_Image |
@@ -117,7 +117,7 @@ export default class RedBrandSwiper extends React.Component { | @@ -117,7 +117,7 @@ export default class RedBrandSwiper extends React.Component { | ||
117 | key={i} | 117 | key={i} |
118 | activeOpacity={1} | 118 | activeOpacity={1} |
119 | onPress={() => { | 119 | onPress={() => { |
120 | - this.props.onPressSlideItem && this.props.onPressSlideItem(item.linkType,item.resource,moduleOrder,moduleType,i+1); | 120 | + this.props.onPressSlideItem && this.props.onPressSlideItem(url,moduleOrder,moduleType,i+1); |
121 | }} | 121 | }} |
122 | > | 122 | > |
123 | <YH_Image | 123 | <YH_Image |
@@ -52,7 +52,7 @@ export default class SingleImage extends React.Component { | @@ -52,7 +52,7 @@ export default class SingleImage extends React.Component { | ||
52 | if (!product) { | 52 | if (!product) { |
53 | showProductInfo = false; | 53 | showProductInfo = false; |
54 | } | 54 | } |
55 | - let title = data.text; | 55 | + let title = data.text?data.text:''; |
56 | let salePrice = product?parseFloat(product.sales_price):0; | 56 | let salePrice = product?parseFloat(product.sales_price):0; |
57 | let originPrice = product?parseFloat(product.market_price):0; | 57 | let originPrice = product?parseFloat(product.market_price):0; |
58 | let name = product?product.product_name:''; | 58 | let name = product?product.product_name:''; |
@@ -80,7 +80,7 @@ export default class Title extends React.Component { | @@ -80,7 +80,7 @@ export default class Title extends React.Component { | ||
80 | <Text style={[styles.text, fontFamilyStyle]}>{title}</Text> | 80 | <Text style={[styles.text, fontFamilyStyle]}>{title}</Text> |
81 | {hasMoreButton? | 81 | {hasMoreButton? |
82 | <TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5} style={styles.thumbnail} onPress={() => { | 82 | <TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5} style={styles.thumbnail} onPress={() => { |
83 | - this.props.onPressProduct && this.props.onPressProduct(linkType,linkReource,moduleOrder,moduleType,0); | 83 | + this.props.onPressProduct && this.props.onPressProduct(url,moduleOrder,moduleType,0); |
84 | }}> | 84 | }}> |
85 | <Image | 85 | <Image |
86 | source={require('../../../brandStore/image/btn_more_p.png')} | 86 | source={require('../../../brandStore/image/btn_more_p.png')} |
@@ -38,7 +38,7 @@ export default class RedPersonPicThree extends Component{ | @@ -38,7 +38,7 @@ export default class RedPersonPicThree extends Component{ | ||
38 | if (!product1) { | 38 | if (!product1) { |
39 | showProductInfo1 = false; | 39 | showProductInfo1 = false; |
40 | } | 40 | } |
41 | - let title1 = data1.text; | 41 | + let title1 = data1.text?data1.text:''; |
42 | let salePrice1 = product1?parseFloat(product1.sales_price):0; | 42 | let salePrice1 = product1?parseFloat(product1.sales_price):0; |
43 | let originPrice1 = product1?parseFloat(product1.market_price):0; | 43 | let originPrice1 = product1?parseFloat(product1.market_price):0; |
44 | let name1 = product1?product1.product_name:''; | 44 | let name1 = product1?product1.product_name:''; |
@@ -55,7 +55,7 @@ export default class RedPersonPicThree extends Component{ | @@ -55,7 +55,7 @@ export default class RedPersonPicThree extends Component{ | ||
55 | if (!product2) { | 55 | if (!product2) { |
56 | showProductInfo2 = false; | 56 | showProductInfo2 = false; |
57 | } | 57 | } |
58 | - let title2 = data2.text; | 58 | + let title2 = data2.text?data2.text:''; |
59 | let salePrice2 = product2?parseFloat(product2.sales_price):0; | 59 | let salePrice2 = product2?parseFloat(product2.sales_price):0; |
60 | let originPrice2 = product2?parseFloat(product2.market_price):0; | 60 | let originPrice2 = product2?parseFloat(product2.market_price):0; |
61 | let name2 = product2?product2.product_name:''; | 61 | let name2 = product2?product2.product_name:''; |
@@ -73,7 +73,7 @@ export default class RedPersonPicThree extends Component{ | @@ -73,7 +73,7 @@ export default class RedPersonPicThree extends Component{ | ||
73 | showProductInfo3 = false; | 73 | showProductInfo3 = false; |
74 | } | 74 | } |
75 | let showProductInfo = showProductInfo1 & showProductInfo2 & showProductInfo3; | 75 | let showProductInfo = showProductInfo1 & showProductInfo2 & showProductInfo3; |
76 | - let title3 = data3.text; | 76 | + let title3 = data3.text?data3.text:''; |
77 | let salePrice3 = product3?parseFloat(product3.sales_price):0; | 77 | let salePrice3 = product3?parseFloat(product3.sales_price):0; |
78 | let originPrice3= product3?parseFloat(product3.market_price):0; | 78 | let originPrice3= product3?parseFloat(product3.market_price):0; |
79 | let name3 = product3?product3.product_name:''; | 79 | let name3 = product3?product3.product_name:''; |
-
Please register or login to post a comment