From f514616b96b3b0524453d63c5c5f31ee3d3899b5 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Sat, 25 May 2024 18:05:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E5=BE=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- page_fenbao/device/index.vue | 42 +++++---- .../statulist/myshop/shopdetail/index.vue | 39 +++++--- page_user/sbdetail.vue | 88 ++++++++++++------- pages/index/index.vue | 6 +- 4 files changed, 111 insertions(+), 64 deletions(-) diff --git a/page_fenbao/device/index.vue b/page_fenbao/device/index.vue index 465e458..ef85776 100644 --- a/page_fenbao/device/index.vue +++ b/page_fenbao/device/index.vue @@ -186,21 +186,33 @@ duration: 2000 }); uni.removeStorageSync('mac'); - let systemInfo = uni.getSystemInfoSync(); - if (systemInfo.platform === 'android') { - // 当前设备是 Android - uni.navigateTo({ - url: '/page_components/wifilist/index?deviceId=' + options - .data.deviceId + '&name=' + options.data.name - }) - } else if (systemInfo.platform === 'ios') { - // 当前设备是 iOS - uni.navigateTo({ - url: '/page_fenbao/device/wifivideo?deviceId=' + options - .data.deviceId + '&name=' + options.data.name - }) - } - + + let vm = this + uni.showModal({ + title: '提示', + content: '你已绑定成功,需前去配网吗?', + success: function (res) { + if (res.confirm) { + let systemInfo = uni.getSystemInfoSync(); + if (systemInfo.platform === 'android') { + // 当前设备是 Android + uni.navigateTo({ + url: '/page_components/wifilist/index?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } else if (systemInfo.platform === 'ios') { + // 当前设备是 iOS + uni.navigateTo({ + url: '/page_fenbao/device/wifivideo?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } + } else if (res.cancel) { + console.log('用户点击了取消'); + } + } + }) + } else { uni.showToast({ title: '该设备已被绑定', diff --git a/page_fenbao/statulist/myshop/shopdetail/index.vue b/page_fenbao/statulist/myshop/shopdetail/index.vue index b1fc2b5..b1c86ea 100644 --- a/page_fenbao/statulist/myshop/shopdetail/index.vue +++ b/page_fenbao/statulist/myshop/shopdetail/index.vue @@ -265,20 +265,31 @@ }); uni.hideLoading(); uni.removeStorageSync('mac'); - let systemInfo = uni.getSystemInfoSync(); - if (systemInfo.platform === 'android') { - // 当前设备是 Android - uni.navigateTo({ - url: '/page_components/wifilist/index?deviceId=' + - options.data.deviceId + '&name=' + options.data.name - }) - } else if (systemInfo.platform === 'ios') { - // 当前设备是 iOS - uni.navigateTo({ - url: '/page_fenbao/device/wifivideo?deviceId=' + - options.data.deviceId + '&name=' + options.data.name - }) - } + let vm = this + uni.showModal({ + title: '提示', + content: '你已绑定成功,需前去配网吗?', + success: function (res) { + if (res.confirm) { + let systemInfo = uni.getSystemInfoSync(); + if (systemInfo.platform === 'android') { + // 当前设备是 Android + uni.navigateTo({ + url: '/page_components/wifilist/index?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } else if (systemInfo.platform === 'ios') { + // 当前设备是 iOS + uni.navigateTo({ + url: '/page_fenbao/device/wifivideo?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } + } else if (res.cancel) { + console.log('用户点击了取消'); + } + } + }) }else if(res.code == 500){ uni.showToast({ diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index d091ec6..8b3b45f 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -32,17 +32,23 @@ </view> </view> <view class="bot"> - <view class="bot_left"> + <!-- <view class="bot_left"> <view class="echarts"> - - <!-- <mpvue-echarts id="main" ref="pieChart" :echarts="echarts" @onInit="initChart" /> --> <l-echart ref="chart" @finished="initChart"></l-echart> <uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas" :ec="ec"> </uni-ec-canvas> </view> - </view> + </view> --> <view class="bot_right"> + <view class="cont" style="text-align: center;"> + <view class="tit"> + {{deviceInfo.orderAmount == null ? 0 : deviceInfo.orderAmount}} + </view> + <view class="txt"> + 订单金额 + </view> + </view> <view class="cont" style="text-align: center;"> <view class="tit"> {{deviceInfo.orderCount == null ? 0 : deviceInfo.orderCount}} @@ -51,7 +57,7 @@ 订单数 </view> </view> - <view class="cont" style="margin-left: 100rpx;text-align: center;"> + <view class="cont" style="text-align: center;"> <view class="tit"> {{timeday}} </view> @@ -190,9 +196,9 @@ } }, onLoad(option) { - setTimeout(() => { - this.$refs.canvas.init(this.initChart) - }, 1000) + // setTimeout(() => { + // this.$refs.canvas.init(this.initChart) + // }, 1000) let id = option.id this.id = id this.getDevice(id) @@ -354,7 +360,7 @@ this.timeday = Math.abs(Math.floor(differenceInMs / (1000 * 60))); } this.loadings = true - this.initChart() + // this.initChart() } }); @@ -449,7 +455,9 @@ // url: '/page_fenbao/device/lianjie?mac=' + this.deviceInfo.mac + '&storeId=' + this // .deviceInfo.storeId // }) - + uni.showLoading({ + title: '加载中...' + }); xBlufi.initXBlufi(1); xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent); xBlufi.notifyStartDiscoverBle({ @@ -519,23 +527,33 @@ icon: 'none', duration: 2000 }); - uni.hideLoading(); + uni.hideLoading(); uni.removeStorageSync('mac'); - let systemInfo = uni.getSystemInfoSync(); - if (systemInfo.platform === 'android') { - // 当前设备是 Android - uni.navigateTo({ - url: '/page_components/wifilist/index?deviceId=' + - options.data.deviceId + '&name=' + options.data.name - }) - } else if (systemInfo.platform === 'ios') { - // 当前设备是 iOS - uni.navigateTo({ - url: '/page_fenbao/device/wifivideo?deviceId=' + - options.data.deviceId + '&name=' + options.data.name - }) - } - + let vm = this + uni.showModal({ + title: '提示', + content: '你已绑定成功,需前去配网吗?', + success: function (res) { + if (res.confirm) { + let systemInfo = uni.getSystemInfoSync(); + if (systemInfo.platform === 'android') { + // 当前设备是 Android + uni.navigateTo({ + url: '/page_components/wifilist/index?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } else if (systemInfo.platform === 'ios') { + // 当前设备是 iOS + uni.navigateTo({ + url: '/page_fenbao/device/wifivideo?deviceId=' + options + .data.deviceId + '&name=' + options.data.name + }) + } + } else if (res.cancel) { + console.log('用户点击了取消'); + } + } + }) }else if(res.code == 500){ uni.showToast({ title: '该设备已被绑定', @@ -628,7 +646,7 @@ .card1 { padding: 34rpx 0 0 40rpx; width: 670rpx; - height: 583rpx; + height: 470rpx; background: #FFFFFF; box-shadow: 0rpx 14rpx 35rpx 0rpx rgba(53, 140, 255, 0.1); border-radius: 28rpx 28rpx 28rpx 28rpx; @@ -700,13 +718,15 @@ align-items: center; justify-content: center; margin-left: 19rpx; - width: 38rpx; - height: 23rpx; + // width: 38rpx; + // height: 23rpx; + padding: 5rpx 10rpx; + box-sizing: border-box; background: rgba(204, 204, 204, 0); opacity: 1; border: 2rpx solid #8883F0; border-radius: 40rpx; - font-size: 14rpx; + font-size: 24rpx; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; font-weight: 400; color: #8883F0; @@ -742,8 +762,12 @@ .bot_right { // margin-top: 50rpx; display: flex; - flex-wrap: nowrap; - + // flex-wrap: nowrap; + width: 100%; + justify-content: space-between; + padding-left: 80rpx; + padding-right: 120rpx; + box-sizing: border-box; .cont { .tit { font-size: 28rpx; diff --git a/pages/index/index.vue b/pages/index/index.vue index c5d534e..bcf9a34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -23,12 +23,12 @@ <view class="fd" > <view class="fd_top"> <view class="fd_da"> - <view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 140}rpx)` }"> + <view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100}rpx)`}"> <view class="fd_tit" v-for="(item,index) in groupLists" :key="index" :class="index==curtitidx?'act1':''" @click="changeidx(index)"> {{item.name}} </view> - </view> + </view> </view> <view class="right"> <!-- <view class="fd_set" @click="show = true"> @@ -1277,7 +1277,7 @@ // width: 40%; text-align: center; // width: 100%; - padding: 0 30rpx; + padding: 0 10rpx; box-sizing: border-box; // margin-right: 20rpx; font-size: 36rpx;