Commit 4be1d473 by zeven

无购物出店需要扫码

parent c1d6a733
......@@ -1097,7 +1097,7 @@ const CounterMixins = ComposeComponent => {
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#FC4001',
backgroundColor: '#FC4000',
marginTop: 40,
}}>
<Text style={{color: '#ffffff', fontSize: 22}}>再逛一逛</Text>
......
......@@ -52,6 +52,7 @@ class VerticalPage extends Component {
priceVisible: true,
isCard: false,
cardVisible: false,
nobuyModal: false,
};
async componentWillMount() {
......@@ -573,6 +574,15 @@ class VerticalPage extends Component {
}, 8000);
};
showNobuyModal = () => {
Speech.speak('请扫码出店');
this.setState({nobuyModal: true});
clearTimeout(this.nobuyTimeout);
this.nobuyTimeout = setTimeout(() => {
this.setState({nobuyModal: false});
}, 30000);
};
render() {
let {
admin,
......@@ -591,6 +601,7 @@ class VerticalPage extends Component {
priceVisible,
stype,
isCard,
nobuyModal,
} = this.state;
pageSize =
goods && goods.bags.length > 0
......@@ -631,6 +642,39 @@ class VerticalPage extends Component {
this.state.faceType === 'wxpay' ? this.wxFacepay : this.smilepay;
return (
<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}>
{goodsArr.length === 0 && stype === 'guard' ? (
<View style={styles.guardModal}>
......@@ -643,7 +687,7 @@ class VerticalPage extends Component {
<Text style={styles.callText}>呼叫客服</Text>
</View>
</Touch>
<Touch onPress={() => this.onNoBuy()}>
<Touch onPress={() => this.showNobuyModal()}>
<View style={styles.guardModal_button_nobuy}>
<Text style={styles.callText}>无购物出店</Text>
</View>
......@@ -1186,7 +1230,7 @@ class HintPhone extends React.Component {
<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'}}>
<Text style={{fontSize: scaleSize(20), color: '#FC4000'}}>
如无法接通客服,可拨打电话: {contact}
</Text>
</View>
......@@ -1216,12 +1260,12 @@ class HintPhone extends React.Component {
const styles = {
HintPhone: {
width: '50%',
height: '25%',
width: width > 801 ? '50%' : '80%',
height: width > 801 ? '25%' : '40%',
backgroundColor: '#ffffff',
position: 'absolute',
top: '20%',
left: '25%',
left: width > 801 ? '25%' : '10%',
display: 'flex',
justifyContent: '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