Commit 1dce4b0a98c32560eab84a127a74530136906a20
1 parent
aa925be5
测肤检查要减次数,要带商家
Showing
1 changed file
with
8 additions
and
1 deletions
packageD/pages/AI-test-skin/analyse/analyse.js
... | ... | @@ -216,15 +216,22 @@ Page({ |
216 | 216 | "appid": "25521854", |
217 | 217 | "image": getApp().globalData.face_SourceImg, |
218 | 218 | "face_field": "age,expression,face_shape,gender,glasses,landmark,landmark150,quality,eye_status,emotion,face_type,mask,spoofing", |
219 | - "image_type": "URL" | |
219 | + "image_type": "URL", | |
220 | + "store_id":setting.stoid | |
220 | 221 | } |
221 | 222 | //开始调用百度接口,进行对图片进行判断是否符合标准 |
222 | 223 | this.json_post("/api/weshop/baidubce/face/skindetect", data, function (res) { |
223 | 224 | if (res.data.code == 0) { |
224 | 225 | //检查的字段存储 |
226 | + | |
225 | 227 | var check_data = th.data.check_data = res.data.data; |
226 | 228 | check_data = check_data.face_list[0]; |
229 | + if(!check_data) { | |
230 | + getApp().showWarning('网络繁忙,请稍后再试'); | |
231 | + return false; | |
232 | + } | |
227 | 233 | let fail_result = new Array(); |
234 | + | |
228 | 235 | console.log(check_data); |
229 | 236 | //检查睁眼闭眼 |
230 | 237 | var eye_status = check_data.eye_status; | ... | ... |