|
@@ -69,10 +69,10 @@ Page({
|
|
|
commitData() {
|
|
commitData() {
|
|
|
console.log(this.data.placeOfUse);
|
|
console.log(this.data.placeOfUse);
|
|
|
console.log(this.data.usingHuman);
|
|
console.log(this.data.usingHuman);
|
|
|
- console.log(this.data.deviceId);
|
|
|
|
|
|
|
+ console.log(this.data.sn);
|
|
|
console.log(this.data.ssid);
|
|
console.log(this.data.ssid);
|
|
|
console.log(this.data.password);
|
|
console.log(this.data.password);
|
|
|
- this.checkSn(this.data.deviceId);
|
|
|
|
|
|
|
+ this.checkSn(this.data.sn);
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -85,7 +85,7 @@ Page({
|
|
|
data: {
|
|
data: {
|
|
|
token: "89835e65993fee4a6a6cbbe4c271da51e5521822934e13769e61cadabaed72c3" || wx.getStorageSync('token'),
|
|
token: "89835e65993fee4a6a6cbbe4c271da51e5521822934e13769e61cadabaed72c3" || wx.getStorageSync('token'),
|
|
|
pid: this.data.pid,
|
|
pid: this.data.pid,
|
|
|
- sntram: this.data.deviceId,
|
|
|
|
|
|
|
+ sntram: this.data.sn,
|
|
|
per: this.data.usingHuman,
|
|
per: this.data.usingHuman,
|
|
|
loc: this.data.placeOfUse,
|
|
loc: this.data.placeOfUse,
|
|
|
},
|
|
},
|
|
@@ -273,9 +273,11 @@ Page({
|
|
|
commitBluetooth() {
|
|
commitBluetooth() {
|
|
|
this.onClose();
|
|
this.onClose();
|
|
|
var deviceId = this.data.deviceList[this.data.bluetoothSelectIndex].deviceId;
|
|
var deviceId = this.data.deviceList[this.data.bluetoothSelectIndex].deviceId;
|
|
|
|
|
+ var name = this.data.deviceList[this.data.bluetoothSelectIndex].name;
|
|
|
|
|
+ var nameList = this.data.deviceList[this.data.bluetoothSelectIndex].name.split(' ');
|
|
|
this.setData({
|
|
this.setData({
|
|
|
deviceId: deviceId,
|
|
deviceId: deviceId,
|
|
|
- sn:deviceId
|
|
|
|
|
|
|
+ sn: nameList[1]
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 开始配网
|
|
// 开始配网
|