Commit 04d33f34 authored by jiangjiantao's avatar jiangjiantao

bugfixed

parent 8502afda
......@@ -197,22 +197,21 @@ Page({
if (res.data.success != true) {
my.showToast({
type: 'fail',
content: res.data.message,
content: "该商品没有对应的活动",
duration: 2000
});
} else {
var arr = Object.keys(res.data.data);
if (arr.length == 0) {
my.showToast({
if(res.data.data == null || res.data.data.barcode == null){
my.showToast({
type: 'fail',
content: "该商品没有对应的活动",
duration: 2000
});
} else {
//识别商品成功
});
}else{
//识别商品成功
this.parseGoodInfo(res.data.data);
console.log("识别商品信息成功");
}
}
}
},
fail: (res) => {
......
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