From 3bfc80985797e05d9c64d8501a5c3f052363154d Mon Sep 17 00:00:00 2001 From: zhangqun <17853500702@163.com> Date: Mon, 24 Jul 2023 19:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E4=B8=8A=E6=8A=A5=E5=89=8D?= =?UTF-8?q?=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 16 +++-- pages/index/index.vue | 8 +-- pages/patrolRecord/list.vue | 4 +- pages/patrolRecord/report.vue | 22 ++++++- pages/positionRecord/list.vue | 4 +- pages/positionRecord/report.vue | 70 +++++++++++++++----- pages/setting/index.vue | 38 +++++++++-- pages/voiceRecord/list.vue | 4 +- pages/voiceRecord/report.vue | 32 ++++++++- unpackage/dist/dev/app-plus/app-service.js | 77 +++++++++++++++------- unpackage/dist/dev/app-plus/app-view.js | 60 +++++++++++------ unpackage/dist/dev/app-plus/manifest.json | 2 +- 12 files changed, 251 insertions(+), 86 deletions(-) diff --git a/pages.json b/pages.json index 912d602..1dc7013 100644 --- a/pages.json +++ b/pages.json @@ -5,12 +5,6 @@ "navigationBarTitleText": "uni-app" } }, - // { - // "path": "pages/gisUpload/gisUpload", - // "style": { - // "navigationBarTitleText": "地图上报" - // } - // }, { "path": "pages/voiceRecord/report", "style": { @@ -65,5 +59,15 @@ "app-plus": { "background": "#efeff4" } + }, + "condition" : { //模式配置,仅开发期间生效 + "current": 0, //当前激活的模式(list 的索引项) + "list": [ + { + "name": "", //模式名称 + "path": "", //启动页面,必选 + "query": "" //启动参数,在页面的onLoad函数里面得到 + } + ] } } diff --git a/pages/index/index.vue b/pages/index/index.vue index ffdfd60..bba448e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -43,10 +43,10 @@ }, onLoad() { this.url = 'http://192.168.3.109:89?appId=123' - // this.keepAlive = uni.requireNativePlugin('Ba-KeepAliveSuit') - // setTimeout(() => { - // this.onKeep(); - // }, 5000); + this.keepAlive = uni.requireNativePlugin('Ba-KeepAliveSuit') + setTimeout(() => { + this.onKeep(); + }, 5000); // setTimeout(() => { // this.onShowNotify(); // }, 10000); diff --git a/pages/patrolRecord/list.vue b/pages/patrolRecord/list.vue index 11e1648..97891cc 100644 --- a/pages/patrolRecord/list.vue +++ b/pages/patrolRecord/list.vue @@ -69,7 +69,7 @@ }, //页面跳转 goPage(url) { - uni.navigateTo({ + uni.redirectTo({ url: url }) }, @@ -136,7 +136,7 @@ .padding-wrap { height: calc(100vh - 98upx - 44upx); padding-top: 30upx; - margin-top: 14upx; + margin-top: 112upx; background-color: #fff; } diff --git a/pages/patrolRecord/report.vue b/pages/patrolRecord/report.vue index 7f09ef8..c026d01 100644 --- a/pages/patrolRecord/report.vue +++ b/pages/patrolRecord/report.vue @@ -76,9 +76,25 @@ methods: { submit() { this.$refs.form.validate().then(res => { - uni.showToast({ - title: '成功' - }); + uni.request({ + url: 'http://192.168.3.32:81/appData/putFile', + method: 'POST', + header:{ + 'content-type':'application/x-www-form-urlencoded; charset=UTF-8'//重点 + }, + data: { + files: this.photoList, + longidute: this.form.longidute, + latidute: this.form.latidute, + planTypeId: '1', + planTypeName: '预案01' + }, + success: (data) => { + uni.showToast({ + title: '成功' + }); + } + }) }).catch(err => { console.log('表单错误信息:', err); uni.showToast({ diff --git a/pages/positionRecord/list.vue b/pages/positionRecord/list.vue index 7257f54..d5dcda9 100644 --- a/pages/positionRecord/list.vue +++ b/pages/positionRecord/list.vue @@ -60,7 +60,7 @@ }, //页面跳转 goPage(url) { - uni.navigateTo({ + uni.redirectTo({ url: url }) } @@ -119,7 +119,7 @@ .padding-wrap { height: calc(100vh - 98upx - 44upx); padding-top: 30upx; - margin-top: 14upx; + margin-top: 112upx; background-color: #fff; } diff --git a/pages/positionRecord/report.vue b/pages/positionRecord/report.vue index 299aa9c..1be9133 100644 --- a/pages/positionRecord/report.vue +++ b/pages/positionRecord/report.vue @@ -38,8 +38,8 @@ return { form: { floor: '', - longidute: '', - latidute: '', + longidute: '120.61988850529002', + latidute: '31.37531834395683', }, positionType: 1, //是否使用常用报警位置 positionList: [], //常用报警点 @@ -67,9 +67,40 @@ methods: { submit() { this.$refs.form.validate().then(res => { - uni.showToast({ - title: '成功' - }); + let param = { + type: '3', + deviceId: '1001', + longidute: this.form.longidute, + latidute: this.form.latidute, + planTypeId: '1', + planTypeName: '预案01' + }; + console.log('request.............', param) + uni.uploadFile({ + url: 'http://192.168.3.32:81/appData/putFile', + filePath: '123', // 随便填,不为空即可 + name: 'file', // 随便填,不为空即可 + formData: param, + success: (data) => { + let _data = JSON.parse(data); + if(_data.code == 200){ + uni.showToast({ + title: '成功' + }); + } + else{ + uni.showToast({ + title: _data.msg + }); + } + }, + fail: (err) => { + console.log(err) + }, + complete: (data) => { + console.log(data) + } + }) }).catch(err => { console.log('表单错误信息:', err); uni.showToast({ @@ -86,29 +117,34 @@ .container { min-height: 100vh; background-color: #FFFFFF; - /deep/.uni-forms-item__label{ + + /deep/.uni-forms-item__label { color: #031945; font-size: 28upx; font-family: PingFang SC-Bold, PingFang SC; font-weight: bold; } - /deep/.uni-select{ + + /deep/.uni-select { height: 99upx; background: #F6F8FA; border-radius: 30upx; padding: 0 15upx 0 30upx; border: 0; } - /deep/.uni-select__input-box{ + + /deep/.uni-select__input-box { height: 99upx; } - /deep/.uni-select__input-placeholder{ + + /deep/.uni-select__input-placeholder { color: #C4C7CB; font-size: 28upx; font-family: PingFang SC-Regular, PingFang SC; font-weight: 400; } - /deep/.uni-icons{ + + /deep/.uni-icons { color: #C4C7CB; font-size: 28upx; } @@ -117,13 +153,14 @@ .padding-wrap { padding: 30upx; } - - .voice-rocord-box{ + + .voice-rocord-box { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40upx; - .voice-box{ + + .voice-box { display: flex; align-items: center; justify-content: flex-end; @@ -132,7 +169,8 @@ background: #338AF8 url(@/static/voive_bg.png) 40upx 28upx no-repeat; background-size: 226upx 34upx; border-radius: 100upx; - .voice-mins{ + + .voice-mins { color: #FFFFFF; font-size: 28upx; font-family: Arial-Regular, Arial; @@ -140,7 +178,8 @@ margin-right: 40upx; } } - .voice-del{ + + .voice-del { color: #B6B8BB; font-size: 28upx; font-family: PingFang SC-Regular, PingFang SC; @@ -204,6 +243,7 @@ .user-avatar { display: block; margin-right: 26upx; + .user-avatar-image { width: 90upx; height: 90upx; diff --git a/pages/setting/index.vue b/pages/setting/index.vue index 206b321..51dc668 100644 --- a/pages/setting/index.vue +++ b/pages/setting/index.vue @@ -1,8 +1,8 @@