处理输入wifi密码切换时的BUG
This commit is contained in:
@@ -50,17 +50,13 @@ Page({
|
||||
equipmentCode: scaleDeviceId,
|
||||
};
|
||||
$.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => {
|
||||
ppScale.plugin.Blue.disconnect();
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: "设备初始化成功,请重新绑定。",
|
||||
})
|
||||
// device.list = [];
|
||||
// device.mac = null;
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2];
|
||||
prevPage.setData({
|
||||
getDeviceSetting: true
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
@@ -68,6 +64,7 @@ Page({
|
||||
}, 1500);
|
||||
});
|
||||
} else {
|
||||
ppScale.plugin.Blue.disconnect();
|
||||
wx.showToast({
|
||||
icon: "none",
|
||||
title: "设备初始化失败。",
|
||||
|
||||
@@ -2,8 +2,6 @@ const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
getDeviceSetting: false,
|
||||
|
||||
initText: "",
|
||||
devicesList: [],
|
||||
searchDevicesList: true,
|
||||
@@ -14,11 +12,7 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (this.data.getDeviceSetting) {
|
||||
this.getDeviceSettingList();
|
||||
} else {
|
||||
this.checkBluetoothPermissionAndInit();
|
||||
}
|
||||
this.checkBluetoothPermissionAndInit();
|
||||
},
|
||||
|
||||
checkBluetoothPermissionAndInit() {
|
||||
|
||||
Reference in New Issue
Block a user