From f9c22f1da461c56a80f441f6ea49931be06ab947 Mon Sep 17 00:00:00 2001 From: 17792275749 <812100002@qq.com> Date: Thu, 29 May 2025 08:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 78 ++- app.json | 17 +- .../configureDevice_1/configureDevice_1.js | 32 + .../configureDevice_1/configureDevice_1.json | 4 + .../configureDevice_1/configureDevice_1.wxml | 17 + .../configureDevice_1/configureDevice_1.wxss | 70 +++ .../configureDevice_2/configureDevice_2.js | 294 ++++++++++ .../configureDevice_2/configureDevice_2.json | 4 + .../configureDevice_2/configureDevice_2.wxml | 127 ++++ .../configureDevice_2/configureDevice_2.wxss | 154 +++++ .../configureDevice_3/configureDevice_3.js | 157 +++++ .../configureDevice_3/configureDevice_3.json | 4 + .../configureDevice_3/configureDevice_3.wxml | 62 ++ .../configureDevice_3/configureDevice_3.wxss | 207 +++++++ .../configureDevice_4/configureDevice_4.js | 27 + .../configureDevice_4/configureDevice_4.json | 4 + .../configureDevice_4/configureDevice_4.wxml | 12 + .../configureDevice_4/configureDevice_4.wxss | 14 +- components/navigation-bar/navigation-bar.js | 107 ---- components/navigation-bar/navigation-bar.json | 5 - components/navigation-bar/navigation-bar.wxml | 47 -- components/navigation-bar/navigation-bar.wxss | 98 ---- images/configureDevice/bluetooth.png | Bin 0 -> 2990 bytes .../close.png | Bin .../configureDevice_3_icon.png} | Bin .../configureDevice_4_icon.png} | Bin .../open.png | Bin .../wifi.png | Bin .../icon.png => configureDevice/wifiPwd.png} | Bin images/familyMembers/add.png | Bin 1703 -> 0 bytes images/getWifiList/icon.png | Bin 2977 -> 0 bytes images/setNetworkSuccessful/icon.png | Bin 16439 -> 0 bytes images/setNetworkSuccessful/success.png | Bin 745 -> 0 bytes pages/configureDevice/configureDevice.js | 187 ++++++ pages/configureDevice/configureDevice.json | 10 + pages/configureDevice/configureDevice.wxml | 27 + pages/configureDevice/configureDevice.wxss | 82 +++ pages/connectedDevice/connectedDevice.js | 146 ----- pages/connectedDevice/connectedDevice.json | 5 - pages/connectedDevice/connectedDevice.wxml | 16 - pages/connectedDevice/connectedDevice.wxss | 68 --- .../connectionSuccessful.js | 10 - .../connectionSuccessful.json | 5 - .../connectionSuccessful.wxml | 10 - pages/deviceInfo/deviceInfo.js | 104 +--- pages/deviceInfo/deviceInfo.wxml | 4 - pages/familyMembers/familyMembers.js | 45 -- pages/familyMembers/familyMembers.json | 5 - pages/familyMembers/familyMembers.wxml | 31 - pages/familyMembers/familyMembers.wxss | 128 ---- pages/getWifiList/getWifiList.js | 32 - pages/getWifiList/getWifiList.json | 4 - pages/getWifiList/getWifiList.wxml | 19 - pages/getWifiList/getWifiList.wxss | 64 -- pages/home/home.js | 57 +- pages/home/home.wxml | 16 +- pages/home/home.wxss | 2 +- pages/index/index.js | 2 - pages/index/index.json | 5 - pages/index/index.wxml | 7 - pages/index/index.wxss | 10 - pages/my/my.js | 99 +--- pages/my/my.wxml | 20 +- pages/my/my.wxss | 2 +- pages/searchDevice/searchDevice.js | 243 ++++---- pages/setNetwork/setNetwork.js | 83 --- pages/setNetwork/setNetwork.json | 5 - pages/setNetwork/setNetwork.wxml | 13 - pages/setNetwork/setNetwork.wxss | 54 -- .../setNetworkSuccessful.js | 128 ---- .../setNetworkSuccessful.json | 5 - .../setNetworkSuccessful.wxml | 21 - .../setNetworkSuccessful.wxss | 93 --- pages/setWifiPassword/setWifiPassword.js | 35 -- pages/setWifiPassword/setWifiPassword.json | 5 - pages/setWifiPassword/setWifiPassword.wxml | 24 - pages/setWifiPassword/setWifiPassword.wxss | 81 --- pages/userInfo/userInfo.js | 553 ------------------ pages/userInfo/userInfo.json | 6 - pages/userInfo/userInfo.wxml | 81 --- pages/userInfo/userInfo.wxss | 145 ----- project.config.json | 66 ++- project.private.config.json | 30 +- 83 files changed, 1831 insertions(+), 2603 deletions(-) create mode 100644 components/configureDevice_1/configureDevice_1.js create mode 100644 components/configureDevice_1/configureDevice_1.json create mode 100644 components/configureDevice_1/configureDevice_1.wxml create mode 100644 components/configureDevice_1/configureDevice_1.wxss create mode 100644 components/configureDevice_2/configureDevice_2.js create mode 100644 components/configureDevice_2/configureDevice_2.json create mode 100644 components/configureDevice_2/configureDevice_2.wxml create mode 100644 components/configureDevice_2/configureDevice_2.wxss create mode 100644 components/configureDevice_3/configureDevice_3.js create mode 100644 components/configureDevice_3/configureDevice_3.json create mode 100644 components/configureDevice_3/configureDevice_3.wxml create mode 100644 components/configureDevice_3/configureDevice_3.wxss create mode 100644 components/configureDevice_4/configureDevice_4.js create mode 100644 components/configureDevice_4/configureDevice_4.json create mode 100644 components/configureDevice_4/configureDevice_4.wxml rename pages/connectionSuccessful/connectionSuccessful.wxss => components/configureDevice_4/configureDevice_4.wxss (81%) delete mode 100644 components/navigation-bar/navigation-bar.js delete mode 100644 components/navigation-bar/navigation-bar.json delete mode 100644 components/navigation-bar/navigation-bar.wxml delete mode 100644 components/navigation-bar/navigation-bar.wxss create mode 100644 images/configureDevice/bluetooth.png rename images/{setWifiPassword => configureDevice}/close.png (100%) rename images/{setNetwork/icon.png => configureDevice/configureDevice_3_icon.png} (100%) rename images/{connectionSuccessful/icon.png => configureDevice/configureDevice_4_icon.png} (100%) rename images/{setWifiPassword => configureDevice}/open.png (100%) rename images/{setNetworkSuccessful => configureDevice}/wifi.png (100%) rename images/{setWifiPassword/icon.png => configureDevice/wifiPwd.png} (100%) delete mode 100644 images/familyMembers/add.png delete mode 100644 images/getWifiList/icon.png delete mode 100644 images/setNetworkSuccessful/icon.png delete mode 100644 images/setNetworkSuccessful/success.png create mode 100644 pages/configureDevice/configureDevice.js create mode 100644 pages/configureDevice/configureDevice.json create mode 100644 pages/configureDevice/configureDevice.wxml create mode 100644 pages/configureDevice/configureDevice.wxss delete mode 100644 pages/connectedDevice/connectedDevice.js delete mode 100644 pages/connectedDevice/connectedDevice.json delete mode 100644 pages/connectedDevice/connectedDevice.wxml delete mode 100644 pages/connectedDevice/connectedDevice.wxss delete mode 100644 pages/connectionSuccessful/connectionSuccessful.js delete mode 100644 pages/connectionSuccessful/connectionSuccessful.json delete mode 100644 pages/connectionSuccessful/connectionSuccessful.wxml delete mode 100644 pages/familyMembers/familyMembers.js delete mode 100644 pages/familyMembers/familyMembers.json delete mode 100644 pages/familyMembers/familyMembers.wxml delete mode 100644 pages/familyMembers/familyMembers.wxss delete mode 100644 pages/getWifiList/getWifiList.js delete mode 100644 pages/getWifiList/getWifiList.json delete mode 100644 pages/getWifiList/getWifiList.wxml delete mode 100644 pages/getWifiList/getWifiList.wxss delete mode 100644 pages/index/index.js delete mode 100644 pages/index/index.json delete mode 100644 pages/index/index.wxml delete mode 100644 pages/index/index.wxss delete mode 100644 pages/setNetwork/setNetwork.js delete mode 100644 pages/setNetwork/setNetwork.json delete mode 100644 pages/setNetwork/setNetwork.wxml delete mode 100644 pages/setNetwork/setNetwork.wxss delete mode 100644 pages/setNetworkSuccessful/setNetworkSuccessful.js delete mode 100644 pages/setNetworkSuccessful/setNetworkSuccessful.json delete mode 100644 pages/setNetworkSuccessful/setNetworkSuccessful.wxml delete mode 100644 pages/setNetworkSuccessful/setNetworkSuccessful.wxss delete mode 100644 pages/setWifiPassword/setWifiPassword.js delete mode 100644 pages/setWifiPassword/setWifiPassword.json delete mode 100644 pages/setWifiPassword/setWifiPassword.wxml delete mode 100644 pages/setWifiPassword/setWifiPassword.wxss delete mode 100644 pages/userInfo/userInfo.js delete mode 100644 pages/userInfo/userInfo.json delete mode 100644 pages/userInfo/userInfo.wxml delete mode 100644 pages/userInfo/userInfo.wxss diff --git a/app.js b/app.js index 9ef0b33..ded7944 100644 --- a/app.js +++ b/app.js @@ -6,14 +6,14 @@ App({ globalData: { // wx.request 请求的服务地址 wxRequestUrl: "https://device.shuziweidao.com/gateway/", - // wxRequestUrl: "http://192.168.10.173:8889/", + // wxRequestUrl: "http://192.168.1.12:8889/", // 秤的所有信息 ppScale: { plugin: null, activeProtocol: null, domain: "http://device.shuziweidao.com:80/gateway", - // domain: "http://192.168.10.173:8889", + // domain: "http://192.168.1.12:8889", wifi: { ssid: "", password: "" @@ -129,19 +129,24 @@ App({ "uhStatus": 1, "updateBy": null }], // 即将要搜索周边秤的配置 - list: [], // 根据配置搜索到秤的列表 + list: [], // 根据配置搜索到秤的列表 + name: "", mac: null, // 选中的设备mac地址/SN码 - name: "", // 设备名称 connection: null, // 默认选中连接的设备 + connectState: null, // 当前连接设备的状态 } - } + }, + + _callbacks: {} // 用于存储所有 globalData 属性的监听回调 }, initPpScale() { this.globalData.ppScale.plugin = requirePlugin('ppScale-plugin'); + // 蓝牙连接状态监听 this.globalData.ppScale.plugin.bus.subscribe("connectState", (res) => { - console.log("app.js ===> connectState", res); + console.log("app.js ===> connectState", res); + this.setGlobalData('ppScale.device.connectState', res); // 连接失败则重新连接 if (res == this.globalData.ppScale.plugin.BLUE_STATE.CONNECTFAILED) { @@ -150,6 +155,7 @@ App({ wx.hideLoading(); }); + // 设备自动断开监听 this.globalData.ppScale.plugin.bus.subscribe("deviceWillDisconnect", (res) => { console.log("app.js ===> deviceWillDisconnect", res); @@ -165,5 +171,63 @@ App({ this.reconnectDevice(); } }) - } + }, + + /** + * 注册 globalData 某个属性的监听 + * @param {string} keyPath 要监听的 globalData 属性路径,例如 'ppScale.device.connectState' + * @param {function} callback 属性变化时执行的回调函数 (newValue, oldValue) => {} + */ + watch(keyPath, callback) { + if (!this.globalData._callbacks[keyPath]) { + this.globalData._callbacks[keyPath] = []; + } + this.globalData._callbacks[keyPath].push(callback); + }, + + /** + * 取消 globalData 某个属性的监听 + * @param {string} keyPath 要取消监听的 globalData 属性路径 + * @param {function} callback 之前注册的回调函数 + */ + unwatch(keyPath, callback) { + if (this.globalData._callbacks[keyPath]) { + this.globalData._callbacks[keyPath] = this.globalData._callbacks[keyPath].filter(cb => cb !== callback); + } + }, + + /** + * 设置 globalData 的值并触发所有相关监听器 + * 支持点表示法设置嵌套属性,例如 'ppScale.device.connectState' + * @param {string} keyPath 要设置的 globalData 属性路径 + * @param {*} value 要设置的新值 + */ + setGlobalData(keyPath, value) { + const keys = keyPath.split('.'); + let current = this.globalData; + let oldValue = undefined; + + // 遍历到目标属性的父级 + for (let i = 0; i < keys.length - 1; i++) { + if (!current[keys[i]]) { + current[keys[i]] = {}; // 如果路径不存在,创建空对象 + } + current = current[keys[i]]; + } + + // 获取旧值 + oldValue = current[keys[keys.length - 1]]; + + // 只有当值发生变化时才更新并通知 + if (oldValue !== value) { + current[keys[keys.length - 1]] = value; // 设置新值 + + // 触发监听器 + if (this.globalData._callbacks[keyPath]) { + this.globalData._callbacks[keyPath].forEach(callback => { + callback(value, oldValue); + }); + } + } + }, }) \ No newline at end of file diff --git a/app.json b/app.json index c26a716..214dfb6 100644 --- a/app.json +++ b/app.json @@ -2,17 +2,9 @@ "pages": [ "pages/home/home", "pages/searchDevice/searchDevice", - "pages/connectedDevice/connectedDevice", - "pages/connectionSuccessful/connectionSuccessful", - "pages/getWifiList/getWifiList", - "pages/setWifiPassword/setWifiPassword", - "pages/setNetwork/setNetwork", - "pages/setNetworkSuccessful/setNetworkSuccessful", + "pages/configureDevice/configureDevice", "pages/my/my", - "pages/userInfo/userInfo", - "pages/deviceInfo/deviceInfo", - "pages/familyMembers/familyMembers", - "pages/index/index" + "pages/deviceInfo/deviceInfo" ], "window": { "navigationBarTitleText": "", @@ -42,11 +34,6 @@ "provider": "wx0ffb48417ce6345c" } }, - "permission": { - "scope.bluetooth": { - "desc": "用于连接体重秤设备" - } - }, "sitemapLocation": "sitemap.json", "lazyCodeLoading": "requiredComponents" } \ No newline at end of file diff --git a/components/configureDevice_1/configureDevice_1.js b/components/configureDevice_1/configureDevice_1.js new file mode 100644 index 0000000..197ff65 --- /dev/null +++ b/components/configureDevice_1/configureDevice_1.js @@ -0,0 +1,32 @@ +const app = getApp(); + +Component({ + data: { + devices: [] + }, + + // 生命周期方法 + lifetimes: { + attached() { + this.setData({ + devices: app.globalData.ppScale.device.list + }) + }, + detached() { + this.setData({ + devices: [] + }) + } + }, + + // 组件的方法 + methods: { + selectDevice(e) { + let device = this.data.devices[e.currentTarget.dataset.i]; + this.triggerEvent('deviceEvent', { + device: device, + status: true + }); + } + } +}); \ No newline at end of file diff --git a/components/configureDevice_1/configureDevice_1.json b/components/configureDevice_1/configureDevice_1.json new file mode 100644 index 0000000..62389a9 --- /dev/null +++ b/components/configureDevice_1/configureDevice_1.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} + } \ No newline at end of file diff --git a/components/configureDevice_1/configureDevice_1.wxml b/components/configureDevice_1/configureDevice_1.wxml new file mode 100644 index 0000000..a225e21 --- /dev/null +++ b/components/configureDevice_1/configureDevice_1.wxml @@ -0,0 +1,17 @@ + + 蓝牙 + 可用设备 + + + + + + + + {{item.name}} + + + + + + \ No newline at end of file diff --git a/components/configureDevice_1/configureDevice_1.wxss b/components/configureDevice_1/configureDevice_1.wxss new file mode 100644 index 0000000..d75a98f --- /dev/null +++ b/components/configureDevice_1/configureDevice_1.wxss @@ -0,0 +1,70 @@ +.configureDevice1 { + width: 100%; + height: 100%; + padding: 60rpx 60rpx 0; + box-sizing: border-box; +} + +.title { + color: #252535; + width: 100%; + height: 48rpx; + font-size: 48rpx; + font-weight: bold; + line-height: 48rpx; + margin-bottom: 48rpx; +} + +.describe { + color: #B6B6B6; + width: 100%; + height: 30rpx; + font-size: 30rpx; + line-height: 30rpx; + margin-bottom: 40rpx; +} + +.deviceName { + width: 100%; + height: calc(100% - 166rpx); +} + +.deviceName>view { + width: 100%; + height: 80rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + margin-bottom: 32rpx; +} + +.deviceName>view>view:nth-of-type(1) { + width: 80rpx; + height: 80rpx; + overflow: hidden; + border-radius: 50%; + margin-right: 22rpx; +} + +.deviceName>view>view:nth-of-type(2) { + flex: 1; + width: 0; +} + +.deviceName>view>view:nth-of-type(2)>view:nth-of-type(1) { + color: #252535; + width: 100%; + height: 32rpx; + font-size: 32rpx; + font-weight: bold; + line-height: 32rpx; +} + +.deviceName>view>view:nth-of-type(2)>view:nth-of-type(2) { + color: #808080; + width: 100%; + height: 28rpx; + font-size: 28rpx; + line-height: 28rpx; + margin-top: 10rpx; +} \ No newline at end of file diff --git a/components/configureDevice_2/configureDevice_2.js b/components/configureDevice_2/configureDevice_2.js new file mode 100644 index 0000000..936346b --- /dev/null +++ b/components/configureDevice_2/configureDevice_2.js @@ -0,0 +1,294 @@ +const app = getApp(); +import $ from "../../utils/request"; + +Component({ + data: { + BLUE_STATE: {}, + device: null, + connectState: "", + + userId: "", + realname: "", + sex: { + index: "", + data: [{ + id: 1, + name: '男' + }, { + id: 2, + name: '女' + }] + }, + birthday: { + label: "1980年01月01日", + value: "1980-01-01" + }, + height: { + index: 50, + data: Array.from({ length: 200 - 120 + 1 }, (_, i) => i + 120) + }, + weight: { + index: [60, 0], + data: [Array.from({ length: 120 + 1 }, (_, i) => i + 10), Array.from({ length: 10 }, (_, i) => i)] + }, + }, + + // 存储回调函数的引用,以便在 detached 时取消监听 + _connectStateWatcher: null, + + lifetimes: { + attached() { + console.log(`[Component] connectState 获取: ${app.globalData.ppScale.device.connectState}`); + this.setData({ + BLUE_STATE: app.globalData.ppScale.plugin.BLUE_STATE, + connectState: app.globalData.ppScale.device.connectState, + device: app.globalData.ppScale.device.connection + }) + this._connectStateWatcher = (newValue, oldValue) => { + console.log(`[Component] connectState 变化: ${oldValue} -> ${newValue}`); + this.setData({ + connectState: newValue || '' + }); + }; + app.watch('ppScale.device.connectState', this._connectStateWatcher); + + let userInfo = wx.getStorageSync("userInfo") || null; + if(userInfo) { + let [year, month, day] = userInfo.birthday.split("-"); + + this.setData({ + userId: userInfo.userId, + realname: userInfo.realname, + ["sex.index"]: this.data.sex.data.findIndex(item => {return item.id === userInfo.sex}), + birthday: { + label: year + "年" + month + "月" + day + "日", + value: userInfo.birthday + }, + ["height.index"]: this.data.height.data.findIndex(item => {return item === userInfo.height}), + }) + + if(userInfo.weight) { + const integerPart = Math.floor(userInfo.weight); + const decimalPart = Math.round((userInfo.weight - integerPart) * 10); + const integerIndex = this.data.weight.data[0].indexOf(integerPart); + const decimalIndex = this.data.weight.data[1].indexOf(decimalPart); + this.setData({ + ["weight.index"]: [integerIndex !== -1 ? integerIndex : null, decimalIndex !== -1 ? decimalIndex : null], + }) + } + } + }, + detached() { + // 4. 在组件销毁时取消监听,防止内存泄漏 + if (this._connectStateWatcher) { + app.unwatch('ppScale.device.connectState', this._connectStateWatcher); + } + } + }, + + // 组件的方法 + methods: { + // 二次连接设备 + connectedDevice() { + this.triggerEvent('connectedDeviceEvent', { + device: this.data.device + }); + }, + + // 姓名输入 + realnameInput(e) { + let realname = e.detail.value.replace(/\s+/g, ''); + this.setData({ + realname: realname + }) + }, + + // 性别选择 + sexChange(e) { + let sex = e.detail.value; + console.log(sex); + this.setData({ + ['sex.index']: e.detail.value + }) + if(this.data.height.index === null) { + this.setData({ + ['height.index']: sex == 0 ? 50 : 40 + }) + } + if(this.data.weight.index === null) { + this.setData({ + ['weight.index']: sex == 0 ? 20 : 10 + }) + } + }, + + // 生日选择 + birthdayChange(e) { + let v = e.detail.value; + let [year, month, day] = v.split("-"); + this.setData({ + birthday: { + label: year + "年" + month + "月" + day + "日", + value: v + } + }) + }, + + // 身高选择 + heightChange(e) { + this.setData({ + ['height.index']: e.detail.value + }) + }, + + // 体重选择 + weightChange(e) { + console.log(e.detail.value) + this.setData({ + ['weight.index']: e.detail.value + }) + }, + + setUserInfo() { + if(this.data.connectState == this.data.BLUE_STATE.CONNECTSUCCESS) { + if(this.data.userId) { + app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ + userID: this.data.userId, + userName: this.data.realname, + memberID: "", + age: this.getAge(this.data.birthday.value), + gender: this.data.sex.data[this.data.sex.index].id, + height: this.data.height.data[this.data.height.index], + isAthleteMode: 0, + currentWeight: this.data.weight.data[0][this.data.weight.index[0]] + '.' + this.data.weight.data[1][this.data.weight.index[1]], + deviceHeaderIndex: 0, + targetWeight: "", + idealWeight: "", + recentData: [], + }, (res) => { + if(res == 0) { + this.triggerEvent('deviceEvent', { + status: true + }); + } else { + console.log("dataSyncUserInfo", res) + wx.showToast({ + title: "用户信息下发失败,请重试。", + icon: "none" + }) + } + }) + } else { + let realname = this.data.realname; + let sex = this.data.sex; + let birthday = this.data.birthday; + let height = this.data.height; + let weight = this.data.weight; + if(!realname) { + wx.showToast({ + icon: "none", + title: "姓名不能为空" + }) + return false; + } + if(sex.index === "") { + wx.showToast({ + icon: "none", + title: "性别不能为空" + }) + return false; + } + if(!birthday.value) { + wx.showToast({ + icon: "none", + title: "生日不能为空" + }) + return false; + } + if(height.index === "") { + wx.showToast({ + icon: "none", + title: "身高不能为空" + }) + return false; + } + if(weight.index[0] === null && weight.index[1] === null) { + console.log(weight) + wx.showToast({ + icon: "none", + title: "体重不能为空" + }) + return false; + } + let sn = app.globalData.ppScale.device.mac.replace(/:/g, ''); + $.ajax("weighingScale/edit/user", { + sn: sn, + realname: realname, + sex: sex.data[sex.index].id, + birthday: birthday.value, + height: height.data[height.index], + weight: weight.data[0][weight.index[0]] + '.' + weight.data[1][weight.index[1]] + }, "POST", true, "保存中...").then(res => { + $.ajax("weighingScale/select/user", { + sn: sn + }, "GET", true, "更新用户信息中...").then(res_ => { + wx.setStorageSync("userInfo", res_.result); + wx.showToast({ + icon: "none", + title: res.message + }) + app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ + userID: res_.result.id, + userName: res_.result.realname, + memberID: "", + age: this.getAge(res_.result.birthday), // + gender: res_.result.sex, // + height: res_.result.height, // + isAthleteMode: 0, + currentWeight: res_.result.weight, // + deviceHeaderIndex: 0, + targetWeight: "", + idealWeight: "", + recentData: [], + }, (res) => { + if(res == 0) { + this.triggerEvent('deviceEvent', { + status: true + }); + } else { + console.log("dataSyncUserInfo", res) + wx.showToast({ + title: "用户信息下发失败,请重试。", + icon: "none" + }) + } + }) + }) + }) + } + } else { + wx.showToast({ + title: "设备连接失败,请重试。", + icon: "none" + }) + } + }, + + // 根据生日获取年龄 + getAge(birthDateString) { + const birthDate = new Date(birthDateString); + const today = new Date(); + + let age = today.getFullYear() - birthDate.getFullYear(); + const monthDiff = today.getMonth() - birthDate.getMonth(); + const dayDiff = today.getDate() - birthDate.getDate(); + + // 如果当前月份小于出生月份,或者同月但当前日期小于出生日期,年龄需要减 1 + if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) { + age--; + } + + return age; + }, + } +}); \ No newline at end of file diff --git a/components/configureDevice_2/configureDevice_2.json b/components/configureDevice_2/configureDevice_2.json new file mode 100644 index 0000000..62389a9 --- /dev/null +++ b/components/configureDevice_2/configureDevice_2.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} + } \ No newline at end of file diff --git a/components/configureDevice_2/configureDevice_2.wxml b/components/configureDevice_2/configureDevice_2.wxml new file mode 100644 index 0000000..9953741 --- /dev/null +++ b/components/configureDevice_2/configureDevice_2.wxml @@ -0,0 +1,127 @@ + + + + 智能蓝牙秤 + 型号:{{device.name}} + + + + + 连接成功 + + + + 连接失败,点击重试 + + + + + + + 姓名 + + {{realname}} + + + + + + + + + + + 性别 + + {{sex.data[sex.index].name}} + + + + + + + 请选择您的性别 + + + {{sex.data[sex.index].name}} + + + + + + + + 生日 + + {{birthday.label}} + + + + + + + 请选择您的生日 + + + {{birthday.label}} + + + + + + + + 身高 + + {{height.data[height.index]}}cm + + + + + + + 请选择您的身高 + + + {{height.data[height.index]}} + + + + cm + + + + + 体重 + + {{weight.data[0][weight.index[0]]}}.{{weight.data[1][weight.index[1]]}}kg + + + + + + + {{weight.data[0][weight.index[0]]}}.{{weight.data[1][weight.index[1]]}} + + + 请选择您的体重 + + + + kg + + + + + + 下一步 + + 请填写和完善您家人的健康信息(填写数据同时,踩亮蓝牙秤并与其保持连接),将用于计算身体数据及运动卡路里消耗等,以便准确的分析数据。 + + \ No newline at end of file diff --git a/components/configureDevice_2/configureDevice_2.wxss b/components/configureDevice_2/configureDevice_2.wxss new file mode 100644 index 0000000..15297b7 --- /dev/null +++ b/components/configureDevice_2/configureDevice_2.wxss @@ -0,0 +1,154 @@ + +input { + width: 100%; + height: 58rpx; + font-size: 28rpx; + line-height: 58rpx; +} + +.placeholderClass { + color: #B6B6B6; + height: 58rpx; + font-size: 28rpx; + line-height: 58rpx; +} + +.valueClass { + color: #77849E; + height: 58rpx; + font-size: 28rpx; + font-weight: bold; + line-height: 58rpx; +} + +.configureDevice2 { + width: 100%; + height: 100%; +} + +.header { + width: 100%; + display: flex; + flex-wrap: nowrap; + align-items: center; + padding: 30rpx 40rpx; + box-sizing: border-box; + border-bottom: 1rpx solid #EAECF1; +} + +.header>view:nth-of-type(1) { + flex: 1; +} + +.header>view:nth-of-type(1)>view:nth-of-type(1) { + color: #252535; + height: 32rpx; + font-weight: bold; + font-size: 32rpx; + line-height: 32rpx; + margin-bottom: 16rpx; +} + +.header>view:nth-of-type(1)>view:nth-of-type(2) { + color: #808080; + height: 26rpx; + font-size: 26rpx; + line-height: 26rpx; +} + +.header>view:nth-of-type(2) { + height: 28rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; +} + +.header>view:nth-of-type(2)>view:nth-of-type(1) { + width: 12rpx; + height: 12rpx; + border-radius: 50%; + margin-right: 14rpx; +} + +.header>view:nth-of-type(2)>view:nth-of-type(2) { + height: 28rpx; + font-weight: bold; + font-size: 28rpx; + line-height: 28rpx; +} + +.section { + width: 100%; + padding: 0 30rpx; + box-sizing: border-box; +} + +.from { + width: 100%; + margin-bottom: 66rpx; +} + +.from>view { + width: 100%; + padding: 48rpx 10rpx 0; + box-sizing: border-box; + border-bottom: 1rpx solid #EAECF1; +} + +.from>view>view:nth-of-type(1) { + color: #252535; + height: 32rpx; + font-size: 32rpx; + font-weight: bold; + line-height: 32rpx; + margin-bottom: 18rpx; +} + +.from>view>view:nth-of-type(2) { + width: 100%; + height: 58rpx; + display: flex; + flex-wrap: nowrap; + padding-right: 26rpx; + box-sizing: border-box; +} + +.from>view>view:nth-of-type(2)>view:nth-of-type(1) { + flex: 1; + width: 0; +} + +.from>view>view:nth-of-type(2)>view:nth-of-type(2) { + color: #77849E; + height: 58rpx; + font-size: 28rpx; + font-weight: bold; + line-height: 58rpx; +} + + +.btn { + width: 100%; + padding: 0 26rpx; + box-sizing: border-box; +} + +.btn>view { + color: #FFFFFF; + width: 100%; + height: 88rpx; + font-size: 32rpx; + font-weight: bold; + text-align: center; + line-height: 88rpx; + border-radius: 44rpx; + margin-bottom: 40rpx; + background-color: #1385FA; +} + +.describe { + color: #77849E; + width: 100%; + font-size: 24rpx; + line-height: 40rpx; +} \ No newline at end of file diff --git a/components/configureDevice_3/configureDevice_3.js b/components/configureDevice_3/configureDevice_3.js new file mode 100644 index 0000000..ca4b3cb --- /dev/null +++ b/components/configureDevice_3/configureDevice_3.js @@ -0,0 +1,157 @@ +const app = getApp(); +import $ from "../../utils/request"; + +Component({ + data: { + progress: 0, + + wifiList: [], + + selectWifi: null, + type: true, + selectWifiPWD: "" + }, + + lifetimes: { + attached() { + this.initWifi(); + }, + detached() { + // 在组件实例被从页面节点树移除时执行 + console.log('MyComponent detached!'); + } + }, + + // 组件的方法 + methods: { + initWifi() { + wx.showLoading({ + title: "正在获取Wi-Fi列表...", + mask: true + }); + app.globalData.ppScale.activeProtocol.dataFindSurroundDevice((res) => { + wx.hideLoading(); + this.setData({ + wifiList: res + }) + }) + }, + + selectDevice(e) { + this.setData({ + progress: 1, + selectWifi: e.currentTarget.dataset.item, + }) + }, + + inputTypeChange() { + this.setData({ + type: !this.data.type + }) + }, + + passwordInput(e) { + this.setData({ + selectWifiPWD: e.detail.value + }) + }, + + setWifiPWD() { + this.setData({ + progress: 2 + }) + + app.globalData.ppScale.activeProtocol.dataConfigNetWork({ + domain: app.globalData.ppScale.domain, + ssid: this.data.selectWifi.ssid, + password: this.data.selectWifiPWD + }, (res) => { + console.log("setNetwork.js dataConfigNetWork", res); + + if(res === 23) { + app.globalData.ppScale.wifi.ssid = this.data.selectWifi.ssid; + app.globalData.ppScale.wifi.password = this.data.selectWifiPWD; + + let mac = app.globalData.ppScale.device.mac; + let deviceId = app.globalData.ppScale.device.connection.deviceId; + if(mac && deviceId) { + let scaleDeviceId = mac.replace(/:/g, ''); + let params = { + equipmentName: app.globalData.ppScale.device.name, + scaleDeviceId: scaleDeviceId, + deviceId: deviceId + }; + $.ajax("weighingScale/binding/device", params, "POST").then(res => { + if (res.success) { + app.globalData.ppScale.activeProtocol.codeSetBindingState((res) => { + console.log("setNetwork.js codeSetBindingState", res); + + if(res == 0) { + this.triggerEvent('deviceEvent', { + status: true + }); + } else { + app.globalData.ppScale.plugin.Blue.disconnect(); + wx.showToast({ + title: "绑定失败,请重试。", + icon: "none" + }) + setTimeout(() => { + wx.navigateBack({ + delta: 2 + }) + }, 1500) + } + }) + } else { + app.globalData.ppScale.plugin.Blue.disconnect(); + wx.showToast({ + icon: "none", + title: res.message + }) + setTimeout(() => { + wx.navigateBack({ + delta: 2 + }) + }, 1500) + } + }).catch(err => { + app.globalData.ppScale.plugin.Blue.disconnect(); + wx.showToast({ + icon: "none", + title: err.message + }) + setTimeout(() => { + wx.navigateBack({ + delta: 2 + }) + }, 1500) + }) + } else { + app.globalData.ppScale.plugin.Blue.disconnect(); + wx.showToast({ + icon: "none", + title: "Mac 地址与 deviceId 获取失败,请重新绑定" + }) + setTimeout(() => { + wx.navigateBack({ + delta: 2 + }) + }, 1500) + } + } else { + app.globalData.ppScale.plugin.Blue.disconnect(); + wx.showToast({ + icon: "none", + title: "配网失败,错误码:" + res + }) + setTimeout(() => { + wx.navigateBack({ + delta: 2 + }) + }, 1500) + } + }) + } + } +}); \ No newline at end of file diff --git a/components/configureDevice_3/configureDevice_3.json b/components/configureDevice_3/configureDevice_3.json new file mode 100644 index 0000000..62389a9 --- /dev/null +++ b/components/configureDevice_3/configureDevice_3.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} + } \ No newline at end of file diff --git a/components/configureDevice_3/configureDevice_3.wxml b/components/configureDevice_3/configureDevice_3.wxml new file mode 100644 index 0000000..6c427af --- /dev/null +++ b/components/configureDevice_3/configureDevice_3.wxml @@ -0,0 +1,62 @@ + + + + + 可用Wi-Fi + 网络列表(设备暂不支持5GWi-Fi网络) + + + + + + + + + + + {{item.ssid}} + + + + + + + + + + 输入Wi-Fi密码 + + + + + + {{selectWifi.ssid}} + + + 密码 + + + + + + + + + 连接 + + + + + + + + 设备正在配对网络中,请稍等... + 请持续站在秤上,耐心等待 + + + \ No newline at end of file diff --git a/components/configureDevice_3/configureDevice_3.wxss b/components/configureDevice_3/configureDevice_3.wxss new file mode 100644 index 0000000..0c91321 --- /dev/null +++ b/components/configureDevice_3/configureDevice_3.wxss @@ -0,0 +1,207 @@ +.configureDevice3 { + width: 100%; + height: 100%; +} + +.progress0 { + width: 100%; + height: 100%; + padding-top: 60rpx; + box-sizing: border-box; +} + +.progress0_title { + width: 100%; + padding: 0 60rpx; + box-sizing: border-box; + margin-bottom: 40rpx; +} + +.progress0_title>view:nth-of-type(1) { + color: #252535; + width: 100%; + height: 48rpx; + font-size: 48rpx; + font-weight: bold; + line-height: 48rpx; + margin-bottom: 48rpx; +} + +.progress0_title>view:nth-of-type(2) { + color: #B6B6B6; + width: 100%; + height: 30rpx; + font-size: 30rpx; + line-height: 30rpx; +} + +.progress0_content { + width: 100%; + height: calc(100% - 166rpx); +} + +.scrollView { + width: 100%; + height: 100%; +} + +.scrollViewContent { + width: 100%; + padding: 0 60rpx; + box-sizing: border-box; +} + +.scrollViewContent>view { + width: 100%; + height: 80rpx; + display: flex; + flex-wrap: nowrap; + margin-bottom: 32rpx; +} + +.scrollViewContent>view>view:nth-of-type(1) { + width: 80rpx; + height: 80rpx; + margin-right: 24rpx; +} + +.scrollViewContent>view>view:nth-of-type(2) { + color: #252535; + flex: 1; + width: 0; + height: 80rpx; + font-size: 32rpx; + font-weight: bold; + line-height: 80rpx; +} + + +.progress1 { + width: 100%; + height: 100%; + padding: 60rpx 30rpx 0; + box-sizing: border-box; +} + +.progress1_title { + color: #252535; + width: 100%; + height: 48rpx; + font-size: 48rpx; + font-weight: bold; + line-height: 48rpx; + margin-bottom: 48rpx; +} + +.progress1_form { + width: 100%; + margin-bottom: 64rpx; +} + +.progress1_form>view { + width: 100%; + height: 96rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + padding: 0 24rpx; + box-sizing: border-box; + border-radius: 16rpx; + background-color: #F6F6F6; +} + +.progress1_form>view:first-of-type { + margin-bottom: 32rpx; +} + +.progress1_form>view>view:nth-of-type(1) { + color: #252535; + width: 100rpx; + height: 96rpx; + line-height: 96rpx; + font-size: 32rpx; + font-weight: bold; +} + +.progress1_form>view:first-of-type>view:nth-of-type(1) { + padding: 24rpx 45rpx 24rpx 7rpx; + box-sizing: border-box; + display: flex; + align-items: center; +} + +.progress1_form>view>view:nth-of-type(2) { + color: #252535; + flex: 1; + width: 0; + height: 96rpx; + font-size: 32rpx; + line-height: 96rpx; +} + +.progress1_form>view>view:nth-of-type(2) input { + color: #252535; + width: 100%; + height: 96rpx; + font-size: 32rpx; + line-height: 96rpx; +} + +.placeholderClass { + color: #B6B6B6; + height: 96rpx; + font-size: 32rpx; + line-height: 96rpx; +} + +.progress1_form>view>view:nth-of-type(3) { + width: 56rpx; + height: 56rpx; +} + +.progress1_btn { + color: #FFFFFF; + width: 580rpx; + height: 88rpx; + font-size: 32rpx; + font-weight: bold; + line-height: 88rpx; + margin: 0 auto; + text-align: center; + border-radius: 44rpx; + background-color: #1385FA; +} + + +.progress2 { + width: 100%; + height: 100%; + padding: 90rpx 62rpx 0; + box-sizing: border-box; +} + +.progress2>view:nth-of-type(1) { + width: 565rpx; + height: 500rpx; + margin: 0 auto; +} + +.progress2>view:nth-of-type(2) { + color: #1385FA; + width: 100%; + height: 36rpx; + font-size: 36rpx; + font-weight: bold; + line-height: 36rpx; + text-align: center; + margin-bottom: 28rpx; +} + +.progress2>view:nth-of-type(3) { + color: #808080; + width: 100%; + height: 30rpx; + font-size: 30rpx; + text-align: center; + line-height: 30rpx; +} \ No newline at end of file diff --git a/components/configureDevice_4/configureDevice_4.js b/components/configureDevice_4/configureDevice_4.js new file mode 100644 index 0000000..d30308c --- /dev/null +++ b/components/configureDevice_4/configureDevice_4.js @@ -0,0 +1,27 @@ +const app = getApp(); +import $ from "../../utils/request"; + +Component({ + data: { + + }, + + lifetimes: { + attached() { + + }, + detached() { + // 在组件实例被从页面节点树移除时执行 + console.log('MyComponent detached!'); + } + }, + + // 组件的方法 + methods: { + bindOk() { + this.triggerEvent('deviceEvent', { + status: true + }); + } + } +}); \ No newline at end of file diff --git a/components/configureDevice_4/configureDevice_4.json b/components/configureDevice_4/configureDevice_4.json new file mode 100644 index 0000000..62389a9 --- /dev/null +++ b/components/configureDevice_4/configureDevice_4.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} + } \ No newline at end of file diff --git a/components/configureDevice_4/configureDevice_4.wxml b/components/configureDevice_4/configureDevice_4.wxml new file mode 100644 index 0000000..2a2c30f --- /dev/null +++ b/components/configureDevice_4/configureDevice_4.wxml @@ -0,0 +1,12 @@ + + + + + + 绑定成功 + + + 随时随地同步测量数据 + + 完成 + \ No newline at end of file diff --git a/pages/connectionSuccessful/connectionSuccessful.wxss b/components/configureDevice_4/configureDevice_4.wxss similarity index 81% rename from pages/connectionSuccessful/connectionSuccessful.wxss rename to components/configureDevice_4/configureDevice_4.wxss index a4e895d..d3107e8 100644 --- a/pages/connectionSuccessful/connectionSuccessful.wxss +++ b/components/configureDevice_4/configureDevice_4.wxss @@ -1,13 +1,13 @@ -page { - width: 100%; - padding: 200rpx 85rpx 0; - box-sizing: border-box; - background-color: #ffffff; +.configureDevice4 { + width: 100%; + height: 100%; + padding: 105rpx 55rpx 0; + box-sizing: border-box; } .icon { width: 100%; - margin-bottom: 540rpx; + margin-bottom: 475rpx; } .icon>view:first-of-type { @@ -46,4 +46,4 @@ page { text-align: center; border-radius: 44rpx; background-color: #1385FA; -} \ No newline at end of file +} diff --git a/components/navigation-bar/navigation-bar.js b/components/navigation-bar/navigation-bar.js deleted file mode 100644 index 66daae3..0000000 --- a/components/navigation-bar/navigation-bar.js +++ /dev/null @@ -1,107 +0,0 @@ -Component({ - options: { - multipleSlots: true // 在组件定义时的选项中启用多slot支持 - }, - /** - * 组件的属性列表 - */ - properties: { - extClass: { - type: String, - value: '' - }, - title: { - type: String, - value: '' - }, - background: { - type: String, - value: '' - }, - color: { - type: String, - value: '' - }, - back: { - type: Boolean, - value: true - }, - loading: { - type: Boolean, - value: false - }, - homeButton: { - type: Boolean, - value: false, - }, - animated: { - // 显示隐藏的时候opacity动画效果 - type: Boolean, - value: true - }, - show: { - // 显示隐藏导航,隐藏的时候navigation-bar的高度占位还在 - type: Boolean, - value: true, - observer: '_showChange' - }, - // back为true的时候,返回的页面深度 - delta: { - type: Number, - value: 1 - }, - }, - /** - * 组件的初始数据 - */ - data: { - displayStyle: '' - }, - lifetimes: { - attached() { - const rect = wx.getMenuButtonBoundingClientRect() - wx.getSystemInfo({ - success: (res) => { - const isAndroid = res.platform === 'android' - const isDevtools = res.platform === 'devtools' - this.setData({ - ios: !isAndroid, - innerPaddingRight: `padding-right: ${res.windowWidth - rect.left}px`, - leftWidth: `width: ${res.windowWidth - rect.left }px`, - safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${res.safeArea.top}px); padding-top: ${res.safeArea.top}px` : `` - }) - } - }) - }, - }, - /** - * 组件的方法列表 - */ - methods: { - _showChange(show) { - const animated = this.data.animated - let displayStyle = '' - if (animated) { - displayStyle = `opacity: ${ - show ? '1' : '0' - };transition:opacity 0.5s;` - } else { - displayStyle = `display: ${show ? '' : 'none'}` - } - this.setData({ - displayStyle - }) - }, - back() { - const data = this.data - if (data.delta) { - wx.navigateBack({ - delta: data.delta - }) - } - this.triggerEvent('back', { - delta: data.delta - }, {}) - } - }, -}) \ No newline at end of file diff --git a/components/navigation-bar/navigation-bar.json b/components/navigation-bar/navigation-bar.json deleted file mode 100644 index 2f56a9b..0000000 --- a/components/navigation-bar/navigation-bar.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "component": true, - "styleIsolation": "apply-shared", - "usingComponents": {} -} \ No newline at end of file diff --git a/components/navigation-bar/navigation-bar.wxml b/components/navigation-bar/navigation-bar.wxml deleted file mode 100644 index 57a74ce..0000000 --- a/components/navigation-bar/navigation-bar.wxml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{title}} - - - - - - - - - - - - \ No newline at end of file diff --git a/components/navigation-bar/navigation-bar.wxss b/components/navigation-bar/navigation-bar.wxss deleted file mode 100644 index 56e9c43..0000000 --- a/components/navigation-bar/navigation-bar.wxss +++ /dev/null @@ -1,98 +0,0 @@ -.weui-navigation-bar { - --weui-FG-0: rgba(0, 0, 0, .9); - --height: 44px; - --left: 16px; -} - -.weui-navigation-bar .android { - --height: 48px; -} - -.weui-navigation-bar { - overflow: hidden; - color: var(--weui-FG-0); - flex: none; -} - -.weui-navigation-bar__inner { - position: relative; - top: 0; - left: 0; - height: calc(var(--height) + env(safe-area-inset-top)); - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - padding-top: env(safe-area-inset-top); - width: 100%; - box-sizing: border-box; -} - -.weui-navigation-bar__left { - position: relative; - padding-left: var(--left); - display: flex; - flex-direction: row; - align-items: flex-start; - height: 100%; - box-sizing: border-box; -} - -.weui-navigation-bar__btn_goback_wrapper { - padding: 11px 18px 11px 16px; - margin: -11px -18px -11px -16px; -} - -.weui-navigation-bar__btn_goback_wrapper.weui-active { - opacity: 0.5; -} - -.weui-navigation-bar__btn_goback { - font-size: 12px; - width: 12px; - height: 24px; - -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%; - mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%; - -webkit-mask-size: cover; - mask-size: cover; - background-color: var(--weui-FG-0); -} - -.weui-navigation-bar__center { - font-size: 17px; - text-align: center; - position: relative; - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - font-weight: bold; - flex: 1; - height: 100%; -} - -.weui-navigation-bar__loading { - margin-right: 4px; - align-items: center; -} - -.weui-loading { - font-size: 16px; - width: 16px; - height: 16px; - display: block; - background: transparent url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A") no-repeat; - background-size: 100%; - margin-left: 0; - animation: loading linear infinite 1s; -} - -@keyframes loading { - from { - transform: rotate(0); - } - - to { - transform: rotate(360deg); - } -} \ No newline at end of file diff --git a/images/configureDevice/bluetooth.png b/images/configureDevice/bluetooth.png new file mode 100644 index 0000000000000000000000000000000000000000..adde03acd009cd6f12bf1b01fce869c0bb1d73c3 GIT binary patch literal 2990 zcmV;f3sLlmP)Px=Xh}ptRCr$PT?ud$#}$1&Ano)D0U_M?VK9UOn<~eNaR74#Sy&O2Lo5Qq#+V~q zCSY_JWMaucgvB9&aD)XUCWZtk!j&>Mcfyf4RB@WaI1YCa1rm^uW>#9Z!yoOAR%kCt ztC^LGU!^K()zkm?o1W?4@BiP+V4~#b=Qj-x5AOruX@|qnoiX+_fHnZW3&0AX0f1rv z4*=W~LOfuM#s zW6V*#?tEWeV*m;v8YqhL7Gvyf03B;`5I*|8B814~oaZve=rs^@2|9p62(Bo~^hb|T z0)VDLx43E@-Vs84$T?rh7*nd&h3Bh+3Sd!DQ5<6|9YFhF8X3gCt_dL$tyb$Fg4JhG z08|vE1AyNEhzgcrHQdkV048(JuU1!2wE zRT@A=Q91$G3!qD7m4$fwe*zfFIsaE>?5q@kHk+-7!{OKmpmk-G)S|YxBuN@#u~;qy zYIDEd$KP1|0w{zCS5@^d0Dj=FvpV+w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index 100% rename from images/setWifiPassword/close.png rename to images/configureDevice/close.png diff --git a/images/setNetwork/icon.png b/images/configureDevice/configureDevice_3_icon.png similarity index 100% rename from images/setNetwork/icon.png rename to images/configureDevice/configureDevice_3_icon.png diff --git a/images/connectionSuccessful/icon.png b/images/configureDevice/configureDevice_4_icon.png similarity index 100% rename from images/connectionSuccessful/icon.png rename to images/configureDevice/configureDevice_4_icon.png diff --git a/images/setWifiPassword/open.png b/images/configureDevice/open.png similarity index 100% rename from images/setWifiPassword/open.png rename to images/configureDevice/open.png diff --git a/images/setNetworkSuccessful/wifi.png b/images/configureDevice/wifi.png similarity index 100% rename from images/setNetworkSuccessful/wifi.png rename to images/configureDevice/wifi.png diff --git a/images/setWifiPassword/icon.png b/images/configureDevice/wifiPwd.png similarity index 100% rename from images/setWifiPassword/icon.png rename to images/configureDevice/wifiPwd.png diff --git a/images/familyMembers/add.png b/images/familyMembers/add.png deleted file mode 100644 index a6cf6b599f51483815a7c17cb75f0458a85eb631..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1703 zcmV;Y23YxtP)Px*VM#yTQ+&<*EadA4x<%&lUufEfaI&bdE}4GFz2nbuqI;gz3bg$zErx`KE+eB0 z-Z(kRV_-PleZo4r%F+YWC2O;W)xZ?Cu8QR;$Le!`r-wrw^Xt?=AGpMOHkM~*aCDIm zIMsX{|K~C>jmW8huKrBRCKHR(RG?^i`@}nk-?QVi^-2enh&7*MwP+SRErj8G$`g2o zLoh~3WhMvelFPdU~E~M}FdH3`w`w*usv4Gx1YaR#AV4Aqr|5l*N&ve8}(hA(g z^fiwk-R7rG2I`X4vaw!zr(IX?2AuYN>`huxO$566lGf+NqQ_;fjMP)MH#R;n?hhI0 z=!arCZb9>u&NTS(xPZ!N4Ry(A*=ScoeT}d%RkX-(c_u39uX>@`U5*0 zuE$NFugPv5iS=1mxD4g*ukgL$$o~zX^X$MU?Zi?lI;5ol%E)2YRf#lHetRKJq~>q{{9n`$l5x6BIuNZ0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y8!=)$@{&N29b}*E+cCav z_PwcQh>8RQGe>LTy(x3fOWRuAIYsgPbCKH|EGP^Apyxy*AC6jsL8T#Q>kIxN3ucP< zmT#!;@U0Bke^3lZHGo|Her!*a{}=0~*p6tf1xhgSwNy@Yr%;Iow~Z2LDf#=zqErwK zFF>tFIn}n%AN!ggDw4K;#hK3&Dnoob;`JF(4Zg(&Ki`GqJ^m2Vq#R3joFFX;oDEi> zU>=N)2%xt}9h~%qcEc=0 zb*wC_nMd?pkP7v1t6)%7Gu%xy$|I87mn+@axEGXFBRc8U8mWE zg+bmmy9WhHc3Aa%CU^FwB_pd*;ez-{CNgn9cM+G$<)p`R+!G@INn$>jTovRn|IVyc$Qh1;$e;proxwU42#?_cqge$Ja;jO-ub$^$aQlD_|_l7YBPs#=YkN9>Sw zX0sA|X^VMi2_GQJ8EhC}zWfO#Ng(%S%j-`duPL7z)I2ALa-<2qe%m??J#joHA5tdz hRUsA`kPx%qe(gr|R@#Xuz z-_QK!{eF+Iz>5|*A9a9w1^!C~Qnq)L87Bys2o<{Mc8h1l%U^Q<-O61CsB=cQc^nT` zyPe4|`Muf!Fq3ZkR{@+ZZFM4LS0){QS~~z{(rmw9J_Uf36?8DdLR-vO%#1T`k9w`r;pJC&ap3t+ z0Bn|M90J-ihWh4jA5j2UdSPN!T!{?>h?R?}%P~Y>>Aq%iqayr41~!$QA^ZrLw~iT! zcTp9b9z-e2JI25b*>GZ_^KM%77R{Dk;-+}$=f~+r3Gi2hVViRrW@&3*R8N!O(8zl2u}kQc77x!H%;LQEr3(``0Tk-uOzW^>Wj0qPZ4 b@Cy6^Nx#`4jFLMe00000NkvXXu0mjfCM8jK diff --git a/pages/configureDevice/configureDevice.js b/pages/configureDevice/configureDevice.js new file mode 100644 index 0000000..205394a --- /dev/null +++ b/pages/configureDevice/configureDevice.js @@ -0,0 +1,187 @@ +const ppScale = getApp().globalData.ppScale; +import $ from "../../utils/request"; + +Page({ + data: { + progress: { + index: 0, + data: ['配置蓝牙', '初始化用户信息', '配备网络', '完成'] + }, + + progressNext: false, + device: null + }, + + onLoad() { + ppScale.plugin.bus.subscribe("devicesModel", (res) => { + console.log("searchDevice ===》devicesModel", res); + ppScale.device.mac = res.deviceMac; + + ppScale.plugin.bus.subscribe("deviceConnect", (res) => { + console.log('connectedDevice ===》deviceConnect', res); + + ppScale.plugin.ScaleAction.startDataProgress(true); + ppScale.activeProtocol = ppScale.plugin.ScaleAction.getActiveProtocol(); + + ppScale.activeProtocol.codeUpdateMTU((res) => { + console.log("connectedDevice ===》codeUpdateMTU", res); + + ppScale.activeProtocol.codeFetchBindingState((res) => { + console.log("connectedDevice ===》codeFetchBindingState", res); + + wx.hideLoading(); + if (res === 1) { + wx.showModal({ + title: '提示', + content: '当前设备已被绑定,你确定要覆盖绑定吗?', + success: (res) => { + if (res.confirm) { + wx.showLoading({ + title: "正在初始化设备...", + mask: true + }); + ppScale.activeProtocol.codeClearDeviceData("00", (res) => { + console.log("deviceInfo === codeClearDeviceData", res); + wx.hideLoading(); + + if(res === 0) { + let scaleDeviceId = ppScale.device.mac.replace(/:/g, ''); + let params = { + equipmentCode: scaleDeviceId, + }; + $.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => { + wx.showToast({ + icon: "none", + title: "设备初始化成功,请重新绑定。", + }) + // device.list = []; + // device.mac = null; + let pages = getCurrentPages(); + let prevPage = pages[pages.length - 2]; + prevPage.setData({ + getDeviceSetting: true + }) + setTimeout(() => { + wx.navigateBack({ + delta: 1 + }) + }, 1500); + }); + } else { + wx.showToast({ + icon: "none", + title: "设备初始化失败。", + }) + } + }) + } else if (res.cancel) { + // device.mac = null; + ppScale.plugin.Blue.disconnect(); + } + } + }) + } else { + ppScale.device.name = this.data.device.name; + ppScale.device.connection = this.data.device; + if(this.data.progressNext) { + let scaleDeviceId = ppScale.device.mac.replace(/:/g, ''); + let params = { + sn: scaleDeviceId, + }; + $.ajax("weighingScale/getUserInfoBySn", params, "GET", true, "正在同步用户信息...").then(res => { + if(res.result) { + wx.setStorageSync("userInfo", res.result); + this.setProgress(); + } else { + wx.removeStorageSync("userInfo"); + wx.showToast({ + title: "暂无用户信息,请手动补充", + icon: "none" + }) + setTimeout(() => { + this.setProgress(); + }, 1500) + } + }).catch(() => { + wx.showToast({ + title: "用户信息同步失败,请手动补充", + icon: "none" + }) + setTimeout(() => { + this.setProgress(); + }, 1500) + }) + } + } + }) + }); + }); + }); + }, + + // 选择了某个设备 + deviceChange(e) { + let status = e.detail.status; + if(status) { + wx.showLoading({ + title: "蓝牙配对中...", + mask: true + }); + this.setData({ + progressNext: true + }) + let device = e.detail.device; + this.connectedDevice_(device); + } + }, + + connectedDevice(e) { + wx.showLoading({ + title: "正在尝试连接...", + mask: true + }); + this.setData({ + progressNext: false + }) + let device = e.detail.device; + this.connectedDevice_(device); + }, + + connectedDevice_(device) { + if(device) { + this.setData({ + device: device + }) + ppScale.plugin.Blue.createBLEConnection(device); + } + }, + + setDeviceUserInfo(e) { + this.setData({ + progressNext: true + }) + let status = e.detail.status; + if(status) { + this.setProgress(); + } + }, + + setDeviceConfig(e) { + let status = e.detail.status; + if(status) { + this.setProgress(); + } + }, + + setConfigSuccessful() { + wx.switchTab({ + url: "/pages/home/home" + }) + }, + + setProgress() { + this.setData({ + ["progress.index"]: this.data.progress.index + 1 + }) + } +}) \ No newline at end of file diff --git a/pages/configureDevice/configureDevice.json b/pages/configureDevice/configureDevice.json new file mode 100644 index 0000000..f2baf7f --- /dev/null +++ b/pages/configureDevice/configureDevice.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "configureDevice1": "/components/configureDevice_1/configureDevice_1", + "configureDevice2": "/components/configureDevice_2/configureDevice_2", + "configureDevice3": "/components/configureDevice_3/configureDevice_3", + "configureDevice4": "/components/configureDevice_4/configureDevice_4" + }, + "navigationBarTitleText": "配置蓝牙", + "disableScroll": true +} \ No newline at end of file diff --git a/pages/configureDevice/configureDevice.wxml b/pages/configureDevice/configureDevice.wxml new file mode 100644 index 0000000..830b596 --- /dev/null +++ b/pages/configureDevice/configureDevice.wxml @@ -0,0 +1,27 @@ + + + + + + {{progress.index >= index ? '' : index + 1}} + + {{item}} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/configureDevice/configureDevice.wxss b/pages/configureDevice/configureDevice.wxss new file mode 100644 index 0000000..81c4ea6 --- /dev/null +++ b/pages/configureDevice/configureDevice.wxss @@ -0,0 +1,82 @@ +.configureDevice { + width: 100%; + height: 100%; + position: relative; + padding: 0 30rpx 20rpx; + box-sizing: border-box; +} + +.configureDevice::before { + content: ''; + position: absolute; + z-index: -1; + top: 0; + left: 0; + right: 0; + width: 100%; + height: 550rpx; + background: linear-gradient(0deg, #F5F7FB 0%, #D8EAFD 100%); +} + +.progress { + width: 100%; + height: 160rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; +} + +.progressList { + flex: 1; +} + +.progressList>view:nth-of-type(1) { + width: 52rpx; + height: 52rpx; + overflow: hidden; + border-radius: 50%; + display: flex; + position: relative; + align-items: center; + justify-content: center; + margin: 0 auto 20rpx; +} + +.progressList>view:nth-of-type(1)::before { + content: ""; +} + +.progressList>view:nth-of-type(1)::after { + content: ""; +} + +.progressList>view:nth-of-type(1)>view { + color: #FFFFFF; + font-size: 24rpx; + font-weight: bold; + line-height: 40rpx; + overflow: hidden; + border-radius: 50%; + text-align: center; +} + +.progressList>view:nth-of-type(2) { + color: #77849E; + height: 24rpx; + font-size: 24rpx; + line-height: 24rpx; + text-align: center; +} + +.active { + color: #3194FB !important; + font-weight: bold !important; +} + +.content { + width: 100%; + border-radius: 16rpx; + height: calc(100% - 160rpx); + background-color: #FFFFFF; +} \ No newline at end of file diff --git a/pages/connectedDevice/connectedDevice.js b/pages/connectedDevice/connectedDevice.js deleted file mode 100644 index 026549f..0000000 --- a/pages/connectedDevice/connectedDevice.js +++ /dev/null @@ -1,146 +0,0 @@ -const app = getApp(); -import $ from "../../utils/request"; - -Page({ - data: { - name: "", - deviceSelect: null - }, - - onLoad(options) { - app.globalData.ppScale.plugin.bus.subscribe("deviceConnect", (res) => { - console.log('connectedDevice ===》deviceConnect', res); - - app.globalData.ppScale.plugin.ScaleAction.startDataProgress(); - app.globalData.ppScale.activeProtocol = app.globalData.ppScale.plugin.ScaleAction.getActiveProtocol(); - - app.globalData.ppScale.activeProtocol.codeUpdateMTU((res) => { - console.log("connectedDevice ===》codeUpdateMTU", res); - - app.globalData.ppScale.activeProtocol.codeFetchBindingState((res) => { - console.log("connectedDevice ===》codeFetchBindingState", res); - - wx.hideLoading(); - if (res === 1) { - wx.showModal({ - title: '提示', - content: '当前设备已被绑定,你确定要覆盖绑定吗?', - success: (res) => { - if (res.confirm) { - app.globalData.ppScale.activeProtocol.codeClearDeviceData("00", (res) => { - console.log("deviceInfo === codeClearDeviceData", res); - - let scaleDeviceId = app.globalData.ppScale.device.mac.replace(/:/g, ''); - let params = { - equipmentCode: scaleDeviceId, - }; - $.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => { - wx.showToast({ - icon: "none", - title: res.message, - }) - let pages = getCurrentPages(); - let prevPage = pages[pages.length - 2]; - prevPage.setData({ - getDeviceSetting: true - }) - setTimeout(() => { - wx.navigateBack({ - delta: 2 - }) - }, 1500); - }); - }) - } else if (res.cancel) { - app.globalData.ppScale.plugin.Blue.disconnect(); - } - } - }) - } else { - app.globalData.ppScale.device.name = this.data.name; - wx.redirectTo({ - url: "/pages/connectionSuccessful/connectionSuccessful" - }) - } - }) - }); - }); - }, - - onShow() { - let token = wx.getStorageSync("token") || null; - let userInfo = wx.getStorageSync("userInfo") || null; - let deviceSelect = app.globalData.ppScale.device.connection; - this.setData({ - token: token, - userInfo: userInfo, - name: deviceSelect.name, - deviceSelect: deviceSelect - }) - }, - - nameInput(e) { - this.setData({ - name: e.detail.value - }) - }, - - // 配对 - openConnectionSuccessful() { - let token = this.data.token; - let userInfo = this.data.userInfo; - if (token && userInfo) { - this.starConnection(); - } else { - wx.login({ - success: (res) => { - if (res.code) { - this.checkOpenIdLogin(res.code); - } else { - wx.showToast({ - icon: "none", - title: "登录失败,请稍后再试!", - }) - } - } - }) - } - }, - - starConnection() { - let deviceSelect = this.data.deviceSelect; - if (deviceSelect) { - let name = this.data.name; - if (name) { - wx.showLoading({ - title: "蓝牙配对中...", - mask: true - }); - app.globalData.ppScale.device.name = name; - app.globalData.ppScale.plugin.Blue.createBLEConnection(deviceSelect); - } else { - wx.showToast({ - icon: "none", - title: "设备名称不能为空" - }) - } - } else { - wx.showToast({ - icon: "none", - title: "配对设备不能为空" - }) - } - }, - - // 微信一键登录 - checkOpenIdLogin(code) { - let params = { - code: code - }; - $.ajax("weighingScale/checkOpenIdLogin", params, "POST", true, "登录中...").then((res) => { - wx.setStorageSync("userInfo", res.result.user); - wx.setStorageSync("token", res.result.token); - this.starConnection(); - }) - }, -}) \ No newline at end of file diff --git a/pages/connectedDevice/connectedDevice.json b/pages/connectedDevice/connectedDevice.json deleted file mode 100644 index 7c0a326..0000000 --- a/pages/connectedDevice/connectedDevice.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "设备命名", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/connectedDevice/connectedDevice.wxml b/pages/connectedDevice/connectedDevice.wxml deleted file mode 100644 index caea25f..0000000 --- a/pages/connectedDevice/connectedDevice.wxml +++ /dev/null @@ -1,16 +0,0 @@ -型号:{{deviceSelect.name}} - - - - - - - - - 设备名称 - - - - - -配对 \ No newline at end of file diff --git a/pages/connectedDevice/connectedDevice.wxss b/pages/connectedDevice/connectedDevice.wxss deleted file mode 100644 index 5a64677..0000000 --- a/pages/connectedDevice/connectedDevice.wxss +++ /dev/null @@ -1,68 +0,0 @@ -page { - padding: 50rpx 60rpx 0; - background-color: #ffffff; -} - -.equipmentModel { - color: #252535; - width: 100%; - height: 48rpx; - font-size: 48rpx; - font-weight: bold; - line-height: 48rpx; - margin-bottom: 60rpx; -} - -.equipmentIcon { - width: 320rpx; - height: 320rpx; - margin: 0 auto 40rpx; -} - -.equipmentName { - width: 100%; - height: 126rpx; - display: flex; - flex-wrap: nowrap; - padding-right: 35rpx; - box-sizing: border-box; - margin-bottom: 550rpx; - justify-content: space-between; - border-bottom: 1rpx solid #EAECF1; -} - -.equipmentName>view:first-of-type { - color: #252535; - height: 126rpx; - line-height: 126rpx; - font-size: 36rpx; - font-weight: bold; -} - -.equipmentName>view:last-of-type { - flex: 1; - width: 0; - height: 126rpx; -} - -.equipmentName>view:last-of-type input { - color: #808080; - width: 100%; - height: 126rpx; - text-align: right; - font-size: 36rpx; - line-height: 126rpx; -} - -.btn { - color: #FFFFFF; - width: 580rpx; - height: 88rpx; - line-height: 88rpx; - margin: 0 auto; - font-size: 32rpx; - font-weight: bold; - border-radius: 44rpx; - text-align: center; - background-color: #1385FA; -} \ No newline at end of file diff --git a/pages/connectionSuccessful/connectionSuccessful.js b/pages/connectionSuccessful/connectionSuccessful.js deleted file mode 100644 index 2cb1f83..0000000 --- a/pages/connectionSuccessful/connectionSuccessful.js +++ /dev/null @@ -1,10 +0,0 @@ -const app = getApp(); - -Page({ - // 获取wifi列表 - openGetWifiList() { - wx.redirectTo({ - url: "/pages/getWifiList/getWifiList" - }) - } -}) \ No newline at end of file diff --git a/pages/connectionSuccessful/connectionSuccessful.json b/pages/connectionSuccessful/connectionSuccessful.json deleted file mode 100644 index 84c4caf..0000000 --- a/pages/connectionSuccessful/connectionSuccessful.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "绑定成功", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/connectionSuccessful/connectionSuccessful.wxml b/pages/connectionSuccessful/connectionSuccessful.wxml deleted file mode 100644 index b3cbcf3..0000000 --- a/pages/connectionSuccessful/connectionSuccessful.wxml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - 绑定成功 - - -随时随地同步测量数据 - -配置网络 \ No newline at end of file diff --git a/pages/deviceInfo/deviceInfo.js b/pages/deviceInfo/deviceInfo.js index 8dab5d6..e4e191a 100644 --- a/pages/deviceInfo/deviceInfo.js +++ b/pages/deviceInfo/deviceInfo.js @@ -3,67 +3,13 @@ import $ from "../../utils/request"; Page({ data: { - // deviceConnect: false, - deviceInfo: null, }, onLoad(options) { this.getDevice(); - - // app.globalData.ppScale.plugin.bus.subscribe("deviceConnect", (res) => { - // console.log('deviceInfo ===》deviceConnect', res); - - // app.globalData.ppScale.plugin.ScaleAction.startDataProgress(); - // app.globalData.ppScale.activeProtocol = app.globalData.ppScale.plugin.ScaleAction.getActiveProtocol(); - - // app.globalData.ppScale.activeProtocol.codeUpdateMTU((res) => { - // console.log("deviceInfo ===》codeUpdateMTU", res); - - // this.setData({ - // deviceConnect: true - // }) - // }); - // }); }, - // 初始化蓝牙 - // initBluetooth() { - // wx.openBluetoothAdapter({ - // success: () => { - // this.getDeviceSettingList(); - // }, - // fail: (err) => { - // if (err.errCode === 10001) { - // wx.showModal({ - // title: "提示", - // content: "请打开手机蓝牙", - // }); - // } - // }, - // }); - // }, - - // getDeviceSettingList() { - // let seviceList = []; - // app.globalData.ppScale.device.setting.map(item => { - // if(this.data.deviceInfo.type === item.deviceName) { - // seviceList.push(item); - // } - // }) - // if(seviceList && seviceList.length) { - // app.globalData.ppScale.plugin.Blue.setDeviceSetting(seviceList); - // app.globalData.ppScale.plugin.Blue.start(seviceList[0].deviceName, false); - // app.globalData.ppScale.plugin.bus.subscribe("devicesList", (res) => { - // let fIndex = res.findIndex(item => item.deviceId === this.data.deviceInfo.deviceId); - // if (fIndex > -1) { - // app.globalData.ppScale.plugin.Blue.stopBluetoothDevicesDiscovery(); - // app.globalData.ppScale.plugin.Blue.createBLEConnection(res[fIndex]); - // } - // }); - // } - // }, - // 获取已经绑定的设备列表 getDevice() { let params = {}; @@ -71,42 +17,24 @@ Page({ this.setData({ deviceInfo: res.result[0] }) - // this.initBluetooth(); }) }, delDevice() { - // if(this.data.deviceConnect) { - // app.globalData.ppScale.activeProtocol.codeClearDeviceData("00", (res) => { - // console.log("deviceInfo === codeClearDeviceData", res); - - let scaleDeviceId = this.data.deviceInfo.macAddress.replace(/:/g, ''); - let params = { - equipmentCode: scaleDeviceId, - }; - $.ajax("weighingScale/del/device", params, "POST", true, "正在解绑设备...").then(res_ => { - wx.showToast({ - icon: "none", - title: res_.message, - }) - setTimeout(() => { - wx.navigateBack({ - delta: 1 - }) - }, 1500); - }); - // }) - // } else { - // wx.showToast({ - // icon: "none", - // title: "删除失败,请靠近设备并点亮后再试" - // }) - // app.globalData.ppScale.plugin.Blue.stop(); - // this.getDeviceSettingList(); - // } - }, - - // onUnload() { - // app.globalData.ppScale.plugin.Blue.stop(); - // } + let scaleDeviceId = this.data.deviceInfo.macAddress.replace(/:/g, ''); + let params = { + equipmentCode: scaleDeviceId, + }; + $.ajax("weighingScale/del/device", params, "POST", true, "正在解绑设备...").then(res_ => { + wx.showToast({ + icon: "none", + title: res_.message, + }) + setTimeout(() => { + wx.navigateBack({ + delta: 1 + }) + }, 1500); + }); + } }) \ No newline at end of file diff --git a/pages/deviceInfo/deviceInfo.wxml b/pages/deviceInfo/deviceInfo.wxml index 0e35bb0..116e043 100644 --- a/pages/deviceInfo/deviceInfo.wxml +++ b/pages/deviceInfo/deviceInfo.wxml @@ -27,10 +27,6 @@ 成员 {{deviceInfo.subUserNum}}人 - - MAC地址 - {{deviceInfo.macAddress}} - 删除设备 diff --git a/pages/familyMembers/familyMembers.js b/pages/familyMembers/familyMembers.js deleted file mode 100644 index 8630a22..0000000 --- a/pages/familyMembers/familyMembers.js +++ /dev/null @@ -1,45 +0,0 @@ -import $ from "../../utils/request"; - -Page({ - data: { - userInfo: null, - - subUserList: [], - }, - - onShow() { - this.setData({ - userInfo: wx.getStorageSync("userInfo") || null - }) - this.getSubUser(); - }, - - // 获取家庭成员列表 - getSubUser() { - let params = {}; - $.ajax("weighingScale/list/subUser", params, "GET", true, "正在获取...").then(res => { - this.setData({ - subUserList: res.result - }) - }) - }, - - openUserInfo() { - wx.navigateTo({ - url: "/pages/userInfo/userInfo?initBluetooth=1&customerType=0" - }) - }, - - editMyInfo() { - wx.navigateTo({ - url: "/pages/userInfo/userInfo?initBluetooth=1&customerType=1" - }) - }, - - editUserInfo(e) { - let id = e.currentTarget.dataset.id; - wx.navigateTo({ - url: "/pages/userInfo/userInfo?id="+ id +"&initBluetooth=1&customerType=0" - }) - } -}) \ No newline at end of file diff --git a/pages/familyMembers/familyMembers.json b/pages/familyMembers/familyMembers.json deleted file mode 100644 index 2a8298a..0000000 --- a/pages/familyMembers/familyMembers.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "家庭成员", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/familyMembers/familyMembers.wxml b/pages/familyMembers/familyMembers.wxml deleted file mode 100644 index afc746d..0000000 --- a/pages/familyMembers/familyMembers.wxml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - {{userInfo ? userInfo.realname : '-'}} - 修改我的档案 - - - - 家庭成员 - - - - - - - - {{item.realname}} - 修改档案 - - - - - - - - - - - 添加新成员 - \ No newline at end of file diff --git a/pages/familyMembers/familyMembers.wxss b/pages/familyMembers/familyMembers.wxss deleted file mode 100644 index 41d2062..0000000 --- a/pages/familyMembers/familyMembers.wxss +++ /dev/null @@ -1,128 +0,0 @@ -page { - padding: 30rpx 30rpx 0; -} - -.myInfo { - width: 100%; - height: 150rpx; - padding: 0 30rpx 0 38rpx; - box-sizing: border-box; - display: flex; - flex-wrap: nowrap; - align-items: center; - border-radius: 16rpx; - margin-bottom: 40rpx; - background-color: #FFFFFF; -} - -.myInfo>view:nth-of-type(1) { - width: 84rpx; - height: 84rpx; - border-radius: 50%; - margin-right: 24rpx; -} - -.myInfo>view:nth-of-type(2) { - color: #252535; - flex: 1; - height: 32rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 32rpx; -} - -.myInfo>view:nth-of-type(3) { - color: #B6B6B6; - height: 28rpx; - font-size: 28rpx; - line-height: 28rpx; - padding-right: 30rpx; -} - -.familyMembers { - width: 100%; - margin-bottom: 24rpx; -} - -.familyMembers>view:first-of-type { - color: #252535; - width: 100%; - height: 32rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 32rpx; - margin-bottom: 30rpx; -} - -.familyMembers>view:last-of-type { - width: 100%; - border-radius: 16rpx; -} - -.familyMembers>view:last-of-type>view { - width: 100%; - height: 150rpx; - padding: 0 30rpx 0 38rpx; - box-sizing: border-box; - display: flex; - flex-wrap: nowrap; - align-items: center; - background-color: #FFFFFF; - border-bottom: 1rpx solid #EAECF1; -} - -.familyMembers>view:last-of-type>view:last-of-type { - border-bottom: 0; -} - -.familyMembers>view:last-of-type>view>view:nth-of-type(1) { - width: 84rpx; - height: 84rpx; - border-radius: 50%; - margin-right: 24rpx; -} - -.familyMembers>view:last-of-type>view>view:nth-of-type(2) { - color: #252535; - flex: 1; - height: 32rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 32rpx; -} - -.familyMembers>view:last-of-type>view>view:nth-of-type(3) { - color: #B6B6B6; - height: 28rpx; - font-size: 28rpx; - line-height: 28rpx; - padding-right: 30rpx; -} - -.btn { - width: 100%; - height: 150rpx; - padding: 0 38rpx; - box-sizing: border-box; - display: flex; - flex-wrap: nowrap; - align-items: center; - border-radius: 16rpx; - background-color: #FFFFFF; -} - -.btn>view:first-of-type { - width: 84rpx; - height: 84rpx; - border-radius: 50%; - margin-right: 24rpx; -} - -.btn>view:last-of-type { - color: #252535; - flex: 1; - height: 32rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 32rpx; -} \ No newline at end of file diff --git a/pages/getWifiList/getWifiList.js b/pages/getWifiList/getWifiList.js deleted file mode 100644 index 9ddd513..0000000 --- a/pages/getWifiList/getWifiList.js +++ /dev/null @@ -1,32 +0,0 @@ -const app = getApp(); - -Page({ - data: { - wifiList: [] - }, - - onLoad() { - this.initWifi(); - }, - - initWifi() { - wx.showLoading({ - title: "正在获取Wi-Fi列表...", - mask: true - }); - app.globalData.ppScale.activeProtocol.dataFindSurroundDevice((res) => { - wx.hideLoading(); - console.log("wifiList", res); - this.setData({ - wifiList: res - }) - }) - }, - - openSetWifiPassword(e) { - let item = JSON.stringify(e.currentTarget.dataset.item); - wx.navigateTo({ - url: "/pages/setWifiPassword/setWifiPassword?item=" + item - }) - } -}) \ No newline at end of file diff --git a/pages/getWifiList/getWifiList.json b/pages/getWifiList/getWifiList.json deleted file mode 100644 index 47fb2f9..0000000 --- a/pages/getWifiList/getWifiList.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "disableScroll": true -} \ No newline at end of file diff --git a/pages/getWifiList/getWifiList.wxml b/pages/getWifiList/getWifiList.wxml deleted file mode 100644 index 98814b6..0000000 --- a/pages/getWifiList/getWifiList.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - 可用Wi-Fi - 网络列表(设备暂不支持5GWi-Fi网络) - - - - - - - - - - - {{item.ssid}} - - - - - \ No newline at end of file diff --git a/pages/getWifiList/getWifiList.wxss b/pages/getWifiList/getWifiList.wxss deleted file mode 100644 index 66493d5..0000000 --- a/pages/getWifiList/getWifiList.wxss +++ /dev/null @@ -1,64 +0,0 @@ -page { - display: flex; - flex-direction: column; - background-color: #ffffff; -} - -.title { - width: 100%; - padding: 50rpx 55rpx 24rpx; - box-sizing: border-box; -} - -.title>view:first-of-type { - color: #252535; - width: 100%; - height: 48rpx; - font-size: 48rpx; - font-weight: bold; - line-height: 48rpx; - margin-bottom: 60rpx; -} - -.title>view:last-of-type { - color: #B6B6B6; - width: 100%; - height: 30rpx; - font-size: 30rpx; - line-height: 30rpx; -} - -.wifi { - flex: 1; - overflow: hidden; -} - -.content { - width: 100%; - padding: 0 55rpx; - box-sizing: border-box; -} - -.content>view { - width: 100%; - height: 80rpx; - margin: 30rpx 0; - display: flex; - flex-wrap: nowrap; -} - -.content>view>view:nth-of-type(1) { - width: 80rpx; - height: 80rpx; - margin-right: 24rpx; -} - -.content>view>view:nth-of-type(2) { - color: #252535; - flex: 1; - width: 0; - height: 80rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 80rpx; -} \ No newline at end of file diff --git a/pages/home/home.js b/pages/home/home.js index a043385..e28a4ce 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -9,23 +9,25 @@ Page({ }, onShow() { - let token = wx.getStorageSync("token") || null; let userInfo = wx.getStorageSync("userInfo") || null; + let token = wx.getStorageSync("token") || null; this.setData({ token: token, - userInfo: userInfo + userInfo: userInfo, + deviceList: [] }) - if(token && userInfo) { + if(token) { this.getDevice(); } }, // 点击登录或注册 - openLoginOrReg() { + openLoginOrReg(e) { + let bol = e.currentTarget.dataset.bol; wx.login({ success: (res) => { if (res.code) { - this.checkOpenIdLogin(res.code); + this.checkOpenIdLogin(res.code, bol); } else { wx.showToast({ icon: "none", @@ -37,30 +39,21 @@ Page({ }, // 微信一键登录 - checkOpenIdLogin(code) { + checkOpenIdLogin(code, bol) { let params = { code: code }; - $.ajax("weighingScale/checkOpenIdLogin", params, "POST", true, "登录中...").then((res) => { + $.ajax("weighingScale/checkOpenIdLogin", params, "POST", true, "加载中...").then((res) => { wx.setStorageSync("userInfo", res.result.user); wx.setStorageSync("token", res.result.token); - if(res.result.token && res.result.user) { - this.setData({ - token: res.result.token, - userInfo: res.result.user - }) - this.getDevice(); - } else { - wx.showToast({ - icon: "none", - title: "请先补全个人信息" - }) - setTimeout(() => { - wx.navigateTo({ - url: "/pages/userInfo/userInfo?initBluetooth=0&customerType=1" - }) - }, 1500) - } + this.setData({ + token: res.result.token, + userInfo: res.result.user + }) + + if(bol) { + this.openSearchDevice(); + } }) }, @@ -76,20 +69,12 @@ Page({ // 添加设备 openSearchDevice() { - // let token = this.data.token; - // let userInfo = this.data.userInfo; - // if (token && userInfo) { - wx.navigateTo({ - url: "/pages/searchDevice/searchDevice" - }) - // } else { - // wx.showToast({ - // icon: "none", - // title: "请先登录" - // }) - // } + wx.navigateTo({ + url: "/pages/searchDevice/searchDevice" + }) }, + // 打开设备详情 openDeviceInfo() { wx.navigateTo({ url: "/pages/deviceInfo/deviceInfo" diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 5f4c38d..ed3e3d5 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -8,14 +8,14 @@ - - {{userInfo.realname}} + + {{userInfo ? userInfo.realname : '已登录'}} - 登录/注册 + 登录/注册 - 智能体脂秤 + 智能蓝牙秤 注重更好的健康生活品质 @@ -31,12 +31,12 @@ 请添加设备 添加设备后,解锁更多体验 - + 添加设备 - + 添加设备 + \ No newline at end of file diff --git a/pages/home/home.wxss b/pages/home/home.wxss index e19e4db..14e9028 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -86,7 +86,7 @@ .device>view:nth-of-type(1) { width: 500rpx; height: 500rpx; - margin: 0 auto; + margin: 0 auto 16rpx; } .device>view:nth-of-type(2) { diff --git a/pages/index/index.js b/pages/index/index.js deleted file mode 100644 index 2066c4f..0000000 --- a/pages/index/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// index.js -Page({}) diff --git a/pages/index/index.json b/pages/index/index.json deleted file mode 100644 index aa3f1b0..0000000 --- a/pages/index/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": { - "navigation-bar": "/components/navigation-bar/navigation-bar" - } -} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml deleted file mode 100644 index 57cc6da..0000000 --- a/pages/index/index.wxml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - Weixin - - diff --git a/pages/index/index.wxss b/pages/index/index.wxss deleted file mode 100644 index 8c2b75a..0000000 --- a/pages/index/index.wxss +++ /dev/null @@ -1,10 +0,0 @@ -/**index.wxss**/ -page { - height: 100vh; - display: flex; - flex-direction: column; -} -.scrollarea { - flex: 1; - overflow-y: hidden; -} diff --git a/pages/my/my.js b/pages/my/my.js index 4f6667e..3d44098 100644 --- a/pages/my/my.js +++ b/pages/my/my.js @@ -3,6 +3,7 @@ import $ from "../../utils/request"; Page({ data: { userInfo: null, + token: null, deviceInfo: null }, @@ -11,66 +12,44 @@ Page({ let token = wx.getStorageSync("token") || null; let userInfo = wx.getStorageSync("userInfo") || null; this.setData({ - userInfo: userInfo + userInfo: userInfo, + token: token }) if(token && userInfo) { this.getDevice(); } - }, - - // 打开用户信息 - openUserInfo() { - if(this.data.userInfo) { - wx.navigateTo({ - url: "/pages/userInfo/userInfo?initBluetooth=1&customerType=1" - }) - } else { - wx.login({ - success: (res) => { - if (res.code) { - this.checkOpenIdLogin(res.code); - } else { - wx.showToast({ - icon: "none", - title: "登录失败,请稍后再试!", - }) - } - } - }) - } - }, - - // 微信一键登录 - checkOpenIdLogin(code) { - let params = { - code: code - }; - $.ajax("weighingScale/checkOpenIdLogin", params, "POST", true, "登录中...").then((res) => { - wx.setStorageSync("userInfo", res.result.user); - wx.setStorageSync("token", res.result.token); - if(res.result.token && res.result.user) { - this.setData({ - token: res.result.token, - userInfo: res.result.user - }) - this.getDevice(); - } else { - wx.showToast({ - icon: "none", - title: "请先补全个人信息" - }) - setTimeout(() => { - wx.navigateTo({ - url: "/pages/userInfo/userInfo?initBluetooth=0&customerType=1" - }) - }, 1500) - } - }) - }, + }, + + openLoginOrReg() { + if(this.data.userInfo === null && this.data.token === null) { + wx.login({ + success: (res) => { + if (res.code) { + let params = { + code: res.code + }; + $.ajax("weighingScale/checkOpenIdLogin", params, "POST", true, "登录中...").then((res) => { + wx.setStorageSync("userInfo", res.result.user); + wx.setStorageSync("token", res.result.token); + this.setData({ + token: res.result.token, + userInfo: res.result.user + }) + }) + } else { + wx.showToast({ + icon: "none", + title: "登录失败,请稍后再试!", + }) + } + } + }) + } + }, // 打开设备详情 openDeviceInfo() { - if(this.data.userInfo) { + if(this.data.userInfo && this.data.token) { let deviceInfo = this.data.deviceInfo; if(deviceInfo) { wx.navigateTo({ @@ -98,20 +77,6 @@ Page({ } }, - // 打开成员管理 - openFamilyMembers() { - if(this.data.userInfo) { - wx.navigateTo({ - url: "/pages/familyMembers/familyMembers" - }) - } else { - wx.showToast({ - icon: "none", - title: "请先登录" - }) - } - }, - // 获取已经绑定的设备列表 getDevice() { let params = {}; diff --git a/pages/my/my.wxml b/pages/my/my.wxml index 608e284..d721db6 100644 --- a/pages/my/my.wxml +++ b/pages/my/my.wxml @@ -1,9 +1,14 @@ - + - {{userInfo && userInfo.realname ? userInfo.realname : '未登录'}} + + + {{userInfo ? userInfo.realname : '已登录'}} + + 未登录 + @@ -33,16 +38,7 @@ 设备绑定 {{deviceInfo ? '已绑定('+ deviceInfo.equipmentName +')' : '未绑定'}} - - - - - 成员管理 - - - - - + diff --git a/pages/my/my.wxss b/pages/my/my.wxss index d2133f7..ec64727 100644 --- a/pages/my/my.wxss +++ b/pages/my/my.wxss @@ -75,7 +75,7 @@ width: 100%; padding: 0 30rpx; box-sizing: border-box; - margin-bottom: 360rpx; + margin-bottom: 480rpx; } .content .arrowAfter::after { diff --git a/pages/searchDevice/searchDevice.js b/pages/searchDevice/searchDevice.js index 692d665..9201489 100644 --- a/pages/searchDevice/searchDevice.js +++ b/pages/searchDevice/searchDevice.js @@ -10,110 +10,136 @@ Page({ }, onLoad(options) { - this.initBluetooth(); + this.checkBluetoothPermissionAndInit(); }, onShow() { if (this.data.getDeviceSetting) { this.getDeviceSettingList(); - } + } else { + this.checkBluetoothPermissionAndInit(); + } }, - // 初始化蓝牙 - initBluetooth() { - this.setData({ - initText: "正在初始化蓝牙..." - }) - wx.openBluetoothAdapter({ - success: () => { - this.setData({ - initText: "蓝牙初始化成功" - }) - this.getDeviceSettingList(); - }, - fail: (err) => { - this.setData({ - initText: "蓝牙初始化失败" - }) - if (err.errCode === 10001) { - wx.showModal({ - title: "提示", - content: "请打开手机蓝牙", - }); - } - }, - }); - }, - - // async refreshToken(fn, flag) { - // let bodyToken = wx.getStorageSync('bodyToken'); - // let bodyTokenTime = wx.getStorageSync('bodyTokenTime'); - // if (!bodyToken || bodyTokenTime * 1000 < +new Date() || flag) { - // let res = await app.globalData.ppScale.plugin.refreshToken({ - // url: "https://uniquehealth.lefuenergy.com", - // data: { - // "appKey": app.globalData.ppScale.options.key, - // "appSecret": app.globalData.ppScale.options.secret - // } - // }); - // if (res.data.code == 200) { - // wx.setStorageSync('bodyToken', res.data.data.token); - // wx.setStorageSync('bodyTokenTime', res.data.data.expireTime); - // fn(); - // } - // } else { - // fn(); - // } - // }, - // getDeviceSettingList() { - // this.setData({ - // initText: "获取设备配置中..." - // }) - // let bodyToken = wx.getStorageSync("bodyToken"); - // app.globalData.ppScale.plugin.getDeviceSettingList({ - // url: "https://uniquehealth.lefuenergy.com", - // data: { - // appKey: app.globalData.ppScale.options.key - // }, - // header: { - // "token": bodyToken, - // "Accept-Language": wx.getStorageSync("lang") || 'zh' - // } - // }).then((res) => { - // if (res.data.code == 200) { - // this.setData({ - // initText: "设备搜索中..." - // }); - // app.globalData.ppScale.plugin.Blue.setDeviceSetting(res.data.data); - // app.globalData.ppScale.device.setting = res.data.data; - // let deviceNames = res.data.data.map(item => item.deviceName); - // app.globalData.ppScale.plugin.Blue.start(deviceNames, false); - // app.globalData.ppScale.plugin.bus.subscribe("devicesList", (res_) => { - // console.log("searchDevice ===> devicesList", res_); - // this.setData({ - // getDeviceSetting: false, - // initText: "设备搜索完成" - // }); - // app.globalData.ppScale.plugin.Blue.stopBluetoothDevicesDiscovery(); - // app.globalData.ppScale.device.list = res_; - // app.globalData.ppScale.device.connection = res_[0]; - // wx.navigateTo({ - // url: "/pages/connectedDevice/connectedDevice" - // }) - // }); - // } else if (res.data.code == 401 || res.data.code == 4008) { - // this.refreshToken(() => { - // this.getDeviceSettingList(); - // }, true); - // } - // }); - // }, + checkBluetoothPermissionAndInit() { + this.setData({ + initText: "正在检查蓝牙权限..." + }); + wx.getSetting({ + success: (res) => { + if (res.authSetting['scope.bluetooth']) { + this.openBluetoothAdapter(); + } else { + wx.authorize({ + scope: 'scope.bluetooth', + success: () => { + this.openBluetoothAdapter(); + }, + fail: (err) => { + this.setData({ + initText: "蓝牙权限被拒绝。" + }); + wx.showModal({ + title: '提示', + content: '您拒绝了蓝牙权限,将无法连接蓝牙秤。是否前往设置开启?', + confirmText: '去开启', + cancelText: '不开启', + success: (modalRes) => { + if (modalRes.confirm) { + wx.openSetting({ + success: (settingRes) => { + console.log('openSetting success', settingRes); + }, + fail: (settingErr) => { + wx.navigateBack({ + delta: 1 + }); + } + }); + } else { + wx.navigateBack({ + delta: 1 + }); + } + } + }); + } + }); + } + }, + fail: (err) => { + this.setData({ + initText: "获取权限设置失败。" + }); + wx.showToast({ + title: '获取权限设置失败', + icon: 'none' + }); + wx.navigateBack({ + delta: 1 + }); + } + }); + }, + + openBluetoothAdapter() { + this.setData({ + initText: "正在初始化蓝牙..." + }); + wx.openBluetoothAdapter({ + success: () => { + this.setData({ + initText: "蓝牙初始化成功" + }); + this.getDeviceSettingList(); + }, + fail: (err) => { + this.setData({ + initText: "蓝牙初始化失败。" + }); + if (err.errCode === 10001) { + wx.showModal({ + title: "提示", + content: "请确保手机蓝牙已开启。", + showCancel: false, + success: () => { + wx.navigateBack({ + delta: 1 + }); + } + }); + } else if (err.errMsg && err.errMsg.includes('permission denied')) { + wx.showModal({ + title: '提示', + content: '蓝牙权限仍被拒绝,无法使用蓝牙功能。', + showCancel: false, + success: () => { + wx.navigateBack({ + delta: 1 + }); + } + }); + } else { + wx.showToast({ + title: `蓝牙适配器打开失败: ${err.errMsg || err.errCode}`, + icon: 'none', + success: () => { + wx.navigateBack({ + delta: 1 + }); + } + }); + } + }, + }); + }, getDeviceSettingList() { // app.globalData.ppScale.plugin.Blue.visibleLog(true); this.setData({ initText: "设备搜索中..." }); + app.globalData.ppScale.device.list = []; let seviceList = app.globalData.ppScale.device.setting; app.globalData.ppScale.plugin.Blue.setDeviceSetting(seviceList); let deviceNames = seviceList.map(item => item.deviceName); @@ -125,12 +151,7 @@ Page({ devicesList: res }); this.selectDevice(); - }); - - app.globalData.ppScale.plugin.bus.subscribe("devicesModel", (res) => { - console.log("searchDevice ===》devicesModel", res); - app.globalData.ppScale.device.mac = res.deviceMac; - }); + }); }, selectDevice() { @@ -141,30 +162,10 @@ Page({ setTimeout(() => { app.globalData.ppScale.plugin.Blue.stopBluetoothDevicesDiscovery(); app.globalData.ppScale.device.list = this.data.devicesList; - if(this.data.devicesList.length === 1) { - app.globalData.ppScale.device.connection = this.data.devicesList[0]; - wx.redirectTo({ - url: "/pages/connectedDevice/connectedDevice" - }) - } else { - let itemLists = this.data.devicesList.map(item => item.name); - wx.showActionSheet({ - itemList: itemLists, - alertText: "请选择你要使用的设备", - success: (res) => { - app.globalData.ppScale.device.connection = this.data.devicesList[res.tapIndex]; - wx.redirectTo({ - url: "/pages/connectedDevice/connectedDevice" - }) - }, - fail: () => { - wx.navigateBack({ - delta: 1 - }) - } - }) - } - }, 3000); + wx.redirectTo({ + url: "/pages/configureDevice/configureDevice" + }) + }, 1000); } } }) \ No newline at end of file diff --git a/pages/setNetwork/setNetwork.js b/pages/setNetwork/setNetwork.js deleted file mode 100644 index d1c071d..0000000 --- a/pages/setNetwork/setNetwork.js +++ /dev/null @@ -1,83 +0,0 @@ -const app = getApp(); -import $ from "../../utils/request"; - -Page({ - onLoad(options) { - let ssid = options.ssid; - let password = options.password; - app.globalData.ppScale.activeProtocol.dataConfigNetWork({ - domain: app.globalData.ppScale.domain, - ssid: options.ssid, - password: options.password - }, (res) => { - console.log("setNetwork.js dataConfigNetWork", res); - - if(res === 23) { - app.globalData.ppScale.wifi.ssid = ssid; - app.globalData.ppScale.wifi.password = password; - - let mac = app.globalData.ppScale.device.mac; - let deviceId = app.globalData.ppScale.device.connection.deviceId; - if(mac && deviceId) { - let scaleDeviceId = mac.replace(/:/g, ''); - let params = { - equipmentName: app.globalData.ppScale.device.name, - scaleDeviceId: scaleDeviceId, - deviceId: deviceId - }; - $.ajax("weighingScale/binding/device", params, "POST").then(res => { - if (res.success) { - app.globalData.ppScale.activeProtocol.codeSetBindingState((res) => { - console.log("setNetwork.js codeSetBindingState", res); - - wx.navigateTo({ - url: "/pages/setNetworkSuccessful/setNetworkSuccessful" - }) - }) - } else { - wx.showToast({ - icon: "none", - title: res.message - }) - setTimeout(() => { - wx.switchTab({ - url: "/pages/home/home" - }) - }, 1500) - } - }).catch(err => { - wx.showToast({ - icon: "none", - title: err.message - }) - setTimeout(() => { - wx.switchTab({ - url: "/pages/home/home" - }) - }, 1500) - }) - } else { - wx.showToast({ - icon: "none", - title: "Mac 地址与 deviceId 获取失败,请重新绑定" - }) - setTimeout(() => { - wx.switchTab({ - url: "/pages/home/home" - }) - }, 1500) - } - } else { - wx.showToast({ - icon: "none", - title: "配网失败,错误码:" + res - }) - setTimeout(() => { - wx.switchTab({ - url: "/pages/home/home" - }) - }, 1500) - } - }) - } -}) \ No newline at end of file diff --git a/pages/setNetwork/setNetwork.json b/pages/setNetwork/setNetwork.json deleted file mode 100644 index 754b6a9..0000000 --- a/pages/setNetwork/setNetwork.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "正在配网", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/setNetwork/setNetwork.wxml b/pages/setNetwork/setNetwork.wxml deleted file mode 100644 index d5908ce..0000000 --- a/pages/setNetwork/setNetwork.wxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 已链接,配网中... - 请持续站在秤上,耐心等待 - - - - 手机尽量靠近设备(2米以内) - Wi-Fi指示灯闪烁,处于配网状态 - Wi-Fi指示灯长亮为已连接状态 - \ No newline at end of file diff --git a/pages/setNetwork/setNetwork.wxss b/pages/setNetwork/setNetwork.wxss deleted file mode 100644 index d15b18d..0000000 --- a/pages/setNetwork/setNetwork.wxss +++ /dev/null @@ -1,54 +0,0 @@ -page { - display: flex; - flex-direction: column; - justify-content: space-between; - padding: 90rpx 60rpx 120rpx; - background-color: #ffffff; -} - -.icon { - width: 100%; -} - -.icon>view:nth-of-type(1) { - width: 565rpx; - height: 500rpx; - margin: 0 auto; -} - -.icon>view:nth-of-type(2) { - color: #1385FA; - width: 100%; - height: 36rpx; - font-size: 36rpx; - font-weight: bold; - line-height: 36rpx; - text-align: center; - margin-bottom: 28rpx; -} - -.icon>view:nth-of-type(3) { - color: #808080; - width: 100%; - height: 30rpx; - font-size: 30rpx; - text-align: center; - line-height: 30rpx; -} - -.describe { - width: 100%; -} - -.describe>view { - color: #808080; - width: 100%; - font-size: 26rpx; - font-weight: bold; - line-height: 26rpx; - margin-bottom: 26rpx; -} - -.describe>view:last-of-type { - margin-bottom: 0; -} \ No newline at end of file diff --git a/pages/setNetworkSuccessful/setNetworkSuccessful.js b/pages/setNetworkSuccessful/setNetworkSuccessful.js deleted file mode 100644 index 789f741..0000000 --- a/pages/setNetworkSuccessful/setNetworkSuccessful.js +++ /dev/null @@ -1,128 +0,0 @@ -const app = getApp(); -import $ from "../../utils/request"; - -Page({ - data: { - userInfo: null, - subUser: { - i: 0, - data: [] - }, - - ssid: "" - }, - - onLoad(options) { - this.setData({ - userInfo: wx.getStorageSync("userInfo"), - ssid: app.globalData.ppScale.wifi.ssid - }); - this.getSubUser(); - }, - - completeClick() { - let userInfo = this.data.userInfo; - // 设置主用户时userID为小程序的用户ID,memberID为空 - app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ - userID: userInfo.id, - userName: userInfo.realname, - memberID: "", - age: this.getAge(userInfo.birthday), // - gender: userInfo.sex, // - height: userInfo.height, // - isAthleteMode: 0, - currentWeight: userInfo.weight, // - deviceHeaderIndex: 0, - targetWeight: "", - idealWeight: "", - recentData: [], - }, (res) => { - console.log("dataSyncUserInfo", res); - - if(this.data.subUser.data && this.data.subUser.data.length) { - wx.showLoading({ - title: "正在同步用户信息,请稍等...", - mask: true - }); - this.setSubUser(); - } else { - this.resetDevice(); - app.globalData.ppScale.plugin.Blue.stop(); - wx.switchTab({ - url: "/pages/home/home" - }) - } - }) - }, - - setSubUser() { - let userInfo = this.data.userInfo; - let i = this.data.subUser.i; - let subUser = this.data.subUser.data; - if(i < subUser.length) { - app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ - userID: userInfo.id, - userName: subUser[i].realname, - memberID: subUser[i].id, - age: this.getAge(subUser[i].birthday), // - gender: subUser[i].sex, // - height: subUser[i].height, // - isAthleteMode: 0, - currentWeight: subUser[i].weight, // - deviceHeaderIndex: 0, - targetWeight: "", - idealWeight: "", - recentData: [], - }, (res) => { - console.log("dataSyncSubUserInfo", res); - this.setData({ - ['subUser.i']: i + 1 - }) - this.setSubUser(); - }) - } else { - this.resetDevice(); - app.globalData.ppScale.plugin.Blue.stop(); - wx.hideLoading(); - wx.switchTab({ - url: "/pages/home/home" - }) - } - }, - - resetDevice() { - app.globalData.ppScale.device = { - list: [], - mac: null, - name: "", - connection: null - } - }, - - // 获取家庭成员列表 - getSubUser() { - let params = {}; - $.ajax("weighingScale/list/subUser", params, "GET", true, "正在获取成员列表...").then(res => { - this.setData({ - ['subUser.data']: res.result - }) - }) - }, - - // 根据生日获取年龄 - getAge(birthDateString) { - const birthDate = new Date(birthDateString); - const today = new Date(); - - let age = today.getFullYear() - birthDate.getFullYear(); - const monthDiff = today.getMonth() - birthDate.getMonth(); - const dayDiff = today.getDate() - birthDate.getDate(); - - // 如果当前月份小于出生月份,或者同月但当前日期小于出生日期,年龄需要减 1 - if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) { - age--; - } - - return age; - } -}) \ No newline at end of file diff --git a/pages/setNetworkSuccessful/setNetworkSuccessful.json b/pages/setNetworkSuccessful/setNetworkSuccessful.json deleted file mode 100644 index 84c4caf..0000000 --- a/pages/setNetworkSuccessful/setNetworkSuccessful.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "绑定成功", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/setNetworkSuccessful/setNetworkSuccessful.wxml b/pages/setNetworkSuccessful/setNetworkSuccessful.wxml deleted file mode 100644 index 25db03c..0000000 --- a/pages/setNetworkSuccessful/setNetworkSuccessful.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - 配网成功 - - - - 当前设备配置Wi-Fi - - - - - {{ssid}} - - - - - - -完成 \ No newline at end of file diff --git a/pages/setNetworkSuccessful/setNetworkSuccessful.wxss b/pages/setNetworkSuccessful/setNetworkSuccessful.wxss deleted file mode 100644 index ec46075..0000000 --- a/pages/setNetworkSuccessful/setNetworkSuccessful.wxss +++ /dev/null @@ -1,93 +0,0 @@ -page { - width: 100%; - padding: 200rpx 85rpx 0; - box-sizing: border-box; - background-color: #ffffff; -} - -.icon { - width: 100%; - margin-bottom: 120rpx; -} - -.icon>view:first-of-type { - width: 360rpx; - height: 295rpx; - margin: 0 auto 50rpx; -} - -.icon>view:last-of-type { - color: #252535; - width: 100%; - height: 40rpx; - font-size: 40rpx; - font-weight: bold; - line-height: 40rpx; - text-align: center; -} - -.info { - width: 100%; - margin-bottom: 380rpx; -} - -.info>view:first-of-type { - color: #B6B6B6; - width: 100%; - height: 30rpx; - font-size: 30rpx; - line-height: 30rpx; - margin-bottom: 40rpx; -} - -.info>view:last-of-type { - width: 100%; - height: 80rpx; - margin: 30rpx 0; - display: flex; - flex-wrap: nowrap; - align-items: center; -} - -.info>view:last-of-type>view:nth-of-type(1) { - width: 80rpx; - height: 80rpx; - margin-right: 24rpx; -} - -.info>view:last-of-type>view:nth-of-type(2) { - color: #252535; - flex: 1; - width: 0; - height: 80rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 80rpx; -} - -.info>view:last-of-type>view:nth-of-type(3) { - width: 32rpx; - height: 32rpx; -} - -.describe { - color: #B6B6B6; - width: 100%; - height: 26rpx; - font-size: 28rpx; - line-height: 28rpx; - text-align: center; - margin-bottom: 46rpx; -} - -.btn { - color: #FFFFFF; - width: 100%; - height: 88rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 88rpx; - text-align: center; - border-radius: 44rpx; - background-color: #1385FA; -} \ No newline at end of file diff --git a/pages/setWifiPassword/setWifiPassword.js b/pages/setWifiPassword/setWifiPassword.js deleted file mode 100644 index ce940f2..0000000 --- a/pages/setWifiPassword/setWifiPassword.js +++ /dev/null @@ -1,35 +0,0 @@ -const app = getApp(); - -Page({ - data: { - type: true, - - wifiInfo: null, - password: "" - }, - - onLoad(options) { - this.setData({ - wifiInfo: JSON.parse(options.item) - }) - }, - - passwordInput(e) { - this.setData({ - password: e.detail.value - }) - }, - - inputTypeChange() { - this.setData({ - type: !this.data.type - }) - }, - - // 打开配网 - openSetNetwork() { - wx.navigateTo({ - url: "/pages/setNetwork/setNetwork?ssid=" + this.data.wifiInfo.ssid + "&password=" + this.data.password - }) - } -}) \ No newline at end of file diff --git a/pages/setWifiPassword/setWifiPassword.json b/pages/setWifiPassword/setWifiPassword.json deleted file mode 100644 index 4200326..0000000 --- a/pages/setWifiPassword/setWifiPassword.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "输入Wi-Fi密码", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/setWifiPassword/setWifiPassword.wxml b/pages/setWifiPassword/setWifiPassword.wxml deleted file mode 100644 index 536fe6d..0000000 --- a/pages/setWifiPassword/setWifiPassword.wxml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - {{wifiInfo.ssid}} - - - 密码 - - - - - - - - - -连接 \ No newline at end of file diff --git a/pages/setWifiPassword/setWifiPassword.wxss b/pages/setWifiPassword/setWifiPassword.wxss deleted file mode 100644 index ebd4598..0000000 --- a/pages/setWifiPassword/setWifiPassword.wxss +++ /dev/null @@ -1,81 +0,0 @@ -page { - padding: 55rpx 55rpx 0; - background-color: #ffffff; -} - -.form { - width: 100%; - margin-bottom: 64rpx; -} - -.form>view { - width: 100%; - height: 96rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - padding: 0 24rpx; - box-sizing: border-box; - border-radius: 16rpx; - background-color: #F6F6F6; -} - -.form>view:first-of-type { - margin-bottom: 32rpx; -} - -.form>view>view:nth-of-type(1) { - color: #252535; - width: 100rpx; - height: 96rpx; - line-height: 96rpx; - font-size: 32rpx; - font-weight: bold; -} - -.form>view:first-of-type>view:nth-of-type(1) { - padding: 24rpx 45rpx 24rpx 7rpx; - box-sizing: border-box; - display: flex; - align-items: center; -} - -.form>view>view:nth-of-type(2) { - color: #252535; - flex: 1; - width: 0; - height: 96rpx; - font-size: 32rpx; - line-height: 96rpx; -} - -.form>view>view:nth-of-type(2) input { - color: #252535; - width: 100%; - height: 96rpx; - font-size: 32rpx; - line-height: 96rpx; -} - -.placeholderClass { - color: #B6B6B6; - font-size: 32rpx; -} - -.form>view>view:nth-of-type(3) { - width: 56rpx; - height: 56rpx; -} - -.btn { - color: #FFFFFF; - width: 580rpx; - height: 88rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 88rpx; - margin: 0 auto; - text-align: center; - border-radius: 44rpx; - background-color: #1385FA; -} \ No newline at end of file diff --git a/pages/userInfo/userInfo.js b/pages/userInfo/userInfo.js deleted file mode 100644 index d752193..0000000 --- a/pages/userInfo/userInfo.js +++ /dev/null @@ -1,553 +0,0 @@ -const app = getApp(); -import $ from "../../utils/request"; - -Page({ - data: { - deviceConnect: false, - - initBluetooth: "0", - customerType: "1", - deviceInfo: null, - seviceList: [], - userInfo: null, - - id: "", - realname: "", - sex: { - index: null, - data: [{ - id: 1, - name: '男' - }, { - id: 2, - name: '女' - }] - }, - birthday: { - label: "1980年01月01日", - value: "1980-01-01" - }, - phone: "", - height: { - index: 50, - data: Array.from({ length: 200 - 120 + 1 }, (_, i) => i + 120) - }, - weight: { - index: 20, - data: Array.from({ length: 100 - 50 + 1 }, (_, i) => i + 50) - }, - - connectedDevice: { - code: "", - color: "", - message: "" - } - }, - - onLoad(options) { - // initBluetooth 是否初始化蓝牙和设备 1 是 / 0 否 - // customerType 用户类型 1 自己 / 0 他人 - // id 用户ID 当customerType为0时,家庭成员的用户ID / 为1时始终为空字符串 - this.setData({ - id: options.id ? options.id : null, - initBluetooth: options.initBluetooth, - customerType: options.customerType, - }) - if(options.customerType === "0") { - wx.setNavigationBarTitle({ - title: options.id ? '编辑成员档案' : '新增成员档案' - }) - if(options.id) { - this.subUserInfo() - } - } else { - let userInfo = wx.getStorageSync("userInfo") || null; - if (userInfo && options.initBluetooth === "1") { - let [year, month, day] = userInfo.birthday.split("-"); - this.setData({ - userInfo: userInfo, - realname: userInfo.realname, - ["sex.index"]: this.data.sex.data.findIndex(item => {return item.id === userInfo.sex}), - birthday: { - label: year + "年" + month + "月" + day + "日", - value: userInfo.birthday - }, - phone: userInfo.phone, - ["height.index"]: this.data.height.data.findIndex(item => {return item === userInfo.height}), - ["weight.index"]: this.data.weight.data.findIndex(item => {return item === userInfo.weight}), - }) - } - } - if(options.initBluetooth === "1") { - this.initBluetooth(); - - app.globalData.ppScale.plugin.bus.subscribe("deviceConnect", (res) => { - console.log('userInfo ===》deviceConnect', res); - this.setData({ - connectedDevice: { - code: "", - color: "#2AC79F", - message: "等待设备回应" - } - }) - - app.globalData.ppScale.plugin.ScaleAction.startDataProgress(); - app.globalData.ppScale.activeProtocol = app.globalData.ppScale.plugin.ScaleAction.getActiveProtocol(); - - app.globalData.ppScale.activeProtocol.codeUpdateMTU((res) => { - console.log("userInfo ===》codeUpdateMTU", res); - - this.setData({ - deviceConnect: true, - connectedDevice: { - code: "", - color: "#2AC79F", - message: "已连接" - } - }) - }); - }); - } - }, - - // 获取已经绑定的设备列表 - getDevice() { - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "获取设备列表" - } - }) - let params = {}; - $.ajax("weighingScale/list/device", params, "GET", false).then((res) => { - if(res.result && res.result.length) { - this.setData({ - deviceInfo: res.result[0] - }) - this.getDeviceSettingList(); - } else { - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "未绑定设备" - } - }) - wx.showModal({ - title: "提示", - content: "当前暂未绑定设备,需要绑定吗?", - confirmText: "去绑定", - success: (res) => { - if (res.confirm) { - wx.navigateTo({ - url: "/pages/searchDevice/searchDevice" - }) - } else if (res.cancel) { - wx.navigateBack({ - delta: 1 - }) - } - } - }) - } - }) - }, - - // 初始化蓝牙 - initBluetooth() { - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "初始化蓝牙" - } - }) - wx.openBluetoothAdapter({ - success: () => { - this.getDevice(); - }, - fail: (err) => { - if (err.errCode === 10001) { - this.setData({ - connectedDevice: { - code: "", - color: "#F24439", - message: "初始化蓝牙失败" - } - }) - wx.showModal({ - title: "提示", - content: "请打开手机蓝牙", - }); - } - }, - }); - }, - - getDeviceSettingList() { - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "获取配置信息" - } - }) - let seviceList = []; - app.globalData.ppScale.device.setting.map(item => { - if(this.data.deviceInfo && this.data.deviceInfo.type === item.deviceName) { - seviceList.push(item); - } - }) - this.setData({ - seviceList: seviceList, - connectedDevice: { - code: "", - color: "#2AC79F", - message: "配置获取成功" - } - }) - if(seviceList && seviceList.length) { - app.globalData.ppScale.plugin.Blue.setDeviceSetting(seviceList); - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "开始搜索设备" - } - }) - app.globalData.ppScale.plugin.Blue.start(seviceList[0].deviceName, false); - app.globalData.ppScale.plugin.bus.subscribe("devicesList", (res) => { - console.log("deviceInfo ===> devicesList", res); - - let fIndex = res.findIndex(item => item.deviceId === this.data.deviceInfo.deviceId); - this.setData({ - connectedDevice: { - code: "", - color: "#808080", - message: "设备搜索中" - } - }) - if (fIndex >= 0) { - app.globalData.ppScale.plugin.Blue.stopBluetoothDevicesDiscovery(); - this.setData({ - connectedDevice: { - code: "", - color: "#2AC79F", - message: "连接中" - } - }) - app.globalData.ppScale.plugin.Blue.createBLEConnection(res[fIndex]); - return; - } - }); - } - }, - - // 姓名输入 - realnameInput(e) { - let realname = e.detail.value.replace(/\s+/g, ''); - this.setData({ - realname: realname - }) - }, - - // 性别选择 - sexChange(e) { - let sex = e.detail.value; - console.log(sex); - this.setData({ - ['sex.index']: e.detail.value - }) - if(this.data.height.index === null) { - this.setData({ - ['height.index']: sex == 0 ? 50 : 40 - }) - } - if(this.data.weight.index === null) { - this.setData({ - ['weight.index']: sex == 0 ? 20 : 10 - }) - } - }, - - // 生日选择 - birthdayChange(e) { - let v = e.detail.value; - let [year, month, day] = v.split("-"); - this.setData({ - birthday: { - label: year + "年" + month + "月" + day + "日", - value: v - } - }) - }, - - // 获取手机号 - getPhoneNumber(e) { - let params = { - code: e.detail.code, - thirdId: wx.getStorageSync("userInfo").thirdId - }; - $.ajax("weighingScale/getPhone", params, "POST").then(res => { - wx.setStorageSync("userInfo", res.result.user); - wx.setStorageSync("token", res.result.token); - this.setData({ - phone: res.result.user.phone - }) - }) - }, - - // 身高选择 - heightChange(e) { - this.setData({ - ['height.index']: e.detail.value - }) - }, - - // 体重选择 - weightChange(e) { - this.setData({ - ['weight.index']: e.detail.value - }) - }, - - // 提交判断 - submit() { - let realname = this.data.realname; - let sex = this.data.sex; - let birthday = this.data.birthday; - let phone = this.data.phone; - let height = this.data.height; - let weight = this.data.weight; - if(this.data.initBluetooth === "1" && !this.data.deviceConnect) { - wx.showToast({ - icon: "none", - title: "请靠近设备并点亮后再试" - }) - app.globalData.ppScale.plugin.Blue.start(this.data.seviceList[0].deviceName, false); - return false; - } - if(!realname) { - wx.showToast({ - icon: "none", - title: "姓名不能为空" - }) - return false; - } - if(sex.index === null) { - wx.showToast({ - icon: "none", - title: "性别不能为空" - }) - return false; - } - if(!birthday.value) { - wx.showToast({ - icon: "none", - title: "生日不能为空" - }) - return false; - } - if(this.data.customerType === "1" && !phone) { - wx.showToast({ - icon: "none", - title: "手机号不能为空" - }) - return false; - } - if(height.index === null) { - wx.showToast({ - icon: "none", - title: "身高不能为空" - }) - return false; - } - if(weight.index === null) { - wx.showToast({ - icon: "none", - title: "体重不能为空" - }) - return false; - } - if(this.data.customerType === "1") { - this.submitMe({ - realname: realname, - sex: sex.data[sex.index].id, - birthday: birthday.value, - phone: phone, - height: height.data[height.index], - weight: weight.data[weight.index] - }); - } else { - this.submitUser({ - id: this.data.id, - realname: realname, - sex: sex.data[sex.index].id, - birthday: birthday.value, - height: height.data[height.index], - weight: weight.data[weight.index] - }); - } - }, - - // 提交自己的信息 - submitMe(params) { - $.ajax("weighingScale/edit/user", params, "POST", true, "保存中...").then(res => { - $.ajax("weighingScale/select/user", {}, "GET", true, "更新用户信息中...").then(res_ => { - wx.setStorageSync("userInfo", res_.result); - wx.showToast({ - icon: "none", - title: res.message - }) - if(this.data.initBluetooth === "1") { - app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ - userID: res_.result.id, - userName: res_.result.realname, - memberID: "", - age: this.getAge(res_.result.birthday), // - gender: res_.result.sex, // - height: res_.result.height, // - isAthleteMode: 0, - currentWeight: res_.result.weight, // - deviceHeaderIndex: 0, - targetWeight: "", - idealWeight: "", - recentData: [], - }, (res) => { - console.log("dataSyncUserInfo", res) - app.globalData.ppScale.plugin.Blue.stop(); - setTimeout(() => { - wx.navigateBack({ - delta: 1 - }) - }, 1500) - }) - } else { - setTimeout(() => { - wx.navigateBack({ - delta: 1 - }) - }, 1500) - } - }) - }) - }, - - // 提交家庭成员的信息 - submitUser(params) { - $.ajax("weighingScale/edit/subUser", params, "POST", true, "保存中...").then(res => { - wx.showToast({ - icon: "none", - title: res.message - }) - app.globalData.ppScale.activeProtocol.dataSyncUserInfo({ - userID: wx.getStorageSync("userInfo").id, - userName: params.realname, - memberID: res.result, - age: this.getAge(params.birthday), // - gender: params.sex, // - height: params.height, // - isAthleteMode: 0, - currentWeight: params.weight, // - deviceHeaderIndex: 0, - targetWeight: "", - idealWeight: "", - recentData: [], - }, (res) => { - console.log("dataSyncUserInfo", res) - app.globalData.ppScale.plugin.Blue.stop(); - setTimeout(() => { - wx.navigateBack({ - delta: 1 - }) - }, 1500) - }) - }) - }, - - // 删除家庭成员 - delUser() { - if(this.data.deviceConnect) { - wx.showModal({ - title: "提示", - content: "你要定要删除此成员吗?", - success: (res) => { - if (res.confirm) { - let params = { - id: this.data.id - }; - console.log(params); - $.ajax("weighingScale/del/subUser", params, "POST", true, "删除中...").then(res => { - wx.showToast({ - icon: "none", - title: res.message - }) - app.globalData.ppScale.activeProtocol.dataDeleteUser({ - userID: wx.getStorageSync("userInfo").id, - memberID: this.data.id, - }, (res) => { - console.log("dataDeleteUser", res); - app.globalData.ppScale.plugin.Blue.stop(); - setTimeout(() => { - wx.navigateBack({ - delta: 1 - }) - }, 1500); - }) - }) - } - } - }) - } else { - wx.showToast({ - icon: "none", - title: "删除失败,请靠近设备并点亮后再试" - }) - app.globalData.ppScale.plugin.Blue.start(this.data.seviceList[0].deviceName, false); - } - }, - - // 获取家庭成员信息详情 - subUserInfo() { - let params = { - userId: this.data.id - }; - $.ajax("weighingScale/select/subUser", params, "GET", false).then(res => { - let [year, month, day] = res.result.birthday.split("-"); - this.setData({ - realname: res.result.realname, - ["sex.index"]: this.data.sex.data.findIndex(item => {return item.id === res.result.sex}), - birthday: { - label: year + "年" + month + "月" + day + "日", - value: res.result.birthday - }, - ["height.index"]: this.data.height.data.findIndex(item => {return item === res.result.height}), - ["weight.index"]: this.data.weight.data.findIndex(item => {return item === res.result.weight}), - }) - }) - }, - - // 根据生日获取年龄 - getAge(birthDateString) { - const birthDate = new Date(birthDateString); - const today = new Date(); - - let age = today.getFullYear() - birthDate.getFullYear(); - const monthDiff = today.getMonth() - birthDate.getMonth(); - const dayDiff = today.getDate() - birthDate.getDate(); - - // 如果当前月份小于出生月份,或者同月但当前日期小于出生日期,年龄需要减 1 - if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) { - age--; - } - - return age; - }, - - onUnload() { - if(this.data.initBluetooth === "1") { - app.globalData.ppScale.plugin.Blue.stop(); - } - } -}) \ No newline at end of file diff --git a/pages/userInfo/userInfo.json b/pages/userInfo/userInfo.json deleted file mode 100644 index 6becaf9..0000000 --- a/pages/userInfo/userInfo.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "用户档案", - "navigationBarBackgroundColor": "#F5F7FB", - "disableScroll": true -} \ No newline at end of file diff --git a/pages/userInfo/userInfo.wxml b/pages/userInfo/userInfo.wxml deleted file mode 100644 index 9f311b6..0000000 --- a/pages/userInfo/userInfo.wxml +++ /dev/null @@ -1,81 +0,0 @@ - - - - {{deviceInfo && deviceInfo.equipmentName ? deviceInfo.equipmentName : '获取中...'}} - 型号:{{deviceInfo && deviceInfo.type ? deviceInfo.type : '获取中...'}} - - - - {{connectedDevice.message}} - - - - - - - 姓名 - - - - - - 性别 - - - {{sex.index === null ? '请选择性别' : sex.data[sex.index].name}} - - - - - 生日 - - - {{birthday.value ? birthday.label : '请选择生日'}} - - - - - - 手机号 - - - {{phone}} - - - - - - - - - 身高 - - - {{height.index === null ? '请选择身高' : height.data[height.index] + ' cm'}} - - - - - 体重 - - - {{weight.index === null ? '请选择体重' : weight.data[weight.index] + ' kg'}} - - - - - -确定 - - - 请填写和完善您家人的健康信息,将用于计算身体数据及运动卡路里消耗等,以便准确的分析数据。我们会严格保护您的家庭信息安全。 - - - - 删除该档案 - diff --git a/pages/userInfo/userInfo.wxss b/pages/userInfo/userInfo.wxss deleted file mode 100644 index 2d80170..0000000 --- a/pages/userInfo/userInfo.wxss +++ /dev/null @@ -1,145 +0,0 @@ -page { - padding: 30rpx 30rpx 0; -} - -.device { - width: 100%; - display: flex; - flex-wrap: nowrap; - align-items: center; - padding: 35rpx 40rpx; - border-radius: 24rpx; - box-sizing: border-box; - margin-bottom: 24rpx; - background-color: #FFFFFF; - justify-content: space-between; -} - -.device>view:nth-of-type(1)>view:nth-of-type(1) { - color: #252535; - height: 32rpx; - font-weight: bold; - font-size: 32rpx; - line-height: 32rpx; - margin-bottom: 22rpx; -} - -.device>view:nth-of-type(1)>view:nth-of-type(2) { - color: #808080; - height: 26rpx; - font-size: 26rpx; - line-height: 26rpx; -} - -.device>view:nth-of-type(2) { - height: 28rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; -} - -.device>view:nth-of-type(2)>view:nth-of-type(1) { - width: 14rpx; - height: 14rpx; - border-radius: 50%; -} - -.device>view:nth-of-type(2)>view:nth-of-type(2) { - height: 28rpx; - font-weight: bold; - font-size: 28rpx; - line-height: 28rpx; - padding-left: 8rpx; -} - -.form { - width: 100%; - padding: 0 30rpx; - border-radius: 16rpx; - box-sizing: border-box; - background-color: #FFFFFF; - margin-bottom: 80rpx; -} - -.form>view { - width: 100%; - height: 120rpx; - padding: 0 10rpx; - display: flex; - flex-wrap: nowrap; - box-sizing: border-box; - border-bottom: 1rpx solid #EAECF1; -} - -.form>view>view:first-of-type { - color: #252535; - height: 120rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 120rpx; -} - -.form>view>view:last-of-type { - flex: 1; - width: 0; - color: #B6B6B6; - font-size: 28rpx; - height: 120rpx; - line-height: 120rpx; - text-align: right; -} - -.form>view>view:last-of-type.arrowAfter { - padding-right: 30rpx; -} - -.form>view>view:last-of-type input { - color: #252535; - width: 100%; - height: 120rpx; - line-height: 120rpx; - text-align: right; -} - -.placeholderClass { - color: #B6B6B6; - font-size: 28rpx; -} - -.form>view { - border-bottom: 0; -} - -.btn { - color: #FFFFFF; - width: 580rpx; - height: 88rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 88rpx; - text-align: center; - border-radius: 44rpx; - margin: 0 auto 50rpx; - background-color: #1385FA; -} - -.tips { - color: #77849E; - width: 100%; - font-size: 26rpx; - line-height: 40rpx; - padding: 0 30rpx; - box-sizing: border-box; -} - -.delBtn { - color: #1385FA; - width: 580rpx; - height: 88rpx; - font-size: 32rpx; - font-weight: bold; - line-height: 88rpx; - text-align: center; - border-radius: 44rpx; - margin: 0 auto; -} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 0868a6f..5dd5a18 100644 --- a/project.config.json +++ b/project.config.json @@ -1,29 +1,41 @@ { - "appid": "wx6c71f3ebcdcddffd", - "compileType": "miniprogram", - "libVersion": "3.7.11", - "packOptions": { - "ignore": [], - "include": [] - }, - "setting": { - "coverView": true, - "es6": true, - "postcss": true, - "minified": true, - "enhance": true, - "showShadowRootInWxmlPanel": true, - "packNpmRelationList": [], - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - } - }, - "condition": {}, - "editorSetting": { - "tabIndent": "tab", - "tabSize": 4 - }, - "simulatorPluginLibVersion": {} + "appid": "wx6c71f3ebcdcddffd", + "compileType": "miniprogram", + "libVersion": "3.8.5", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "compileWorklet": false, + "uglifyFileName": false, + "uploadWithSourceMap": true, + "packNpmManually": false, + "minifyWXSS": true, + "minifyWXML": true, + "localPlugins": false, + "disableUseStrict": false, + "useCompilerPlugins": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "condition": {}, + "editorSetting": { + "tabIndent": "tab", + "tabSize": 4 + }, + "simulatorPluginLibVersion": {} } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 673eb24..cdd4818 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,10 +1,24 @@ { - "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "projectname": "bodyWeight", - "setting": { - "compileHotReLoad": true, - "urlCheck": false, - "bigPackageSizeSupport": true - }, - "libVersion": "3.7.11" + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "bodyWeight", + "setting": { + "compileHotReLoad": true, + "urlCheck": false, + "bigPackageSizeSupport": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true + }, + "libVersion": "3.8.5", + "condition": {} } \ No newline at end of file