处理输入wifi密码切换时的BUG
This commit is contained in:
@@ -35,15 +35,25 @@
|
|||||||
<view>
|
<view>
|
||||||
<view>密码</view>
|
<view>密码</view>
|
||||||
<view>
|
<view>
|
||||||
<input
|
<block wx:if="{{type}}">
|
||||||
password="{{type}}"
|
<input
|
||||||
value="{{selectWifiPWD}}"
|
password="{{true}}"
|
||||||
bindinput="passwordInput"
|
value="{{selectWifiPWD}}"
|
||||||
placeholder="输入您的wi-fi密码"
|
bindinput="passwordInput"
|
||||||
placeholder-class="placeholderClass" />
|
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>
|
||||||
<view bind:tap="inputTypeChange">
|
<view bind:tap="inputTypeChange">
|
||||||
<image src="/images/configureDevice/open.png" />
|
<image src="/images/configureDevice/{{type ? 'open' : 'close'}}.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -50,17 +50,13 @@ Page({
|
|||||||
equipmentCode: scaleDeviceId,
|
equipmentCode: scaleDeviceId,
|
||||||
};
|
};
|
||||||
$.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => {
|
$.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => {
|
||||||
|
ppScale.plugin.Blue.disconnect();
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "设备初始化成功,请重新绑定。",
|
title: "设备初始化成功,请重新绑定。",
|
||||||
})
|
})
|
||||||
// device.list = [];
|
// device.list = [];
|
||||||
// device.mac = null;
|
// device.mac = null;
|
||||||
let pages = getCurrentPages();
|
|
||||||
let prevPage = pages[pages.length - 2];
|
|
||||||
prevPage.setData({
|
|
||||||
getDeviceSetting: true
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.navigateBack({
|
wx.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
@@ -68,6 +64,7 @@ Page({
|
|||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
ppScale.plugin.Blue.disconnect();
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "设备初始化失败。",
|
title: "设备初始化失败。",
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ const app = getApp();
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
getDeviceSetting: false,
|
|
||||||
|
|
||||||
initText: "",
|
initText: "",
|
||||||
devicesList: [],
|
devicesList: [],
|
||||||
searchDevicesList: true,
|
searchDevicesList: true,
|
||||||
@@ -14,11 +12,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.data.getDeviceSetting) {
|
this.checkBluetoothPermissionAndInit();
|
||||||
this.getDeviceSettingList();
|
|
||||||
} else {
|
|
||||||
this.checkBluetoothPermissionAndInit();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
checkBluetoothPermissionAndInit() {
|
checkBluetoothPermissionAndInit() {
|
||||||
|
|||||||
+22
-22
@@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "bodyWeight",
|
"projectname": "bodyWeight",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true,
|
"compileHotReLoad": true,
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"bigPackageSizeSupport": true,
|
"bigPackageSizeSupport": true,
|
||||||
"coverView": true,
|
"coverView": true,
|
||||||
"lazyloadPlaceholderEnable": false,
|
"lazyloadPlaceholderEnable": false,
|
||||||
"skylineRenderEnable": false,
|
"skylineRenderEnable": false,
|
||||||
"preloadBackgroundData": false,
|
"preloadBackgroundData": false,
|
||||||
"autoAudits": false,
|
"autoAudits": false,
|
||||||
"useApiHook": true,
|
"useApiHook": true,
|
||||||
"useApiHostProcess": true,
|
"useApiHostProcess": true,
|
||||||
"showShadowRootInWxmlPanel": true,
|
"showShadowRootInWxmlPanel": true,
|
||||||
"useStaticServer": false,
|
"useStaticServer": false,
|
||||||
"useLanDebug": false,
|
"useLanDebug": false,
|
||||||
"showES6CompileOption": false,
|
"showES6CompileOption": false,
|
||||||
"checkInvalidKey": true,
|
"checkInvalidKey": true,
|
||||||
"ignoreDevUnusedFiles": true
|
"ignoreDevUnusedFiles": true
|
||||||
},
|
},
|
||||||
"libVersion": "3.8.5",
|
"libVersion": "3.8.6",
|
||||||
"condition": {}
|
"condition": {}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user