处理输入wifi密码切换时的BUG
This commit is contained in:
@@ -35,15 +35,25 @@
|
||||
<view>
|
||||
<view>密码</view>
|
||||
<view>
|
||||
<block wx:if="{{type}}">
|
||||
<input
|
||||
password="{{type}}"
|
||||
password="{{true}}"
|
||||
value="{{selectWifiPWD}}"
|
||||
bindinput="passwordInput"
|
||||
placeholder="输入您的wi-fi密码"
|
||||
placeholder-class="placeholderClass" />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<input
|
||||
password="{{false}}"
|
||||
value="{{selectWifiPWD}}"
|
||||
bindinput="passwordInput"
|
||||
placeholder="输入您的wi-fi密码"
|
||||
placeholder-class="placeholderClass" />
|
||||
</block>
|
||||
</view>
|
||||
<view bind:tap="inputTypeChange">
|
||||
<image src="/images/configureDevice/open.png" />
|
||||
<image src="/images/configureDevice/{{type ? 'open' : 'close'}}.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
checkBluetoothPermissionAndInit() {
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
"checkInvalidKey": true,
|
||||
"ignoreDevUnusedFiles": true
|
||||
},
|
||||
"libVersion": "3.8.5",
|
||||
"libVersion": "3.8.6",
|
||||
"condition": {}
|
||||
}
|
||||
Reference in New Issue
Block a user