Commit cfe0326f authored by Damon's avatar Damon

fix: 充电桩扫码格式化

parent e4881c27
...@@ -31,8 +31,14 @@ ...@@ -31,8 +31,14 @@
const self = this const self = this
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
self.dataValue = res.result let result = res.result
self.valueChange(res.result) if (result.substring(0, 4) === 'http') {
const arr = result.split('/#/')
console.log("arr", arr)
result = arr[1]
}
self.dataValue = result
self.valueChange(result)
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment