Commit bddc418f by 姜雷

Merge branch 'test'

parents d0726083 8b9c2460
......@@ -30,6 +30,9 @@ type DeviceInfoResponse = {
positionId: string;
// 位置id
rates: RateInfoResponse[];
//是否纯蓝牙设备 1:是,0:否
isOnlyBluetooth: number;
};
type RateInfoResponse = {
mark: string;
......
......@@ -243,6 +243,10 @@ class Pay extends Component {
);
})
.catch(err => {
Taro.showModal({
title: '温馨提示',
content: '为了更好的体验本次服务,请打开手机蓝牙!',
});
console.error(err);
Taro.onBluetoothAdapterStateChange(res => {
console.log('adapterState changed, now is', res);
......@@ -717,12 +721,14 @@ class Pay extends Component {
} = this.props;
const { payId, deviceDone, sockedDone } = this.state;
if (payId) {
if (device.isOnlyBluetooth && device.isOnlyBluetooth === 1) {
if (this.checkIsShower()) {
console.log(deviceDone, sockedDone);
if (!deviceDone || !sockedDone) {
return this.showerPayHandle();
}
}
}
getPayOrder({
equipmentNum: device.originCode,
equipmentPos: device.position,
......
......@@ -17,6 +17,7 @@ export const INITIAL_STATE = {
rates: [],
serviceId: 0,
serviceName: '',
isOnlyBluetooth: 0,
};
export const updateDeviceData = (entity: DeviceState): Action => ({
......
......@@ -20,4 +20,5 @@ export type Device = {
rates: Rate[];
serviceId: number;
serviceName: string;
isOnlyBluetooth: number;
};
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