mirror of
https://github.com/yunluo/gdk.git
synced 2024-06-19 22:15:11 +02:00
增加生成二维码功能
支付功能增加浏览器日志 替换意见反馈页面
This commit is contained in:
parent
4d65314d59
commit
3168271cfe
|
@ -1,5 +1,8 @@
|
||||||
jQuery(function ($) { /**声明加载jQuery */
|
jQuery(function ($) { /**声明加载jQuery */
|
||||||
|
|
||||||
|
function glog(a){
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 展示被隐藏的内容,适用于密码可见,付费可见,积分可见
|
* 展示被隐藏的内容,适用于密码可见,付费可见,积分可见
|
||||||
* @param {string} a 内容div的 id或者class
|
* @param {string} a 内容div的 id或者class
|
||||||
|
@ -74,6 +77,7 @@ jQuery(function ($) { /**声明加载jQuery */
|
||||||
c = $.trim(c); /**Ajax返回有空行,这里处理一下.妈的花了老子3个小时 */
|
c = $.trim(c); /**Ajax返回有空行,这里处理一下.妈的花了老子3个小时 */
|
||||||
if (c !== '400') {
|
if (c !== '400') {
|
||||||
show_hide_content('.pass_viewbox', c);
|
show_hide_content('.pass_viewbox', c);
|
||||||
|
glog('加密内容已展示');
|
||||||
localStorage.setItem('gdk_pass_' + ajax_data['id'], c); /**隐藏内容直接存入浏览器缓存,下次直接读取,ps.有个问题,内容更新会略坑,不管了 */
|
localStorage.setItem('gdk_pass_' + ajax_data['id'], c); /**隐藏内容直接存入浏览器缓存,下次直接读取,ps.有个问题,内容更新会略坑,不管了 */
|
||||||
} else {
|
} else {
|
||||||
swal("查看失败", "您的密码错误,请重试", "error");
|
swal("查看失败", "您的密码错误,请重试", "error");
|
||||||
|
@ -199,6 +203,7 @@ jQuery(function ($) { /**声明加载jQuery */
|
||||||
check_pay_points(c, f[1]); /**用户id,订单号,积分充值检测 */
|
check_pay_points(c, f[1]); /**用户id,订单号,积分充值检测 */
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
glog('二维码内容为:' + f[3]);
|
||||||
new QRious({
|
new QRious({
|
||||||
element: document.getElementById("pqrious"),
|
element: document.getElementById("pqrious"),
|
||||||
size: 300,
|
size: 300,
|
||||||
|
@ -291,6 +296,7 @@ jQuery(function ($) { /**声明加载jQuery */
|
||||||
closeOnClickOutside: false,
|
closeOnClickOutside: false,
|
||||||
content: "input",
|
content: "input",
|
||||||
}).then((d) => { /**提取码 */
|
}).then((d) => { /**提取码 */
|
||||||
|
glog('提取码为:' + d );
|
||||||
get_content(a);
|
get_content(a);
|
||||||
add_code(a, `${d}`);
|
add_code(a, `${d}`);
|
||||||
}); //ok
|
}); //ok
|
||||||
|
|
3311
class/qrcode.class.php
Normal file
3311
class/qrcode.class.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -401,7 +401,7 @@ $(".feedback-btn").click(function() {
|
||||||
function() {
|
function() {
|
||||||
$(".feedback-load").hide();
|
$(".feedback-load").hide();
|
||||||
$.fancybox.open({
|
$.fancybox.open({
|
||||||
src: 'https://wj.qq.com/s2/5705098/515f/',
|
src: 'https://support.qq.com/products/51158/',
|
||||||
type: 'iframe',
|
type: 'iframe',
|
||||||
opts: {
|
opts: {
|
||||||
afterShow: function(instance, current) {
|
afterShow: function(instance, current) {
|
||||||
|
|
|
@ -1280,3 +1280,20 @@ function base64img($image_file)
|
||||||
$base64_image = 'data:' . $image_info['mime'] . ';base64,' . base64_encode($image_data);
|
$base64_image = 'data:' . $image_info['mime'] . ';base64,' . base64_encode($image_data);
|
||||||
return $base64_image;
|
return $base64_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//生成二维码
|
||||||
|
function getQrcode($url)
|
||||||
|
{
|
||||||
|
//引入phpqrcode类库
|
||||||
|
require_once GDK_ROOT_PATH . '/class/qrcode.class.php';
|
||||||
|
$errorCorrectionLevel = 'L'; //容错级别
|
||||||
|
$matrixPointSize = 6; //生成图片大小
|
||||||
|
ob_start();
|
||||||
|
QRcode::png($url, false, $errorCorrectionLevel, $matrixPointSize, 2);
|
||||||
|
$data = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
$imageString = base64_encode($data);
|
||||||
|
header("content-type:application/json; charset=utf-8");
|
||||||
|
return 'data:image/jpeg;base64,' . $imageString;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue