Commit e8ffded3 by 修福龙

刷脸界面修改

parent 91f859d6
import React, {Component} from 'react'; import React, {Component} from 'react';
import {View, Text, Image, Dimensions} from 'react-native'; import {View, Text, Image} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
// import RtcEngine from 'react-native-agora'; // import RtcEngine from 'react-native-agora';
...@@ -15,8 +15,9 @@ import phone from '../assets/Vertical/phone.png'; ...@@ -15,8 +15,9 @@ import phone from '../assets/Vertical/phone.png';
import {onTalkCall, leaveTalkCall} from '../utils/agora'; import {onTalkCall, leaveTalkCall} from '../utils/agora';
import Toast from '../components/Toast'; import Toast from '../components/Toast';
import Screensaver from '../components/Screensaver'; import Screensaver from '../components/Screensaver';
import {width} from '../utils/screen';
const {width} = Dimensions.get('screen'); // const {width} = Dimensions.get('screen');
class FacePage extends Component { class FacePage extends Component {
state = { state = {
...@@ -32,7 +33,7 @@ class FacePage extends Component { ...@@ -32,7 +33,7 @@ class FacePage extends Component {
tip: '', tip: '',
tipsModal: false, tipsModal: false,
faceType: 'wxpay', faceType: 'wxpay',
sleep: true, sleep: false,
}; };
async componentWillMount() { async componentWillMount() {
...@@ -392,7 +393,8 @@ class FacePage extends Component { ...@@ -392,7 +393,8 @@ class FacePage extends Component {
clearTimeout(this.wakeUpTimeout); clearTimeout(this.wakeUpTimeout);
this.wakeUpTimeout = setTimeout(() => { this.wakeUpTimeout = setTimeout(() => {
this.setState({sleep: true}); this.setState({sleep: true});
}, 18888); }, 60 * 60 * 1000);
// }, 18888);
}; };
render() { render() {
...@@ -576,19 +578,19 @@ const styles = { ...@@ -576,19 +578,19 @@ const styles = {
title: { title: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
marginLeft: 30, marginLeft: width > 471 ? 30 : 15,
marginRight: 30, marginRight: width > 471 ? 30 : 15,
marginTop: 10, marginTop: width > 471 ? 10 : 8,
}, },
headline: { headline: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
flex: 1, flex: 1,
marginBottom: 20, marginBottom: width > 471 ? 20 : 16,
}, },
headTitle: { headTitle: {
fontSize: 60, fontSize: width > 471 ? 60 : 48,
color: '#fff', color: '#fff',
}, },
left: { left: {
...@@ -600,14 +602,20 @@ const styles = { ...@@ -600,14 +602,20 @@ const styles = {
alignItems: 'center', alignItems: 'center',
}, },
img: { img: {
width: 60, width: width > 471 ? 60 : 48,
height: 60, height: width > 471 ? 60 : 48,
marginRight: 10, marginRight: width > 471 ? 10 : 8,
resizeMode: 'contain', resizeMode: 'contain',
}, },
text: { text: {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: 40, fontSize: width > 471 ? 40 : 32,
},
phone: {
width: width > 471 ? 40 : 32,
height: width > 471 ? 40 : 32,
marginRight: width > 471 ? 10 : 8,
resizeMode: 'contain',
}, },
face: { face: {
flex: 0.6, flex: 0.6,
...@@ -639,25 +647,19 @@ const styles = { ...@@ -639,25 +647,19 @@ const styles = {
flexDirection: 'row', flexDirection: 'row',
}, },
clickText: { clickText: {
fontSize: 50, fontSize: width > 471 ? 50 : 35,
color: '#fff', color: '#fff',
marginTop: 25, marginTop: width > 471 ? 25 : 20,
}, },
wxpay: { wxpay: {
width: 72, width: width > 471 ? 72 : 40,
height: 65, height: width > 471 ? 65 : 35,
marginTop: 30, marginTop: width > 471 ? 30 : 24,
marginRight: 10, marginRight: width > 471 ? 10 : 8,
}, },
up: { up: {
width: 100, width: width > 471 ? 100 : 70,
height: 120, height: width > 471 ? 120 : 85,
},
phone: {
width: 40,
height: 40,
marginRight: 10,
resizeMode: 'contain',
}, },
footer: { footer: {
flex: 0.2, flex: 0.2,
...@@ -672,9 +674,9 @@ const styles = { ...@@ -672,9 +674,9 @@ const styles = {
justifyContent: 'center', justifyContent: 'center',
}, },
callGif: { callGif: {
width: 350, width: width > 471 ? 350 : 250,
height: 240, height: width > 471 ? 240 : 140,
marginLeft: -120, marginLeft: width > 471 ? -120 : -90,
}, },
callText: { callText: {
fontSize: 70, fontSize: 70,
...@@ -691,9 +693,9 @@ const styles = { ...@@ -691,9 +693,9 @@ const styles = {
alignItems: 'center', alignItems: 'center',
}, },
onCallText: { onCallText: {
fontSize: 70, fontSize: width > 471 ? 70 : 40,
color: '#fff', color: '#fff',
marginLeft: -70, marginLeft: width > 471 ? -70 : -40,
}, },
modal: { modal: {
// flex: 0.2, // flex: 0.2,
......
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