Commit 47ce025e by zhonghao

呼叫客服弹窗

parent c8a1d66d
import React, {Component} from 'react'; import React, {Component} from 'react';
import {View, Text, Image, Modal, Button, ScrollView} from 'react-native'; import {View, Text, Image, Modal, ScrollView} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import Swiper from 'react-native-swiper'; import Swiper from 'react-native-swiper';
import QRCode from 'react-native-qrcode-svg'; import QRCode from 'react-native-qrcode-svg';
...@@ -14,6 +14,7 @@ import counterText from '../assets/Vertical/counterText.png'; ...@@ -14,6 +14,7 @@ import counterText from '../assets/Vertical/counterText.png';
import img24h from '../assets/Vertical/24h.png'; import img24h from '../assets/Vertical/24h.png';
import phone from '../assets/Vertical/phone.png'; import phone from '../assets/Vertical/phone.png';
import guide from '../assets/Vertical/guide.jpg'; import guide from '../assets/Vertical/guide.jpg';
import call from '../assets/Vertical/call.png';
import {login} from '../utils/config'; import {login} from '../utils/config';
import {colors} from '../utils/common'; import {colors} from '../utils/common';
import WxFacepay from '../utils/WxFacepay'; import WxFacepay from '../utils/WxFacepay';
...@@ -359,6 +360,8 @@ class VerticalPage extends Component { ...@@ -359,6 +360,8 @@ class VerticalPage extends Component {
this.setState({ this.setState({
hintVisible: true, hintVisible: true,
}); });
clearTimeout(this.callModalTimeout);
this.callModalTimeout = setTimeout(() => { this.setState({ hintVisible: false }); }, 300000);
}; };
onNoBuy = async () => { onNoBuy = async () => {
...@@ -595,7 +598,7 @@ class VerticalPage extends Component { ...@@ -595,7 +598,7 @@ class VerticalPage extends Component {
{goodsArr.length === 0 && dtype === 'guard' ? ( {goodsArr.length === 0 && dtype === 'guard' ? (
<View style={styles.guardModal}> <View style={styles.guardModal}>
<View style={styles.guardModal_image}> <View style={styles.guardModal_image}>
<Image source={guide} /> <Image style={styles.Imageee} source={guide} />
</View> </View>
<View style={styles.guardModal_button}> <View style={styles.guardModal_button}>
<Touch onPress={() => this.onCall()}> <Touch onPress={() => this.onCall()}>
...@@ -1098,18 +1101,31 @@ class HintPhone extends React.Component { ...@@ -1098,18 +1101,31 @@ class HintPhone extends React.Component {
<View /> <View />
</Touch> </Touch>
<View style={styles.HintPhone}> <View style={styles.HintPhone}>
<Text style={{fontSize: 35, marginTop: 30}}> <Image style={{width: '60%', height: '60%'}} source={call} />
如无法接通客服,可拨打电话 <Text style={{fontSize: scaleSize(30)}}>正在呼叫客服</Text>
<View style={{display: 'flex', marginTop: 10}}>
<Text style={{fontSize: scaleSize(20), color: '#7f7f7f'}}>
如无法接通客服,可拨打电话: {contact}
</Text>
</View>
<Touch
onPress={closeHint}>
<View
style={{
width: scaleSize(200),
height: scaleSize(65),
borderRadius: 100,
backgroundColor: '#fc4000',
marginTop: 30,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
<Text style={{color: '#ffffff', fontSize: scaleSize(30)}}>
关闭弹窗
</Text> </Text>
<Text style={{fontSize: 50, marginTop: 30}}>{contact}</Text>
<View style={{marginTop: 80, width: 100}}>
<Button
onPress={closeHint}
style={{marginTop: 30}}
title="关闭"
color="#fc4000"
/>
</View> </View>
</Touch>
</View> </View>
</View> </View>
</Modal> </Modal>
...@@ -1119,12 +1135,14 @@ class HintPhone extends React.Component { ...@@ -1119,12 +1135,14 @@ class HintPhone extends React.Component {
const styles = { const styles = {
HintPhone: { HintPhone: {
width: '70%', width: '50%',
height: '25%', height: '25%',
backgroundColor: '#fff', backgroundColor: '#ffffff',
position: 'absolute', position: 'absolute',
top: '20%', top: '20%',
left: '15%', left: '25%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
opacity: 40, opacity: 40,
}, },
...@@ -1608,6 +1626,10 @@ const styles = { ...@@ -1608,6 +1626,10 @@ const styles = {
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}, },
Imageee: {
height: '65%',
width: '80%',
},
guardModal_button: { guardModal_button: {
height: '30%', height: '30%',
width: '100%', width: '100%',
...@@ -1625,7 +1647,6 @@ const styles = { ...@@ -1625,7 +1647,6 @@ const styles = {
alignItems: 'center', alignItems: 'center',
width: scaleSize(350), width: scaleSize(350),
height: scaleSize(125), height: scaleSize(125),
fontSize: scaleSize(75),
marginRight: 50, marginRight: 50,
}, },
guardModal_button_nobuy: { guardModal_button_nobuy: {
......
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