Commit 04d33f34 authored by jiangjiantao's avatar jiangjiantao

bugfixed

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