Commit e83451ae by 修福龙

适配马里奥设备

parent e8ffded3
...@@ -6,6 +6,7 @@ import ModalStyles from './Modal/styles'; ...@@ -6,6 +6,7 @@ import ModalStyles from './Modal/styles';
import {colors, font} from '../utils/common'; import {colors, font} from '../utils/common';
import Touch from './Touch'; import Touch from './Touch';
import phone from '../assets/Vertical/phone.png'; import phone from '../assets/Vertical/phone.png';
import {width} from '../utils/screen';
const mStyles = { const mStyles = {
...ModalStyles, ...ModalStyles,
...@@ -70,8 +71,19 @@ class PhoneModal extends Component { ...@@ -70,8 +71,19 @@ class PhoneModal extends Component {
}; };
render() { render() {
const {onCall, ...props} = this.props; const {onCall, faceType, ...props} = this.props;
const {value} = this.state; const {value} = this.state;
if (faceType === 'alipay') {
styles.header = {...styles.header, backgroundColor: '#1b7dc7'};
styles.keyTouchOnSure = {
...styles.keyTouchOnSure,
backgroundColor: '#1b7dc7',
};
styles.keyTouchSure = {
...styles.keyTouchSure,
backgroundColor: '#87CEFA',
};
}
return ( return (
<Modal styles={mStyles} {...props}> <Modal styles={mStyles} {...props}>
<View style={styles.modalBackgroundStyle}> <View style={styles.modalBackgroundStyle}>
...@@ -101,7 +113,12 @@ class PhoneModal extends Component { ...@@ -101,7 +113,12 @@ class PhoneModal extends Component {
</View> </View>
</View> </View>
<View style={styles.container}> <View style={styles.container}>
<Text style={{color: 'red', fontSize: 45, marginBottom: 10}}> <Text
style={{
color: 'red',
fontSize: width > 471 ? 45 : 32,
marginBottom: width > 471 ? 10 : 8,
}}>
请输入接收验证码的手机号 请输入接收验证码的手机号
</Text> </Text>
<View <View
...@@ -115,7 +132,8 @@ class PhoneModal extends Component { ...@@ -115,7 +132,8 @@ class PhoneModal extends Component {
fontSize: 35, fontSize: 35,
width: '80%', width: '80%',
textAlign: 'center', textAlign: 'center',
padding: 30, padding: width > 471 ? 30 : 20,
color: '#000',
}} }}
placeholder="安全输入不留痕迹" placeholder="安全输入不留痕迹"
placeholderTextColor="lightgray" placeholderTextColor="lightgray"
...@@ -204,9 +222,9 @@ const styles = { ...@@ -204,9 +222,9 @@ const styles = {
title: { title: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
marginLeft: 30, marginLeft: width > 471 ? 30 : 24,
marginRight: 30, marginRight: width > 471 ? 30 : 24,
marginTop: 10, marginTop: width > 471 ? 10 : 5,
}, },
left: { left: {
flexDirection: 'row', flexDirection: 'row',
...@@ -215,18 +233,18 @@ const styles = { ...@@ -215,18 +233,18 @@ const styles = {
right: { right: {
flexDirection: 'row-reverse', flexDirection: 'row-reverse',
alignItems: 'center', alignItems: 'center',
marginTop: 15, marginTop: width > 471 ? 15 : 12,
}, },
img: { img: {
width: 80, width: width > 471 ? 80 : 60,
height: 80, height: width > 471 ? 80 : 60,
marginRight: 10, marginRight: width > 471 ? 10 : 5,
resizeMode: 'contain', resizeMode: 'contain',
}, },
phone: { phone: {
width: 40, width: width > 471 ? 40 : 30,
height: 40, height: width > 471 ? 40 : 30,
marginRight: 10, marginRight: width > 471 ? 10 : 8,
resizeMode: 'contain', resizeMode: 'contain',
}, },
image: { image: {
...@@ -236,13 +254,13 @@ const styles = { ...@@ -236,13 +254,13 @@ const styles = {
alignItems: 'center', alignItems: 'center',
}, },
logo: { logo: {
width: 150, width: width > 471 ? 150 : 120,
height: 150, height: width > 471 ? 150 : 120,
resizeMode: 'contain', resizeMode: 'contain',
}, },
text: { text: {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: 30, fontSize: width > 471 ? 30 : 25,
}, },
container: { container: {
flex: 0.2, flex: 0.2,
...@@ -355,7 +373,7 @@ const styles = { ...@@ -355,7 +373,7 @@ const styles = {
marginHorizontal: 5, marginHorizontal: 5,
}, },
keyUnitClose: { keyUnitClose: {
fontSize: 50, fontSize: width > 471 ? 50 : 40,
color: '#FFFFFF', color: '#FFFFFF',
}, },
}; };
......
...@@ -6,6 +6,7 @@ import ModalStyles from './Modal/styles'; ...@@ -6,6 +6,7 @@ import ModalStyles from './Modal/styles';
import {colors, font} from '../utils/common'; import {colors, font} from '../utils/common';
import Touch from './Touch'; import Touch from './Touch';
import phone from '../assets/Vertical/phone.png'; import phone from '../assets/Vertical/phone.png';
import {width} from '../utils/screen';
const mStyles = { const mStyles = {
...ModalStyles, ...ModalStyles,
...@@ -79,8 +80,19 @@ class VerifyCodeModal extends Component { ...@@ -79,8 +80,19 @@ class VerifyCodeModal extends Component {
}; };
render() { render() {
const {onCall, ...props} = this.props; const {onCall, faceType, ...props} = this.props;
const {value} = this.state; const {value} = this.state;
if (faceType === 'alipay') {
styles.header = {...styles.header, backgroundColor: '#1b7dc7'};
styles.keyTouchOnSure = {
...styles.keyTouchOnSure,
backgroundColor: '#1b7dc7',
};
styles.keyTouchSure = {
...styles.keyTouchSure,
backgroundColor: '#87CEFA',
};
}
return ( return (
<Modal styles={mStyles} {...props}> <Modal styles={mStyles} {...props}>
<View style={styles.modalBackgroundStyle}> <View style={styles.modalBackgroundStyle}>
...@@ -198,9 +210,9 @@ const styles = { ...@@ -198,9 +210,9 @@ const styles = {
title: { title: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
marginLeft: 30, marginLeft: width > 471 ? 30 : 24,
marginRight: 30, marginRight: width > 471 ? 30 : 24,
marginTop: 10, marginTop: width > 471 ? 10 : 8,
}, },
left: { left: {
flexDirection: 'row', flexDirection: 'row',
...@@ -209,18 +221,18 @@ const styles = { ...@@ -209,18 +221,18 @@ const styles = {
right: { right: {
flexDirection: 'row-reverse', flexDirection: 'row-reverse',
alignItems: 'center', alignItems: 'center',
marginTop: 15, marginTop: width > 471 ? 15 : 12,
}, },
img: { img: {
width: 80, width: width > 471 ? 80 : 60,
height: 80, height: width > 471 ? 80 : 60,
marginRight: 10, marginRight: width > 471 ? 10 : 5,
resizeMode: 'contain', resizeMode: 'contain',
}, },
phone: { phone: {
width: 40, width: width > 471 ? 40 : 30,
height: 40, height: width > 471 ? 40 : 30,
marginRight: 10, marginRight: width > 471 ? 10 : 8,
resizeMode: 'contain', resizeMode: 'contain',
}, },
image: { image: {
...@@ -230,13 +242,13 @@ const styles = { ...@@ -230,13 +242,13 @@ const styles = {
alignItems: 'center', alignItems: 'center',
}, },
logo: { logo: {
width: 150, width: width > 471 ? 150 : 120,
height: 150, height: width > 471 ? 150 : 120,
resizeMode: 'contain', resizeMode: 'contain',
}, },
text: { text: {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: 30, fontSize: width > 471 ? 30 : 25,
}, },
container: { container: {
flex: 0.3, flex: 0.3,
...@@ -247,8 +259,8 @@ const styles = { ...@@ -247,8 +259,8 @@ const styles = {
}, },
tips: { tips: {
color: 'red', color: 'red',
fontSize: 45, fontSize: width > 471 ? 45 : 32,
marginBottom: 10, marginBottom: width > 471 ? 10 : 8,
textAlign: 'center', textAlign: 'center',
}, },
codeView: { codeView: {
...@@ -256,7 +268,7 @@ const styles = { ...@@ -256,7 +268,7 @@ const styles = {
justifyContent: 'space-around', justifyContent: 'space-around',
alignItems: 'center', alignItems: 'center',
flex: 0.5, flex: 0.5,
marginTop: 30, marginTop: width > 471 ? 30 : 24,
}, },
code: { code: {
height: '100%', height: '100%',
...@@ -370,7 +382,7 @@ const styles = { ...@@ -370,7 +382,7 @@ const styles = {
marginHorizontal: 5, marginHorizontal: 5,
}, },
keyUnitClose: { keyUnitClose: {
fontSize: 50, fontSize: width > 471 ? 50 : 40,
color: '#FFFFFF', color: '#FFFFFF',
}, },
}; };
......
...@@ -140,7 +140,6 @@ const CounterMixins = ComposeComponent => { ...@@ -140,7 +140,6 @@ const CounterMixins = ComposeComponent => {
} }
window.socket.on('cmdOperate', this.command.bind(this)); window.socket.on('cmdOperate', this.command.bind(this));
window.socket.on('adsOperate', ({adsData}) => { window.socket.on('adsOperate', ({adsData}) => {
console.warn(adsData);
this.setState({ this.setState({
autoplayTime: Number(adsData.time), autoplayTime: Number(adsData.time),
imgArr: adsData[adsData.type], imgArr: adsData[adsData.type],
......
...@@ -33,7 +33,7 @@ class FacePage extends Component { ...@@ -33,7 +33,7 @@ class FacePage extends Component {
tip: '', tip: '',
tipsModal: false, tipsModal: false,
faceType: 'wxpay', faceType: 'wxpay',
sleep: false, sleep: true,
}; };
async componentWillMount() { async componentWillMount() {
...@@ -393,8 +393,7 @@ class FacePage extends Component { ...@@ -393,8 +393,7 @@ class FacePage extends Component {
clearTimeout(this.wakeUpTimeout); clearTimeout(this.wakeUpTimeout);
this.wakeUpTimeout = setTimeout(() => { this.wakeUpTimeout = setTimeout(() => {
this.setState({sleep: true}); this.setState({sleep: true});
}, 60 * 60 * 1000); }, 18888);
// }, 18888);
}; };
render() { render() {
...@@ -411,9 +410,10 @@ class FacePage extends Component { ...@@ -411,9 +410,10 @@ class FacePage extends Component {
tip, tip,
tipsModal, tipsModal,
sleep, sleep,
faceType,
} = this.state; } = this.state;
let {dispatch} = this.props; let {dispatch} = this.props;
if (this.state.faceType === 'alipay') { if (faceType === 'alipay') {
styles.header = {...styles.header, backgroundColor: '#1b7dc7'}; styles.header = {...styles.header, backgroundColor: '#1b7dc7'};
styles.btnCome = {...styles.btnCome, backgroundColor: '#1b7dc7'}; styles.btnCome = {...styles.btnCome, backgroundColor: '#1b7dc7'};
styles.footer = {...styles.footer, backgroundColor: '#1b7dc7'}; styles.footer = {...styles.footer, backgroundColor: '#1b7dc7'};
...@@ -431,6 +431,7 @@ class FacePage extends Component { ...@@ -431,6 +431,7 @@ class FacePage extends Component {
// onRequestClose={this.handleClose} // onRequestClose={this.handleClose}
onCall={this.onCall} onCall={this.onCall}
onSubmit={this.onSubmit} onSubmit={this.onSubmit}
faceType={faceType}
/> />
<VerifyCodeModal <VerifyCodeModal
visible={verifyCodeModal} visible={verifyCodeModal}
...@@ -440,6 +441,7 @@ class FacePage extends Component { ...@@ -440,6 +441,7 @@ class FacePage extends Component {
// onRequestClose={this.handleCodeClose} // onRequestClose={this.handleCodeClose}
onCall={this.onCall} onCall={this.onCall}
onSubmit={this.onCodeSubmit} onSubmit={this.onCodeSubmit}
faceType={faceType}
/> />
<OrderDetailsModal <OrderDetailsModal
visible={orderDetailsModal} visible={orderDetailsModal}
...@@ -455,6 +457,7 @@ class FacePage extends Component { ...@@ -455,6 +457,7 @@ class FacePage extends Component {
talkCall={talkCall} talkCall={talkCall}
customerPhone={customerPhone} customerPhone={customerPhone}
current={current} current={current}
faceType={faceType}
/> />
<View style={styles.header}> <View style={styles.header}>
<View style={styles.title}> <View style={styles.title}>
...@@ -509,7 +512,7 @@ class FacePage extends Component { ...@@ -509,7 +512,7 @@ class FacePage extends Component {
<View style={styles.click}> <View style={styles.click}>
<Image <Image
source={ source={
this.state.faceType === 'wxpay' faceType === 'wxpay'
? require('../assets/wxpay.png') ? require('../assets/wxpay.png')
: require('../assets/Vertical/alipay01.png') : require('../assets/Vertical/alipay01.png')
} }
...@@ -525,7 +528,11 @@ class FacePage extends Component { ...@@ -525,7 +528,11 @@ class FacePage extends Component {
{talkCall === 1 ? ( {talkCall === 1 ? (
<View style={styles.onCall}> <View style={styles.onCall}>
<Image <Image
source={require('../assets/call.gif')} source={
faceType === 'wxpay'
? require('../assets/call.gif')
: require('../assets/call_blue.gif')
}
style={styles.callGif} style={styles.callGif}
/> />
<Text style={styles.onCallText}>正在语音通话中</Text> <Text style={styles.onCallText}>正在语音通话中</Text>
...@@ -534,7 +541,7 @@ class FacePage extends Component { ...@@ -534,7 +541,7 @@ class FacePage extends Component {
<View style={styles.onCall}> <View style={styles.onCall}>
<Image <Image
source={ source={
this.state.faceType === 'wxpay' faceType === 'wxpay'
? require('../assets/call.gif') ? require('../assets/call.gif')
: require('../assets/call_blue.gif') : require('../assets/call_blue.gif')
} }
...@@ -547,7 +554,7 @@ class FacePage extends Component { ...@@ -547,7 +554,7 @@ class FacePage extends Component {
<View style={styles.call}> <View style={styles.call}>
<Image <Image
source={ source={
this.state.faceType === 'wxpay' faceType === 'wxpay'
? require('../assets/call.gif') ? require('../assets/call.gif')
: require('../assets/call_blue.gif') : require('../assets/call_blue.gif')
} }
...@@ -701,7 +708,7 @@ const styles = { ...@@ -701,7 +708,7 @@ const styles = {
// flex: 0.2, // flex: 0.2,
marginTop: '30%', marginTop: '30%',
width: '100%', width: '100%',
height: 200, height: width > 471 ? 200 : 160,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
...@@ -713,24 +720,24 @@ const styles = { ...@@ -713,24 +720,24 @@ const styles = {
backgroundColor: '#FC4000', backgroundColor: '#FC4000',
width: '70%', width: '70%',
// height: '18%', // height: '18%',
height: 200, height: width > 471 ? 200 : 160,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
marginRight: 5, marginRight: 5,
}, },
tipText: { tipText: {
fontSize: 40, fontSize: width > 471 ? 40 : 32,
color: '#fff', color: '#fff',
textAlign: 'center', textAlign: 'center',
paddingTop: 40, paddingTop: width > 471 ? 40 : 32,
paddingBottom: 40, paddingBottom: width > 471 ? 40 : 32,
paddingLeft: 5, paddingLeft: 5,
paddingRight: 5, paddingRight: 5,
}, },
callTouch: { callTouch: {
width: '30%', width: '30%',
// height: '18%', // height: '18%',
height: 200, height: width > 471 ? 200 : 160,
marginLeft: 5, marginLeft: 5,
backgroundColor: '#FC4000', backgroundColor: '#FC4000',
}, },
...@@ -744,17 +751,17 @@ const styles = { ...@@ -744,17 +751,17 @@ const styles = {
// marginLeft: 5, // marginLeft: 5,
}, },
callTipsText: { callTipsText: {
fontSize: 40, fontSize: width > 471 ? 40 : 32,
color: '#fff', color: '#fff',
textAlign: 'center', textAlign: 'center',
paddingTop: 70, paddingTop: width > 471 ? 70 : 56,
// paddingBottom: 40, // paddingBottom: 40,
paddingLeft: 10, paddingLeft: width > 471 ? 10 : 8,
paddingRight: 10, paddingRight: width > 471 ? 10 : 8,
}, },
callTipsImg: { callTipsImg: {
width: 80, width: width > 471 ? 80 : 64,
height: 60, height: width > 471 ? 60 : 48,
}, },
}; };
......
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