diff --git a/manifest.json b/manifest.json index 098e9e0..ae156a3 100644 --- a/manifest.json +++ b/manifest.json @@ -139,8 +139,8 @@ "/api" : { "https" : true, // "target" : "https://pqmcn.com:8092/api", - // "target" : "http://192.168.1.103:10215", - "target" : "http://192.168.1.103:10215", + // "target" : "http://192.168.1.103:10215", + "target" : "http://192.168.1.103:10215", "changOrigin" : true, "pathRewrite" : { "/api" : "" diff --git a/pages/device/list.vue b/pages/device/list.vue index f1aa56f..1944660 100644 --- a/pages/device/list.vue +++ b/pages/device/list.vue @@ -108,6 +108,9 @@ > + + + @@ -156,6 +159,7 @@ export default { }, ], pageOptions: {}, + showBackTop: false, options1: [ { text: '置顶', @@ -457,7 +461,17 @@ export default { } else { this[type] = true } - } + }, + backToTop() { + uni.pageScrollTo({ + scrollTop: 0, + duration: 300, + }) + this.showBackTop = false + }, + }, + onPageScroll(e) { + this.showBackTop = e.scrollTop > 200 }, } @@ -465,4 +479,19 @@ export default { /deep/ .button-group--right { padding: 0 0 20rpx; } + +.back-top { + position: fixed; + right: 30rpx; + bottom: 60rpx; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + background: #376cf3; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); + z-index: 99; +} diff --git a/pages/index/comp/apply.vue b/pages/index/comp/apply.vue index 1c18ac5..68a3318 100644 --- a/pages/index/comp/apply.vue +++ b/pages/index/comp/apply.vue @@ -95,7 +95,7 @@ {{ item.landPoint != null && item.landPoint !== '' ? ',落点区域:' + item.landPoint - : '' + : ',落点区域:未知' }} diff --git a/pages/index/comp/device.vue b/pages/index/comp/device.vue index cbb60c5..a07d9e5 100644 --- a/pages/index/comp/device.vue +++ b/pages/index/comp/device.vue @@ -4,14 +4,8 @@ - + {{ select.projectName @@ -20,18 +14,10 @@ : select.projectName : '全部项目' }} - - + + @@ -40,17 +26,11 @@ 确定 - + - + @@ -132,6 +136,9 @@ export default { userInfo: {}, height: 0, selectValue: {}, + scrollTop: 0, + oldScrollTop: 0, + showBackTop: false, } }, created() { }, @@ -170,6 +177,8 @@ export default { sectionChange(index) { this.curSub = index.currentIndex + this.showBackTop = false + this.scrollTop = 0 }, // 生成报告 generate(item) { @@ -284,6 +293,17 @@ export default { this.store.next && this.store.next() } }, + onScroll(e) { + this.oldScrollTop = e.detail.scrollTop + this.showBackTop = e.detail.scrollTop > 200 + }, + backToTop() { + this.scrollTop = this.oldScrollTop + this.$nextTick(() => { + this.scrollTop = 0 + }) + this.showBackTop = false + }, }, watch: {}, } @@ -383,4 +403,19 @@ export default { /deep/ .uni-scroll-view-refresher { display: none; } + +.back-top { + position: fixed; + right: 30rpx; + bottom: 60rpx; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + background: #376cf3; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); + z-index: 99; +} diff --git a/pages/index/index.vue b/pages/index/index.vue index 309481c..437c497 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,6 +42,9 @@ + + + @@ -80,6 +83,7 @@ export default { engineeringList: [], navTabHeight: 0, timer: null, + showBackTop: false, } }, computed: { @@ -93,6 +97,7 @@ export default { } }, }, + methods: { selectEngineering() { if (this.userInfo.authorities === 'engineering_user') { @@ -221,7 +226,17 @@ export default { uni.navigateTo({ url: `/pages/index/comp/monitoringPoint`, }) - } + }, + backToTop() { + uni.pageScrollTo({ + scrollTop: 0, + duration: 300, + }) + this.showBackTop = false + }, + }, + onPageScroll(e) { + this.showBackTop = e.scrollTop > 200 }, onLoad() { // 页面加载时,动态配置导航栏按钮 @@ -302,7 +317,7 @@ export default { .canneng-index-title { padding: 0 20rpx; - font-weight: 500; + /* font-weight: 500; */ display: flex; } @@ -337,4 +352,19 @@ export default { margin-left: auto; } + +.back-top { + position: fixed; + right: 30rpx; + bottom: 60rpx; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + background: #376cf3; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); + z-index: 99; +} diff --git a/pages/message1/alarm.vue b/pages/message1/alarm.vue index be17ba9..95f43d4 100644 --- a/pages/message1/alarm.vue +++ b/pages/message1/alarm.vue @@ -3,7 +3,8 @@ - @@ -46,6 +47,9 @@ :status="store.status"> + + +