管理控制台功能更新

This commit is contained in:
技术老胡 2024-09-07 17:48:35 +08:00
parent 5ad72a36b2
commit 984601841f
3 changed files with 152 additions and 25 deletions

View File

@ -37,7 +37,7 @@ class ConsoleController extends BaseController
// 时间段
$month_start = date('Y-m-01 00:00:00');
$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);
$yesterday_start = date('Y-m-d 00:00:00', strtotime('yesterday'));
$yesterday_end = date('Y-m-d 23:59:59', strtotime('yesterday'));

File diff suppressed because one or more lines are too long

View File

@ -194,41 +194,28 @@
}
queryOrder(`/getOrderState/${order}`);
})();
// <?php if ($patt == 0 && $passtime > 0) { ?>
/* <?php if ($patt == 0 && $passtime > 0) { ?> */
// 验证支付结果
const id = '<?php echo htmlentities($id);?>';
const reVali = () => {
const reVali = (step) => {
setTimeout(() => {
layer.confirm('是否已支付?', { icon: 3, title: '提示' },
layer.confirm('是否已支付?', { icon: 3, title: '提示', closeBtn: 0 },
(index) => {
(async () => {
const res = await validatePayResult(id, 1);
if (res) { reVali() }
if (res) { reVali(8000) }
})()
layer.close(index);
}, (index) => {
reVali();
reVali(5000);
layer.close(index);
})
}, 5000);
}, step);
}
setTimeout(() => {
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);
reVali(10000);
// 验证支付结果
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 };
const res1 = await fetch(`/validatePayResult`, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) });
const rec1_info = await res1.json();
@ -251,7 +238,7 @@
})
return info;
}
// <?php } ?>
/* <?php } ?> */
// 生成二维码
async function getQrcode(text, QR) {
const qrcodeUrl = await new Promise((resolve) => {