diff --git a/src/redux/actions/userFactor.js b/src/redux/actions/userFactor.js index f739d9c..73e91d0 100644 --- a/src/redux/actions/userFactor.js +++ b/src/redux/actions/userFactor.js @@ -24,12 +24,11 @@ const userFactor = { }, //vod - payment: - (data1 = {}, data2 = {}) => - async (dispatch) => { - await proxy.post("userProduct/addVOD", data1, { dispatch }); - await proxy.post("userFactor/paymentVOD", data2, { dispatch }); - }, + // payment: + // (data1 = {}, data2 = {}) => + // async (dispatch) => { + // await proxy.post("userFactor/payment", data1, { dispatch }); + // }, verify: (data = {}) => async (dispatch) => diff --git a/src/redux/reducers/userFactor.js b/src/redux/reducers/userFactor.js index a07a884..cab3709 100644 --- a/src/redux/reducers/userFactor.js +++ b/src/redux/reducers/userFactor.js @@ -1,4 +1,5 @@ import { asyncAwesomeAlert } from "../../utils/AsyncWrappers"; +import {Linking} from "react-native"; const initialState = { loading: false, @@ -43,6 +44,7 @@ export default function userFactor(state = initialState, action) { case "userFactor/delete": return { ...state, loading: false, error: null }; case "userFactor/payment": + Linking.openURL(data); return { ...state, loading: false, error: null }; //vod case "userFactor/myList": @@ -51,7 +53,8 @@ export default function userFactor(state = initialState, action) { return { ...state, loading: false, info: data.factorInfo, error: null }; case "userFactor/deleteUserOffCode": return { ...state, loading: false, error: null }; - case "userFactor/paymentVOD": + case "userFactor/payment": + console.log(data); return { ...state, loading: false, error: null, isVerified: false }; case "userFactor/verifyVOD": return { ...state, loading: false, error: null, isVerified: true }; diff --git a/src/screens/QR/layouts/Scan/index.js b/src/screens/QR/layouts/Scan/index.js index df58aa3..21f730c 100644 --- a/src/screens/QR/layouts/Scan/index.js +++ b/src/screens/QR/layouts/Scan/index.js @@ -34,18 +34,11 @@ function Scan({ route, theme, page }) { }, []); const handleBarCodeScanned = ({ type, data }) => { - setScanned(true); if (page === "activation") { - setTimeout(() => { - setScanned(false); - }, 300); navigation.replace("Activation", { data: data.slice(data.lastIndexOf("/") + 1, data.length), }); } else { - setTimeout(() => { - setScanned(false); - }, 300); navigation.replace("QRContent", { data: data.slice(data.lastIndexOf("/") + 1, data.length), });