mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-17 17:26:40 +08:00
管理控制台功能更新
This commit is contained in:
parent
5ad72a36b2
commit
984601841f
@ -37,7 +37,7 @@ class ConsoleController extends BaseController
|
|||||||
// 时间段
|
// 时间段
|
||||||
$month_start = date('Y-m-01 00:00:00');
|
$month_start = date('Y-m-01 00:00:00');
|
||||||
$month_end = date('Y-m-d 23:59:59', strtotime('last day of this month'));
|
$month_end = date('Y-m-d 23:59:59', strtotime('last day of this month'));
|
||||||
$week_start = date('Y-m-d 00:00:00', strtotime('this monday'));
|
$week_start = date('Y-m-d 00:00:00', strtotime('monday this week'));
|
||||||
$week_end = date('Y-m-d 23:59:59', strtotime('next monday') - 1);
|
$week_end = date('Y-m-d 23:59:59', strtotime('next monday') - 1);
|
||||||
$yesterday_start = date('Y-m-d 00:00:00', strtotime('yesterday'));
|
$yesterday_start = date('Y-m-d 00:00:00', strtotime('yesterday'));
|
||||||
$yesterday_end = date('Y-m-d 23:59:59', strtotime('yesterday'));
|
$yesterday_end = date('Y-m-d 23:59:59', strtotime('yesterday'));
|
||||||
|
File diff suppressed because one or more lines are too long
@ -194,41 +194,28 @@
|
|||||||
}
|
}
|
||||||
queryOrder(`/getOrderState/${order}`);
|
queryOrder(`/getOrderState/${order}`);
|
||||||
})();
|
})();
|
||||||
// <?php if ($patt == 0 && $passtime > 0) { ?>
|
/* <?php if ($patt == 0 && $passtime > 0) { ?> */
|
||||||
// 验证支付结果
|
// 验证支付结果
|
||||||
const id = '<?php echo htmlentities($id);?>';
|
const id = '<?php echo htmlentities($id);?>';
|
||||||
const reVali = () => {
|
const reVali = (step) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
layer.confirm('是否已支付?', { icon: 3, title: '提示' },
|
layer.confirm('是否已支付?', { icon: 3, title: '提示', closeBtn: 0 },
|
||||||
(index) => {
|
(index) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
const res = await validatePayResult(id, 1);
|
const res = await validatePayResult(id, 1);
|
||||||
if (res) { reVali() }
|
if (res) { reVali(8000) }
|
||||||
})()
|
})()
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
}, (index) => {
|
}, (index) => {
|
||||||
reVali();
|
reVali(5000);
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
})
|
})
|
||||||
}, 5000);
|
}, step);
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
reVali(10000);
|
||||||
layer.confirm('是否已支付?', { icon: 3, title: '提示' },
|
|
||||||
(index) => {
|
|
||||||
(async () => {
|
|
||||||
const res = await validatePayResult(id, 1);
|
|
||||||
if (res) { reVali() }
|
|
||||||
})()
|
|
||||||
layer.close(index);
|
|
||||||
},
|
|
||||||
(index) => {
|
|
||||||
reVali();
|
|
||||||
layer.close(index);
|
|
||||||
})
|
|
||||||
}, 10000);
|
|
||||||
// 验证支付结果
|
// 验证支付结果
|
||||||
async function validatePayResult(id, patt) {
|
async function validatePayResult(id, patt) {
|
||||||
const lay = layer.load(1, { shade: [0.1, '#393D49'] });
|
const lay = layer.load(2);
|
||||||
let data = { id: id, patt: patt };
|
let data = { id: id, patt: patt };
|
||||||
const res1 = await fetch(`/validatePayResult`, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) });
|
const res1 = await fetch(`/validatePayResult`, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) });
|
||||||
const rec1_info = await res1.json();
|
const rec1_info = await res1.json();
|
||||||
@ -251,7 +238,7 @@
|
|||||||
})
|
})
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
// <?php } ?>
|
/* <?php } ?> */
|
||||||
// 生成二维码
|
// 生成二维码
|
||||||
async function getQrcode(text, QR) {
|
async function getQrcode(text, QR) {
|
||||||
const qrcodeUrl = await new Promise((resolve) => {
|
const qrcodeUrl = await new Promise((resolve) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user