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 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 NP from '../utils/np';
import {setSpText, scaleSize} from '../utils/screen';
import {scaleSize, setSpText} from '../utils/screen';
import ModalStyles from './Modal/styles';
const mStyles = {
...ModalStyles,
......@@ -30,9 +30,6 @@ class OrderDetailMini extends Component {
contact,
storeName,
});
setTimeout(() => {
this.props.onPress();
}, 2000);
}
// 生成不重复的key
......
......@@ -449,6 +449,7 @@ class FacePage extends Component {
type: 'goods/faceinfo',
rawdata,
});
if (data.code !== 1) return null;
return data;
};
......@@ -737,7 +738,8 @@ class FacePage extends Component {
};
wxFacepay = async () => {
const auth = (await this.payscoreAuthinfo()) || {};
const {data} = (await this.authinfo()) || {};
const auth = data;
let params = null;
if (auth.bizCode === '0000') {
// 随行付支付
......@@ -768,7 +770,7 @@ class FacePage extends Component {
if (!params) {
if (this.faceRetry) {
this.faceRetry = false;
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付', true);
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付');
} else {
this.faceRetry = true;
await this.wxFacepay(); // 重试
......@@ -791,7 +793,7 @@ class FacePage extends Component {
smilepay = async () => {
await this.alipayinfo();
if (!this.alipayInfo || !this.alipayInfo.metaInfo) {
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付', true);
Speech.speak('刷脸支付启动失败,请重新刷脸或扫码支付');
return;
}
const {data} = await this.props.dispatch({
......@@ -861,7 +863,6 @@ class FacePage extends Component {
noBarcode,
openid,
});
console.log('data', data);
if (data.code === 1) {
this.orderId = data.data.orderId;
this.successPay(true);
......
......@@ -2,7 +2,7 @@ const app = ''; // eg: .25h/.eg
export const isProd = process.env.NODE_ENV === 'production';
export const host = isProd
? `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 qrHost = login;
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