From d74eb83a164b0c287407e5eef93d55413587d25e Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Sat, 11 May 2024 13:33:17 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E6=94=B9'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- page_fenbao/device/index.vue | 25 ++------ page_fenbao/device/joinDevice.vue | 23 +------ page_fenbao/statulist/about/index.vue | 35 +++++----- .../statulist/myshop/editshop/index.vue | 2 +- page_fenbao/statulist/myshop/index.vue | 2 +- page_fenbao/statulist/nearby/index.vue | 5 ++ page_user/mapditu/index.vue | 2 +- page_user/sbdetail.vue | 8 +-- page_user/setting.vue | 2 +- page_user/userSet.vue | 29 +++++++-- page_user/wifijoint/index.vue | 23 +++---- pages.json | 10 +++ pages/index/index.vue | 64 ++++--------------- pages/tj.vue | 32 +++++----- 15 files changed, 113 insertions(+), 151 deletions(-) diff --git a/manifest.json b/manifest.json index a944b8d..7533f64 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "kaiguan", - "appid" : "__UNI__CE4B00E", + "appid" : "__UNI__F877C47", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/page_fenbao/device/index.vue b/page_fenbao/device/index.vue index 09d5bb6..967a7fd 100644 --- a/page_fenbao/device/index.vue +++ b/page_fenbao/device/index.vue @@ -5,7 +5,7 @@ 设备列表 - 正在扫描蓝牙设备...... + {{texts}} @@ -25,7 +25,7 @@ - + @@ -135,8 +135,7 @@ case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS: if (options.result) { let devicesarr = options.data - // this.devicesList = options.data - // console.log(mac,'devicesarrdevicesarr'); + devicesarr.forEach(device => { const mac = device.name.substring(6); @@ -144,6 +143,7 @@ // this.$u.get(`/app/device/${mac}/isBind`, data).then((res) => { // if (res.data == false) { this.devicesList.push(device); + console.log(this.devicesList); let uniqueDevicesList = Array.from(new Set(this.devicesList)); // 将去重后的数组重新赋值给 this.devicesList @@ -152,16 +152,7 @@ // }) } - // getisband(mac).then(res => { - // console.log(res); - // if (res.data == true) { - // console.log(`MAC 地址 ${mac} 已经绑定`); - // } else { - // this.devicesList.push(device) - // } - // }).catch(error => { - // console.error(`检查 MAC 地址 ${mac} 是否绑定的过程中出错:`, error); - // }); + }); } break; @@ -176,11 +167,7 @@ }); { console.log("连接回调options.data.deviceId:" + options.data.deviceId, "连接回调options.data.name:" + options.data.name); - // 连接成功绑定设备 - // let params = { - // mac: this.Bluetoothmac, - // userId: this.$store.state.user.userId - // } + let systemInfo = uni.getSystemInfoSync(); if (systemInfo.platform === 'android') { // 当前设备是 Android diff --git a/page_fenbao/device/joinDevice.vue b/page_fenbao/device/joinDevice.vue index dba1571..30a0f9c 100644 --- a/page_fenbao/device/joinDevice.vue +++ b/page_fenbao/device/joinDevice.vue @@ -32,28 +32,7 @@ 绑定 - + diff --git a/page_fenbao/statulist/about/index.vue b/page_fenbao/statulist/about/index.vue index 1fcc5c8..686f5b7 100644 --- a/page_fenbao/statulist/about/index.vue +++ b/page_fenbao/statulist/about/index.vue @@ -4,26 +4,15 @@ height='38'> - 微信小程序 + {{obj.title}} - - - - - 微信小程序 - - - 微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程序微信小程序微信小程 微信小程序微信小程序微信小程序微信小程序微信小程 序微信小程序微信小程序微信小程序 - - - 微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程 - - - 微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程微信小程序微信小程序 微信小程序微信小程序 + + + @@ -32,11 +21,21 @@ export default { data() { return { - + obj:{} } }, + onLoad() { + this.getabout() + }, methods: { - + getabout(){ + let type = 'about' + this.$u.get(`/app/article/licence/${type}`).then((res) => { + if (res.code == 200) { + this.obj= res.data + } + }) + } } } diff --git a/page_fenbao/statulist/myshop/editshop/index.vue b/page_fenbao/statulist/myshop/editshop/index.vue index 3704b57..c53bc97 100644 --- a/page_fenbao/statulist/myshop/editshop/index.vue +++ b/page_fenbao/statulist/myshop/editshop/index.vue @@ -16,7 +16,7 @@ 营业时间 + style="display: flex;justify-content: space-between;padding: 15rpx 26rpx;box-sizing: border-box;"> {{ksyy}} -- diff --git a/page_fenbao/statulist/myshop/index.vue b/page_fenbao/statulist/myshop/index.vue index 106e29b..caafa9f 100644 --- a/page_fenbao/statulist/myshop/index.vue +++ b/page_fenbao/statulist/myshop/index.vue @@ -311,7 +311,7 @@ display: flex; justify-content: space-between; position: fixed; - top: 170rpx; + top: 160rpx; .cjshop { width: 200rpx; height: 64rpx; diff --git a/page_fenbao/statulist/nearby/index.vue b/page_fenbao/statulist/nearby/index.vue index 7ae0d93..822f9a8 100644 --- a/page_fenbao/statulist/nearby/index.vue +++ b/page_fenbao/statulist/nearby/index.vue @@ -151,6 +151,11 @@ uni.navigateTo({ url:'/page_user/mapditu/index' }) + }else if(num == 2){ + console.log(111); + uni.switchTab({ + url:'/pages/index/index' + }) } } }, diff --git a/page_user/mapditu/index.vue b/page_user/mapditu/index.vue index 386cf85..68ab422 100644 --- a/page_user/mapditu/index.vue +++ b/page_user/mapditu/index.vue @@ -229,7 +229,7 @@ left: 50%; transform: translateX(-50%); width: 706rpx; - height: 384rpx; + height: 400rpx; background: #FFFFFF; box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08); border-radius: 20rpx; diff --git a/page_user/sbdetail.vue b/page_user/sbdetail.vue index 108a835..691192d 100644 --- a/page_user/sbdetail.vue +++ b/page_user/sbdetail.vue @@ -652,14 +652,14 @@ .bot_left { width: 210rpx; - height: 190.14rpx; + height: 180rpx; margin-right: 34rpx; .echarts { - width: 210rpx; - + // width: 210rpx; + height: 200rpx; .uni-ec-canvas { width: 100%; - height: 190.14rpx; + height: 100rpx !important; display: block; // margin-top: 30rpx; } diff --git a/page_user/setting.vue b/page_user/setting.vue index b72dde5..89f813c 100644 --- a/page_user/setting.vue +++ b/page_user/setting.vue @@ -259,7 +259,7 @@ tosetpage() { this.showfz = false uni.navigateTo({ - url: '/pages_user/fenzu' + url: '/page_user/fenzu' }) }, sub(num) { diff --git a/page_user/userSet.vue b/page_user/userSet.vue index 0606793..b6a049a 100644 --- a/page_user/userSet.vue +++ b/page_user/userSet.vue @@ -28,7 +28,7 @@ - + 用户协议 @@ -37,7 +37,7 @@ - + 隐私政策 @@ -46,7 +46,7 @@ - + 个人信息收集清单 @@ -135,7 +135,8 @@ } ], mode:'房东模式', - userinfo:{} + userinfo:{}, + type:'' } }, onLoad() { @@ -148,6 +149,26 @@ }) }, + btnwz(num){ + if(num == 1){ + this.type = 'user' + uni.navigateTo({ + url:'/page_components/wentdetail?type=' + this.type + }) + }else if(num == 2){ + this.type = 'privacy' + uni.navigateTo({ + url:'/page_components/wentdetail?type=' + this.type + }) + }else if(num == 3){ + this.type = 'collection' + uni.navigateTo({ + url:'/page_components/wentdetail?type=' + this.type + }) + } + }, + + // 点击更换用户模式 confirm(e){ // console.log(e); diff --git a/page_user/wifijoint/index.vue b/page_user/wifijoint/index.vue index 690f6c3..394adff 100644 --- a/page_user/wifijoint/index.vue +++ b/page_user/wifijoint/index.vue @@ -57,9 +57,7 @@ export default { xBlufi.notifyInitBleEsp32({ deviceId: this.objlist.deviceId }); - - // console.log("获取到id",JSON.parse(this.options.objlist.deviceId)) - // console.log(this.objlist,"option",this.objlist.deviceId) + }, onReady() { }, onUnload() { @@ -141,19 +139,18 @@ export default { content: `连接成功路由器`, showCancel: false, success: function (res) { - let ids = that.$store.state.user.deviceId - getwifi(ids).then(res => { - console.log(res); - uni.switchTab({ - url:'/pages/index' - }) + // let ids = that.$store.state.user.deviceId + uni.switchTab({ + url:'/pages/index/index' }) + // getwifi(ids).then(res => { + // console.log(res); + // uni.switchTab({ + // url:'/pages/index/index' + // }) + // }) } }) - // 连接成功进行跳转 - // setTimeout(()=>{ - - // },1000) } } break; diff --git a/pages.json b/pages.json index 7e4fd42..991da24 100644 --- a/pages.json +++ b/pages.json @@ -409,6 +409,16 @@ "navigationBarTextStyle": "#FFFFFF", "navigationStyle": "custom" } + }, + { + "path": "wentdetail", + "style": { + "navigationBarTitleText": "添加设备", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#3996FD", + "navigationBarTextStyle": "#FFFFFF", + "navigationStyle": "custom" + } } ] } diff --git a/pages/index/index.vue b/pages/index/index.vue index 967c6cb..625a7e8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -12,9 +12,7 @@ 系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值 - + @@ -28,10 +26,7 @@ - + {{titlist}} @@ -103,19 +98,14 @@ - - + 该店铺暂无设备... @@ -138,14 +128,6 @@ - @@ -212,20 +194,7 @@ } }, onLoad() { - setTimeout(() => { - console.log(this.$refs) - // this.$refs.canvas.init(this.initChart) - }, 1000) - - // setTimeout(() => { - - // this.initChart() - // }, 300); - // this.initChart() - - // 首次加载页面给现在的时间 - - + }, onShow() { this.logins(); @@ -297,7 +266,6 @@ }else{ this.orderinfo=null } - // console.log(this.deviceInfo,'this.deviceInfo'); }); }, @@ -439,7 +407,7 @@ tosetpage() { this.showfz = false uni.navigateTo({ - url: '/pages_user/shebei/fenzu' + url: '/page_user/fenzu' }) }, // 点击更换用户模式 @@ -608,12 +576,9 @@ // console.log( this.$refs.chartRef,'1111'); const chart = await this.$refs.chart.init(echarts); - console.log(option); + // console.log(option); chart.setOption(option) - // chart.resize({ - // width: uni.upx2px(210), // Convert 210rpx to pixels - // height: uni.upx2px(190.14) // Convert 190.14rpx to pixels - // }); + return chart }, // 获取设备详情 @@ -707,10 +672,8 @@ this.sbflag = true } uni.setStorageSync('deviceId', this.deviceInfo.deviceId); - this.initChart() + // this.initChart() this.order() - // console.log(this.deviceInfo,'this.deviceInfo'); - }); }, changeidx(index) { @@ -1305,13 +1268,12 @@ } .card_right { - margin-top: 60rpx; + margin-top: 30rpx; margin-left: auto; - margin-right: 94rpx; - + margin-right: 50rpx; image { - width: 63.04rpx; - height: 167.48rpx; + width: 180rpx; + height:200rpx; } } } diff --git a/pages/tj.vue b/pages/tj.vue index c1fb944..622953f 100644 --- a/pages/tj.vue +++ b/pages/tj.vue @@ -23,8 +23,7 @@ - + @@ -94,9 +93,6 @@ ec: { lazyLoad: true }, - - - params: { year: true, month: true, @@ -126,10 +122,7 @@ } }, onLoad() { - setTimeout(() => { - console.log(this.$refs) - this.$refs.canvas.init(this.initChart) - }, 1000) + // setTimeout(() => { @@ -142,6 +135,10 @@ }, onShow() { + setTimeout(() => { + // console.log(this.$refs) + this.$refs.canvas.init(this.initChart) + }, 1000) this.recharge = 0 this.deviceId = uni.getStorageSync('deviceId') this.userType = uni.getStorageSync('userType') @@ -149,11 +146,12 @@ const now = new Date(); this.yeartime.year = now.getFullYear() this.yeartime.month = now.getMonth() + 1 - if (this.userType == '00') { - this.gettimes() - } else if (this.userType == '01') { - this.gettime() - } + this.gettime() + // if (this.userType == '00') { + // this.gettimes() + // } else if (this.userType == '01') { + // this.gettime() + // } }, methods: { // 点击获取时间 @@ -161,6 +159,10 @@ this.recharge = 0 this.yeartime = e this.gettime() + setTimeout(() => { + // console.log(this.$refs) + this.$refs.canvas.init(this.initChart) + }, 1000) }, // 进行获取用电量请求 gettime() { @@ -314,7 +316,7 @@ height: height, devicePixelRatio: canvasDpr }) - console.log(chart); + option.series[0].data = that.chartData canvas.setChart(chart) chart.setOption(option)