From 8f2e28012eb018b4cf826d6ed323d863839d220c Mon Sep 17 00:00:00 2001 From: qcl_123 <5212384+qcl_123@user.noreply.gitee.com> Date: Wed, 25 Mar 2026 17:27:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=93=9D=E7=89=99=E8=AE=BE=E5=A4=87=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Food/count/search.vue | 59 +-- Food/me/menudetail.vue | 12 +- body/login/login.vue | 3 +- components/bodyIndex/drawer.vue | 1 + components/bodyIndex/record.vue | 2 +- components/foodIndex/bluetooth.vue | 336 +++++++----- components/foodIndex/bluetooth_food.vue | 294 ++++++----- content.json | 21 +- pageTwo/devices/B20.vue | 96 ++-- pageTwo/devices/G02.vue | 63 ++- pageTwo/devices/PCL.vue | 108 ++-- pageTwo/devices/PCL22.vue | 117 +++-- pageTwo/devices/PCL22S.vue | 86 +-- pageTwo/devices/PCT01.vue | 26 +- pageTwo/devices/pcL06.vue | 423 +++++++++++++++ pageTwo/devices/scss/PCT01.scss | 1 - pageTwo/skiping/skip.vue | 290 +++-------- pages.json | 6 + pages/index/index.vue | 63 ++- scss/common.scss | 1 + scss/food.scss | 2 +- static/lianjie.png | Bin 0 -> 1287 bytes static/qie.png | Bin 0 -> 3740 bytes store/index.js | 22 +- toolJs/Bluetooth.js | 322 +++++------- toolJs/https.js | 2 +- toolJs/tools.js | 26 +- .../mp-weixin/Food/count/everyDay.js.map | 2 +- .../mp-weixin/Food/count/everyMeal.js.map | 2 +- .../mp-weixin/Food/count/search.js.map | 2 +- .../mp-weixin/Food/count/setting.js.map | 2 +- .../mp-weixin/Food/me/menudetail.js.map | 2 +- .../mp-weixin/Food/me/mymenu.js.map | 2 +- .../mp-weixin/Food/me/record.js.map | 2 +- .../mp-weixin/Food/search/list.js.map | 2 +- .../mp-weixin/Food/search/search.js.map | 2 +- .../mp-weixin/body/curve/curve.js.map | 2 +- .../mp-weixin/body/history/history.js.map | 2 +- .../body/history/historyDetail.js.map | 2 +- .../mp-weixin/body/home/body.js.map | 2 +- .../body/login/forgetPassword.js.map | 2 +- .../mp-weixin/body/login/login.js.map | 2 +- .../.sourcemap/mp-weixin/body/my/about.js.map | 2 +- .../mp-weixin/body/my/manage.js.map | 2 +- .../mp-weixin/body/my/userInfo.js.map | 2 +- .../mp-weixin/body/report/report.js.map | 2 +- .../mp-weixin/body/setting/email.js.map | 2 +- .../mp-weixin/body/setting/password.js.map | 2 +- .../mp-weixin/body/setting/phone.js.map | 2 +- .../mp-weixin/body/setting/setting.js.map | 2 +- .../.sourcemap/mp-weixin/common/main.js.map | 2 +- .../.sourcemap/mp-weixin/common/vendor.js.map | 2 +- .../components/bodyIndex/bodyHome.js.map | 2 +- .../components/bodyIndex/drawer.js.map | 2 +- .../components/bodyIndex/firstweight.js.map | 2 +- .../components/bodyIndex/record.js.map | 2 +- .../components/bodyIndex/targetWeight.js.map | 2 +- .../components/cardIndex/cardHome.js.map | 2 +- .../components/cardIndex/record.js.map | 2 +- .../components/foodIndex/bluetooth.js.map | 2 +- .../foodIndex/bluetooth_food.js.map | 2 +- .../components/foodIndex/foodHome.js.map | 2 +- .../components/foodIndex/search.js.map | 2 +- .../components/foodIndex/search2.js.map | 2 +- .../mp-weixin/element/drawer.js.map | 2 +- .../mp-weixin/element/headerIndex.js.map | 2 +- .../element/ren-calendar/ren-calendar.js.map | 2 +- .../mp-weixin/element/slider-fraction.js.map | 2 +- .../mp-weixin/pageTwo/bmi/bmi.js.map | 2 +- .../mp-weixin/pageTwo/cardList/card.js.map | 2 +- .../mp-weixin/pageTwo/charts/charts.js.map | 2 +- .../mp-weixin/pageTwo/compk/contrast.js.map | 2 +- .../mp-weixin/pageTwo/compk/pkdetail.js.map | 2 +- .../mp-weixin/pageTwo/devices/B20.js.map | 2 +- .../mp-weixin/pageTwo/devices/G02.js.map | 2 +- .../mp-weixin/pageTwo/devices/PCL.js.map | 2 +- .../mp-weixin/pageTwo/devices/PCL22.js.map | 2 +- .../mp-weixin/pageTwo/devices/PCL22S.js.map | 2 +- .../mp-weixin/pageTwo/devices/PCT01.js.map | 2 +- .../mp-weixin/pageTwo/devices/PCV02.js.map | 2 +- .../mp-weixin/pageTwo/devices/pcL06.js.map | 1 + .../mp-weixin/pageTwo/devices/search.js.map | 2 +- .../mp-weixin/pageTwo/history/history.js.map | 2 +- .../pageTwo/history/historyDetail.js.map | 2 +- .../inheritHeighet/inheritHeighet.js.map | 2 +- .../pageTwo/lunging/vitalcapacity.js.map | 2 +- .../mp-weixin/pageTwo/pcL06/pcL06.js.map | 1 + .../mp-weixin/pageTwo/score/score.js.map | 2 +- .../mp-weixin/pageTwo/skiping/skip.js.map | 2 +- .../mp-weixin/pages/index/index.js.map | 2 +- .../.sourcemap/mp-weixin/pages/my/me.js.map | 2 +- .../mp-weixin/pages/target/target.js.map | 2 +- .../llt-slider-range/llt-slider-range.js.map | 2 +- .../components/qiun-data-charts.js.map | 2 +- .../qiun-data-charts/qiun-data-charts.js.map | 2 +- .../components/qiun-error/qiun-error.js.map | 2 +- .../components/qiun-loading/loading1.js.map | 2 +- .../components/qiun-loading/loading2.js.map | 2 +- .../components/qiun-loading/loading3.js.map | 2 +- .../components/qiun-loading/loading4.js.map | 2 +- .../components/qiun-loading/loading5.js.map | 2 +- .../components/uni-icons/uni-icons.js.map | 2 +- .../uni-popup-dialog/uni-popup-dialog.js.map | 2 +- .../components/uni-popup/uni-popup.js.map | 2 +- .../uni-swipe-action-item.js.map | 2 +- .../dist/dev/mp-weixin/Food/count/everyDay.js | 4 +- .../dev/mp-weixin/Food/count/everyMeal.js | 8 +- .../dist/dev/mp-weixin/Food/count/search.js | 67 +-- .../dist/dev/mp-weixin/Food/count/search.wxss | 1 - .../dist/dev/mp-weixin/Food/count/setting.js | 6 +- .../dist/dev/mp-weixin/Food/me/menudetail.js | 17 +- .../dist/dev/mp-weixin/Food/me/mymenu.js | 2 +- .../dist/dev/mp-weixin/Food/me/record.js | 2 +- .../dist/dev/mp-weixin/Food/me/recordetail.js | 2 +- .../dist/dev/mp-weixin/Food/search/list.js | 4 +- .../dist/dev/mp-weixin/Food/search/search.js | 2 +- unpackage/dist/dev/mp-weixin/app.json | 3 +- .../dist/dev/mp-weixin/body/curve/curve.js | 8 +- .../dev/mp-weixin/body/history/history.js | 6 +- .../dist/dev/mp-weixin/body/login/login.js | 2 +- .../dist/dev/mp-weixin/body/login/login.wxss | 1 - unpackage/dist/dev/mp-weixin/body/my/about.js | 2 +- .../dist/dev/mp-weixin/body/my/manage.js | 4 +- .../dist/dev/mp-weixin/body/my/userInfo.js | 2 +- .../dist/dev/mp-weixin/body/report/report.js | 4 +- .../dev/mp-weixin/body/setting/setting.js | 2 +- unpackage/dist/dev/mp-weixin/common/main.wxss | 3 +- unpackage/dist/dev/mp-weixin/common/vendor.js | 491 +++++++++--------- .../components/bodyIndex/bodyHome.js | 36 +- .../mp-weixin/components/bodyIndex/drawer.js | 29 +- .../components/bodyIndex/firstweight.js | 28 +- .../mp-weixin/components/bodyIndex/record.js | 28 +- .../components/bodyIndex/record.wxml | 2 +- .../components/bodyIndex/targetWeight.js | 28 +- .../components/cardIndex/cardHome.js | 30 +- .../mp-weixin/components/cardIndex/record.js | 30 +- .../components/foodIndex/bluetooth.js | 363 +++++++------ .../components/foodIndex/bluetooth.wxml | 2 +- .../components/foodIndex/bluetooth.wxss | 4 +- .../components/foodIndex/bluetooth_food.js | 317 +++++------ .../components/foodIndex/bluetooth_food.wxml | 2 +- .../components/foodIndex/bluetooth_food.wxss | 3 +- .../components/foodIndex/foodHome.js | 40 +- .../mp-weixin/components/foodIndex/search.js | 30 +- .../mp-weixin/components/foodIndex/search2.js | 28 +- .../dist/dev/mp-weixin/element/drawer.js | 28 +- .../dist/dev/mp-weixin/element/drawer.json | 4 +- .../dist/dev/mp-weixin/element/headerIndex.js | 32 +- .../element/ren-calendar/ren-calendar.js | 30 +- .../element/ren-calendar/ren-calendar.json | 4 +- .../dev/mp-weixin/element/slider-fraction.js | 28 +- .../mp-weixin/element/slider-fraction.json | 4 +- .../dist/dev/mp-weixin/pageTwo/bmi/bmi.js | 2 +- .../dev/mp-weixin/pageTwo/cardList/card.js | 2 +- .../dev/mp-weixin/pageTwo/charts/charts.js | 4 +- .../dev/mp-weixin/pageTwo/compk/contrast.js | 4 +- .../dev/mp-weixin/pageTwo/compk/pkdetail.js | 2 +- .../dist/dev/mp-weixin/pageTwo/devices/B20.js | 80 +-- .../dev/mp-weixin/pageTwo/devices/B20.wxml | 2 +- .../dev/mp-weixin/pageTwo/devices/B20.wxss | 10 +- .../dist/dev/mp-weixin/pageTwo/devices/G02.js | 65 +-- .../dist/dev/mp-weixin/pageTwo/devices/PCL.js | 100 ++-- .../dev/mp-weixin/pageTwo/devices/PCL22.js | 113 ++-- .../dev/mp-weixin/pageTwo/devices/PCL22S.js | 80 +-- .../dev/mp-weixin/pageTwo/devices/PCT01.js | 25 +- .../dev/mp-weixin/pageTwo/devices/PCT01.wxss | 1 - .../dev/mp-weixin/pageTwo/devices/pcL06.js | 484 +++++++++++++++++ .../dev/mp-weixin/pageTwo/devices/pcL06.json | 4 + .../dev/mp-weixin/pageTwo/devices/pcL06.wxml | 1 + .../dev/mp-weixin/pageTwo/devices/pcL06.wxss | 90 ++++ .../dev/mp-weixin/pageTwo/history/history.js | 6 +- .../pageTwo/inheritHeighet/inheritHeighet.js | 2 +- .../dist/dev/mp-weixin/pageTwo/score/score.js | 8 +- .../dev/mp-weixin/pageTwo/skiping/skip.js | 278 ++-------- .../dev/mp-weixin/pageTwo/skiping/skip.wxml | 2 +- .../dist/dev/mp-weixin/pages/index/index.js | 71 +-- .../dist/dev/mp-weixin/pages/index/index.wxml | 2 +- .../dist/dev/mp-weixin/pages/index/index.wxss | 3 + unpackage/dist/dev/mp-weixin/pages/my/me.js | 4 +- .../dev/mp-weixin/project.private.config.json | 2 +- .../dist/dev/mp-weixin/static/lianjie.png | Bin 0 -> 1287 bytes unpackage/dist/dev/mp-weixin/static/qie.png | Bin 0 -> 3740 bytes .../llt-slider-range/llt-slider-range.js | 30 +- .../components/qiun-data-charts.js | 34 +- .../qiun-data-charts/qiun-data-charts.js | 38 +- .../components/qiun-error/qiun-error.js | 28 +- .../components/qiun-loading/loading1.js | 28 +- .../components/qiun-loading/loading2.js | 28 +- .../components/qiun-loading/loading3.js | 28 +- .../components/qiun-loading/loading4.js | 28 +- .../components/qiun-loading/loading5.js | 28 +- .../components/qiun-loading/qiun-loading.js | 30 +- .../components/uni-icons/uni-icons.js | 30 +- .../uni-popup-dialog/uni-popup-dialog.js | 32 +- .../components/uni-popup/uni-popup.js | 30 +- .../uni-swipe-action-item.js | 42 +- .../uni-swipe-action/uni-swipe-action.js | 20 +- .../uni-transition/uni-transition.js | 22 +- 198 files changed, 3513 insertions(+), 2719 deletions(-) create mode 100644 pageTwo/devices/pcL06.vue create mode 100644 static/lianjie.png create mode 100644 static/qie.png create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/pageTwo/devices/pcL06.js.map create mode 100644 unpackage/dist/dev/.sourcemap/mp-weixin/pageTwo/pcL06/pcL06.js.map create mode 100644 unpackage/dist/dev/mp-weixin/pageTwo/devices/pcL06.js create mode 100644 unpackage/dist/dev/mp-weixin/pageTwo/devices/pcL06.json create mode 100644 unpackage/dist/dev/mp-weixin/pageTwo/devices/pcL06.wxml create mode 100644 unpackage/dist/dev/mp-weixin/pageTwo/devices/pcL06.wxss create mode 100644 unpackage/dist/dev/mp-weixin/static/lianjie.png create mode 100644 unpackage/dist/dev/mp-weixin/static/qie.png diff --git a/Food/count/search.vue b/Food/count/search.vue index 13c8241..71673e3 100644 --- a/Food/count/search.vue +++ b/Food/count/search.vue @@ -302,9 +302,9 @@ watch: { bleValue: { handler(newVal, oldVal) { - this.realTimeWeight(newVal.countWeight, newVal.unit) - if (newVal.type == 2 && Number(newVal.countWeight) > 0) { - this.handletoggleUnit(newVal.countWeight, newVal.unit, this.activeType.nutrients_four) + this.realTimeWeight(newVal.foodWeight, newVal.foodUnit) + if (newVal.foodType == 2 && Number(newVal.foodWeight) > 0) { + this.handletoggleUnit(newVal.foodWeight, newVal.foodUnit, this.activeType.nutrients_four) } }, deep: true @@ -384,7 +384,7 @@ //实时重量 realTimeWeight(weight, unit) { this.activeType = Object.assign({}, this.activeType, { - weight: this.convertToGrams(weight, unit) + weight: this.$ble.convertToGrams(weight, unit) }) }, // 食物选择 @@ -398,17 +398,17 @@ that.activeType = ite that.weightKcal = ite.kcal if (that.bleValue.serviceId != "") { - that.realTimeWeight(that.bleValue.countWeight, that.bleValue.unit) - if (that.bleValue.type == 2 && Number(that.bleValue.countWeight) > 0) { - that.handletoggleUnit(that.bleValue.countWeight, that.bleValue.unit, ite.nutrients_four) + that.realTimeWeight(that.bleValue.foodWeight, that.bleValue.foodUnit) + if (that.bleValue.foodType == 2 && Number(that.bleValue.foodWeight) > 0) { + that.handletoggleUnit(that.bleValue.foodWeight, that.bleValue.foodUnit, ite.nutrients_four) } } else { - let weight = Number(that.bleValue.countWeight) > 0 ? Number(that.bleValue.countWeight) : 100 + let weight = Number(that.bleValue.foodWeight) > 0 ? Number(that.bleValue.foodWeight) : 100 that.$store.commit("changeBluetoothValue", { - countWeight: weight, - unit: that.bleValue.unit + foodWeight: weight, + foodUnit: that.bleValue.foodUnit }) - that.realTimeWeight(weight, that.bleValue.unit) + that.realTimeWeight(weight, that.bleValue.foodUnit) } }, @@ -523,14 +523,10 @@ eat_log_id: ite.food_id }).then(res => { that.ActiveList.splice(that.ActiveList.indexOf(ite), 1); - if (that.time == that.countFoodInfo.date) { - that.$store.dispatch("getUserInfoFood") - } else { - that.$store.dispatch("getCountFoodInfo", { - aud_id: that.user.aud_id, - time: that.time - }) - } + that.$store.dispatch("getCountFoodInfo", { + aud_id: that.user.aud_id, + time: that.time + }) that.handleAddEveryMealFood() }) } @@ -570,30 +566,10 @@ } return unit }, - convertToGrams(value, fromUnit) { - const conversionFactors = { - 'lb': 453.59237, // 1磅 = 453.59237克 - 'oz': 28.349523125, // 1盎司 = 28.349523125克 - 'kg': 1000, // 1公斤 = 1000克 - 'g': 1, - 'ml': 1, - '斤': 500, - 'Waterml': 1, - 'milkml': 1.03 - // "stlb": "floz": "lboz": - }; - - if (!conversionFactors.hasOwnProperty(fromUnit)) { - return '' - } - - return value * conversionFactors[fromUnit]; - }, - // 下发营养含量 handletoggleUnit(val, unit, ite) { let that = this - let weight = Number(that.convertToGrams(val, unit)) / 100 + let weight = Number(that.$ble.convertToGrams(val, unit)) / 100 const dataArray = that.buildNutritionData({ fat: weight * ite[2].value, calorie: weight * ite[0].value, @@ -676,7 +652,7 @@ uni.writeBLECharacteristicValue({ deviceId: that.bleValue.deviceId, serviceId: that.bleValue.serviceId, - characteristicId: that.bleValue.write, + characteristicId: that.bleValue.foodWrite, value: buffer, success: res => { console.log('下发指令成功', res.errMsg) @@ -1246,7 +1222,6 @@ justify-content: space-between; border-bottom: 1px solid #f1f1f1; padding: 16rpx 0; - font-size: 24rpx; margin-top: 10rpx; } diff --git a/Food/me/menudetail.vue b/Food/me/menudetail.vue index 1b68c47..0b619cc 100644 --- a/Food/me/menudetail.vue +++ b/Food/me/menudetail.vue @@ -298,14 +298,18 @@ time: that.$tools.getDate("start") }).then(res => { if (res.code != 0) return - that.$store.dispatch("getUserInfoFood") + that.$store.dispatch("getCountFoodInfo", { + aud_id: that.user.aud_id, + time: that.$tools.getDate("start") + }) uni.showToast({ title: '保存成功', icon: 'success' }) - // uni.switchTab({ - // url: "/pages/count/count" - // }) + that.$store.commit("changehomeCard", 1); + uni.switchTab({ + url: "/pages/index/index" + }) }) } that.showSaveFood = false diff --git a/body/login/login.vue b/body/login/login.vue index bb5fbd5..6b6f0e2 100644 --- a/body/login/login.vue +++ b/body/login/login.vue @@ -137,7 +137,7 @@ }) setTimeout(function() { uni.reLaunch({ - url: "/pages/home/home" + url: "/pages/index/index" }) }, 1000) }).catch(err => {}) @@ -285,7 +285,6 @@ button { line-height: initial; - background: #fff; display: flex; flex-wrap: wrap; padding: 0; diff --git a/components/bodyIndex/drawer.vue b/components/bodyIndex/drawer.vue index 0cc87d0..27d1e32 100644 --- a/components/bodyIndex/drawer.vue +++ b/components/bodyIndex/drawer.vue @@ -58,6 +58,7 @@ that.$store.dispatch("getResult", { aud_id: val.id }) + that.$store.commit("changehomeCard", 0); that.$store.commit("changeDrawe", false); // that.handlePublicRecord(val.id) }, diff --git a/components/bodyIndex/record.vue b/components/bodyIndex/record.vue index 6b09773..f4e0e9b 100644 --- a/components/bodyIndex/record.vue +++ b/components/bodyIndex/record.vue @@ -26,7 +26,7 @@ kg - + 头围 cm diff --git a/components/foodIndex/bluetooth.vue b/components/foodIndex/bluetooth.vue index d8af33e..b349011 100644 --- a/components/foodIndex/bluetooth.vue +++ b/components/foodIndex/bluetooth.vue @@ -1,7 +1,7 @@