处理输入wifi密码切换时的BUG
This commit is contained in:
@@ -35,15 +35,25 @@
|
||||
<view>
|
||||
<view>密码</view>
|
||||
<view>
|
||||
<input
|
||||
password="{{type}}"
|
||||
value="{{selectWifiPWD}}"
|
||||
bindinput="passwordInput"
|
||||
placeholder="输入您的wi-fi密码"
|
||||
placeholder-class="placeholderClass" />
|
||||
<block wx:if="{{type}}">
|
||||
<input
|
||||
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();
|
||||
}
|
||||
this.checkBluetoothPermissionAndInit();
|
||||
},
|
||||
|
||||
checkBluetoothPermissionAndInit() {
|
||||
|
||||
+22
-22
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "bodyWeight",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
"bigPackageSizeSupport": true,
|
||||
"coverView": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
"preloadBackgroundData": false,
|
||||
"autoAudits": false,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"useStaticServer": false,
|
||||
"useLanDebug": false,
|
||||
"showES6CompileOption": false,
|
||||
"checkInvalidKey": true,
|
||||
"ignoreDevUnusedFiles": true
|
||||
},
|
||||
"libVersion": "3.8.5",
|
||||
"condition": {}
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "bodyWeight",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
"bigPackageSizeSupport": true,
|
||||
"coverView": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
"preloadBackgroundData": false,
|
||||
"autoAudits": false,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"useStaticServer": false,
|
||||
"useLanDebug": false,
|
||||
"showES6CompileOption": false,
|
||||
"checkInvalidKey": true,
|
||||
"ignoreDevUnusedFiles": true
|
||||
},
|
||||
"libVersion": "3.8.6",
|
||||
"condition": {}
|
||||
}
|
||||
Reference in New Issue
Block a user