Skip to content

单个菜品学习

方法名

imageLearn

用法

用法示例

js
module.imageLearn({
  //图片路径或网络地址
  url: "/storage/emulated/0/food/eggplant/eggplant2.png",
  //商品标识
  skuID: "紫茄子"
}, res => {
  console.log(res)
})

参数说明

参数名参数类型是否必填默认值参数描述
urlString图片路径或网络地址
skuIDString商品标识

回调

回调示例

json
{
  "message": "",
  "data": {
    "skuID": "紫茄子",
    "imageID": "83a9d898-ffff-0fff-2d88-000000000000"
  },
  "code": 0
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.skuIDString商品的唯一标识
data.imageIDString学习后sdk生成的图片id
codeInteger返回类型,0.成功,其他:失败