Authored by 孙凯

Merge branch '5.7.0' into 5.7.0-0.44.0

... ... @@ -30,6 +30,7 @@ import {
import {
setShopId,
setKeyWord,
} from './reducers/brandStore/brandStoreActions';
function getInitialState() {
... ... @@ -47,10 +48,12 @@ export default function native(platform) {
render() {
const store = configureStore(getInitialState());
store.dispatch(setPlatform(platform));
let {storeId, host, channel} = this.props;
let {storeId, host, channel, keyWord} = this.props;
store.dispatch(setHost(host));
store.dispatch(setChannel(channel));
store.dispatch(setShopId(storeId));
//5.7.0 新增搜索关键词跳转到店铺落地页,上报关键词
store.dispatch(setKeyWord(keyWord));
return (
<Provider store={store}>
... ...
... ... @@ -10,6 +10,7 @@ export default keyMirror({
SEL_BRANDITEM: null,
SEL_COUPONITEM: null,
SET_SHOP_ID: null,
SET_KEY_WORD: null,
SHOP_INFO_SUCCESS: null,
SHOP_INFO_REQUEST: null,
... ...
... ... @@ -121,6 +121,8 @@ class BrandStoreContainer extends Component {
F_URL: "",
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_HOME_FLR_C', param);
}
... ... @@ -143,6 +145,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -166,11 +170,13 @@ class BrandStoreContainer extends Component {
SHOP_ID: this.props.brandStore.shopId,
TAB_ID: 0,
TAB_NAME: '首页',
SORT_TYPE: order,
SORT_TYPE: order,
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
FILTER_VALUE: this.props.brandStore.filterNameFactors.toJS(),
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------点击品牌店铺页中全部TAB中的商品列表时---111---');
... ... @@ -195,6 +201,8 @@ class BrandStoreContainer extends Component {
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------点击品牌店铺页中全部TAB中的商品列表时---111---');
... ... @@ -209,6 +217,8 @@ class BrandStoreContainer extends Component {
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------点击品牌店铺页中全部TAB中的商品列表时---111---');
... ... @@ -228,6 +238,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -246,6 +258,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -264,6 +278,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -282,6 +298,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -300,6 +318,8 @@ class BrandStoreContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
// console.log('------各楼层');
... ... @@ -333,6 +353,8 @@ class BrandStoreContainer extends Component {
TAB_NAME: name,
TEMPLATE_TYPE: this.props.brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: this.props.brandStore.keyWord,
FROM_WHERE: this.props.brandStore.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_TAB_C', param);
this.props.actions.setSimilarIndex(-1);
... ...
... ... @@ -15,6 +15,7 @@ const {
PROCESS_SCAN_STRING,
SEL_COUPONITEM,
SET_SHOP_ID,
SET_KEY_WORD,
SHOP_INFO_REQUEST,
SHOP_INFO_SUCCESS,
... ... @@ -171,6 +172,13 @@ export function setShopId(shopId) {
};
}
export function setKeyWord(keyWord) {
return {
type: SET_KEY_WORD,
payload: keyWord,
};
}
export function shopInfoRequest() {
return {
type: SHOP_INFO_REQUEST,
... ... @@ -1134,6 +1142,8 @@ export function addFavorite() {
COL_TYPE: 1,
TEMPLATE_TYPE:brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: brandStore.keyWord,
FROM_WHERE: brandStore.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
... ... @@ -1174,6 +1184,8 @@ export function cancelFavorite() {
COL_TYPE: 2,
TEMPLATE_TYPE:brandStore.info.shop_template_type,
IS_RED: 0,
KEY_WORD: brandStore.keyWord,
FROM_WHERE: brandStore.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
... ...
... ... @@ -4,6 +4,7 @@ import {Record, List, Map} from 'immutable';
let InitialState = Record({
shopId: 0,
keyWord: '',
storeFilter: 0,
categoryFilterList: List(),
filterCategoryDetailFilterList: List(),
... ...
... ... @@ -7,6 +7,7 @@ const {
SET_STOREFILTER,
SET_COLLECTION,
SET_SHOP_ID,
SET_KEY_WORD,
SHOP_INFO_REQUEST,
SHOP_INFO_SUCCESS,
... ... @@ -84,6 +85,10 @@ export default function brandStoreReducer(state=initialState, action) {
return state.set('shopId', action.payload);
}
case SET_KEY_WORD: {
return state.set('keyWord', action.payload);
}
case SHOP_INFO_REQUEST: {
return state.setIn(['info', 'isFetching'], true)
.setIn(['info', 'error'], null);
... ...
... ... @@ -62,9 +62,8 @@ export default class BankCardAdd extends React.Component {
setNextButtonEnable(){
let cardNo = this.state.newCardNo;
let mobile = this.state.mobile;
let bankSupport = this.props.cardAddState.bankSupport;
if(cardNo && mobile && bankSupport){
if(cardNo && mobile){
this.setState({nextBtnEnable: true});
}
else{
... ... @@ -85,7 +84,7 @@ export default class BankCardAdd extends React.Component {
render() {
let {showResult, result, message, description, buttonText} = this.props.cardAddState;
let {showResult, result, message, description, buttonText, userName} = this.props.cardAddState;
if(showResult){
return (
... ... @@ -116,8 +115,6 @@ export default class BankCardAdd extends React.Component {
let bankSupport = cardAddState.get("bankSupport");
let showBankInfo = cardAddState.get("showBankInfo");
let userName = '';
let nextBtnBgColor = this.state.nextBtnEnable ? {backgroundColor:'#444444'} : {backgroundColor:'#b0b0b0'};
return (
... ...
'use strict';
import React from 'react';
import ReactNative, {
View,
Text,
Image,
StyleSheet,
Dimensions,
PixelRatio,
TouchableOpacity,
ListView,
Alert,
} from 'react-native';
import Immutable, {Map} from 'immutable';
export default class ChangeBankCard extends React.Component {
constructor(props) {
super(props);
this.dataSource = new ListView.DataSource({
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
});
this.renderRow = this.renderRow.bind(this);
this.renderSeparator = this.renderSeparator.bind(this);
this.renderFooter = this.renderFooter.bind(this);
}
renderRow(rowData, sectionID, rowID, highlightRow) {
let title = rowData ? rowData.get("outBankNameNumb") : "";
//判断是否为当前支付银行卡
let payCard = this.props.payCard;
let isPayCard = Immutable.is(payCard, rowData);
// cardIdNo
return (
<TouchableOpacity key={"row_"+rowID} activeOpacity={0.5} onPress={() => {
this.props.changeBankCard && this.props.changeBankCard(); }}>
<View style={styles.choseCardContainer}>
<Text style={styles.choseCardTitle}>{title}</Text>
{
isPayCard ? <Image source={require("../../image/check_icon.png")}/> : null
}
</View>
</TouchableOpacity>
);
}
renderSeparator(sectionID, rowID, adjacentRowHighlighted){
return (
<View key={"sep_"+rowID} style={styles.splitLine}/>
);
}
renderFooter(){
return (
<View >
<View style={styles.choseCardContainer}>
<Text style={styles.choseCardTitle}>使用新卡还款</Text>
<Image style={{marginRight:4*DEVICE_WIDTH_RATIO}} source={require("../../image/arrow_gray.png")}/>
</View>
<View style={styles.splitLine}/>
</View>
);
}
render() {
let{bankCardsList}=this.props;
let bankCardArray = bankCardsList ? bankCardsList.toArray() : [];
return (
<View style={styles.container}>
<View style={styles.changeCardContainer}>
<View style={styles.titleContainer}>
<Text style={{fontSize:16*DEVICE_WIDTH_RATIO,lineHeight:Math.ceil(30 * DEVICE_WIDTH_RATIO),color:'#444444'}}>选择支付方式</Text>
<TouchableOpacity style={styles.closeIcon} onPress={() => {this.props.closeBankSafePay && this.props.closeBankSafePay()}} >
<Image
source={require('../../image/close_ic.png')}
resizeMode={'contain'}
/>
</TouchableOpacity>
</View>
<View style={styles.splitLine}/>
<ListView
style={styles.cardListContainer}
conta
dataSource={this.dataSource.cloneWithRows(bankCardArray)}
enableEmptySections={true}
renderRow={this.renderRow}
renderSeparator={this.renderSeparator}
renderFooter={this.renderFooter}/>
<View style={styles.splitLine}/>
</View>
</View>
);
}
};
let {width, height} = Dimensions.get('window');
const DEVICE_WIDTH_RATIO = width / 320;
let styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.3)',
alignItems: 'center',
position: 'absolute',
width: width,
height: height,
top: 0,
},
changeCardContainer: {
position: 'absolute',
bottom: 0,
width: width,
height: 375 * DEVICE_WIDTH_RATIO,
backgroundColor: 'white',
},
titleContainer: {
width: width,
height: 44 * DEVICE_WIDTH_RATIO,
alignItems: 'center',
position: 'relative',
},
closeIcon: {
position: 'absolute',
right: 10 * DEVICE_WIDTH_RATIO,
top: 0 * DEVICE_WIDTH_RATIO,
paddingLeft: 10 * DEVICE_WIDTH_RATIO,
paddingRight: 10 * DEVICE_WIDTH_RATIO,
paddingTop: 14 * DEVICE_WIDTH_RATIO,
},
splitLine: {
width: width,
height: 1,
backgroundColor: '#e5e5e5',
},
cardListContainer: {
width: width,
height: 200 * DEVICE_WIDTH_RATIO,
},
choseCardContainer: {
height: 44 * DEVICE_WIDTH_RATIO,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginRight: 15 * DEVICE_WIDTH_RATIO,
},
choseCardTitle: {
marginLeft: 15 * DEVICE_WIDTH_RATIO,
color: '#444444',
fontSize: 14,
},
});
... ...
... ... @@ -78,12 +78,12 @@ export default class ConfirmPay extends React.Component {
}
render() {
let{payCard}=this.props;
let{payCard, formateData}=this.props;
return (
<View style={styles.container}>
<View style={[styles.alertView,{top:this.state.alertViewTop}]}>
<Text style={styles.payTitle}>
支付¥455.00
支付¥{ formateData.currAmtCount}
</Text>
<Text style={styles.codeTitle}>
请输入银行预留手机{payCard.outMobile}收到的验证码
... ... @@ -215,9 +215,9 @@ let styles = StyleSheet.create({
width: 134.5 * DEVICE_WIDTH_RATIO,
height: 44 * DEVICE_WIDTH_RATIO,
alignItems: 'center',
justifyContent: 'center',
},
buttonText: {
marginTop: 14 * DEVICE_WIDTH_RATIO,
fontSize: 16 * DEVICE_WIDTH_RATIO,
color: '#444444',
}
... ...
... ... @@ -46,9 +46,9 @@ export default class RepayList extends React.Component {
<View style={styles.repayStatusContianer}>
<View style={styles.repayStatusTextContianer}>
<Text style={[styles.repayStatusText,{left:-15*DEVICE_WIDTH_RATIO}]}>付款</Text>
<Text style={[styles.repayStatusText,{left:70*DEVICE_WIDTH_RATIO}]}>银行处理</Text>
<Text style={[styles.repayStatusText,{right:-30*DEVICE_WIDTH_RATIO}]}>还款结果</Text>
<Text style={[styles.repayStatusText,{left:8*DEVICE_WIDTH_RATIO}]}>付款</Text>
<Text style={[styles.repayStatusText,{left:95*DEVICE_WIDTH_RATIO}]}>银行处理</Text>
<Text style={[styles.repayStatusText,{right:0*DEVICE_WIDTH_RATIO}]}>还款结果</Text>
</View>
<View style={styles.repayStatusLineContianer}>
<View style={[{
... ... @@ -61,9 +61,9 @@ export default class RepayList extends React.Component {
height: 1 * DEVICE_WIDTH_RATIO,
backgroundColor: 'blue',
},isThree]}/>
<View style={[styles.circle,{left:-5*DEVICE_WIDTH_RATIO}]}/>
<View style={[styles.circle,{left:95*DEVICE_WIDTH_RATIO},isTwo]}/>
<View style={[styles.circle,{right:-5*DEVICE_WIDTH_RATIO},isThree]}/>
<View style={[styles.circle,{left:0*DEVICE_WIDTH_RATIO}]}/>
<View style={[styles.circle,{left:100*DEVICE_WIDTH_RATIO},isTwo]}/>
<View style={[styles.circle,{right:0*DEVICE_WIDTH_RATIO},isThree]}/>
</View>
<Text style={styles.repayResult}>{curRepayInfo.txt?curRepayInfo.txt:''}</Text>
... ... @@ -121,14 +121,15 @@ let styles = StyleSheet.create({
repayStatusTextContianer: {
height: 50 * DEVICE_WIDTH_RATIO,
flexDirection: 'row',
width: 200 * DEVICE_WIDTH_RATIO,
width: 255 * DEVICE_WIDTH_RATIO,
position: 'relative',
},
repayStatusLineContianer: {
height: 1 * DEVICE_WIDTH_RATIO,
width: 200 * DEVICE_WIDTH_RATIO,
height: 10 * DEVICE_WIDTH_RATIO,
width: 210 * DEVICE_WIDTH_RATIO,
flexDirection: 'row',
position: 'relative',
alignItems: 'center',
},
repayStatusText: {
marginTop: 15 * DEVICE_WIDTH_RATIO,
... ... @@ -141,7 +142,6 @@ let styles = StyleSheet.create({
borderRadius: 5 * DEVICE_WIDTH_RATIO,
backgroundColor: '#444444',
position: 'absolute',
top: -5 * DEVICE_WIDTH_RATIO,
},
repayResult: {
marginTop: 40 * DEVICE_WIDTH_RATIO,
... ...
... ... @@ -174,6 +174,7 @@ export default class RepayList extends React.Component {
cancelPayInConfirm={this.props.cancelPayInConfirm}
confirmPayAction={this.props.confirmPayAction}
payCard={payCard}
formateData={formateData}
/>
:null
}
... ...
... ... @@ -18,6 +18,7 @@ import YH_Image from '../../../common/components/YH_Image';
import SlicedImage from '../../../common/components/SlicedImage';
import LoadingIndicator from '../../../common/components/LoadingIndicator';
import BankSafePay from '../installment/BankSafePay';
import ChangeBankCard from '../installment/ChangeBankCard';
import ConfirmPay from '../installment/ConfirmPay';
import Prompt from '../../../coupon/components/coupon/Prompt';
... ... @@ -45,7 +46,7 @@ export default class MyOrderDetail extends React.Component {
render() {
let {isFetching, orderInfo, showBankSafePayView, showConfirmPayView, payCard, formateData, tipMessage} = this.props.myOrderDetail;
let {isFetching, orderInfo, showBankSafePayView, showChangeBankView, showConfirmPayView, bankCardsList, payCard, formateData, tipMessage} = this.props.myOrderDetail;
if(!orderInfo)
return null;
... ... @@ -104,7 +105,7 @@ export default class MyOrderDetail extends React.Component {
<View style={styles.installmentInfoCell}>
<Text style={styles.installmentInfoCellText}>总计应还</Text>
<Text style={styles.installmentInfoCellText}>{totalAmount}</Text>
</View>
</View>
</View>
<View style={styles.splitLine}></View>
<View style={styles.splitBlank}></View>
... ... @@ -118,27 +119,30 @@ export default class MyOrderDetail extends React.Component {
<View style={styles.splitLine}></View>
{
isOrderOver ?
<View style={styles.bottomContainer}>
<Text style={styles.orderOverText} numberOfLines={1}>{orderOverText}</Text>
</View>
:
<View style={styles.bottomContainer}>
<TouchableOpacity style={styles.checkboxContainer} activeOpacity={1} onPress={() => {
this.props.onPressCheckboxAll && this.props.onPressCheckboxAll()}}>
<Image style={styles.checkboxIcon} source={checkboxIcon}/>
</TouchableOpacity>
<View style={styles.payMoneyContainer}>
<Text style={styles.payTitle} numberOfLines={1}>待支付</Text>
<Text style={styles.payAmount} numberOfLines={1}> ¥{formateData.get("currAmtCount")?formateData.get("currAmtCount"):'0.00'}</Text>
status ?
isOrderOver ?
<View style={styles.bottomContainer}>
<Text style={styles.orderOverText} numberOfLines={1}>{orderOverText}</Text>
</View>
<Text style={styles.payDesc} numberOfLines={1}>含服务费¥{formateData.get("currFeeCount")?formateData.get("currFeeCount"):'0.00'}</Text>
<TouchableOpacity style={styles.payButtonContainer} activeOpacity={1} onPress={() => {
this.props.onPressPayNow && this.props.onPressPayNow()}}>
<Text style={styles.payButton}>立即还款</Text>
</TouchableOpacity>
</View>
:
<View style={styles.bottomContainer}>
<TouchableOpacity style={styles.checkboxContainer} activeOpacity={1} onPress={() => {
this.props.onPressCheckboxAll && this.props.onPressCheckboxAll()}}>
<Image style={styles.checkboxIcon} source={checkboxIcon}/>
</TouchableOpacity>
<View style={styles.payMoneyContainer}>
<Text style={styles.payTitle} numberOfLines={1}>待支付</Text>
<Text style={styles.payAmount} numberOfLines={1}> ¥{formateData.get("currAmtCount")?formateData.get("currAmtCount"):'0.00'}</Text>
</View>
<Text style={styles.payDesc} numberOfLines={1}>含服务费¥{formateData.get("currFeeCount")?formateData.get("currFeeCount"):'0.00'}</Text>
<TouchableOpacity style={styles.payButtonContainer} activeOpacity={1} onPress={() => {
this.props.onPressPayNow && this.props.onPressPayNow()}}>
<Text style={styles.payButton}>立即还款</Text>
</TouchableOpacity>
</View>
:
null
}
... ... @@ -156,12 +160,23 @@ export default class MyOrderDetail extends React.Component {
/>
:null
}
{showBankSafePayView ?
<ChangeBankCard
payCard={payCard}
bankCardsList={bankCardsList}
closeBankSafePay={this.props.closeBankSafePay}
bankSafePayNow={this.props.bankSafePayNow}
changeBankCard={this.props.changeBankCard}
/>
:null
}
{showConfirmPayView?
<ConfirmPay
reSendConfirmPaySnsCode={this.props.reSendConfirmPaySnsCode}
cancelPayInConfirm={this.props.cancelPayInConfirm}
confirmPayAction={this.props.confirmPayAction}
payCard={payCard}
payCard={payCard.toJS()}
formateData={formateData.toJS()}
/>
:null
}
... ...
... ... @@ -69,6 +69,7 @@ export default keyMirror({
GET_CARD_LIST_SUCCESS: null,
SHOW_BANK_INFO: null,
SET_USER_NAME: null,
SHOW_RESULT_INFO: null,
RESET_CARD_ADD_INFO: null,
... ...
... ... @@ -53,7 +53,7 @@ class InstallmentMyCardAddContainer extends Component {
}
componentDidMount() {
this.props.actions.getUserName();
}
... ...
... ... @@ -9,10 +9,56 @@ SET_ERROR,
SHOW_BANK_INFO,
SHOW_RESULT_INFO,
RESET_CARD_ADD_INFO,
SET_USER_NAME,
} = require('../../constants/actionTypes').default;
/**
* 获取用户姓名,因为没有接口提供用户名,只能通过获取银行卡列表然后取第一张银行卡用户名称
**/
export function getUserName() {
return (dispatch, getState) => {
let {app} = getState();
let queryUserName = (uid) => {
return new InstallmentService(app.host).getBankCards(uid)
.then(json => {
let name = "";
if (json && json.length > 0) {
name = json[0].userName
}
dispatch(setUserName(name));
})
.catch(error => {
dispatch(setUserName(""));
});
};
ReactNative.NativeModules.YH_CommonHelper.uid()
.then(uid => {
queryUserName(uid);
})
.catch(error => {
ReactNative.NativeModules.YH_CommonHelper.login()
.then(uid => {
queryUserName(uid);
})
.catch(error => {
});
});
};
}
export function setUserName(name) {
return {
type: SET_USER_NAME,
payload: name,
}
}
export function getBankInfo(cardNo) {
return (dispatch, getState) => {
... ...
... ... @@ -12,6 +12,7 @@ let InitialState = Record({
cardNO: '',
bankSupport: false,
showBankInfo: false,
userName: '',
banks: bankList.join('、'),
... ...
... ... @@ -7,7 +7,7 @@ const {
SHOW_BANK_INFO,
SHOW_RESULT_INFO,
RESET_CARD_ADD_INFO,
SET_USER_NAME,
} = require('../../constants/actionTypes').default;
const initialState = new InitialState;
... ... @@ -16,6 +16,8 @@ export default function cardAddReducer(state = initialState, action) {
//if (!(state instanceof InitialState)) return initialState.merge(state);
switch (action.type) {
case SET_USER_NAME:
return state.set('userName', action.payload)
case SHOW_BANK_INFO:
return state.set('bankCode', action.payload.bankCode)
.set('bankName', action.payload.bankName)
... ...
... ... @@ -14,6 +14,7 @@ let InitialState = Record({
bankCardsList: List(),
payCard: Map(),
showBankSafePayView: false,
showChangeBankView: false,
showConfirmPayView: false,
repayTermList:List(),
prePaySuccessParam: Map(),
... ...
... ... @@ -31,6 +31,7 @@ import {
import {
setShopId,
setKeyWord,
} from './reducers/redBrand/redBrandActions';
function getInitialState() {
... ... @@ -48,11 +49,13 @@ export default function native(platform) {
render() {
const store = configureStore(getInitialState());
store.dispatch(setPlatform(platform));
let {storeId, host,singleApiHost,liveHost} = this.props;
let {storeId, host,singleApiHost,liveHost, keyWord} = this.props;
store.dispatch(setHost(host));
store.dispatch(setShopId(storeId));
store.dispatch(setSingleApiHost(singleApiHost));
store.dispatch(setliveHost(liveHost));
//5.7.0 新增搜索关键词跳转到店铺落地页,上报关键词
store.dispatch(setKeyWord(keyWord));
return (
<Provider store={store}>
... ...
... ... @@ -7,6 +7,7 @@ export default keyMirror({
SET_PLATFORM: null,
SET_HOST: null,
SET_SHOP_ID: null,
SET_KEY_WORD: null,
SET_SINGLE_API_HOST: null,
SET_LIVE_API_HOST: null,
... ...
... ... @@ -117,6 +117,8 @@ class RedPersonBrandContainer extends Component {
TAB_NAME: name,
TEMPLATE_TYPE: this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
KEY_WORD: this.props.redBrand.keyWord,
FROM_WHERE: this.props.redBrand.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_TAB_C', param);
} catch (e) {
... ... @@ -150,6 +152,8 @@ class RedPersonBrandContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
KEY_WORD: this.props.redBrand.keyWord,
FROM_WHERE: this.props.redBrand.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_HOME_FLR_C', param);
} catch (e) {
... ... @@ -181,6 +185,8 @@ class RedPersonBrandContainer extends Component {
TEMPLATE_TYPE: this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
SORT_TYPE: 1,
KEY_WORD: this.props.redBrand.keyWord,
FROM_WHERE: this.props.redBrand.keyWord ? "1" : "",
}
if (tabID != '1') {
param.FILTER_VALUE = this.props.redBrand.filterNameFactors.toJS();
... ... @@ -215,6 +221,8 @@ class RedPersonBrandContainer extends Component {
F_URL: url,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
KEY_WORD: this.props.redBrand.keyWord,
FROM_WHERE: this.props.redBrand.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_HOME_FLR_C', param);
} catch (e) {
... ...
... ... @@ -12,6 +12,7 @@ const {
SET_SHOW_SIMILAR_GUIDER,
SET_SHOP_ID,
SET_KEY_WORD,
SET_LAUNCHPROFILE,
SET_FILTER,
PRODUCT_LIST_REQUEST,
... ... @@ -99,6 +100,13 @@ export function setShopId(shopId) {
};
}
export function setKeyWord(keyWord) {
return {
type: SET_KEY_WORD,
payload: keyWord,
};
}
export function setLaunchProfile(value) {
return {
type: SET_LAUNCHPROFILE,
... ... @@ -1131,6 +1139,8 @@ export function addFavorite() {
COL_TYPE: 1,
TEMPLATE_TYPE:redBrand.shopIntro.shop_template_type,
IS_RED: 1,
KEY_WORD: redBrand.keyWord,
FROM_WHERE: redBrand.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
... ... @@ -1171,6 +1181,8 @@ export function cancelFavorite() {
COL_TYPE: 2,
TEMPLATE_TYPE:redBrand.shopIntro.shop_template_type,
IS_RED: 1,
KEY_WORD: redBrand.keyWord,
FROM_WHERE: redBrand.keyWord ? "1" : "",
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
... ...
... ... @@ -4,6 +4,7 @@ import {Record, List, Map} from 'immutable';
let InitialState = Record({
shopId: 0,
keyWord: '',
launchProfile: false,//header 详情展开收起开关
fliter: 0,//红人首页。全部商品切换开关
... ...
... ... @@ -8,6 +8,7 @@ const {
SET_SHOW_SIMILAR_GUIDER,
SET_SHOP_ID,
SET_KEY_WORD,
SET_LAUNCHPROFILE,
SET_FILTER,
... ... @@ -71,6 +72,9 @@ export default function redBrandReducer(state=initialState, action) {
case SET_SHOP_ID: {
return state.set('shopId', action.payload);
}
case SET_KEY_WORD: {
return state.set('keyWord', action.payload);
}
case SET_LAUNCHPROFILE: {
return state.set('launchProfile', action.payload);
}
... ...
... ... @@ -36,7 +36,7 @@ export default class Birth extends Component {
<TouchableOpacity style={styles.getCouponContainer} activeOpacity={1} onPress={() => { this.props.onPressGetCoupon && this.props.onPressGetCoupon()}}>
<Text style={styles.getCouponText}>立即领取生日福利券</Text>
</TouchableOpacity>
</TouchableOpacity>
<View style={styles.tipContainer}>
... ... @@ -82,12 +82,12 @@ export default class Birth extends Component {
<Text style={styles.tipBottomMsg}>温馨提示:同一用户一年内(365天)仅可领取一次生日特惠哦!</Text>
{
showAlert ?
<CouponAlertView
showAlert ?
<CouponAlertView
notSupportReasons={notSupportReasons}
notSupportReasonsTitle={notSupportReasonsTitle}
notSupportReasonsMessage={notSupportReasonsMessage}
onPressClose={this.props.onPressClose} />
onPressClose={this.props.onPressClose} />
: null
}
... ... @@ -98,6 +98,7 @@ export default class Birth extends Component {
let {width, height} = Dimensions.get('window');
const DEVICE_WIDTH_RATIO = width / 320;
const radio = 942 / 640;
let styles = StyleSheet.create({
... ... @@ -108,13 +109,16 @@ let styles = StyleSheet.create({
contentBg: {
width: width,
height: 471 * DEVICE_WIDTH_RATIO,
height: Math.ceil(width*radio),
},
getCouponContainer:{
position: 'absolute',
top: 250 * DEVICE_WIDTH_RATIO,
left: 76 * DEVICE_WIDTH_RATIO,
width: width,
top: Math.ceil(width*radio*(525 / 942)) - (Platform.OS === 'ios'? 10 : 15),
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'transparent',
},
getCouponText:{
... ... @@ -139,6 +143,7 @@ let styles = StyleSheet.create({
color: '#ffffff',
fontWeight: 'bold',
fontStyle: 'italic',
backgroundColor: 'transparent',
},
tipContentContainer:{
... ...