diff --git a/app/controller/ConsoleController.php b/app/controller/ConsoleController.php index 3adf01f..63ccc51 100644 --- a/app/controller/ConsoleController.php +++ b/app/controller/ConsoleController.php @@ -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')); diff --git a/view/console/console.html b/view/console/console.html index 27121c3..616770d 100644 --- a/view/console/console.html +++ b/view/console/console.html @@ -24,6 +24,76 @@ .index-card>div { text-align: center; } + .order-tite { + display: flex; + justify-content: space-between; + align-items: center; + } + .order-total { + margin: 18px; + } + + .order-total>div:first-child { + text-align: center; + } + + .order-total>div:first-child>p:first-child { + font-size: 2em; + font-weight: 700; + color: #566a7f; + } + + .order-total>div:first-child>p:last-child { + color: #686f77; + } + + .order-channel { + display: flex; + justify-content: space-between; + align-items: center; + } + .order-channel>div:nth-child(2) { + width: 80px; + text-align: right; + } + .order-channel>div:nth-child(3) { + width: 100px; + text-align: right; + } + + .info-channel { + display: flex; + align-items: center; + justify-content: flex-start; + padding: 8px 0; + } + + .info-channel>div:first-child { + height: 2.5em; + width: 2.5em; + border-radius: 5px; + display: flex; + align-items: center; + justify-content: center; + } + + .info-channel>div:first-child>svg { + width: 1.2em; + } + + .info-channel>div:last-child { + margin-left: 12px; + line-height: 1.2em; + } + + .info-channel>div:last-child>p:first-child { + color: #566a7f; + font-weight: 700; + } + + .info-channel>div:last-child>p:last-child { + color: #a1acb8; + } @@ -116,9 +186,79 @@
-
订单统计
+
订单统计
- 订单内容 +
+
+

1433

+

总订单

+
+
+
+
+
+
+ +
+
+

微信

+

全渠道统计

+
+
+
99
+
120
+
+
+
+
+ +
+
+

支付宝

+

全渠道统计

+
+
+
50
+
490
+
+
+
+
+ + + + +
+
+

云闪付

+

全渠道统计

+
+
+
31
+
68
+
+
diff --git a/view/pay/console.html b/view/pay/console.html index 55d924f..0552c9a 100644 --- a/view/pay/console.html +++ b/view/pay/console.html @@ -194,41 +194,28 @@ } queryOrder(`/getOrderState/${order}`); })(); - // 0) { ?> + /* 0) { ?> */ // 验证支付结果 const 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; } - // + /* */ // 生成二维码 async function getQrcode(text, QR) { const qrcodeUrl = await new Promise((resolve) => {