|
@@ -2,7 +2,7 @@ import {createSlice} from "@reduxjs/toolkit";
|
|
|
import {REQ_STATUS} from "@api/config";
|
|
import {REQ_STATUS} from "@api/config";
|
|
|
import {
|
|
import {
|
|
|
buildReqReducer,
|
|
buildReqReducer,
|
|
|
- reqChangePayPass,
|
|
|
|
|
|
|
+ reqChangePayPass, reqCPFSave,
|
|
|
reqFirstPayConfig, reqForgetPayPass,
|
|
reqFirstPayConfig, reqForgetPayPass,
|
|
|
reqGetAccountsPayInfo, reqMexWithdrawSetInfo,
|
|
reqGetAccountsPayInfo, reqMexWithdrawSetInfo,
|
|
|
reqPaymentOrder,
|
|
reqPaymentOrder,
|
|
@@ -25,6 +25,7 @@ const reducerRechargeConfig=(state,action,arg)=>{
|
|
|
if (data.list){
|
|
if (data.list){
|
|
|
state.config=data.list;
|
|
state.config=data.list;
|
|
|
state.showBonus=data.bonus_show;
|
|
state.showBonus=data.bonus_show;
|
|
|
|
|
+ state.cpfFirst=data.cpf_first;
|
|
|
// state.showBonus=true;
|
|
// state.showBonus=true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -231,6 +232,24 @@ const reducerWithdrawPayout=(state,action,arg)=>{
|
|
|
const withdrawPayoutStatus=(state,status,arg)=>{
|
|
const withdrawPayoutStatus=(state,status,arg)=>{
|
|
|
state.status.WithdrawPayout=status;
|
|
state.status.WithdrawPayout=status;
|
|
|
}
|
|
}
|
|
|
|
|
+const reducerSaveCPF=(state,action,arg)=>{
|
|
|
|
|
+ let payload=action.payload;
|
|
|
|
|
+ let msg=getHttpMsg(payload);
|
|
|
|
|
+ if (payload&&payload.code===200){
|
|
|
|
|
+ state.cpfFirst=false;
|
|
|
|
|
+ toast.success(msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ toast.error(msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (arg&&arg.callback!=null){
|
|
|
|
|
+ arg.callback(payload);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const saveCPFStatus=(state,status,arg)=>{
|
|
|
|
|
+ state.status.SaveCPF=status;
|
|
|
|
|
+}
|
|
|
export const Pay=createSlice({
|
|
export const Pay=createSlice({
|
|
|
name: 'pay',
|
|
name: 'pay',
|
|
|
initialState: {
|
|
initialState: {
|
|
@@ -247,6 +266,7 @@ export const Pay=createSlice({
|
|
|
WithdrawSetInfo:REQ_STATUS.NONE,
|
|
WithdrawSetInfo:REQ_STATUS.NONE,
|
|
|
WithdrawPayout:REQ_STATUS.NONE,
|
|
WithdrawPayout:REQ_STATUS.NONE,
|
|
|
ForgetPayPass:REQ_STATUS.NONE,
|
|
ForgetPayPass:REQ_STATUS.NONE,
|
|
|
|
|
+ SaveCPF:REQ_STATUS.NONE,
|
|
|
},
|
|
},
|
|
|
config:[],
|
|
config:[],
|
|
|
payconfig:null,
|
|
payconfig:null,
|
|
@@ -259,7 +279,8 @@ export const Pay=createSlice({
|
|
|
payOrderList:null,
|
|
payOrderList:null,
|
|
|
withdrawRecord:null,
|
|
withdrawRecord:null,
|
|
|
changePayPassType:0,
|
|
changePayPassType:0,
|
|
|
- showBonus:false
|
|
|
|
|
|
|
+ showBonus:false,
|
|
|
|
|
+ cpfFirst:false
|
|
|
},
|
|
},
|
|
|
reducers: {
|
|
reducers: {
|
|
|
updatePayFinish:((state, action) => {
|
|
updatePayFinish:((state, action) => {
|
|
@@ -291,6 +312,7 @@ export const Pay=createSlice({
|
|
|
buildReqReducer(builder,reqWithdrawPayout,reducerWithdrawPayout,withdrawPayoutStatus);
|
|
buildReqReducer(builder,reqWithdrawPayout,reducerWithdrawPayout,withdrawPayoutStatus);
|
|
|
buildReqReducer(builder,reqForgetPayPass,reducerChangePayPass,changePayPassStatus);
|
|
buildReqReducer(builder,reqForgetPayPass,reducerChangePayPass,changePayPassStatus);
|
|
|
buildReqReducer(builder,reqMexWithdrawSetInfo,reducerWithdrawSetInfo,withdrawSetInfoStatus);
|
|
buildReqReducer(builder,reqMexWithdrawSetInfo,reducerWithdrawSetInfo,withdrawSetInfoStatus);
|
|
|
|
|
+ buildReqReducer(builder,reqCPFSave,reducerSaveCPF,saveCPFStatus);
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
export const {updatePayFinish,setChangePayPassType} = Pay.actions;
|
|
export const {updatePayFinish,setChangePayPassType} = Pay.actions;
|
|
@@ -395,6 +417,12 @@ export const getPayConfigStatus=(state)=>{
|
|
|
export const getForgetPayPassStatus=(state)=>{
|
|
export const getForgetPayPassStatus=(state)=>{
|
|
|
return state.pay.status.ForgetPayPass;
|
|
return state.pay.status.ForgetPayPass;
|
|
|
}
|
|
}
|
|
|
|
|
+export const getCPFFirst=(state)=>{
|
|
|
|
|
+ return state.pay.cpfFirst;
|
|
|
|
|
+}
|
|
|
|
|
+export const getSaveCPFStatus=(state)=>{
|
|
|
|
|
+ return state.pay.status.SaveCPF;
|
|
|
|
|
+}
|
|
|
export default Pay.reducer;
|
|
export default Pay.reducer;
|
|
|
|
|
|
|
|
export const reqPayConfig=(dispatch,userInfo)=>{
|
|
export const reqPayConfig=(dispatch,userInfo)=>{
|