Skip to content

Commit

Permalink
V1.6版本
Browse files Browse the repository at this point in the history
  • Loading branch information
szvone committed Apr 25, 2019
1 parent 802e6c3 commit 15eff62
Show file tree
Hide file tree
Showing 6 changed files with 2,557 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ V免签为完全开源项目,开源项目意味着作者没有任何收入来
+ 微信店员收款推送通知

## 更新记录
+ v1.6(2019.04.25)
+ 优化二维码识别,使用js解析二维码,解决部分二维码识别返回false问题

+ v1.5(2019.04.24)
+ 同步最新版APP
+ 添加注意事项说明,完善README.md文档
Expand Down
14 changes: 12 additions & 2 deletions public/aaa.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,19 @@
});
</script>
<script src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/wangeditor@3.1.1/release/wangEditor.min.js"></script>
<script src="js/llqrcode.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

function getObjectURL(file) {
var url = null;
if (window.createObjectURL != undefined) {
url = window.createObjectURL(file);
} else if (window.URL != undefined) {
url = window.URL.createObjectURL(file);
} else if (window.webkitURL != undefined) {
url = window.webkitURL.createObjectURL(file);
}
return url;
}

$("#LAY_preview").load("main.html")

Expand Down
24 changes: 17 additions & 7 deletions public/admin/addwxqrcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,26 @@

//读取本地文件
obj.preview(function(index, file, result){
$.post("qr-code/test.php","base64="+encodeURIComponent(result.split(",")[1]),function (data) {
console.log(data)
if (!data.data) {
data = JSON.parse(data);
}
imgs.push({"index":imgs.length,"money":"","b64":result,"url":data.data});
// $.post("qr-code/test.php","base64="+encodeURIComponent(result.split(",")[1]),function (data) {
// console.log(data)
// if (!data.data) {
// data = JSON.parse(data);
// }
// imgs.push({"index":imgs.length,"money":"","b64":result,"url":data.data});
// mytable.reload({
// data: imgs
// });
// });
//console.log(index)

qrcode.decode(getObjectURL(file),result);
qrcode.callback = function(imgMsg,img64) {

imgs.push({"index":imgs.length,"money":"","b64":img64,"url":imgMsg});
mytable.reload({
data: imgs
});
});
}

});
}
Expand Down
10 changes: 10 additions & 0 deletions public/admin/addzfbqrcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
layer.msg("等待所有二维码识别完毕后手动输入金额,输入完成后点击保存二维码")
//读取本地文件
obj.preview(function(index, file, result){
/*
$.post("qr-code/test.php","base64="+encodeURIComponent(result.split(",")[1]),function (data) {
console.log(data)
if (!data.data) {
Expand All @@ -81,6 +82,15 @@
data: imgs
});
});
*/
qrcode.decode(getObjectURL(file),result);
qrcode.callback = function(imgMsg,img64) {

imgs.push({"index":imgs.length,"money":"","b64":img64,"url":imgMsg});
mytable.reload({
data: imgs
});
}

});
}
Expand Down
24 changes: 24 additions & 0 deletions public/admin/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@
var uploadInst = upload.render({
elem: '#wxup'
, url: 'qr-code/test.php'
,auto: false
,choose: function(obj){
console.log(obj)
obj.preview(function(index, file, result){
qrcode.decode(getObjectURL(file));
qrcode.callback = function(imgMsg) {
console.log(imgMsg)
$('#wximg').attr('src', "enQrcode?url="+imgMsg);
}
});

}
, before: function (obj) {
layer.msg('处理中', {
icon: 16
Expand Down Expand Up @@ -147,6 +159,18 @@
var uploadInst2 = upload.render({
elem: '#zfbup'
, url: 'qr-code/test.php'
,auto: false
,choose: function(obj){
console.log(obj)
obj.preview(function(index, file, result){
qrcode.decode(getObjectURL(file));
qrcode.callback = function(imgMsg) {
console.log(imgMsg)
$('#zfbimg').attr('src', "enQrcode?url="+imgMsg);
}
});

}
, before: function (obj) {
layer.msg('处理中', {
icon: 16
Expand Down
Loading

0 comments on commit 15eff62

Please sign in to comment.