处理636的兼容

This commit is contained in:
17792275749
2025-04-08 14:08:04 +08:00
parent 62091ee0c1
commit 0e4a1aa622
8 changed files with 170 additions and 177 deletions
+4 -2
View File
@@ -14,11 +14,13 @@ Page({
app.globalData.ppScale.wifi.password = password;
let mac = app.globalData.ppScale.device.mac;
if(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 => {
app.globalData.ppScale.activeProtocol.codeSetBindingState((res) => {
@@ -42,7 +44,7 @@ Page({
} else {
wx.showToast({
icon: "none",
title: "Mac 地址获取失败,请重新绑定"
title: "Mac 地址与 deviceId 获取失败,请重新绑定"
})
setTimeout(() => {
wx.switchTab({