|
@@ -35,8 +35,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getCodeImg } from "@/api/login";
|
|
|
|
-import { getCert } from "@/api/cert"
|
|
|
|
|
|
+import { getCodeImg,checkCode } from "@/api/login";
|
|
|
|
+import { getCert } from "@/api/system/contract";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -59,19 +59,46 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleSearch(){
|
|
|
|
|
|
+ async handleSearch(){
|
|
|
|
+ if( this.isBlock(this.userName)){
|
|
|
|
+ this.$message.error("请输入持证人姓名或单位名称!")
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if( this.isBlock(this.certNumber)){
|
|
|
|
+ this.$message.error("请输入证书编码!")
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if( this.isBlock(this.code)){
|
|
|
|
+ this.$message.error("请输入验证码!")
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const form = {
|
|
const form = {
|
|
- userName: this.userName,
|
|
|
|
- certNumber: this.certNumber,
|
|
|
|
- code: this.code,
|
|
|
|
- uuid: this.uuid
|
|
|
|
|
|
+ userName: this.userName,
|
|
|
|
+ certNumber: this.certNumber,
|
|
|
|
+ }
|
|
|
|
+ const codeForm = {
|
|
|
|
+ code: this.code,
|
|
|
|
+ uuid: this.uuid
|
|
}
|
|
}
|
|
- console.log(form)
|
|
|
|
|
|
+ let codeRes = await checkCode(codeForm)
|
|
|
|
+ if(codeRes.code===200 && codeRes.msg==="success"){
|
|
|
|
+ getCert(form).then(res=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ // console.log(codeRes)
|
|
|
|
+ },
|
|
|
|
+ isBlock(str){
|
|
|
|
+ if(str===""){
|
|
|
|
+ return true
|
|
|
|
+ }else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.getCode()
|
|
this.getCode()
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|