diff --git a/miniprogram/pages/addDevice/addDevice.js b/miniprogram/pages/addDevice/addDevice.js index 885b33f..f5dc595 100644 --- a/miniprogram/pages/addDevice/addDevice.js +++ b/miniprogram/pages/addDevice/addDevice.js @@ -173,15 +173,6 @@ 'projectName': app.globalData.selectProjectName, }) console.log('-----------------------3333', options); - if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 - that.setData({ - 'form.wellType': options.wellType, // 井类型 - 'form.position': options.position, // 位置 - latitude: parseFloat(options.latitude).toFixed(6), - longitude: parseFloat(options.longitude).toFixed(6), - }) - } - //=========初始化表单内容为上次填写值========== // var cacheForms = wx.getStorageSync('cacheList') // if (cacheForms) { @@ -354,6 +345,20 @@ that.setData({ [description]: installTypeMap[that.data.form.installType] }) + console.log('options', options); + if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 + that.setData({ + 'form.wellType': options.wellType, // 井类型 + 'form.wellcode': options.wellCode, // 井编号 + 'form.position': options.position, // 位置 + 'form.devicetype': '1', // 设备类型 + 'form.latitude': parseFloat(options.latitude).toFixed(6), + 'form.longitude': parseFloat(options.longitude).toFixed(6), + latitude: parseFloat(options.latitude).toFixed(6), + longitude: parseFloat(options.longitude).toFixed(6), + }) + } + }, @@ -677,9 +682,12 @@ wx.setStorageSync('cacheList', that.data.form) //提交成功后提示用户操作 if (res.confirm) { - wx.switchTab({ - url: '../earth/earth' - }) + // wx.switchTab({ + // url: '../earth/earth' + // }) + wx.navigateBack({ // 返回上一页 + delta: 1 + }); } else { //这里是点击了取消以后 console.log('用户点击取消') } diff --git a/miniprogram/pages/addDevice/addDevice.js b/miniprogram/pages/addDevice/addDevice.js index 885b33f..f5dc595 100644 --- a/miniprogram/pages/addDevice/addDevice.js +++ b/miniprogram/pages/addDevice/addDevice.js @@ -173,15 +173,6 @@ 'projectName': app.globalData.selectProjectName, }) console.log('-----------------------3333', options); - if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 - that.setData({ - 'form.wellType': options.wellType, // 井类型 - 'form.position': options.position, // 位置 - latitude: parseFloat(options.latitude).toFixed(6), - longitude: parseFloat(options.longitude).toFixed(6), - }) - } - //=========初始化表单内容为上次填写值========== // var cacheForms = wx.getStorageSync('cacheList') // if (cacheForms) { @@ -354,6 +345,20 @@ that.setData({ [description]: installTypeMap[that.data.form.installType] }) + console.log('options', options); + if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 + that.setData({ + 'form.wellType': options.wellType, // 井类型 + 'form.wellcode': options.wellCode, // 井编号 + 'form.position': options.position, // 位置 + 'form.devicetype': '1', // 设备类型 + 'form.latitude': parseFloat(options.latitude).toFixed(6), + 'form.longitude': parseFloat(options.longitude).toFixed(6), + latitude: parseFloat(options.latitude).toFixed(6), + longitude: parseFloat(options.longitude).toFixed(6), + }) + } + }, @@ -677,9 +682,12 @@ wx.setStorageSync('cacheList', that.data.form) //提交成功后提示用户操作 if (res.confirm) { - wx.switchTab({ - url: '../earth/earth' - }) + // wx.switchTab({ + // url: '../earth/earth' + // }) + wx.navigateBack({ // 返回上一页 + delta: 1 + }); } else { //这里是点击了取消以后 console.log('用户点击取消') } diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index b459b4a..0156252 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -123,7 +123,7 @@ id: index, longitude: manhole.coordinateX, latitude: manhole.coordinateY, - iconPath: that.getMarkerIcon(manhole.isInStall), + // iconPath: that.getMarkerIcon(manhole.isInStall), width: 30, height: 30, callout: { diff --git a/miniprogram/pages/addDevice/addDevice.js b/miniprogram/pages/addDevice/addDevice.js index 885b33f..f5dc595 100644 --- a/miniprogram/pages/addDevice/addDevice.js +++ b/miniprogram/pages/addDevice/addDevice.js @@ -173,15 +173,6 @@ 'projectName': app.globalData.selectProjectName, }) console.log('-----------------------3333', options); - if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 - that.setData({ - 'form.wellType': options.wellType, // 井类型 - 'form.position': options.position, // 位置 - latitude: parseFloat(options.latitude).toFixed(6), - longitude: parseFloat(options.longitude).toFixed(6), - }) - } - //=========初始化表单内容为上次填写值========== // var cacheForms = wx.getStorageSync('cacheList') // if (cacheForms) { @@ -354,6 +345,20 @@ that.setData({ [description]: installTypeMap[that.data.form.installType] }) + console.log('options', options); + if(options.fromPage === 'defineMap') { // 从自定义地图页面跳转过来 + that.setData({ + 'form.wellType': options.wellType, // 井类型 + 'form.wellcode': options.wellCode, // 井编号 + 'form.position': options.position, // 位置 + 'form.devicetype': '1', // 设备类型 + 'form.latitude': parseFloat(options.latitude).toFixed(6), + 'form.longitude': parseFloat(options.longitude).toFixed(6), + latitude: parseFloat(options.latitude).toFixed(6), + longitude: parseFloat(options.longitude).toFixed(6), + }) + } + }, @@ -677,9 +682,12 @@ wx.setStorageSync('cacheList', that.data.form) //提交成功后提示用户操作 if (res.confirm) { - wx.switchTab({ - url: '../earth/earth' - }) + // wx.switchTab({ + // url: '../earth/earth' + // }) + wx.navigateBack({ // 返回上一页 + delta: 1 + }); } else { //这里是点击了取消以后 console.log('用户点击取消') } diff --git a/miniprogram/pages/defineMap/defineMap.js b/miniprogram/pages/defineMap/defineMap.js index b459b4a..0156252 100644 --- a/miniprogram/pages/defineMap/defineMap.js +++ b/miniprogram/pages/defineMap/defineMap.js @@ -123,7 +123,7 @@ id: index, longitude: manhole.coordinateX, latitude: manhole.coordinateY, - iconPath: that.getMarkerIcon(manhole.isInStall), + // iconPath: that.getMarkerIcon(manhole.isInStall), width: 30, height: 30, callout: { diff --git a/project.config.json b/project.config.json index dfc3b7f..3732d91 100644 --- a/project.config.json +++ b/project.config.json @@ -27,7 +27,7 @@ }, "appid": "wx79419f886f8c77ef", "projectname": "constructionApp", - "libVersion": "2.8.1", + "libVersion": "3.8.6", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",