liuhj 11 місяців тому
батько
коміт
e7e107c935
1 змінених файлів з 43 додано та 2 видалено
  1. 43 2
      src/components/OP/OCRIdentify.vue

+ 43 - 2
src/components/OP/OCRIdentify.vue

@@ -52,6 +52,7 @@
             <el-button type="primary" @click="deed(1)">房产证</el-button>
             <el-button type="primary" @click="Marriage(1)">结婚证</el-button>
             <el-button type="primary" @click="mainlandPassport(1)">大陆护照</el-button>
+            <el-button type="primary" @click="mainlandPassports(1)">护照</el-button>
             <el-button type="primary" @click="universal(1)">通用印刷体</el-button>
             <el-button type="primary" @click="license(2)">营业执照(英文)</el-button>
             <el-button type="primary" @click="creditCode(2)">统一信用代码(英文)</el-button>
@@ -59,12 +60,13 @@
             <el-button type="primary" @click="IDcardG(2)">身份证-国徽面(英文)</el-button>
             <el-button type="primary" @click="driving(2)">行驶证(英文)</el-button>
             <el-button type="primary" @click="household(2)">户口本(英文)</el-button>
-            <!-- <el-button type="primary">户口本-成员页</el-button> -->
-            <!-- <el-button type="primary">户口本-成员页(英文)</el-button> -->
             <el-button type="primary" @click="deed(2)">房产证(英文)</el-button>
             <el-button type="primary" @click="Marriage(2)">结婚证(英文)</el-button>
             <el-button type="primary" @click="mainlandPassport(2)">大陆护照(英文)</el-button>
+            <el-button type="primary" @click="mainlandPassports(2)">护照(英文)</el-button>
             <el-button type="primary" @click="universal(2)">通用印刷体(英文)</el-button>
+            <div style="width:160px"></div>
+            <div style="width:160px"></div>
         </el-row>
     </div>
 </template>
@@ -496,6 +498,45 @@ export default {
                 that.$message.error('请检查图片是否为此类型!');
             }
         },
+        //护照
+        mainlandPassports(val){
+            this.fullscreenLoading = true;
+            var url="/api/TencentOCR/GetMLIDPassport"
+            var that=this
+            if(that.panduan){
+                that.fullscreenLoading = true;
+                this.$axios({
+                    method: 'post',
+                    url:url,
+                    headers:{
+                        Authorization:'Bearer '+this.token
+                    },
+                    data:{
+                        language:val,
+                        picBase64:that.picBase64,
+                    }
+                }).then(function(res){
+                    if(res.data.code==200){       
+                        console.log(res)
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });     
+                        that.fullscreenLoading = false;      
+                        window.open(res.data.data.url)
+                    }else{
+                        that.fullscreenLoading = false;
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'warning'
+                        });       
+                    }
+                })
+            }else{
+                that.fullscreenLoading = false;
+                that.$message.error('请检查图片是否为此类型!');
+            }
+        },
         //通用印刷体
         universal(val){
             this.fullscreenLoading = true;