From 8f39471722e739b47b569fda641a7f46650579bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Wed, 1 Nov 2023 14:27:21 +0800 Subject: [PATCH] feat:fix bugs --- .../inspectionInput/inspectionInput.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/weapp/package/inspectionInput/inspectionInput.js b/weapp/package/inspectionInput/inspectionInput.js index 0ed90e5..fa6bf48 100644 --- a/weapp/package/inspectionInput/inspectionInput.js +++ b/weapp/package/inspectionInput/inspectionInput.js @@ -69,7 +69,7 @@ Page({ if (pointDevices.length) { pointDevices.forEach(device => { inspectContentArr.push({ - deviceName: device.device.name, + deviceName: device?.device?.name, deviceId: device.deviceId, checkItems: checkItems.map(c => ({ id: `${device.deviceId}-${c.id}`, @@ -327,14 +327,14 @@ Page({ address } = that.data; let alarm = false; - if (!address) { - wx.showToast({ - title: '请获取当前位置', - icon: 'none', - duration: 1500 - }) - return; - } + // if (!address) { + // wx.showToast({ + // title: '请获取当前位置', + // icon: 'none', + // duration: 1500 + // }) + // return; + // } let reportArr = inspectContentArr.map(d => ({ ...d, alarm: false })); for (const [index, device] of inspectContentArr.entries()) { for (const item of device.checkItems) { @@ -396,6 +396,7 @@ Page({ */ onLoad(options) { const that = this; + // console.log('inspectContentArr',inspectContentArr) const scenePointId = options.scene; if (scenePointId) { // 扫小程序码进入 const userInfo = wx.getStorageSync('userInfo');