"version": "1.2.19"
This commit is contained in:
@@ -32,8 +32,8 @@
|
|||||||
"style": "v2",
|
"style": "v2",
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"ppScale-plugin": {
|
"ppScale-plugin": {
|
||||||
"version": "0.0.19",
|
"version": "1.2.19",
|
||||||
"provider": "wx0826af4e4908f524"
|
"provider": "wx0ffb48417ce6345c"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ Component({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setUserInfo() {
|
setUserInfo() {
|
||||||
|
// app.globalData.ppScale.activeProtocol.codeClearDeviceData("00", (res) => {
|
||||||
|
// console.log("deviceInfo === codeClearDeviceData", res);
|
||||||
|
// })
|
||||||
|
|
||||||
if(this.data.connectState == this.data.BLUE_STATE.CONNECTSUCCESS) {
|
if(this.data.connectState == this.data.BLUE_STATE.CONNECTSUCCESS) {
|
||||||
if(this.data.userId) {
|
if(this.data.userId) {
|
||||||
app.globalData.ppScale.activeProtocol.dataSyncUserInfo({
|
app.globalData.ppScale.activeProtocol.dataSyncUserInfo({
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Page({
|
|||||||
console.log("deviceInfo === codeClearDeviceData", res);
|
console.log("deviceInfo === codeClearDeviceData", res);
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
|
||||||
if(res === 0) {
|
if (res === 0) {
|
||||||
let scaleDeviceId = ppScale.device.mac.replace(/:/g, '');
|
let scaleDeviceId = ppScale.device.mac.replace(/:/g, '');
|
||||||
let params = {
|
let params = {
|
||||||
equipmentCode: scaleDeviceId,
|
equipmentCode: scaleDeviceId,
|
||||||
@@ -86,13 +86,13 @@ Page({
|
|||||||
ppScale.device.connection = this.data.device;
|
ppScale.device.connection = this.data.device;
|
||||||
const nameArr = this.data.device.name.split("-");
|
const nameArr = this.data.device.name.split("-");
|
||||||
ppScale.version = nameArr.length === 5 ? "domain2" : "domain1";
|
ppScale.version = nameArr.length === 5 ? "domain2" : "domain1";
|
||||||
if(this.data.progressNext) {
|
if (this.data.progressNext) {
|
||||||
let scaleDeviceId = ppScale.device.mac.replace(/:/g, '');
|
let scaleDeviceId = ppScale.device.mac.replace(/:/g, '');
|
||||||
let params = {
|
let params = {
|
||||||
sn: scaleDeviceId,
|
sn: scaleDeviceId,
|
||||||
};
|
};
|
||||||
$.ajax("weighingScale/getUserInfoBySn", params, "GET", true, "正在同步用户信息...").then(res => {
|
$.ajax("weighingScale/getUserInfoBySn", params, "GET", true, "正在同步用户信息...").then(res => {
|
||||||
if(res.result) {
|
if (res.result) {
|
||||||
wx.setStorageSync("userInfo", res.result);
|
wx.setStorageSync("userInfo", res.result);
|
||||||
this.setProgress();
|
this.setProgress();
|
||||||
} else {
|
} else {
|
||||||
@@ -125,7 +125,7 @@ Page({
|
|||||||
// 选择了某个设备
|
// 选择了某个设备
|
||||||
deviceChange(e) {
|
deviceChange(e) {
|
||||||
let status = e.detail.status;
|
let status = e.detail.status;
|
||||||
if(status) {
|
if (status) {
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: "蓝牙配对中...",
|
title: "蓝牙配对中...",
|
||||||
mask: true
|
mask: true
|
||||||
@@ -139,6 +139,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
connectedDevice(e) {
|
connectedDevice(e) {
|
||||||
|
ppScale.plugin.Blue.stop();
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: "正在尝试连接...",
|
title: "正在尝试连接...",
|
||||||
mask: true
|
mask: true
|
||||||
@@ -151,7 +152,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
connectedDevice_(device) {
|
connectedDevice_(device) {
|
||||||
if(device) {
|
if (device) {
|
||||||
this.setData({
|
this.setData({
|
||||||
device: device
|
device: device
|
||||||
})
|
})
|
||||||
@@ -164,14 +165,14 @@ Page({
|
|||||||
progressNext: true
|
progressNext: true
|
||||||
})
|
})
|
||||||
let status = e.detail.status;
|
let status = e.detail.status;
|
||||||
if(status) {
|
if (status) {
|
||||||
this.setProgress();
|
this.setProgress();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setDeviceConfig(e) {
|
setDeviceConfig(e) {
|
||||||
let status = e.detail.status;
|
let status = e.detail.status;
|
||||||
if(status) {
|
if (status) {
|
||||||
this.setProgress();
|
this.setProgress();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user