Commit 4be1d473 by zeven

无购物出店需要扫码

parent c1d6a733
...@@ -1097,7 +1097,7 @@ const CounterMixins = ComposeComponent => { ...@@ -1097,7 +1097,7 @@ const CounterMixins = ComposeComponent => {
borderRadius: 5, borderRadius: 5,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: '#FC4001', backgroundColor: '#FC4000',
marginTop: 40, marginTop: 40,
}}> }}>
<Text style={{color: '#ffffff', fontSize: 22}}>再逛一逛</Text> <Text style={{color: '#ffffff', fontSize: 22}}>再逛一逛</Text>
......
...@@ -52,6 +52,7 @@ class VerticalPage extends Component { ...@@ -52,6 +52,7 @@ class VerticalPage extends Component {
priceVisible: true, priceVisible: true,
isCard: false, isCard: false,
cardVisible: false, cardVisible: false,
nobuyModal: false,
}; };
async componentWillMount() { async componentWillMount() {
...@@ -573,6 +574,15 @@ class VerticalPage extends Component { ...@@ -573,6 +574,15 @@ class VerticalPage extends Component {
}, 8000); }, 8000);
}; };
showNobuyModal = () => {
Speech.speak('请扫码出店');
this.setState({nobuyModal: true});
clearTimeout(this.nobuyTimeout);
this.nobuyTimeout = setTimeout(() => {
this.setState({nobuyModal: false});
}, 30000);
};
render() { render() {
let { let {
admin, admin,
...@@ -591,6 +601,7 @@ class VerticalPage extends Component { ...@@ -591,6 +601,7 @@ class VerticalPage extends Component {
priceVisible, priceVisible,
stype, stype,
isCard, isCard,
nobuyModal,
} = this.state; } = this.state;
pageSize = pageSize =
goods && goods.bags.length > 0 goods && goods.bags.length > 0
...@@ -631,6 +642,39 @@ class VerticalPage extends Component { ...@@ -631,6 +642,39 @@ class VerticalPage extends Component {
this.state.faceType === 'wxpay' ? this.wxFacepay : this.smilepay; this.state.faceType === 'wxpay' ? this.wxFacepay : this.smilepay;
return ( return (
<View style={{flex: 1, position: 'relative'}}> <View style={{flex: 1, position: 'relative'}}>
<Modal visible={nobuyModal} transparent>
<View>
<Touch
style={{
width: '100%',
height: '100%',
backgroundColor: 'rgba(0, 0, 0, .5)',
}}
onPress={() => this.setState({nobuyModal: false})}>
<View />
</Touch>
<View style={styles.HintPhone}>
<Image
source={require('../assets/Vertical/realname.png')}
style={{left: 20, position: 'absolute'}}
/>
<Image
source={require('../assets/Vertical/police.png')}
style={{right: 20, position: 'absolute'}}
/>
<Text style={{fontSize: scaleSize(50), marginBottom: 20}}>
请扫码出店
</Text>
<QRCode
logoSize={width > 801 ? 50 : scaleSize(100)}
// logoBackgroundColor="#fc4000"
logo={logoVisible && require('../assets/logo2.png')}
size={width > 801 ? 200 : scaleSize(400)}
value={`${qrHost || login}/#/store-leave-g${this.storeKey}`}
/>
</View>
</View>
</Modal>
<View style={styles.main}> <View style={styles.main}>
{goodsArr.length === 0 && stype === 'guard' ? ( {goodsArr.length === 0 && stype === 'guard' ? (
<View style={styles.guardModal}> <View style={styles.guardModal}>
...@@ -643,7 +687,7 @@ class VerticalPage extends Component { ...@@ -643,7 +687,7 @@ class VerticalPage extends Component {
<Text style={styles.callText}>呼叫客服</Text> <Text style={styles.callText}>呼叫客服</Text>
</View> </View>
</Touch> </Touch>
<Touch onPress={() => this.onNoBuy()}> <Touch onPress={() => this.showNobuyModal()}>
<View style={styles.guardModal_button_nobuy}> <View style={styles.guardModal_button_nobuy}>
<Text style={styles.callText}>无购物出店</Text> <Text style={styles.callText}>无购物出店</Text>
</View> </View>
...@@ -1186,7 +1230,7 @@ class HintPhone extends React.Component { ...@@ -1186,7 +1230,7 @@ class HintPhone extends React.Component {
<Image style={{width: '60%', height: '60%'}} source={call} /> <Image style={{width: '60%', height: '60%'}} source={call} />
<Text style={{fontSize: scaleSize(30)}}>正在呼叫客服</Text> <Text style={{fontSize: scaleSize(30)}}>正在呼叫客服</Text>
<View style={{display: 'flex', marginTop: 10}}> <View style={{display: 'flex', marginTop: 10}}>
<Text style={{fontSize: scaleSize(20), color: '#7f7f7f'}}> <Text style={{fontSize: scaleSize(20), color: '#FC4000'}}>
如无法接通客服,可拨打电话: {contact} 如无法接通客服,可拨打电话: {contact}
</Text> </Text>
</View> </View>
...@@ -1216,12 +1260,12 @@ class HintPhone extends React.Component { ...@@ -1216,12 +1260,12 @@ class HintPhone extends React.Component {
const styles = { const styles = {
HintPhone: { HintPhone: {
width: '50%', width: width > 801 ? '50%' : '80%',
height: '25%', height: width > 801 ? '25%' : '40%',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
position: 'absolute', position: 'absolute',
top: '20%', top: '20%',
left: '25%', left: width > 801 ? '25%' : '10%',
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
......
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