Commit 1629d521 authored by zhengke's avatar zhengke

修复正则问题

parent e01951fd
......@@ -795,15 +795,15 @@ export default {
})
var wechat=[];
var zhifu=[];
wechat = OcrStr.match(/(\?<=商户单号)(\d*)/);
zhifu = OcrStr.match(/(\?<=商家可扫码退款或查询交易)(\d*)/);
wechat = OcrStr.match(/商户单号.\d+/);
zhifu = OcrStr.match(/商家可扫码退款或查询交易.\d+/);
if(wechat==null&&zhifu==null){
return;
}
if(zhifu==null&&wechat.length>0){
this.setCode = wechat[wechat.length-1]
this.setCode = wechat[wechat.length-1].replace('商户单号','');
}else if(wechat==null&&zhifu.length>0){
this.setCode = zhifu[zhifu.length-1]
this.setCode = zhifu[zhifu.length-1].replace('商家可扫码退款或查询交易','');
}
this.$confirm('匹配到交易流水号是否替换?', '提示', {
confirmButtonText: '确定',
......
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