Appearance
单个菜品学习
方法名
imageLearn
用法
用法示例
js
module.imageLearn({
//图片路径或网络地址
url: "/storage/emulated/0/food/eggplant/eggplant2.png",
//商品标识
skuID: "紫茄子"
}, res => {
console.log(res)
})参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 参数描述 |
|---|---|---|---|---|
| url | String | 是 | 无 | 图片路径或网络地址 |
| skuID | String | 是 | 无 | 商品标识 |
回调
回调示例
json
{
"message": "",
"data": {
"skuID": "紫茄子",
"imageID": "83a9d898-ffff-0fff-2d88-000000000000"
},
"code": 0
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.skuID | String | 商品的唯一标识 |
| data.imageID | String | 学习后sdk生成的图片id |
| code | Integer | 返回类型,0.成功,其他:失败 |
