|
|
@@ -324,7 +324,7 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
if (res.data.mess == '返回成功') {
|
|
|
this.xiaofei_items = []
|
|
|
// 消费记录
|
|
|
@@ -571,6 +571,7 @@
|
|
|
})
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
title: err.errMsg,
|
|
|
duration: 2000
|
|
|
})
|
|
|
@@ -596,6 +597,7 @@
|
|
|
fail: err => {
|
|
|
// console.log(err, '错误信息');
|
|
|
uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
title: err.errMsg,
|
|
|
duration: 2000
|
|
|
})
|
|
|
@@ -645,7 +647,6 @@
|
|
|
if (device.name == this.device_code) {
|
|
|
this.process_control(0);
|
|
|
|
|
|
- this.stopBluetoothDevicesDiscovery()
|
|
|
|
|
|
//data里面建立一个deviceId、device_code,存储起来
|
|
|
// this.device_code = device.name;
|
|
|
@@ -654,6 +655,9 @@
|
|
|
if (this.devices.indexOf(res.devices[0].deviceId) == -1) {
|
|
|
this.devices.push(res.devices[0].deviceId)
|
|
|
}
|
|
|
+
|
|
|
+ // 放此位置,苹果手机兼容
|
|
|
+ this.stopBluetoothDevicesDiscovery()
|
|
|
|
|
|
return
|
|
|
}
|
|
|
@@ -678,7 +682,7 @@
|
|
|
// console.log(err)
|
|
|
this.isScan = false
|
|
|
if (err.errMsg.indexOf('already connect') != -1) {
|
|
|
- // this.connect_BLE()
|
|
|
+ this.connect_BLE()
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '建立连接失败',
|
|
|
@@ -720,7 +724,7 @@
|
|
|
|
|
|
this.process_control(1);
|
|
|
|
|
|
- this.getBLEDeviceCharacteristics(this.deviceId, res.services[1].uuid)
|
|
|
+ this.getBLEDeviceCharacteristics()
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
// console.log(err)
|
|
|
@@ -1094,6 +1098,7 @@
|
|
|
}
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
title: '字节码或学号为空!'
|
|
|
});
|
|
|
// 初始化
|
|
|
@@ -1130,15 +1135,15 @@
|
|
|
})
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
- icon: 'success',
|
|
|
- title: '结算失败!',
|
|
|
+ icon: 'none',
|
|
|
+ title: res.data.mess,
|
|
|
duration: 3000
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
- title: '字节码为空!',
|
|
|
- icon: 'success'
|
|
|
+ icon: 'success',
|
|
|
+ title: '字节码为空!'
|
|
|
});
|
|
|
// 初始化
|
|
|
this.setInit()
|