Commit 9285059c by Confettis

出门刷脸扣款 2

parent 8774b350
import React, {Component} from 'react';
import {Modal, View, Text, Image, FlatList, ScrollView} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import ModalStyles from './Modal/styles'; import React, {Component} from 'react';
import {FlatList, Image, Modal, ScrollView, Text, View} from 'react-native';
import {font} from '../utils/common'; import {font} from '../utils/common';
import NP from '../utils/np'; import NP from '../utils/np';
import {setSpText, scaleSize} from '../utils/screen'; import {scaleSize, setSpText} from '../utils/screen';
import ModalStyles from './Modal/styles';
const mStyles = { const mStyles = {
...ModalStyles, ...ModalStyles,
...@@ -30,9 +30,6 @@ class OrderDetailMini extends Component { ...@@ -30,9 +30,6 @@ class OrderDetailMini extends Component {
contact, contact,
storeName, storeName,
}); });
setTimeout(() => {
this.props.onPress();
}, 2000);
} }
// 生成不重复的key // 生成不重复的key
......
...@@ -449,6 +449,7 @@ class FacePage extends Component { ...@@ -449,6 +449,7 @@ class FacePage extends Component {
type: 'goods/faceinfo', type: 'goods/faceinfo',
rawdata, rawdata,
}); });
if (data.code !== 1) return null;
return data; return data;
}; };
...@@ -737,7 +738,8 @@ class FacePage extends Component { ...@@ -737,7 +738,8 @@ class FacePage extends Component {
}; };
wxFacepay = async () => { wxFacepay = async () => {
const auth = (await this.payscoreAuthinfo()) || {}; const {data} = (await this.authinfo()) || {};
const auth = data;
let params = null; let params = null;
if (auth.bizCode === '0000') { if (auth.bizCode === '0000') {
// 随行付支付 // 随行付支付
...@@ -768,7 +770,7 @@ class FacePage extends Component { ...@@ -768,7 +770,7 @@ class FacePage extends Component {
if (!params) { if (!params) {
if (this.faceRetry) { if (this.faceRetry) {
this.faceRetry = false; this.faceRetry = false;
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付', true); Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付');
} else { } else {
this.faceRetry = true; this.faceRetry = true;
await this.wxFacepay(); // 重试 await this.wxFacepay(); // 重试
...@@ -791,7 +793,7 @@ class FacePage extends Component { ...@@ -791,7 +793,7 @@ class FacePage extends Component {
smilepay = async () => { smilepay = async () => {
await this.alipayinfo(); await this.alipayinfo();
if (!this.alipayInfo || !this.alipayInfo.metaInfo) { if (!this.alipayInfo || !this.alipayInfo.metaInfo) {
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付', true); Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付');
return; return;
} }
const {data} = await this.props.dispatch({ const {data} = await this.props.dispatch({
...@@ -861,7 +863,6 @@ class FacePage extends Component { ...@@ -861,7 +863,6 @@ class FacePage extends Component {
noBarcode, noBarcode,
openid, openid,
}); });
console.log('data', data);
if (data.code === 1) { if (data.code === 1) {
this.orderId = data.data.orderId; this.orderId = data.data.orderId;
this.successPay(true); this.successPay(true);
......
...@@ -2,7 +2,7 @@ const app = ''; // eg: .25h/.eg ...@@ -2,7 +2,7 @@ const app = ''; // eg: .25h/.eg
export const isProd = process.env.NODE_ENV === 'production'; export const isProd = process.env.NODE_ENV === 'production';
export const host = isProd export const host = isProd
? `https://api${app}.vs-u.com` ? `https://api${app}.vs-u.com`
: 'http://192.168.88.43:7001'; : 'http://192.168.88.88:7001';
export const login = `https://m${app}.vs-u.com`; export const login = `https://m${app}.vs-u.com`;
export const qrHost = login; export const qrHost = login;
export const imgUrl = 'http://barcod.oss-cn-shenzhen.aliyuncs.com/images/'; export const imgUrl = 'http://barcod.oss-cn-shenzhen.aliyuncs.com/images/';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment