Commit 1c9200a3 by zeven

刷卡收银台只支持刷卡付款

parent 201856f8
{ {
"name": "zm-face-counter", "name": "zm-face-counter",
"version": "1.3.9", "version": "1.3.11",
"private": true, "private": true,
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
"test": "jest", "test": "jest",
"lint": "eslint --ext .js index.js src", "lint": "eslint --ext .js index.js src",
"apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk", "apk": "cd android && ./gradlew app:assembleRelease && cp ./app/build/outputs/apk/release/app-release.apk ../fcounter.apk",
"android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.8'", "android-staging": "code-push release-react ZmFaceCounter-android android -t '1.0.0' --des '1.3.11'",
"android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.8'", "android-product": "code-push promote ZmFaceCounter-android Staging Production --des '1.3.11'",
"android-history": "code-push deployment history ZmFaceCounter-android Production", "android-history": "code-push deployment history ZmFaceCounter-android Production",
"android-rollback": "code-push rollback ZmFaceCounter-android Production" "android-rollback": "code-push rollback ZmFaceCounter-android Production"
}, },
......
...@@ -739,13 +739,17 @@ const CounterMixins = ComposeComponent => { ...@@ -739,13 +739,17 @@ const CounterMixins = ComposeComponent => {
if (this.barcodeBusy) { if (this.barcodeBusy) {
return true; return true;
} }
Toast.loading('正在付款,请稍后~');
const isWxpay = code.toString().match(/1[0-5]\d{16}/); const isWxpay = code.toString().match(/1[0-5]\d{16}/);
const isAlipay = const isAlipay =
fToken || code.toString().match(/^(2[5-9]|30)\d{14,22}$/); fToken || code.toString().match(/^(2[5-9]|30)\d{14,22}$/);
if (!isWxpay && !isAlipay) { if (!isWxpay && !isAlipay) {
return false; return false;
} }
if (window.cardCounter) {
this.speak('不支持使用付款码付款', true);
return true;
}
Toast.loading('正在付款,请稍后~');
this.barcodeBusy = true; this.barcodeBusy = true;
let successPay = false; let successPay = false;
const {ids, noBarcode} = this.getGoods(); const {ids, noBarcode} = this.getGoods();
......
...@@ -312,10 +312,11 @@ class FacePage extends Component { ...@@ -312,10 +312,11 @@ class FacePage extends Component {
} }
}; };
face = () => { face = async () => {
this.setState({ await this.setState({
tipsModal: false, tipsModal: false,
goTipsModal: false, goTipsModal: false,
orderDetailMini: false,
}); });
this.orderDetailMiniPop(false); this.orderDetailMiniPop(false);
const {faceType} = this.state; const {faceType} = this.state;
......
...@@ -141,9 +141,11 @@ class VerticalPage extends Component { ...@@ -141,9 +141,11 @@ class VerticalPage extends Component {
}); });
if (data.code === 1 && data.data) { if (data.code === 1 && data.data) {
const state = {priceVisible: data.data.priceVisible}; const state = {priceVisible: data.data.priceVisible};
if (data.data.cardCounter) if (data.data.cardCounter) {
// 是否支持刷卡 // 是否支持刷卡
state.isCard = true; state.isCard = true;
window.cardCounter = data.data.cardCounter;
}
if (data.data.logo) state.logo = `${ossLink}/${data.data.logo}`; if (data.data.logo) state.logo = `${ossLink}/${data.data.logo}`;
this.setState(state); this.setState(state);
} }
...@@ -666,7 +668,11 @@ class VerticalPage extends Component { ...@@ -666,7 +668,11 @@ class VerticalPage extends Component {
</View> </View>
</Touch> </Touch>
</View> </View>
<View style={styles.container}> <View
style={{
...styles.container,
height: width > 801 && !isCard ? '62%' : '94%',
}}>
<View style={{flexDirection: 'row', flex: 1}}> <View style={{flexDirection: 'row', flex: 1}}>
<View style={{width: '100%'}}> <View style={{width: '100%'}}>
<View style={{backgroundColor: '#fff'}}> <View style={{backgroundColor: '#fff'}}>
...@@ -998,33 +1004,40 @@ class VerticalPage extends Component { ...@@ -998,33 +1004,40 @@ class VerticalPage extends Component {
</Touch> </Touch>
</View> </View>
<View style={styles.paymentRight}> <View style={styles.paymentRight}>
<View style={styles.paymentRightTitle}> {isCard ? (
<View style={styles.paymentRightContents}> <Image
<Text style={styles.paymentRightText}>扫码</Text> style={{width: scaleSize(200), height: scaleSize(200)}}
<Text style={styles.paymentRightText}>支付</Text> source={require('../assets/logo2.png')}
<Image />
source={require('../assets/Vertical/alipay01.png')} ) : (
style={styles.paymentRightImage} <View style={styles.paymentRightTitle}>
alt="" <View style={styles.paymentRightContents}>
/> <Text style={styles.paymentRightText}>扫码</Text>
<Image <Text style={styles.paymentRightText}>支付</Text>
source={require('../assets/Vertical/wx.png')} <Image
style={styles.paymentRightImage} source={require('../assets/Vertical/alipay01.png')}
alt="" style={styles.paymentRightImage}
/> alt=""
</View> />
<View style={styles.paymentRightCode}> <Image
<QRCode source={require('../assets/Vertical/wx.png')}
logoSize={width > 801 ? 50 : scaleSize(60)} style={styles.paymentRightImage}
// logoBackgroundColor="#fc4000" alt=""
logo={logoVisible && require('../assets/logo2.png')} />
size={width > 801 ? 200 : scaleSize(250)} </View>
value={`${qrHost || login}/#/counter-order-${ <View style={styles.paymentRightCode}>
admin.socket <QRCode
}`} logoSize={width > 801 ? 50 : scaleSize(60)}
/> // logoBackgroundColor="#fc4000"
logo={logoVisible && require('../assets/logo2.png')}
size={width > 801 ? 200 : scaleSize(250)}
value={`${qrHost || login}/#/counter-order-${
admin.socket
}`}
/>
</View>
</View> </View>
</View> )}
</View> </View>
</View> </View>
<View style={styles.explain}> <View style={styles.explain}>
...@@ -1041,7 +1054,7 @@ class VerticalPage extends Component { ...@@ -1041,7 +1054,7 @@ class VerticalPage extends Component {
</Text> </Text>
</View> </View>
</View> </View>
{width > 801 ? ( {width > 801 && !isCard ? (
<View style={styles.footer}> <View style={styles.footer}>
{adType === 'image' ? ( {adType === 'image' ? (
imgArr && imgArr.length > 0 ? ( imgArr && imgArr.length > 0 ? (
...@@ -1494,6 +1507,7 @@ const styles = { ...@@ -1494,6 +1507,7 @@ const styles = {
width: '34%', width: '34%',
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center',
// overflow: 'hidden', // overflow: 'hidden',
flexDirection: 'column', flexDirection: 'column',
borderRightWidth: 1, borderRightWidth: 1,
......
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