From 800a961d1e2af771a6e03c51133adb010e907837 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Tue, 4 Jun 2024 17:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statulist/myshop/editshop/index.vue | 5 +- page_fenbao/statulist/myshop/index.vue | 4 +- .../statulist/myshop/shopdetail/index.vue | 4 +- page_user/fenzu.vue | 33 ++++++--- page_user/sbdetail.vue | 35 ++++++--- pages/index/index.vue | 71 ++++++------------- pages/my.vue | 3 - pages/shouye/index.vue | 12 ++-- 8 files changed, 81 insertions(+), 86 deletions(-) diff --git a/page_fenbao/statulist/myshop/editshop/index.vue b/page_fenbao/statulist/myshop/editshop/index.vue index bc5457b..bac1e16 100644 --- a/page_fenbao/statulist/myshop/editshop/index.vue +++ b/page_fenbao/statulist/myshop/editshop/index.vue @@ -60,9 +60,6 @@ - @@ -387,7 +384,7 @@ position: fixed; top: 0; left: 0; - + color: #666; .box { width: 750rpx; height: 1440rpx; diff --git a/page_fenbao/statulist/myshop/index.vue b/page_fenbao/statulist/myshop/index.vue index 16fcfaf..3b01b15 100644 --- a/page_fenbao/statulist/myshop/index.vue +++ b/page_fenbao/statulist/myshop/index.vue @@ -9,13 +9,13 @@ - + {{item.name}} - + - {{listobj.name}} + {{listobj.name == null ? '' : listobj.name}} @@ -15,7 +15,7 @@ 营业时间: {{listobj.businessTimeStart}}~{{listobj.businessTimeEnd}} + class="shen">{{listobj.businessTimeStart == null ? '' : listobj.businessTimeStart}}~{{listobj.businessTimeEnd == null ? '' : listobj.businessTimeEnd}} 详细地址: {{listobj.address}} diff --git a/page_user/fenzu.vue b/page_user/fenzu.vue index 7f0e167..1840e4a 100644 --- a/page_user/fenzu.vue +++ b/page_user/fenzu.vue @@ -155,17 +155,28 @@ }); }, delgroup(id){ - this.$u.delete("/app/store/"+id).then((res) => { - if (res.code == 200) { - this.getgroup(); - }else if(res.code == 500){ - uni.showToast({ - title: res.msg, - icon: 'none', - duration:2000 - }); - } - }); + let that = this + uni.showModal({ + title: '提示', + content: '你确定要删掉该店铺吗?', + success: function (res) { + if (res.confirm) { + that.$u.delete("/app/store/"+id).then((res) => { + if (res.code == 200) { + that.getgroup(); + }else if(res.code == 500){ + uni.showToast({ + title: res.msg, + icon: 'none', + duration:2000 + }); + } + }) + } else if (res.cancel) { + console.log('用户点击了取消'); + } + } + }) }, putgroupname(id){ this.groupid=id diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index 1d8ec98..106d954 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -191,7 +191,8 @@ name: '', deviceId: '', storeId: '', - qrResult: '' + qrResult: '', + devicesList:[] } }, onLoad(option) { @@ -469,11 +470,21 @@ xBlufi.notifyStartDiscoverBle({ 'isStart': false }); - xBlufi.notifyConnectBle({ - isStart: true, - deviceId: this.deviceId, - name: this.name - }); + + xBlufi.notifyConnectBle({ + isStart: true, + deviceId: this.deviceId, + name: this.name + }) + + // if(this.devicesList.length == 0){ + // uni.hideLoading(); + // uni.showToast({ + // title: '设备离线或不在范围内', + // icon: 'none', + // duration: 2000 + // }); + // } }, 2000) } @@ -494,8 +505,7 @@ console.log(this.mac, 'macmacmac'); this.devicesList = uniqueDevicesList; } - - }); + }) } break; @@ -531,7 +541,7 @@ let vm = this uni.showModal({ title: '提示', - content: '你已绑定成功,需前去配网吗?', + content: '你已绑定该设备,需前去配网吗?', success: function(res) { if (res.confirm) { let systemInfo = uni.getSystemInfoSync(); @@ -573,6 +583,13 @@ } }) } + }else{ + uni.hideLoading() + uni.showToast({ + title: '设备离线或不在范围内', + icon: 'none', + duration: 2000 + }) } break; diff --git a/pages/index/index.vue b/pages/index/index.vue index 34d3667..1857be1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -22,11 +22,11 @@ - - + + - {{item.name}} + {{item.name.length > 5 ? item.name.slice(0, 5) + '...' : item.name}} @@ -204,13 +204,11 @@ onShow() { this.pagenum = 1 this.wateringList = [] - this.logins(); + this.logins() this.getgroup(); - this.deviceId = uni.getStorageSync('deviceIds'); - this.name = uni.getStorageSync('name'); - // console.log(this.deviceId,'aaa',this.name); - let that = this; // 将外部的 this 绑定到 that 上 - + this.deviceId = uni.getStorageSync('deviceIds') + this.name = uni.getStorageSync('name') + let that = this setTimeout(() => { if (this.userType === '01') { // 注意 '01' 是一个字符串 if (uni.getStorageSync('mac')) { @@ -218,7 +216,6 @@ uni.getLocation({ type: 'wgs84', success: function(lb) { - that.gps.lat = lb.latitude; that.gps.lon = lb.longitude; that.tobind() @@ -240,37 +237,30 @@ this.showtip = false this.order() } - // console.log(this.deviceInfo,'this.deviceInfo'); - - }); + }) } } }, 2000); }, methods: { - tocz() { this.showtip = false uni.navigateTo({ url: '/page_fenbao/device/czDevice?orderinfo=' + JSON.stringify(this.orderinfo) - }); + }) }, checkModelTags(modelTags) { return modelTags && modelTags.some(tag => tag === 2); }, order() { - console.log('调用了'); this.$u.get("/app/bill/recharge/device/fail/list").then((res) => { - - if (res.data.length != 0) { this.showtip = true this.orderinfo = res.data[0] } else { this.orderinfo = null } - - }); + }) }, towifi(mac) { uni.navigateTo({ @@ -285,7 +275,6 @@ let systemInfo = uni.getSystemInfoSync(); if (systemInfo.platform === 'android') { // 当前设备是 Android - } else if (systemInfo.platform === 'ios') { // console.log('aaaaaaaaaaaa'); uni.navigateTo({ @@ -321,16 +310,14 @@ setTimeout(() => { this.getdevice() }, 2000) - - // this.loadings=true // this.initChart() } else { uni.showToast({ title: res.msg, icon: 'none' - }); + }) } - }); + }) }, getgroup() { this.$u.get("/app/store/listCount").then((res) => { @@ -338,13 +325,13 @@ this.groupList = [] this.groupLists = res.data this.groupList = res.data.filter(item => { - return item.name === '全部'; + return item.name === '全部' }) this.titlist = this.groupList[0].name this.storeId = this.groupList[0].storeId this.getlist() } - }); + }) }, getlist() { this.shujuflag = false @@ -423,11 +410,11 @@ this.pagenum++ } else { // 没有更多数据 - this.noMoreData = true; + this.noMoreData = true } - this.isLoading = false; + this.isLoading = false } - }); + }) } else { this.pagenum = 1 this.wateringList = [] @@ -443,16 +430,11 @@ this.pagenum++ } else { // 没有更多数据 - this.noMoreData = true; + this.noMoreData = true } - this.isLoading = false; + this.isLoading = false } - }); - // this.$u.put(`/app/store/${item.storeId}/setDefault`).then((res) => { - // if (res.code == 200) { - - // } - // }) + }) } } }, @@ -464,7 +446,6 @@ }, // 点击更换用户模式 confirm(e) { - // console.log(e,'eeeeeeeeee'); let type = e[0].value if (type == '1') { this.scanQRCode() @@ -521,7 +502,6 @@ url: '/page_fenbao/device/index' }) }, - async initChart() { let value = 100; let value2 = this.deviceInfo.surplusElectriQuantity @@ -545,7 +525,6 @@ startAngle: 90, // 起始角度 z: 0, zlevel: 0, - data: [{ value: value, name: '占比', // 数据项名称 @@ -633,9 +612,7 @@ ], }; - // console.log( this.$refs.chartRef,'1111'); const chart = await this.$refs.chart.init(echarts); - // console.log(option); chart.setOption(option) return chart @@ -646,7 +623,6 @@ // this.$forceUpdate() if (res.code == 200) { this.deviceInfo = res.data - // console.log(this.deviceInfo, 1111); this.loadings = true } }); @@ -668,7 +644,7 @@ } else { this.jmlogin() } - }); + }) }, jmlogin() { let taht = this @@ -677,16 +653,13 @@ if (res.code) { let data = { loginCode: res.code, - - }; + } taht.$u.post('/app/auth/wxLogin', data).then(res => { if (res.code == 10003) { uni.navigateTo({ url: '/pages/login/login' }) - } else if (res.code == 200) { - // console.log("老用户登录",res.data) uni.setStorageSync('token', res.token); taht.logins() } diff --git a/pages/my.vue b/pages/my.vue index a9c1f79..6a8c072 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -213,7 +213,6 @@ page{ background-color: #F7FAFE; } .page{ - // position: relative; width: 750rpx; height: 100vh; .userpage{ @@ -230,7 +229,6 @@ page{ padding: 40rpx 50rpx ; margin-top: -50rpx; width: 750rpx; - // min-height: 500rpx; background: #F7FAFE; border-radius: 50rpx 50rpx 0 0; .userinfo{ @@ -376,7 +374,6 @@ page{ padding: 40rpx 50rpx ; margin-top: -50rpx; width: 750rpx; - // min-height: 500rpx; background: #F7FAFE; border-radius: 50rpx 50rpx 0 0; .botcard{ diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue index 5298a6c..76affe3 100644 --- a/pages/shouye/index.vue +++ b/pages/shouye/index.vue @@ -723,25 +723,25 @@ } .guangg { - margin-top: 24rpx; - margin-bottom: 28rpx; + margin-top: 10rpx; + margin-bottom: 10rpx; image { border-radius: 30rpx; width: 680rpx; - height: 238rpx; + height: 218rpx; } } .saoma { width: 750rpx; - height: 186rpx; + height: 166rpx; background: #FFFFFF; position: relative; left: -34rpx; - padding-top: 38rpx; + padding-top: 22rpx; border-radius: 54rpx 54rpx 0 0; - + margin-top: 20rpx; view { text-align: center; width: 676rpx;