diff --git a/page_fenbao/zhuce.vue b/page_fenbao/zhuce.vue index 4f5010e..ca90406 100644 --- a/page_fenbao/zhuce.vue +++ b/page_fenbao/zhuce.vue @@ -126,7 +126,6 @@ path: '/pages/shouye/index' } }, - // 分享到朋友圈 onShareTimeline: function() { return { @@ -175,7 +174,6 @@ } }) }, - getxingh() { this.$u.get(`/app/model/all`).then(res => { if (res.code == 200) { @@ -205,8 +203,6 @@ } }) }, - - btnyc() { this.titleflag = false }, @@ -254,7 +250,7 @@ if (!options.result) { this.mengcflag = false uni.hideLoading() - console.log("蓝牙未开启", options); + console.log("蓝牙未开启", options) uni.showToast({ title: '蓝牙未开启,请打开手机蓝牙', icon: 'none', @@ -268,20 +264,20 @@ if (options.result) { let uniqueDevicesList = Array.from(new Set(this.devicesList)); this.devicesLists = uniqueDevicesList.map(device => { - const deviceId = device.name.substring(5); + const deviceId = device.name.substring(5) const newDevice = { ...device, xuanz: "请选择", }; // 直接在复制时添加 xuanz 字段 - return newDevice; + return newDevice }) let devicesarr = options.data this.devicesList.forEach(device => { if (device.name.substring(0, 4) == "CCYK") { - this.devicesList.push(device); - let uniqueDevicesList = Array.from(new Set(this.devicesList)); + this.devicesList.push(device) + let uniqueDevicesList = Array.from(new Set(this.devicesList)) this.devicesLists = uniqueDevicesList.filter(device => { - const deviceId = device.name.substring(5); + const deviceId = device.name.substring(5) return deviceId }) } @@ -299,26 +295,25 @@ this.arrs = arr.join(',') this.$u.get(`/app/device/getExistMac/${this.arrs}`).then(res => { if (res.code == 200 && Array.isArray(res.data)) { - const existingDevices = new Map(res.data.map(item => [item.mac, true])); // 使用Map来存储已找到的MAC - + const existingDevices = new Map(res.data.map(item => [item.mac, true]))// 使用Map来存储已找到的MAC this.devicesLists = this.devicesLists.map(device => { - const trimmedName = device.name.slice(5); // 假设name中包含MAC地址的一部分 - const mac = trimmedName; // 如果trimmedName直接就是MAC,则不需要再处理 - device.found = existingDevices.has(mac); // 添加一个found属性来标记是否找到 + const trimmedName = device.name.slice(5) // 假设name中包含MAC地址的一部分 + const mac = trimmedName // 如果trimmedName直接就是MAC,则不需要再处理 + device.found = existingDevices.has(mac) // 添加一个found属性来标记是否找到 if (device.found) { - const sn = res.data.find(val => val.mac === mac)?.sn; // 从res.data中找到匹配的sn + const sn = res.data.find(val => val.mac === mac)?.sn // 从res.data中找到匹配的sn if (sn) { - device.sn = sn; // 设置sn + device.sn = sn // 设置sn } - device.flags = true; // 设置flags为true,因为找到了匹配的MAC + device.flags = true // 设置flags为true,因为找到了匹配的MAC } else { - device.flags = false; // 可选:如果你想要明确表示未找到 + device.flags = false // 可选:如果你想要明确表示未找到 } - return device; // 但map函数仍然需要return来保持结构 - }); + return device // 但map函数仍然需要return来保持结构 + }) this.devicesLists.sort((a, b) => { - if (a.found && !b.found) return 1; // b排在a前面(即a在后面) - if (!a.found && b.found) return -1; // a排在b前面 + if (a.found && !b.found) return 1 // b排在a前面(即a在后面) + if (!a.found && b.found) return -1 // a排在b前面 return 0; }); } @@ -333,7 +328,7 @@ setTimeout(()=>{ uni.hideLoading() },2000) - console.log('蓝牙停止搜索失败'); + console.log('蓝牙停止搜索失败') } this.searching = false break @@ -477,13 +472,13 @@ }; // 遍历数组并解析每个字段 for (let i = 0; i < dataArray.length; i++) { - const field = dataArray[i]; + const field = dataArray[i] for (const prefix in prefixMap) { if (field.startsWith(prefix)) { - const value = field.substring(1); - const propertyName = prefixMap[prefix]; - parsedData[propertyName] = isNaN(parseFloat(value)) ? value : parseFloat(value); - break; + const value = field.substring(1) + const propertyName = prefixMap[prefix] + parsedData[propertyName] = isNaN(parseFloat(value)) ? value : parseFloat(value) + break } } } @@ -516,7 +511,7 @@ // setTimeout(() => { // uni.navigateBack() // }, 1000) - uni.removeStorageSync('mac'); + uni.removeStorageSync('mac') } else { this.mengcflag = false uni.hideLoading() @@ -524,7 +519,7 @@ title: res.msg, icon: 'none', duration: 2000 - }); + }) } }) }, @@ -551,6 +546,7 @@ this.texts = '正在扫描蓝牙设备...' setTimeout(() => { this.statusflag = false + uni.hideLoading() // if (this.searching) { xBlufi.notifyStartDiscoverBle({ 'isStart': false @@ -575,7 +571,6 @@ this.tishiflag = false } } - } @@ -585,7 +580,6 @@ padding-bottom: 300rpx; box-sizing: border-box; } - .containers { width: 100%; height: 100vh; @@ -595,27 +589,16 @@ box-sizing: border-box; left: 0; z-index: 999 !important; - /* background-color: #fff; */ - z-index: 99; } - .pages { - // padding-top: 136rpx !important; padding: 0 32rpx; box-sizing: border-box; } - - // text{ - // display: block; - // } - .sm { color: #77808D; border-radius: 0rpx 0rpx 0rpx 0rpx; - // margin-top: 48rpx; display: inline-block; } - .title { margin-bottom: 84rpx; margin-top: 50rpx; @@ -628,7 +611,6 @@ vertical-align: bottom; margin-right: 10rpx; } - text:nth-child(1) { font-weight: 400; font-size: 66rpx; @@ -641,7 +623,6 @@ margin-bottom: 48rpx; } } - .dblist { display: flex; justify-content: space-between; @@ -653,23 +634,19 @@ box-sizing: border-box; text-align: center; border-radius: 10rpx; - .lt { padding-left: 10rpx; box-sizing: border-box; margin-right: 18rpx; - image { width: 120rpx; height: 200rpx; } } - .cen { width: 365rpx; padding-left: 10rpx; box-sizing: border-box; - .name { font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-weight: 400; @@ -681,7 +658,6 @@ text-transform: none; margin-top: 10rpx; } - .mac { font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-weight: 400; @@ -694,11 +670,9 @@ margin-top: 16rpx; } } - .rt { margin-top: 32rpx; box-sizing: border-box; - text { display: block; width: 108rpx; @@ -713,7 +687,6 @@ } } } - .anniu { padding: 0 90rpx; width: 100%; @@ -721,14 +694,12 @@ position: fixed; left: 0; bottom: 112rpx; - button { background: #8883F0; border-radius: 52rpx 52rpx 52rpx 52rpx; color: #fff; } } - .mask { width: 622rpx; height: 710rpx; @@ -743,7 +714,6 @@ padding-left: 60rpx; padding-right: 60rpx; box-sizing: border-box; - .titles { font-size: 48rpx; color: #262B37; @@ -751,7 +721,6 @@ text-align: center; margin-bottom: 24rpx; } - text { display: block; font-size: 32rpx; @@ -759,7 +728,6 @@ line-height: 56rpx; text-align: left; } - button { margin-top: 46rpx; width: 266rpx; diff --git a/page_user/HM-dragSorts/HM-dragSorts.vue b/page_user/HM-dragSorts/HM-dragSorts.vue index 4b5adad..f78e03a 100644 --- a/page_user/HM-dragSorts/HM-dragSorts.vue +++ b/page_user/HM-dragSorts/HM-dragSorts.vue @@ -57,8 +57,11 @@ {{row.name.length > 10 ? row.name.substring(0, 10) + '...' : row.name }}({{row.deviceCount}}) - - + + (修改审核中) + + diff --git a/page_user/fenzu.vue b/page_user/fenzu.vue index b10bca4..33d01fc 100644 --- a/page_user/fenzu.vue +++ b/page_user/fenzu.vue @@ -28,7 +28,7 @@ - 修改分组名称 + 修改店铺名称 @@ -48,7 +48,7 @@ 新建分组 --> - + diff --git a/pages/login/login.vue b/pages/login/login.vue index 1ce9ce8..ec2dd52 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -212,6 +212,10 @@ } }, getPhoneNumber(){ + uni.showLoading({ + title: '登录中...', + mask: true + }) let taht = this wx.login({ success(res) { @@ -221,6 +225,7 @@ } taht.$u.post('/app/auth/wxLogin', data).then(res => { if (res.code == 10003) { + uni.hideLoading() uni.navigateTo({ url: '/pages/login/login' }) @@ -268,6 +273,7 @@ // }) // }, async ceshi() { + uni.hideLoading() this.$u.get("/app/user/userInfo").then((res) => { if (this.id == 1) { uni.navigateBack()