Commit 1c9200a3 by zeven

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

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