diff --git a/miniprogram/.cloudbase/container/debug.json b/miniprogram/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/miniprogram/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/miniprogram/.cloudbase/container/debug.json b/miniprogram/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/miniprogram/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/miniprogram/app.js b/miniprogram/app.js index db1c90a..163c743 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -18,9 +18,8 @@ // this.globalData = {} }, globalData: { - // httpsUrl: "https://logapi.smartlog.work/", // 20240716线上地址 - httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 - // httpsUrl: "https://gas.task.smartlog.work/", // 线上 + httpsUrl: "https://logapi.smartlog.work/", // 正式域名 + // httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 openid: null, indexCount:1, nickName:"", diff --git a/miniprogram/.cloudbase/container/debug.json b/miniprogram/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/miniprogram/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/miniprogram/app.js b/miniprogram/app.js index db1c90a..163c743 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -18,9 +18,8 @@ // this.globalData = {} }, globalData: { - // httpsUrl: "https://logapi.smartlog.work/", // 20240716线上地址 - httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 - // httpsUrl: "https://gas.task.smartlog.work/", // 线上 + httpsUrl: "https://logapi.smartlog.work/", // 正式域名 + // httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 openid: null, indexCount:1, nickName:"", diff --git a/miniprogram/package-lock.json b/miniprogram/package-lock.json index f9502d4..48cf461 100644 --- a/miniprogram/package-lock.json +++ b/miniprogram/package-lock.json @@ -1,10 +1,18 @@ { "name": "package.json", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@vant/weapp": { + "packages": { + "": { + "name": "package.json", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.3.1" + } + }, + "node_modules/@vant/weapp": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.3.1.tgz", "integrity": "sha512-b4Kr1TUVRtoCKRphRvGYoQIKoSi2QBt3v4VrD6pwKOav3U3AVxKKLcqdCRkVMyTGsZrnwD/5se/HXcXA4ra9dg==" diff --git a/miniprogram/.cloudbase/container/debug.json b/miniprogram/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/miniprogram/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/miniprogram/app.js b/miniprogram/app.js index db1c90a..163c743 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -18,9 +18,8 @@ // this.globalData = {} }, globalData: { - // httpsUrl: "https://logapi.smartlog.work/", // 20240716线上地址 - httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 - // httpsUrl: "https://gas.task.smartlog.work/", // 线上 + httpsUrl: "https://logapi.smartlog.work/", // 正式域名 + // httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 openid: null, indexCount:1, nickName:"", diff --git a/miniprogram/package-lock.json b/miniprogram/package-lock.json index f9502d4..48cf461 100644 --- a/miniprogram/package-lock.json +++ b/miniprogram/package-lock.json @@ -1,10 +1,18 @@ { "name": "package.json", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@vant/weapp": { + "packages": { + "": { + "name": "package.json", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.3.1" + } + }, + "node_modules/@vant/weapp": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.3.1.tgz", "integrity": "sha512-b4Kr1TUVRtoCKRphRvGYoQIKoSi2QBt3v4VrD6pwKOav3U3AVxKKLcqdCRkVMyTGsZrnwD/5se/HXcXA4ra9dg==" diff --git a/miniprogram/pages/addDevice/addDevice.js b/miniprogram/pages/addDevice/addDevice.js index 86fd531..339d469 100644 --- a/miniprogram/pages/addDevice/addDevice.js +++ b/miniprogram/pages/addDevice/addDevice.js @@ -3,6 +3,14 @@ var QQMapWX = require('../../libs/qqmap-wx-jssdk.js'); var qqmapsdk; var app = getApp() +const installTypeMap = { + '1': '初次安装', + '2': '初次拆走', + '3': '二次安装', + '4': '二次拆走', + '5': '正在维护', + '6': '其他', +} Page({ /** @@ -59,7 +67,6 @@ factory: "", workmsg: "", position: "", - description: "", longitude: "", latitude: "", longitude84: "", @@ -73,6 +80,7 @@ photopath2: '', photopath3: '', installType: '1', // 设备安装情况 + description: "初次安装", // 备注 }, fileList: [], listQuery: { @@ -165,19 +173,19 @@ 'projectName': app.globalData.selectProjectName, }) console.log('ppp', that.data.form.project); - //初始化表单内容为上次填写值 - var cacheForms = wx.getStorageSync('cacheList') - if (cacheForms) { - cacheForms.photopath1='' - cacheForms.photopath2='' - cacheForms.photopath3='' - that.data.fileList=[] - that.setData({ - form: cacheForms, - devcode: cacheForms.devcode, - }) - } - var form = that.data.form + //=========初始化表单内容为上次填写值========== + // var cacheForms = wx.getStorageSync('cacheList') + // if (cacheForms) { + // cacheForms.photopath1='' + // cacheForms.photopath2='' + // cacheForms.photopath3='' + // that.data.fileList=[] + // that.setData({ + // form: cacheForms, + // devcode: cacheForms.devcode, + // }) + // } + // var form = that.data.form //默认安装经纬度为当前位置(gcj02) wx.getLocation({ type: "gcj02", @@ -265,7 +273,6 @@ //获取项目下拉列表 - wx.request({ method: "POST", url: app.globalData.httpsUrl + "project/getProject", @@ -329,6 +336,12 @@ // 粘贴经纬度 this.paste() + + // 处理备注的默认 + var description = 'form.description'; + that.setData({ + [description]: installTypeMap[that.data.form.installType] + }) }, @@ -368,6 +381,18 @@ onPullDownRefresh: function () { }, + + // 监听页面滚动 + onPageScroll(e) { + console.log('监听页面滚动'); + var that = this + console.log(that.selectComponent('#selectPersonDropdown')); + // that.selectComponent('#selectPersonDropdown').triggerEvent(false) +}, + +toggle() { + +}, // 点击检索 searchWellCode() { if(!this.data.form.wellcode) { @@ -768,8 +793,10 @@ selectInstallType(value) { var that = this; var installType = 'form.installType'; + var description = 'form.description'; that.setData({ - [installType]: value.detail + [installType]: value.detail, + [description]: installTypeMap[value.detail] }) }, diff --git a/miniprogram/.cloudbase/container/debug.json b/miniprogram/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/miniprogram/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/miniprogram/app.js b/miniprogram/app.js index db1c90a..163c743 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -18,9 +18,8 @@ // this.globalData = {} }, globalData: { - // httpsUrl: "https://logapi.smartlog.work/", // 20240716线上地址 - httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 - // httpsUrl: "https://gas.task.smartlog.work/", // 线上 + httpsUrl: "https://logapi.smartlog.work/", // 正式域名 + // httpsUrl: "https://grey.logapi.smartlog.work/", // 测试域名 openid: null, indexCount:1, nickName:"", diff --git a/miniprogram/package-lock.json b/miniprogram/package-lock.json index f9502d4..48cf461 100644 --- a/miniprogram/package-lock.json +++ b/miniprogram/package-lock.json @@ -1,10 +1,18 @@ { "name": "package.json", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@vant/weapp": { + "packages": { + "": { + "name": "package.json", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.3.1" + } + }, + "node_modules/@vant/weapp": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.3.1.tgz", "integrity": "sha512-b4Kr1TUVRtoCKRphRvGYoQIKoSi2QBt3v4VrD6pwKOav3U3AVxKKLcqdCRkVMyTGsZrnwD/5se/HXcXA4ra9dg==" diff --git a/miniprogram/pages/addDevice/addDevice.js b/miniprogram/pages/addDevice/addDevice.js index 86fd531..339d469 100644 --- a/miniprogram/pages/addDevice/addDevice.js +++ b/miniprogram/pages/addDevice/addDevice.js @@ -3,6 +3,14 @@ var QQMapWX = require('../../libs/qqmap-wx-jssdk.js'); var qqmapsdk; var app = getApp() +const installTypeMap = { + '1': '初次安装', + '2': '初次拆走', + '3': '二次安装', + '4': '二次拆走', + '5': '正在维护', + '6': '其他', +} Page({ /** @@ -59,7 +67,6 @@ factory: "", workmsg: "", position: "", - description: "", longitude: "", latitude: "", longitude84: "", @@ -73,6 +80,7 @@ photopath2: '', photopath3: '', installType: '1', // 设备安装情况 + description: "初次安装", // 备注 }, fileList: [], listQuery: { @@ -165,19 +173,19 @@ 'projectName': app.globalData.selectProjectName, }) console.log('ppp', that.data.form.project); - //初始化表单内容为上次填写值 - var cacheForms = wx.getStorageSync('cacheList') - if (cacheForms) { - cacheForms.photopath1='' - cacheForms.photopath2='' - cacheForms.photopath3='' - that.data.fileList=[] - that.setData({ - form: cacheForms, - devcode: cacheForms.devcode, - }) - } - var form = that.data.form + //=========初始化表单内容为上次填写值========== + // var cacheForms = wx.getStorageSync('cacheList') + // if (cacheForms) { + // cacheForms.photopath1='' + // cacheForms.photopath2='' + // cacheForms.photopath3='' + // that.data.fileList=[] + // that.setData({ + // form: cacheForms, + // devcode: cacheForms.devcode, + // }) + // } + // var form = that.data.form //默认安装经纬度为当前位置(gcj02) wx.getLocation({ type: "gcj02", @@ -265,7 +273,6 @@ //获取项目下拉列表 - wx.request({ method: "POST", url: app.globalData.httpsUrl + "project/getProject", @@ -329,6 +336,12 @@ // 粘贴经纬度 this.paste() + + // 处理备注的默认 + var description = 'form.description'; + that.setData({ + [description]: installTypeMap[that.data.form.installType] + }) }, @@ -368,6 +381,18 @@ onPullDownRefresh: function () { }, + + // 监听页面滚动 + onPageScroll(e) { + console.log('监听页面滚动'); + var that = this + console.log(that.selectComponent('#selectPersonDropdown')); + // that.selectComponent('#selectPersonDropdown').triggerEvent(false) +}, + +toggle() { + +}, // 点击检索 searchWellCode() { if(!this.data.form.wellcode) { @@ -768,8 +793,10 @@ selectInstallType(value) { var that = this; var installType = 'form.installType'; + var description = 'form.description'; that.setData({ - [installType]: value.detail + [installType]: value.detail, + [description]: installTypeMap[value.detail] }) }, diff --git a/miniprogram/pages/addDevice/addDevice.wxml b/miniprogram/pages/addDevice/addDevice.wxml index 871ea29..037b327 100644 --- a/miniprogram/pages/addDevice/addDevice.wxml +++ b/miniprogram/pages/addDevice/addDevice.wxml @@ -69,8 +69,8 @@ - - + + @@ -96,7 +96,7 @@ - + - + - + - + + - + +