Commit df2a23fb authored by zhengke's avatar zhengke

修改

parent 8347a610
...@@ -79,7 +79,10 @@ ...@@ -79,7 +79,10 @@
import { import {
UploadSelfFile UploadSelfFile
} from '../api/common/common' } from '../api/common/common'
import { Encrypt,Decrypt} from '../utils/encrypt' import {
Encrypt,
Decrypt
} from '../utils/encrypt'
export default { export default {
...@@ -103,7 +106,7 @@ ...@@ -103,7 +106,7 @@
Id: 0, Id: 0,
sign: '' sign: ''
}, },
StudentName:'' StudentName: ''
}; };
}, },
mounted() { mounted() {
...@@ -117,7 +120,7 @@ ...@@ -117,7 +120,7 @@
let ContractId = Decrypt(decodeURIComponent(this.$route.query.a)); let ContractId = Decrypt(decodeURIComponent(this.$route.query.a));
this.msg.ContractId = ContractId; this.msg.ContractId = ContractId;
} }
if(this.$route.query.StudentName){ if (this.$route.query.StudentName) {
this.StudentName = this.$route.query.StudentName this.StudentName = this.$route.query.StudentName
} }
if (this.$route.query.Money) { if (this.$route.query.Money) {
...@@ -234,31 +237,8 @@ ...@@ -234,31 +237,8 @@
// _this.basedata = dataurl; // _this.basedata = dataurl;
_this.msg.Sign = canvas1.toDataURL(type); _this.msg.Sign = canvas1.toDataURL(type);
_this.BackMsg.sign = canvas1.toDataURL(type); _this.BackMsg.sign = canvas1.toDataURL(type);
_this.SaveMsg();
let newArr = [];
var fileName = `${_this.uuid(10,10)}.png`;
var path = `assets/sign/`;
let configObj= {
isTencentOcr:1
}
newArr.push(_this.dataURLtoFile(_this.msg.Sign, fileName));
UploadSelfFile(path, newArr[0], x => {
let Msg = JSON.parse(x.Message)
if(Msg&&Msg.TextDetections.length>0){
let StuName = Msg.TextDetections[0].DetectedText;
if(StuName==_this.StudentName){
_this.SaveMsg();
}else{
_this.$q.notify({
type: 'negative',
position: "top",
message: `当前签名与合同主体不匹配请重新签名!`
})
_this.clearcanvas();
return
}
}
}, configObj)
}; };
}; };
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment