Commit ad4fc80d99f76ef1c6fffd95f0739a3123ae336a
1 parent
d11b3c53
修改人脸组件英文;
Showing
1 changed file
with
20 additions
and
20 deletions
src/components/FaceDetect/index.js
| @@ -89,7 +89,7 @@ class FaceDetect extends Component { | @@ -89,7 +89,7 @@ class FaceDetect extends Component { | ||
| 89 | this.video.onloadedmetadata = e => { | 89 | this.video.onloadedmetadata = e => { |
| 90 | _this.video.play(); | 90 | _this.video.play(); |
| 91 | }; | 91 | }; |
| 92 | - _this.changeStatusContent("人脸检测中"); | 92 | + _this.changeStatusContent("Face detection"); |
| 93 | _this.changePercentStatus(""); | 93 | _this.changePercentStatus(""); |
| 94 | let timer = setInterval(async () => { | 94 | let timer = setInterval(async () => { |
| 95 | try { | 95 | try { |
| @@ -110,7 +110,7 @@ class FaceDetect extends Component { | @@ -110,7 +110,7 @@ class FaceDetect extends Component { | ||
| 110 | timer = null; | 110 | timer = null; |
| 111 | const url = this.urlpre + `/face/faceSearch`; | 111 | const url = this.urlpre + `/face/faceSearch`; |
| 112 | //console.log(url,this.urlpre); | 112 | //console.log(url,this.urlpre); |
| 113 | - _this.changeStatusContent("人脸验证中"); | 113 | + _this.changeStatusContent("Face verification in progress"); |
| 114 | _this.stopMedia(); | 114 | _this.stopMedia(); |
| 115 | reject(); | 115 | reject(); |
| 116 | const dataReturn = await commonServices.postValueService( | 116 | const dataReturn = await commonServices.postValueService( |
| @@ -149,7 +149,7 @@ class FaceDetect extends Component { | @@ -149,7 +149,7 @@ class FaceDetect extends Component { | ||
| 149 | //console.log("dataReturn",dataReturn); | 149 | //console.log("dataReturn",dataReturn); |
| 150 | if (dataReturn && dataReturn.data == undefined) { | 150 | if (dataReturn && dataReturn.data == undefined) { |
| 151 | _this.changePercentStatus("exception"); | 151 | _this.changePercentStatus("exception"); |
| 152 | - _this.changeStatusContent("接口请求失败"); | 152 | + _this.changeStatusContent("Interface request failed"); |
| 153 | // message.error('接口请求失败!'); | 153 | // message.error('接口请求失败!'); |
| 154 | _this.stopMedia(); | 154 | _this.stopMedia(); |
| 155 | return; | 155 | return; |
| @@ -157,13 +157,13 @@ class FaceDetect extends Component { | @@ -157,13 +157,13 @@ class FaceDetect extends Component { | ||
| 157 | if (dataReturn.data.code < 0) { | 157 | if (dataReturn.data.code < 0) { |
| 158 | _this.changePercentStatus("exception"); | 158 | _this.changePercentStatus("exception"); |
| 159 | _this.changeStatusContent( | 159 | _this.changeStatusContent( |
| 160 | - "人脸验证失败,请重新识别:" + dataReturn.data.msg | 160 | + "Face verification failed, please try again:" + dataReturn.data.msg |
| 161 | ); | 161 | ); |
| 162 | //message.error('人脸验证失败!请重新识别'+dataReturn.data.msg); | 162 | //message.error('人脸验证失败!请重新识别'+dataReturn.data.msg); |
| 163 | _this.stopMedia(); | 163 | _this.stopMedia(); |
| 164 | reject(); | 164 | reject(); |
| 165 | } else { | 165 | } else { |
| 166 | - _this.changeStatusContent("人脸验证成功,登录中"); | 166 | + _this.changeStatusContent("Face verification successful, logging in"); |
| 167 | _this.props.onIdentifySuccess && | 167 | _this.props.onIdentifySuccess && |
| 168 | _this.props.onIdentifySuccess(dataReturn.data); | 168 | _this.props.onIdentifySuccess(dataReturn.data); |
| 169 | _this.changeCurrentPercent(100); | 169 | _this.changeCurrentPercent(100); |
| @@ -204,7 +204,7 @@ class FaceDetect extends Component { | @@ -204,7 +204,7 @@ class FaceDetect extends Component { | ||
| 204 | this.video.onloadedmetadata = e => { | 204 | this.video.onloadedmetadata = e => { |
| 205 | _this.video.play(); | 205 | _this.video.play(); |
| 206 | }; | 206 | }; |
| 207 | - _this.changeStatusContent("人脸采集中,请稍等"); | 207 | + _this.changeStatusContent("Face collection in progress, please wait"); |
| 208 | _this.changePercentStatus(""); | 208 | _this.changePercentStatus(""); |
| 209 | let timer = setInterval(async () => { | 209 | let timer = setInterval(async () => { |
| 210 | if (this.checkParams.length < 10) { | 210 | if (this.checkParams.length < 10) { |
| @@ -222,7 +222,7 @@ class FaceDetect extends Component { | @@ -222,7 +222,7 @@ class FaceDetect extends Component { | ||
| 222 | timer = null; | 222 | timer = null; |
| 223 | //验证URL | 223 | //验证URL |
| 224 | const url = this.urlpre + `/face/detectFaces`; | 224 | const url = this.urlpre + `/face/detectFaces`; |
| 225 | - _this.changeStatusContent("人脸检测中"); | 225 | + _this.changeStatusContent("Face detection"); |
| 226 | _this.stopMedia(); | 226 | _this.stopMedia(); |
| 227 | reject(); | 227 | reject(); |
| 228 | //console.log("dataReturn",_this.checkParams); | 228 | //console.log("dataReturn",_this.checkParams); |
| @@ -234,8 +234,8 @@ class FaceDetect extends Component { | @@ -234,8 +234,8 @@ class FaceDetect extends Component { | ||
| 234 | //console.log("dataReturn",dataReturn); | 234 | //console.log("dataReturn",dataReturn); |
| 235 | if (dataReturn && dataReturn.data == undefined) { | 235 | if (dataReturn && dataReturn.data == undefined) { |
| 236 | _this.changePercentStatus("exception"); | 236 | _this.changePercentStatus("exception"); |
| 237 | - _this.changeStatusContent("接口请求失败"); | ||
| 238 | - message.error("接口请求失败!"); | 237 | + _this.changeStatusContent("Interface request failed"); |
| 238 | + message.error("Interface request failed!"); | ||
| 239 | _this.stopMedia(); | 239 | _this.stopMedia(); |
| 240 | return; | 240 | return; |
| 241 | } | 241 | } |
| @@ -248,7 +248,7 @@ class FaceDetect extends Component { | @@ -248,7 +248,7 @@ class FaceDetect extends Component { | ||
| 248 | _this.stopMedia(); | 248 | _this.stopMedia(); |
| 249 | reject(); | 249 | reject(); |
| 250 | } else { | 250 | } else { |
| 251 | - _this.changeStatusContent("人脸采集成功"); | 251 | + _this.changeStatusContent("Face collection successful"); |
| 252 | let img = _this.getFace(); | 252 | let img = _this.getFace(); |
| 253 | const userinfo = this.props.app.userinfo; | 253 | const userinfo = this.props.app.userinfo; |
| 254 | let item = { | 254 | let item = { |
| @@ -265,19 +265,19 @@ class FaceDetect extends Component { | @@ -265,19 +265,19 @@ class FaceDetect extends Component { | ||
| 265 | }; | 265 | }; |
| 266 | //保存URL | 266 | //保存URL |
| 267 | const url = this.urlpre + `/face/faceAdd`; | 267 | const url = this.urlpre + `/face/faceAdd`; |
| 268 | - _this.changeStatusContent("人脸数据处理中,请稍等"); | 268 | + _this.changeStatusContent("Face data processing, please wait"); |
| 269 | const dataReturn = await commonServices.postValueService( | 269 | const dataReturn = await commonServices.postValueService( |
| 270 | null, | 270 | null, |
| 271 | item, | 271 | item, |
| 272 | url | 272 | url |
| 273 | ); | 273 | ); |
| 274 | if (dataReturn.data.code > 0) { | 274 | if (dataReturn.data.code > 0) { |
| 275 | - _this.changeStatusContent("人脸数据处理成功"); | 275 | + _this.changeStatusContent("Facial data processing successful"); |
| 276 | _this.props.onSaveFaceSuccess && | 276 | _this.props.onSaveFaceSuccess && |
| 277 | _this.props.onSaveFaceSuccess(dataReturn); | 277 | _this.props.onSaveFaceSuccess(dataReturn); |
| 278 | } else { | 278 | } else { |
| 279 | _this.changeStatusContent( | 279 | _this.changeStatusContent( |
| 280 | - "人脸数据处理失败," + dataReturn.data.msg + "请重新采集" | 280 | + "Face data processing failed." + dataReturn.data.msg + "Please collect again" |
| 281 | ); | 281 | ); |
| 282 | } | 282 | } |
| 283 | _this.changeCurrentPercent(100); | 283 | _this.changeCurrentPercent(100); |
| @@ -299,8 +299,8 @@ class FaceDetect extends Component { | @@ -299,8 +299,8 @@ class FaceDetect extends Component { | ||
| 299 | const _this = this; | 299 | const _this = this; |
| 300 | const userinfo = this.props.app.userinfo; | 300 | const userinfo = this.props.app.userinfo; |
| 301 | if (undefined === userinfo.sEmployeeId || userinfo.sEmployeeId === "") { | 301 | if (undefined === userinfo.sEmployeeId || userinfo.sEmployeeId === "") { |
| 302 | - _this.changeStatusContent("您没有采集权限,请联系管理员,将您绑定成员工。"); | ||
| 303 | - message.error("您没有采集权限,请联系管理员,将您绑定成员工。"); | 302 | + _this.changeStatusContent("You do not have collection permissions, please contact the administrator to bind you as an employee."); |
| 303 | + message.error("You do not have collection permissions, please contact the administrator to bind you as an employee."); | ||
| 304 | return; | 304 | return; |
| 305 | } | 305 | } |
| 306 | _this.getMediaAddFace().then(async () => { | 306 | _this.getMediaAddFace().then(async () => { |
| @@ -366,7 +366,7 @@ class FaceDetect extends Component { | @@ -366,7 +366,7 @@ class FaceDetect extends Component { | ||
| 366 | ); | 366 | ); |
| 367 | if (dataReturn.data.code === 1) { | 367 | if (dataReturn.data.code === 1) { |
| 368 | _this.setState({ thumbImg: _this.getFace() }); | 368 | _this.setState({ thumbImg: _this.getFace() }); |
| 369 | - _this.changeStatusContent("人脸验证成功"); | 369 | + _this.changeStatusContent("Face verification successful"); |
| 370 | _this.stopMedia(); | 370 | _this.stopMedia(); |
| 371 | _this.props.onDetectSuccess && | 371 | _this.props.onDetectSuccess && |
| 372 | _this.props.onDetectSuccess(dataReturn.data); | 372 | _this.props.onDetectSuccess(dataReturn.data); |
| @@ -422,7 +422,7 @@ class FaceDetect extends Component { | @@ -422,7 +422,7 @@ class FaceDetect extends Component { | ||
| 422 | return; | 422 | return; |
| 423 | } else { | 423 | } else { |
| 424 | _this.changePercentStatus("exception"); | 424 | _this.changePercentStatus("exception"); |
| 425 | - _this.changeStatusContent("未匹配到用户"); | 425 | + _this.changeStatusContent("No user matched"); |
| 426 | } | 426 | } |
| 427 | }); | 427 | }); |
| 428 | }; | 428 | }; |
| @@ -437,7 +437,7 @@ class FaceDetect extends Component { | @@ -437,7 +437,7 @@ class FaceDetect extends Component { | ||
| 437 | const url = `/face/delete/`; | 437 | const url = `/face/delete/`; |
| 438 | const dataReturn = await commonServices.postValueService(null, item, url); | 438 | const dataReturn = await commonServices.postValueService(null, item, url); |
| 439 | if (dataReturn.data.error_msg === "SUCCESS") { | 439 | if (dataReturn.data.error_msg === "SUCCESS") { |
| 440 | - message.success("删除成功"); | 440 | + message.success("Delete successfully"); |
| 441 | console.log("dataReturn", dataReturn); | 441 | console.log("dataReturn", dataReturn); |
| 442 | return; | 442 | return; |
| 443 | } | 443 | } |
| @@ -451,7 +451,7 @@ class FaceDetect extends Component { | @@ -451,7 +451,7 @@ class FaceDetect extends Component { | ||
| 451 | const url = `/face/list/`; | 451 | const url = `/face/list/`; |
| 452 | const dataReturn = await commonServices.postValueService(null, item, url); | 452 | const dataReturn = await commonServices.postValueService(null, item, url); |
| 453 | if (dataReturn.data.error_msg === "SUCCESS") { | 453 | if (dataReturn.data.error_msg === "SUCCESS") { |
| 454 | - message.success("删除成功"); | 454 | + message.success("Delete successfully"); |
| 455 | console.log("dataReturn", dataReturn); | 455 | console.log("dataReturn", dataReturn); |
| 456 | return; | 456 | return; |
| 457 | } | 457 | } |
| @@ -508,7 +508,7 @@ class FaceDetect extends Component { | @@ -508,7 +508,7 @@ class FaceDetect extends Component { | ||
| 508 | <span className="action-item-icon"> | 508 | <span className="action-item-icon"> |
| 509 | <VideoCameraOutlined /> | 509 | <VideoCameraOutlined /> |
| 510 | </span> | 510 | </span> |
| 511 | - <span>人脸采集</span> | 511 | + <span>Face collection</span> |
| 512 | </div> | 512 | </div> |
| 513 | </div> | 513 | </div> |
| 514 | </div> | 514 | </div> |