|
@@ -59,7 +59,7 @@ Page({
|
|
|
scanFlag: false
|
|
|
})
|
|
|
var response = e.detail.result
|
|
|
- var scodeType = response.split('|')[0] == 'DEVICE' ? true : false
|
|
|
+ var scodeType = response.split('|')[0].trim() == 'DEVICE' ? true : false
|
|
|
if (!scodeType) {
|
|
|
wx.showModal({
|
|
|
content: '请扫描正确的设备二维码',
|
|
@@ -78,9 +78,9 @@ Page({
|
|
|
})
|
|
|
} else {
|
|
|
// DEVICE|deviceCode|nonceCode|timeStamp
|
|
|
- var deviceCode = response.split('|')[1]
|
|
|
- var nonceCode = response.split('|')[2]
|
|
|
- var timeStamp = response.split('|')[3]
|
|
|
+ var deviceCode = response.split('|')[1].trim()
|
|
|
+ var nonceCode = response.split('|')[2].trim()
|
|
|
+ var timeStamp = response.split('|')[3].trim()
|
|
|
that.bindCarFn(deviceCode, nonceCode, timeStamp)
|
|
|
}
|
|
|
}
|