Authored by 张丽霞

merge 5.7.1的热修复,review by 陈林

... ... @@ -23,6 +23,8 @@ import {
setPlatform,
setHost,
setServiceHost,
setGlobalHost,
setSingleHost,
setChannel,
} from './reducers/app/appActions';
... ... @@ -49,6 +51,9 @@ export default function native(platform) {
store.dispatch(setPlatform(platform));
store.dispatch(setHost(this.props.host));
store.dispatch(setServiceHost(this.props.serviceHost));
store.dispatch(setGlobalHost(this.props.globalApiHost));
store.dispatch(setSingleHost(this.props.singleHost));
let channel = this.props.channel;
let profilesInfo = this.props.profilesInfo;
... ...
... ... @@ -4,6 +4,9 @@ export default keyMirror({
SET_PLATFORM:null,
SET_HOST: null,
SET_SERVICE_HOST: null,
SET_GLOBAL_HOST: null,
SET_SINGLE_HOST: null,
SET_CHANNEL:null,
SET_IS_NEED_SHOW_XSRZ:null,
SET_IS_DELAY_EXPOSEDATA:null,
... ...
... ... @@ -255,7 +255,7 @@ class MineContainer extends Component {
this.props.actions.getMemberBillTaskRedDotSuccess(false);
break;
case 'mineActivity':
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')}"}}`;
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')}"}}`;
NativeModules.YH_CommonHelper.logEvent('YB_MY_INV', {});
NativeModules.YH_MineHelper.setMineActivityClicked(data.get('act_id'));
break;
... ... @@ -428,7 +428,7 @@ let styles = StyleSheet.create({
container: {
flex: 1,
width,
height: height - 49
height: Platform.OS === 'ios' ? height - 49 : height - 75
},
});
... ...
... ... @@ -6,6 +6,8 @@ const {
SET_PLATFORM,
SET_HOST,
SET_SERVICE_HOST,
SET_GLOBAL_HOST,
SET_SINGLE_HOST,
SET_CHANNEL,
} = require('../../constants/actionTypes').default;
... ... @@ -31,6 +33,20 @@ export function setServiceHost(host) {
};
}
export function setGlobalHost(host) {
return {
type: SET_GLOBAL_HOST,
payload: host
};
}
export function setSingleHost(host) {
return {
type: SET_SINGLE_HOST,
payload: host
};
}
export function setChannel(channel) {
return {
type: SET_CHANNEL,
... ...
... ... @@ -6,6 +6,8 @@ const {
SET_PLATFORM,
SET_HOST,
SET_SERVICE_HOST,
SET_GLOBAL_HOST,
SET_SINGLE_HOST,
SET_CHANNEL,
} = require('../../constants/actionTypes').default;
... ... @@ -21,6 +23,10 @@ export default function appReducer(state = initialState, action) {
return state.set('host', action.payload);
case SET_SERVICE_HOST:
return state.set('serviceHost', action.payload);
case SET_GLOBAL_HOST:
return state.set('globalApiHost', action.payload);
case SET_SINGLE_HOST:
return state.set('singleHost', action.payload);
case SET_CHANNEL:
return state.set('channel', action.payload);
}
... ...
... ... @@ -55,7 +55,7 @@ export default class DoubleImage extends React.Component {
let sale1 = '¥' + originPrice1.toFixed(2);
let saleAble1 = false;//salePrice1>0?true:false;
let linkReource1 = data1.resource;
let title1 = data1.text;
let title1 = data1.text?data1.text:'';
let data2 = list?list[1]:null;
let backgroundImage2 = data2.pic;
... ... @@ -73,7 +73,7 @@ export default class DoubleImage extends React.Component {
let sale2 = '¥' + originPrice2.toFixed(2);
let saleAble2 = false;//salePrice2>0?true:false;
let linkReource2 = data2.resource;
let title2 = data2.text;
let title2 = data2.text?data2.text:'';
let moduleOrder = resource.get('module_order') + 1;
let moduleType = resource.get('module_type');
... ...
... ... @@ -39,9 +39,10 @@ export default class Recommend extends React.Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
let linkType = rowData.get('linkType');
let linkReource = rowData.get('resource');
let title = rowData.get('title')?rowData.get('title'):'';
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}","title":"${title}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
... ... @@ -71,7 +72,7 @@ export default class Recommend extends React.Component {
}
return (
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={1.0} onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(rowData.get('linkType'), rowData.get('resource'),moduleOrder,moduleType,rowID+1);
this.props.onPressProduct && this.props.onPressProduct(url,moduleOrder,moduleType,rowID+1);
}}>
<View style={[styles.rowContainer,{height: rowContainerHeight}]}>
<YH_Image url={rowData.get('pic')} style={styles.thumbnail}/>
... ...
... ... @@ -70,7 +70,7 @@ export default class RedBrandSwiper extends React.Component {
activeOpacity={1}
style={{width: width, height: backgroundHeight,backgroundColor:'#f0f0f0'}}
onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(data[0].linkType,data[0].resource,moduleOrder,moduleType,1);
this.props.onPressSlideItem && this.props.onPressSlideItem(url,moduleOrder,moduleType,1);
}}
>
<YH_Image
... ... @@ -117,7 +117,7 @@ export default class RedBrandSwiper extends React.Component {
key={i}
activeOpacity={1}
onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(item.linkType,item.resource,moduleOrder,moduleType,i+1);
this.props.onPressSlideItem && this.props.onPressSlideItem(url,moduleOrder,moduleType,i+1);
}}
>
<YH_Image
... ...
... ... @@ -52,7 +52,7 @@ export default class SingleImage extends React.Component {
if (!product) {
showProductInfo = false;
}
let title = data.text;
let title = data.text?data.text:'';
let salePrice = product?parseFloat(product.sales_price):0;
let originPrice = product?parseFloat(product.market_price):0;
let name = product?product.product_name:'';
... ...
... ... @@ -80,7 +80,7 @@ export default class Title extends React.Component {
<Text style={[styles.text, fontFamilyStyle]}>{title}</Text>
{hasMoreButton?
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5} style={styles.thumbnail} onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(linkType,linkReource,moduleOrder,moduleType,0);
this.props.onPressProduct && this.props.onPressProduct(url,moduleOrder,moduleType,0);
}}>
<Image
source={require('../../../brandStore/image/btn_more_p.png')}
... ...
... ... @@ -38,7 +38,7 @@ export default class RedPersonPicThree extends Component{
if (!product1) {
showProductInfo1 = false;
}
let title1 = data1.text;
let title1 = data1.text?data1.text:'';
let salePrice1 = product1?parseFloat(product1.sales_price):0;
let originPrice1 = product1?parseFloat(product1.market_price):0;
let name1 = product1?product1.product_name:'';
... ... @@ -55,7 +55,7 @@ export default class RedPersonPicThree extends Component{
if (!product2) {
showProductInfo2 = false;
}
let title2 = data2.text;
let title2 = data2.text?data2.text:'';
let salePrice2 = product2?parseFloat(product2.sales_price):0;
let originPrice2 = product2?parseFloat(product2.market_price):0;
let name2 = product2?product2.product_name:'';
... ... @@ -73,7 +73,7 @@ export default class RedPersonPicThree extends Component{
showProductInfo3 = false;
}
let showProductInfo = showProductInfo1 & showProductInfo2 & showProductInfo3;
let title3 = data3.text;
let title3 = data3.text?data3.text:'';
let salePrice3 = product3?parseFloat(product3.sales_price):0;
let originPrice3= product3?parseFloat(product3.market_price):0;
let name3 = product3?product3.product_name:'';
... ...