新查询upc优化

This commit is contained in:
苏尹岚
2020-04-17 18:02:25 +08:00
parent ac2c0da81f
commit 5393e8a291

View File

@@ -136,7 +136,7 @@ func (a *API) GetNetUpcInfo(bar string) (getNetUpcInfo *GetNetUpcInfoResult, err
getNetUpcInfo = &GetNetUpcInfoResult{}
body := result["fakeData"].(string)
if strings.Contains(body, "没有收录") {
return nil, err
return getNetUpcInfo, err
}
results := regexpUpc.FindAllStringSubmatch(body, -1)
getNetUpcInfo.Upc = results[0][1]