Commit 7bf9a3f4 by 黄日华

调整付款后开门离店提示时间

调整呼叫客服弹窗时间
parent 29aecaab
......@@ -465,31 +465,30 @@ const CounterMixins = ComposeComponent => {
successPay = async balance => {
Toast.hide();
const {goodsArr} = this.state;
let total = 0;
let totalNum = 0;
goodsArr.map(item => {
totalNum += Number(item.num);
if (item.price) {
total += Number(item.price) * Number(item.num);
} else {
total += Number(item.prePrice) * Number(item.num);
}
});
// const msg = balance
// ? '余额付款成功,祝您生活愉快~'
// : '付款成功,祝您生活愉快~';
const msg = '付款' + total + '元,共' + totalNum + '件商品,祝您生活愉快';
// let total = 0;
// let totalNum = 0;
// goodsArr.map(item => {
// totalNum += Number(item.num);
// if (item.price) {
// total += Number(item.price) * Number(item.num);
// } else {
// total += Number(item.prePrice) * Number(item.num);
// }
// });
// const msg = '付款' + total + '元,共' + totalNum + '件商品,祝您生活愉快';
this.props.dispatch({
// 购物完成步骤
type: 'app/step',
step: 3,
});
this.setState({voiceModal: true, voiceTitle: msg});
Speech.speak(msg);
// this.setState({voiceModal: true, voiceTitle: msg});
Speech.speak('付款成功');
if (this.state.stype === 'guard') {
this.showLeaveModal();
} else {
this.storeSetting(goodsArr);
await wait(1500);
this.onLucky();
await wait(1500);
}
this.clearList();
};
......@@ -552,7 +551,7 @@ const CounterMixins = ComposeComponent => {
showLeaveModal = () => {
if (this.state.stype === 'guard') {
Speech.speak('请点击开门离店或者再逛一逛继续购物');
Speech.speak('请点击收银界面开门离店按钮,离开门店');
this.setState({cloudFinishModal: true});
clearTimeout(this.leaveModalTimeout);
this.leaveModalTimeout = setTimeout(() => {
......@@ -1053,7 +1052,7 @@ const CounterMixins = ComposeComponent => {
});
const {stype} = this.state;
if (stype === 'guard') {
Speech.speak('请点击开门离店或者再逛一逛继续购物');
Speech.speak('请点击收银界面开门离店按钮,离开门店');
this.setState({
cloudFinishModal: true,
});
......@@ -1245,11 +1244,18 @@ const CounterMixins = ComposeComponent => {
</Modal>
<Modal visible={cloudFinishModal} transparent>
<View style={{alignItems: 'center'}}>
<View
style={{
flexDirection: 'row',
justifyContent: 'center',
marginBottom: 10,
}}>
<Image
style={{
width: 100,
height: 100,
marginLeft: '5%',
marginLeft: -10,
marginTop: -18,
resizeMode: 'contain',
alignSelf: 'flex-start',
}}
......@@ -1259,23 +1265,30 @@ const CounterMixins = ComposeComponent => {
style={{
justifyContent: 'center',
alignItems: 'center',
marginTop: -30,
flex: 1,
}}>
<Text style={{color: '#000000', fontSize: 26}}>云值守店</Text>
<Text style={{color: '#000000', fontSize: 28}}>云值守店</Text>
</View>
<Touch
onPress={() => this.onCloseCloudFinish()}
style={{
width: '90%',
height: 70,
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#FC4000',
marginTop: 40,
width: 100,
height: 100,
justifyContent: 'flex-start',
alignItems: 'flex-end',
}}>
<Text style={{color: '#ffffff', fontSize: 22}}>再逛一逛</Text>
<Image
style={{
width: 30,
height: 30,
marginRight: -8,
marginTop: -16,
resizeMode: 'contain',
}}
source={require('../assets/close.png')}
/>
</Touch>
</View>
<Touch
onPress={() => this.onOpen()}
style={{
......@@ -1284,11 +1297,10 @@ const CounterMixins = ComposeComponent => {
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#E3DDDD',
marginTop: 40,
marginBottom: 20,
backgroundColor: '#FC4000',
marginVertical: 25,
}}>
<Text style={{color: '#000000', fontSize: 22}}>开门离店</Text>
<Text style={{color: '#ffffff', fontSize: 22}}>开门离店</Text>
</Touch>
</View>
</Modal>
......
......@@ -376,7 +376,7 @@ class VerticalPage extends Component {
clearTimeout(this.callModalTimeout);
this.callModalTimeout = setTimeout(() => {
this.setState({hintVisible: false});
}, 300000);
}, 12000);
};
onNoBuy = async () => {
......@@ -572,7 +572,7 @@ class VerticalPage extends Component {
}, 8000);
};
shownoBuyModal = () => {
showNoBuyModal = () => {
Speech.speak('请扫码出店');
this.setState({noBuyModal: true});
clearTimeout(this.nobuyTimeout);
......@@ -692,7 +692,7 @@ class VerticalPage extends Component {
<Text style={styles.callText}>呼叫客服</Text>
</View>
</Touch>
<Touch onPress={() => this.shownoBuyModal()}>
<Touch onPress={() => this.showNoBuyModal()}>
<View style={styles.guardModal_button_nobuy}>
<Text style={styles.callText}>无购物出店</Text>
</View>
......@@ -1266,16 +1266,16 @@ class HintPhone extends React.Component {
<Touch onPress={closeHint}>
<View
style={{
width: scaleSize(200),
height: scaleSize(65),
width: scaleSize(300),
height: scaleSize(100),
borderRadius: 100,
backgroundColor: '#fc4000',
marginTop: 30,
marginTop: 20,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
<Text style={{color: '#ffffff', fontSize: scaleSize(30)}}>
<Text style={{color: '#ffffff', fontSize: scaleSize(36)}}>
关闭弹窗
</Text>
</View>
......
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