Commit 7bf9a3f4 by 黄日华

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

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