Authored by 张丽霞

分期模块,review by 陈林

... ... @@ -258,7 +258,6 @@ let styles = StyleSheet.create({
textAlign: 'left',
color: 'white',
lineHeight: Math.ceil(19 * DEVICE_WIDTH_RATIO),
marginTop: 7,
marginLeft: 20,
marginRight: 20,
},
... ...
... ... @@ -163,7 +163,8 @@ let styles = StyleSheet.create({
justifyContent: 'center',
},
title: {
lineHeight: Math.ceil(20 * DEVICE_WIDTH_RATIO),
height: 44 * DEVICE_WIDTH_RATIO,
lineHeight: Math.ceil(30 * DEVICE_WIDTH_RATIO),
fontSize: 12 * DEVICE_WIDTH_RATIO,
marginLeft: 15 * DEVICE_WIDTH_RATIO,
},
... ... @@ -172,7 +173,7 @@ let styles = StyleSheet.create({
height: 20 * DEVICE_WIDTH_RATIO,
fontSize: 12 * DEVICE_WIDTH_RATIO,
padding: 0,
marginTop: 4 * DEVICE_WIDTH_RATIO,
marginTop: 16 * DEVICE_WIDTH_RATIO,
},
touchContainer:{
width: 20* DEVICE_WIDTH_RATIO,
... ...
... ... @@ -423,7 +423,8 @@ export function onPressStatusPageBtn(page) {
if (jumpUrl && jumpUrl != '') {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(jumpUrl);
} else {
ReactNative.NativeModules.YH_InstallmentHelper.backToOpenInstallment();
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentOpen","params":{"type":"back"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
};
}
... ... @@ -532,7 +533,8 @@ export function getAlreadyPageInfo() {
export function onPressTabBtn() {
return (dispatch, getState) => {
ReactNative.NativeModules.YH_InstallmentHelper.helpAction();
let url = `http://m.yohobuy.com/home/installment/agreement?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/installment/help"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
};
}
... ... @@ -540,14 +542,16 @@ export function onPressTabBtn() {
export function gotoRepayListPageWithDays(days) {
return (dispatch, getState) => {
let {app, installment} = getState();
ReactNative.NativeModules.YH_InstallmentHelper.gotoRepayListPage(days);
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentRepayList","params":{"days":"${days}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
};
}
export function gotoRepayRecordList() {
return (dispatch, getState) => {
let {app, installment} = getState();
ReactNative.NativeModules.YH_InstallmentHelper.gotoRepayRecordListPage();
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentRepayRecordList","params":{}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
};
}
... ...
... ... @@ -104,12 +104,6 @@ export function onPressOpenNext() {
if (!nextBtnEnable) {
return;
}
//跳转原生静态页面
// let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentActivated","params":{'status':'2','failReason':'您的授信未通过,在有货更多的消费,增加信用度,会大大提升审核通过率奥。'}}`;
// ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
// ReactNative.NativeModules.YH_InstallmentHelper.gotoInstallmentStatusView('2', '您的授信未通过,在有货更多的消费,增加信用度,会大大提升审核通过率奥。');
// return;
cellList.map((item, i) => {
if (item.get('inputKey') != 'BankIcon') {
activateParams[item.get('inputKey')]= item.get('text');
... ... @@ -135,11 +129,14 @@ export function onPressOpenNext() {
})
.then(json => {
dispatch(nextBtnProcessingSuccess());
console.log('------1');
console.log(json);
let tipMessage = '';
if (json.status == '3') {
json.failReason = json.failReason || '姓名、身份证、银行卡不匹配';
}
ReactNative.NativeModules.YH_InstallmentHelper.gotoInstallmentStatusView(json.status, json.failReason);
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentStatus","params":{"status": "${json.status}", "failReason": "${json.failReason}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
})
.catch(error => {
});
... ... @@ -288,8 +285,8 @@ export function updateOpenPageCellInfo(cellInfo) {
export function onPressCheckCode() {
return (dispatch, getState) => {
let {app, newRegister} = getState();
let {cellList,snsCheckCodeEnable,snsCheckCodeText} = newRegister;
if (snsCheckCodeEnable && snsCheckCodeText == '获取验证码') {
let {cellList,snsCheckCodeEnable} = newRegister;
if (snsCheckCodeEnable) {
let mobile = '';
cellList.map((item, i) => {
if (item.get('inputKey') == 'mobile') {
... ...
... ... @@ -12,7 +12,6 @@ const {
UPDATE_CELL_LIST,
UPDATE_NEXT_BTN_ENABLE_STATUS,
UPDATE_NEXT_BTN_TEXT,
UPDATE_SNS_CHECK_CODE_TEXT,
UPDATE_TIP_MESSAGE,
UPDATE_BANK_INFO,
NEXT_BTN_PROCESSING_REQUEST,
... ... @@ -37,8 +36,6 @@ export default function appReducer(state = initialState, action) {
return state.set('cellList', Immutable.fromJS(action.payload));
case UPDATE_NEXT_BTN_ENABLE_STATUS:
return state.set('nextBtnEnable', action.payload);
case UPDATE_SNS_CHECK_CODE_TEXT:
return state.set('snsCheckCodeText', action.payload);
case UPDATE_TIP_MESSAGE:
return state.set('tipMessage', action.payload);
case UPDATE_BANK_INFO:
... ...
... ... @@ -487,7 +487,8 @@ export function confirmPayAction(snsCode) {
dispatch(setBankSafePayViewStatus(false));
dispatch(getQueryAmtList(queryDays));
//jumpTO详情页面
ReactNative.NativeModules.YH_InstallmentHelper.gotoRepayDetailPage(json.repayOrderCode, true);
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.instalmentRepayRecordDetail","params":{"repayOrderCode":"${repayOrderCode}","isBackToRoot":true}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}else {
dispatch(setTipMessage(json.message || '暂未获取到数据'));
}
... ...