mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-10-18 08:23:43 +08:00
首次提交
This commit is contained in:
524
view/console/console.html
Normal file
524
view/console/console.html
Normal file
@@ -0,0 +1,524 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>控制台</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="/admin/css/other/console1.css" />
|
||||
</head>
|
||||
|
||||
<body class="pear-container">
|
||||
<div>
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-xs6 layui-col-md3">
|
||||
<div class="layui-card top-panel">
|
||||
<div class="layui-card-header">今日访问</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space5">
|
||||
<div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;"
|
||||
id="value1">
|
||||
0
|
||||
</div>
|
||||
<div class="layui-col-xs4 layui-col-md4 top-panel-tips">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 1024 1024" width="200"
|
||||
height="200" t="1591462258798" p-id="942" version="1.1">
|
||||
<path fill="#fcc66f"
|
||||
d="M 262.7 835 c -15.3 0 -28.1 -11.4 -29.8 -26.6 L 174.1 291 c -0.6 -5.1 1 -10.2 4.5 -14 s 8.3 -6 13.4 -6 h 640 c 5.1 0 10 2.2 13.4 6 s 5 8.9 4.5 14 l -58.8 517.4 c -1.7 15.2 -14.5 26.6 -29.8 26.6 H 262.7 Z"
|
||||
p-id="943" />
|
||||
<path fill="#ffd79c"
|
||||
d="M 802 289 l -58.8 517.4 c -0.7 6.1 -5.8 10.6 -11.9 10.6 h 30 c 6.1 0 11.2 -4.6 11.9 -10.6 L 832 289 h -30 Z"
|
||||
p-id="944" />
|
||||
<path fill="#f56e73"
|
||||
d="M 164 307 c -16.5 0 -30 -13.5 -30 -30 v -58 c 0 -16.5 13.5 -30 30 -30 h 696 c 16.5 0 30 13.5 30 30 v 58 c 0 16.5 -13.5 30 -30 30 H 164 Z"
|
||||
p-id="945" />
|
||||
<path fill="#ffa1a8"
|
||||
d="M 860 207 h -30 c 6.6 0 12 5.4 12 12 v 58 c 0 6.6 -5.4 12 -12 12 h 30 c 6.6 0 12 -5.4 12 -12 v -58 c 0 -6.6 -5.4 -12 -12 -12 Z"
|
||||
p-id="946" />
|
||||
<path fill="#65c8ff"
|
||||
d="M 190.9 651.5 c -31.4 0 -56.9 -25.5 -56.9 -56.9 V 219 c 0 -16.5 13.5 -30 30 -30 h 466.2 c 9.9 0 18 8.1 18 18 v 301.1 c 0 34.7 -28.2 62.9 -62.9 62.9 s -62.9 -28.2 -62.9 -62.9 V 393.5 c 0 -23.2 -18.8 -42 -42 -42 s -42 18.8 -42 42 v 68.1 c 0 29.4 -23.9 53.4 -53.4 53.4 s -53.4 -23.9 -53.4 -53.4 v -68.1 c 0 -23.2 -18.8 -42 -42 -42 s -42 18.8 -42 42 v 201.1 c 0.1 31.4 -25.4 56.9 -56.7 56.9 Z"
|
||||
p-id="947" />
|
||||
<path fill="#b3eaff"
|
||||
d="M 277.8 321.5 c -33.1 0 -60 26.9 -60 60 v 201.1 c 0 21.5 -17.4 38.9 -38.9 38.9 c -7.7 0 -14.8 -2.2 -20.8 -6.1 c 6.9 10.9 19 18.1 32.8 18.1 c 21.5 0 38.9 -17.4 38.9 -38.9 V 393.5 c 0 -33.1 26.9 -60 60 -60 c 13.5 0 25.9 4.5 36 12 c -11 -14.5 -28.4 -24 -48 -24 Z M 618.3 207 v 289.1 c 0 24.8 -20.1 44.9 -44.9 44.9 c -9.3 0 -18 -2.8 -25.2 -7.7 c 8.1 11.9 21.7 19.7 37.2 19.7 c 24.8 0 44.9 -20.1 44.9 -44.9 V 207 h -12 Z M 468.5 321.5 c -33.1 0 -60 26.9 -60 60 v 68.1 c 0 19.5 -15.8 35.4 -35.4 35.4 c -6.7 0 -12.9 -1.9 -18.3 -5.1 c 6.2 10.2 17.4 17.1 30.3 17.1 c 19.5 0 35.4 -15.8 35.4 -35.4 v -68.1 c 0 -33.1 26.9 -60 60 -60 c 13.5 0 25.9 4.5 36 12 c -11 -14.5 -28.4 -24 -48 -24 Z"
|
||||
p-id="948" />
|
||||
<path fill="#453b56"
|
||||
d="M 698 729.4 m -18 0 a 18 18 0 1 0 36 0 a 18 18 0 1 0 -36 0 Z" p-id="949" />
|
||||
<path fill="#453b56"
|
||||
d="M 860 171 H 632.5 v 0.1 c -0.7 0 -1.5 -0.1 -2.2 -0.1 H 164 c -26.5 0 -48 21.5 -48 48 v 375.6 c 0 41.3 33.6 74.9 74.9 74.9 c 2.7 0 5.4 -0.2 8.1 -0.5 l 16 141.4 c 2.8 24.3 23.3 42.6 47.7 42.6 h 498.6 c 24.4 0 44.9 -18.3 47.7 -42.6 l 55.2 -485.6 c 24.5 -2.1 43.8 -22.7 43.8 -47.8 v -58 c 0 -26.5 -21.5 -48 -48 -48 Z M 190.9 633.5 c -21.5 0 -38.9 -17.4 -38.9 -38.9 V 219 c 0 -6.6 5.4 -12 12 -12 h 466.3 v 301.1 c 0 24.8 -20.1 44.9 -44.9 44.9 c -24.8 0 -44.9 -20.1 -44.9 -44.9 V 393.5 c 0 -33.1 -26.9 -60 -60 -60 s -60 26.9 -60 60 v 68.1 c 0 19.5 -15.8 35.4 -35.4 35.4 c -19.5 0 -35.4 -15.8 -35.4 -35.4 v -68.1 c 0 -33.1 -26.9 -60 -60 -60 s -60 26.9 -60 60 v 201.1 c 0.1 21.5 -17.4 38.9 -38.8 38.9 Z m 582.3 172.9 c -0.7 6.1 -5.8 10.6 -11.9 10.6 H 262.7 c -6.1 0 -11.2 -4.6 -11.9 -10.6 l -6.7 -59 h 396.6 c 9.9 0 18 -8.1 18 -18 s -8.1 -18 -18 -18 H 240 l -6.3 -55.4 c 19.3 -13.6 32.1 -36 32.1 -61.3 V 393.5 c 0 -13.2 10.8 -24 24 -24 s 24 10.8 24 24 v 68.1 c 0 39.4 32 71.4 71.4 71.4 s 71.4 -32 71.4 -71.4 v -68.1 c 0 -13.2 10.8 -24 24 -24 s 24 10.8 24 24 v 114.6 c 0 44.6 36.3 80.9 80.9 80.9 c 44.6 0 80.9 -36.3 80.9 -80.9 V 325 h 161.7 l -54.9 481.4 Z M 872 277 c 0 6.6 -5.4 12 -12 12 H 666.3 v -82 H 860 c 6.6 0 12 5.4 12 12 v 58 Z"
|
||||
p-id="950" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs6 layui-col-md3">
|
||||
<div class="layui-card top-panel">
|
||||
<div class="layui-card-header">提交次数</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space5">
|
||||
<div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;"
|
||||
id="value2">
|
||||
0
|
||||
</div>
|
||||
<div class="layui-col-xs4 layui-col-md4 top-panel-tips">
|
||||
<svg t="1591462430908" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3170" width="200" height="200">
|
||||
<path
|
||||
d="M532 784.2c0 24.4-19.8 44.3-44.3 44.3s-44.3-19.8-44.3-44.3c0-24.4 44.3-80.3 44.3-80.3s44.3 55.8 44.3 80.3zM766 784.2c0 24.4 19.8 44.3 44.3 44.3 24.4 0 44.3-19.8 44.3-44.3 0-24.4-44.3-80.3-44.3-80.3S766 759.7 766 784.2z"
|
||||
fill="#97DCFF" p-id="3171"></path>
|
||||
<path
|
||||
d="M123.5 471.3c-9.9 0-18-8.1-18-18v-302c0-9.9 8.1-18 18-18h58c9.9 0 18 8.1 18 18v302c0 9.9-8.1 18-18 18h-58z"
|
||||
fill="#FCC66F" p-id="3172"></path>
|
||||
<path
|
||||
d="M181.5 151.3v302h-58v-302h58m0-36h-58c-19.9 0-36 16.1-36 36v302c0 19.9 16.1 36 36 36h58c19.9 0 36-16.1 36-36v-302c0-19.8-16.1-36-36-36z"
|
||||
fill="#453B56" p-id="3173"></path>
|
||||
<path d="M266.4 210.7m-18 0a18 18 0 1 0 36 0 18 18 0 1 0-36 0Z" fill="#453B56"
|
||||
p-id="3174"></path>
|
||||
<path
|
||||
d="M430.8 641.1c-9.9 0-18-8.1-18-18v-21.6c0-130.3 106-236.3 236.3-236.3s236.3 106 236.3 236.3v21.6c0 9.9-8.1 18-18 18H430.8z"
|
||||
fill="#FCC66F" p-id="3175"></path>
|
||||
<path
|
||||
d="M649 383.2c-5 0-10 0.2-15 0.6 113.5 7.7 203.3 102.2 203.3 217.7v21.6h30v-21.6c0-120.6-97.7-218.3-218.3-218.3z"
|
||||
fill="#FFD79C" p-id="3176"></path>
|
||||
<path
|
||||
d="M419.6 694.4c-22.1 0-40.1-18-40.1-40.1s18-40.1 40.1-40.1h458.8c22.1 0 40.1 18 40.1 40.1s-18 40.1-40.1 40.1H419.6z"
|
||||
fill="#F56E73" p-id="3177"></path>
|
||||
<path
|
||||
d="M878.4 632.3h-30c12.2 0 22.1 9.9 22.1 22.1s-9.9 22.1-22.1 22.1h30c12.2 0 22.1-9.9 22.1-22.1s-9.9-22.1-22.1-22.1z"
|
||||
fill="#FFA1A8" p-id="3178"></path>
|
||||
<path
|
||||
d="M693.3 846.4c0 24.4-19.8 44.3-44.3 44.3-24.4 0-44.3-19.8-44.3-44.3s44.3-80.3 44.3-80.3 44.3 55.9 44.3 80.3z"
|
||||
fill="#97DCFF" p-id="3179"></path>
|
||||
<path
|
||||
d="M649 908.7c-34.3 0-62.3-27.9-62.3-62.3 0-28.5 36.9-77.2 48.1-91.4 3.4-4.3 8.6-6.8 14.1-6.8s10.7 2.5 14.1 6.8c11.3 14.2 48.1 62.9 48.1 91.4 0.2 34.3-27.8 62.3-62.1 62.3z m0-112.3c-14.1 20.4-26.3 41.9-26.3 50 0 14.5 11.8 26.3 26.3 26.3s26.3-11.8 26.3-26.3c0-8.1-12.1-29.6-26.3-50z"
|
||||
fill="#453B56" p-id="3180"></path>
|
||||
<path
|
||||
d="M903.3 601.9v-0.5c0-134.1-104.4-244.3-236.3-253.6v-30.7c0-68.7-55.9-124.6-124.6-124.6H326.5c-9.9 0-18 8.1-18 18s8.1 18 18 18h215.9c48.8 0 88.6 39.7 88.6 88.6v30.7c-131.8 9.3-236.3 119.4-236.3 253.6v0.5c-19.6 9.3-33.2 29.3-33.2 52.4 0 32 26 58.1 58.1 58.1H459c-14.8 21-33.5 51.5-33.5 71.8 0 34.3 27.9 62.3 62.3 62.3 34.3 0 62.2-27.9 62.2-62.3 0-20.3-18.6-50.7-33.5-71.8h264.9c-14.8 21-33.5 51.5-33.5 71.8 0 34.3 27.9 62.3 62.3 62.3 34.3 0 62.3-27.9 62.3-62.3 0-20.3-18.6-50.7-33.5-71.8h39.4c32 0 58.1-26 58.1-58.1 0-23.1-13.6-43-33.2-52.4zM487.8 810.4c-14.5 0-26.3-11.8-26.3-26.3 0-8.1 12.1-29.6 26.3-50 14.1 20.4 26.2 41.9 26.2 50 0 14.5-11.8 26.3-26.2 26.3z m322.5 0c-14.5 0-26.3-11.8-26.3-26.3 0-8.1 12.1-29.6 26.3-50 14.1 20.4 26.3 41.9 26.3 50-0.1 14.5-11.9 26.3-26.3 26.3zM649 383.2c118.8 0 215.4 94.9 218.1 213.1H430.9c2.8-118.1 99.3-213.1 218.1-213.1z m251.5 271.1c0 12.2-9.9 22.1-22.1 22.1H419.6c-12.2 0-22.1-9.9-22.1-22.1 0-12.2 9.9-22.1 22.1-22.1h458.8c12.2 0.1 22.1 10 22.1 22.1z"
|
||||
fill="#453B56" p-id="3181"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs6 layui-col-md3">
|
||||
<div class="layui-card top-panel">
|
||||
<div class="layui-card-header">下载数量</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space5">
|
||||
<div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;"
|
||||
id="value3">
|
||||
0
|
||||
</div>
|
||||
<div class="layui-col-xs4 layui-col-md4 top-panel-tips">
|
||||
<svg t="1591462464512" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3311" width="200" height="200">
|
||||
<path
|
||||
d="M750.4 216.5h-130v-15.3c0-32.9-26.8-59.7-59.7-59.7h-97.3c-32.9 0-59.7 26.8-59.7 59.7v15.3h-130c-30.7 0-55.6 25-55.6 55.6v72.4c0 9.9 8.1 18 18 18h31.5v478c0 23.2 18.8 42 42 42h405c23.2 0 42-18.8 42-42v-478H788c9.9 0 18-8.1 18-18v-72.4c0-30.6-25-55.6-55.6-55.6z"
|
||||
fill="#FCC66F" p-id="3312"></path>
|
||||
<path d="M708.5 344.5v496c0 13.3-10.7 24-24 24h30c13.3 0 24-10.7 24-24v-496h-30z"
|
||||
fill="#FFD79C" p-id="3313"></path>
|
||||
<path
|
||||
d="M309.5 882.5c-23.2 0-42-18.8-42-42V596c0-9.9 8.1-18 18-18h36.8c30.2 0 54.8 24.6 54.8 54.8v231.7c0 9.9-8.1 18-18 18h-49.6zM664.9 882.5c-9.9 0-18-8.1-18-18V632.8c0-30.2 24.6-54.8 54.8-54.8h36.8c9.9 0 18 8.1 18 18v244.5c0 23.2-18.8 42-42 42h-49.6z"
|
||||
fill="#F56E73" p-id="3314"></path>
|
||||
<path d="M708.5 596v244.5c0 13.3-10.7 24-24 24h30c13.3 0 24-10.7 24-24V596h-30z"
|
||||
fill="#FFA1A8" p-id="3315"></path>
|
||||
<path
|
||||
d="M475.2 882.5c-9.9 0-18-8.1-18-18V632.8c0-30.2 24.6-54.8 54.8-54.8 30.2 0 54.8 24.6 54.8 54.8v231.7c0 9.9-8.1 18-18 18h-73.6z"
|
||||
fill="#F56E73" p-id="3316"></path>
|
||||
<path
|
||||
d="M560.7 159.5h-18c23 0 41.7 18.7 41.7 41.7V221h18v-19.8c-0.1-23-18.7-41.7-41.7-41.7zM750.4 234.5h-30c20.8 0 37.6 16.8 37.6 37.6v72.4h30v-72.4c0-20.8-16.8-37.6-37.6-37.6z"
|
||||
fill="#FFD79C" p-id="3317"></path>
|
||||
<path
|
||||
d="M750.4 198.5H638.2c-1.4-41.6-35.6-75-77.5-75h-97.3c-41.9 0-76.1 33.4-77.5 75H273.6c-40.6 0-73.6 33-73.6 73.6v72.4c0 19.9 16.1 36 36 36h13.5v460c0 33.1 26.9 60 60 60H714.7c33.1 0 60-26.9 60-60v-460H788c19.9 0 36-16.1 36-36v-72.4c0-40.6-33-73.6-73.6-73.6z m-287.1-39h97.3c22.1 0 40.2 17.2 41.5 39H421.8c1.4-21.8 19.4-39 41.5-39z m-104.2 705h-49.6c-13.3 0-24-10.7-24-24V596h36.8c20.3 0 36.8 16.5 36.8 36.8v231.7z m189.7 0h-73.6V632.8c0-20.3 16.5-36.8 36.8-36.8 20.3 0 36.8 16.5 36.8 36.8v231.7z m189.7-24c0 13.3-10.7 24-24 24h-49.6V632.8c0-20.3 16.5-36.8 36.8-36.8h36.8v244.5z m0-280.5h-36.8c-40.1 0-72.8 32.6-72.8 72.8v231.7h-44.2V632.8c0-40.1-32.6-72.8-72.8-72.8-40.1 0-72.8 32.6-72.8 72.8v231.7h-44.2V632.8c0-40.1-32.6-72.8-72.8-72.8h-36.8v-74.5h279c9.9 0 18-8.1 18-18s-8.1-18-18-18h-279v-69h453V560zM788 344.5H236v-72.4c0-20.8 16.8-37.6 37.6-37.6h476.8c20.8 0 37.6 16.8 37.6 37.6v72.4z"
|
||||
fill="#453B56" p-id="3318"></path>
|
||||
<path d="M621.8 467.5m-18 0a18 18 0 1 0 36 0 18 18 0 1 0-36 0Z" fill="#453B56"
|
||||
p-id="3319"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs6 layui-col-md3">
|
||||
<div class="layui-card top-panel">
|
||||
<div class="layui-card-header">流量统计</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space5">
|
||||
<div class="layui-col-xs8 layui-col-md8 top-panel-number" style="color: #28333E;"
|
||||
id="value4">
|
||||
0
|
||||
</div>
|
||||
<div class="layui-col-xs4 layui-col-md4 top-panel-tips">
|
||||
<svg t="1591462491887" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3449" width="200" height="200">
|
||||
<path
|
||||
d="M363.2 807c-9.9 0-18-8.1-18-18v-75.5c0-9.9 8.1-18 18-18h108.5c9.9 0 18 8.1 18 18V789c0 9.9-8.1 18-18 18H363.2z"
|
||||
fill="#F56E73" p-id="3450"></path>
|
||||
<path d="M441.7 713.5h30V789h-30z" fill="#FFA1A8" p-id="3451"></path>
|
||||
<path
|
||||
d="M259.6 398c-9.9 0-18-8.1-18-18V178.6c0-23.8 19.3-43.1 43.1-43.1s43.1 19.3 43.1 43.1V380c0 9.9-8.1 18-18 18h-50.2zM525.1 398c-9.9 0-18-8.1-18-18V178.6c0-23.8 19.3-43.1 43.1-43.1s43.1 19.3 43.1 43.1V380c0 9.9-8.1 18-18 18h-50.2z"
|
||||
fill="#65C8FF" p-id="3452"></path>
|
||||
<path
|
||||
d="M550.2 153.5c-3.2 0-6.2 0.7-9 1.7 9.4 3.6 16.1 12.7 16.1 23.4V380h18V178.6c0.1-13.9-11.2-25.1-25.1-25.1z"
|
||||
fill="#97DCFF" p-id="3453"></path>
|
||||
<path
|
||||
d="M686 330.5H149c-9.9 0-18 8.1-18 18v63c0 9.9 8.1 18 18 18h33.2l45 225c8.7 43.4 47.1 75 91.4 75h197.6c44.3 0 82.7-31.5 91.4-75l45-225H686c9.9 0 18-8.1 18-18v-63c0-9.9-8.1-18-18-18z"
|
||||
fill="#FCC66F" p-id="3454"></path>
|
||||
<path
|
||||
d="M608 411.5L560.1 651c-7 35.2-37.9 60.5-73.8 60.5h30c35.9 0 66.7-25.3 73.8-60.5L638 411.5h-30zM656 348.5h30v63h-30z"
|
||||
fill="#FFD79C" p-id="3455"></path>
|
||||
<path d="M474.2 543.5m-18 0a18 18 0 1 0 36 0 18 18 0 1 0-36 0Z" fill="#453B56"
|
||||
p-id="3456"></path>
|
||||
<path
|
||||
d="M416.9 525.5h-125c-9.9 0-18 8.1-18 18s8.1 18 18 18h125c9.9 0 18-8.1 18-18s-8.1-18-18-18zM893 543.5h-33.4c-65.2 0-118.2 53-118.2 118.2v19.6c0 9.9 8.1 18 18 18s18-8.1 18-18v-19.6c0-45.3 36.9-82.2 82.2-82.2H893c9.9 0 18-8.1 18-18s-8-18-18-18zM772.2 744.2c7-7 7-18.4 0-25.5-7-7-18.4-7-25.5 0s-7 18.4 0 25.5 18.4 7.1 25.5 0z"
|
||||
fill="#453B56" p-id="3457"></path>
|
||||
<path
|
||||
d="M759.5 761.6c-9.9 0-18 8.1-18 18v11.6c0 43.7-35.6 79.3-79.3 79.3H487.3c-26.4 0-48.3-19.9-51.4-45.5h35.8c19.9 0 36-16.1 36-36v-41.5h8.6c52.8 0 98.7-37.6 109.1-89.4l42.1-210.6H686c19.9 0 36-16.1 36-36v-63c0-19.9-16.1-36-36-36h-74.6V178.6c0-33.7-27.4-61.1-61.1-61.1s-61.1 27.4-61.1 61.1v133.9H345.9V178.6c0-33.7-27.4-61.1-61.1-61.1s-61.1 27.4-61.1 61.1v133.9H149c-19.9 0-36 16.1-36 36v63c0 19.9 16.1 36 36 36h18.5l42.1 210.6c10.4 51.8 56.2 89.4 109.1 89.4h8.6V789c0 19.9 16.1 36 36 36h36.6c3.3 45.5 41.2 81.5 87.5 81.5h174.8c63.6 0 115.3-51.7 115.3-115.3v-11.6c0-10-8.1-18-18-18z m-234.4-583c0-13.9 11.2-25.1 25.1-25.1s25.1 11.2 25.1 25.1v133.9H525V178.6z m-265.5 0c0-13.9 11.2-25.1 25.1-25.1s25.1 11.2 25.1 25.1v133.9h-50.3V178.6zM149 411.5v-63h537v63H149z m169.7 300c-35.9 0-66.7-25.3-73.8-60.5l-40.7-203.5h426.6L590.1 651c-7 35.2-37.9 60.5-73.8 60.5H318.7z m44.5 77.5v-41.5h108.5V789H363.2z"
|
||||
fill="#453B56" p-id="3458"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-tab custom-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
<div id="echarts-records" style="background-color:#ffffff;min-height:400px;padding: 10px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">动态</div>
|
||||
<div class="layui-card-body">
|
||||
<dl class="layuiadmin-card-status">
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>七彩枫叶 在 <a class="pear-text"
|
||||
lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear Admin 专区</a> 回答问题
|
||||
</p>
|
||||
<span>几秒前</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>简 在 <a class="pear-text" lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear
|
||||
Admin 专区</a> 进行了 <a class="pear-text"
|
||||
lay-href="http://fly.layui.com/vipclub/list/layuiadmin/column/quiz/">提问</a>
|
||||
</p>
|
||||
<span>2天前</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>恒宇少年 将 <a class="pear-text"
|
||||
lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear Admin </a> 更新至
|
||||
2.3.0
|
||||
版本</p>
|
||||
<span>7天前</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>如花 在 <a class="pear-text"
|
||||
lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear Admin 社区</a> 发布了 <a
|
||||
class="pear-text" lay-href="http://fly.layui.com/column/suggest/">建议</a></p>
|
||||
<span>7天前</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>就眠仪式 在 <a class="pear-text"
|
||||
lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear Admin 社区</a> 发布了 <a
|
||||
class="pear-text" lay-href="http://fly.layui.com/column/suggest/">建议</a></p>
|
||||
<span>8天前</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<div class="layui-status-img"><a href="javascript:;"><img
|
||||
style="width: 32px;height: 32px;border-radius: 50px;"
|
||||
src="/admin/images/avatar.jpg"></a></div>
|
||||
<div>
|
||||
<p>贤心 在 <a class="pear-text"
|
||||
lay-href="https://gitee.com/Jmysy/Pear-Admin-Layui">Pear Admin 专区</a> 进行了 <a
|
||||
class="pear-text"
|
||||
lay-href="http://fly.layui.com/vipclub/list/layuiadmin/column/quiz/">提问</a>
|
||||
</p>
|
||||
<span>8天前</span>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">更 新</div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="list">
|
||||
<li class="list-item"><span class="title">优化代码格式</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">新增消息组件</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">移动端兼容</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">系统布局优化</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">兼容多系统菜单模式</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">兼容多标签页切换</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">扩展下拉组件</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
<li class="list-item"><span class="title">扩展卡片样式</span><span class="footer">2021-09-06
|
||||
11:28</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
链接
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<a target="_blank" href="http://www.pearadmin.com"
|
||||
class="pear-btn pear-btn-primary layui-btn-fluid"
|
||||
style="margin-top: 8px;height: 50px;line-height: 50px;">官
|
||||
网</a>
|
||||
<br />
|
||||
<a target="_blank" href="https://gitee.com/pear-admin/Pear-Admin-Layui"
|
||||
class="pear-btn pear-btn-warming layui-btn-fluid"
|
||||
style="margin-top: 8px;height: 50px;line-height: 50px;">下 载</a>
|
||||
<br />
|
||||
<a target="_blank" href="https://gitee.com/pear-admin/Pear-Admin-Boot"
|
||||
class="pear-btn pear-btn-danger layui-btn-fluid"
|
||||
style="margin-top: 8px;height: 50px;line-height: 50px;">后 端</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
寄语
|
||||
</div>
|
||||
<div class="layui-card-body" style="line-height:40px;">
|
||||
原想将澎湃的爱平平稳稳放置你手心,奈何我徒有一股蛮劲,只顾向你跑去,一个不稳跌的满身脏兮兮。试图爬起的我,
|
||||
心想你会不会笑我 " 献爱献的这样笨拙, 怎么不知避开爱里的埋伏 "
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['layer', 'echarts', 'element', 'count'], function () {
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
element = layui.element,
|
||||
count = layui.count,
|
||||
echarts = layui.echarts;
|
||||
|
||||
count.up("value1", {
|
||||
time: 4000,
|
||||
num: 440.34,
|
||||
bit: 2,
|
||||
regulator: 50
|
||||
})
|
||||
|
||||
count.up("value2", {
|
||||
time: 4000,
|
||||
num: 236.30,
|
||||
bit: 2,
|
||||
regulator: 50
|
||||
})
|
||||
|
||||
count.up("value3", {
|
||||
time: 4000,
|
||||
num: 634.43,
|
||||
bit: 2,
|
||||
regulator: 50
|
||||
})
|
||||
|
||||
count.up("value4", {
|
||||
time: 4000,
|
||||
bit: 2,
|
||||
num: 373.23,
|
||||
regulator: 50
|
||||
})
|
||||
|
||||
var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
|
||||
|
||||
const colorList = ["#9E87FF", '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF']
|
||||
var option = {
|
||||
backgroundColor: '#fff',
|
||||
tooltip: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
top: '10%',
|
||||
bottom: '6%',
|
||||
left: '6%',
|
||||
right: '6%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
margin: 10,
|
||||
//textStyle: {
|
||||
fontSize: 14,
|
||||
color: 'rgba(#999)'
|
||||
//}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#939ab6',
|
||||
opacity: .15
|
||||
}
|
||||
},
|
||||
data: ['10:00', '10:10', '10:10', '10:30', '10:40', '10:50']
|
||||
},],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
offset: 15,
|
||||
max: 100,
|
||||
min: 0,
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
margin: 10,
|
||||
//textStyle: {
|
||||
fontSize: 14,
|
||||
color: '#999'
|
||||
//}
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
|
||||
}],
|
||||
series: [{
|
||||
name: '2',
|
||||
type: 'line',
|
||||
z: 3,
|
||||
showSymbol: false,
|
||||
smoothMonotone: 'x',
|
||||
lineStyle: {
|
||||
width: 3,
|
||||
color: {
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: 'rgba(59,102,246)' // 0% 处的颜色
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(118,237,252)' // 100% 处的颜色
|
||||
}]
|
||||
},
|
||||
shadowBlur: 4,
|
||||
shadowColor: 'rgba(69,126,247,.2)',
|
||||
shadowOffsetY: 4
|
||||
},
|
||||
areaStyle: {
|
||||
//normal: {
|
||||
color: {
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: 'rgba(227,233,250,.9)' // 0% 处的颜色
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(248,251,252,.3)' // 100% 处的颜色
|
||||
}]
|
||||
}
|
||||
//}
|
||||
},
|
||||
smooth: true,
|
||||
data: [20, 56, 17, 40, 68, 42]
|
||||
}, {
|
||||
name: '1',
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
smoothMonotone: 'x',
|
||||
|
||||
lineStyle: {
|
||||
width: 3,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: 'rgba(255,84,108)'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(252,140,118)'
|
||||
}], false),
|
||||
shadowBlur: 4,
|
||||
shadowColor: 'rgba(253,121,128,.2)',
|
||||
shadowOffsetY: 4
|
||||
},
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: 'rgba(255,84,108,.15)'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(252,140,118,0)'
|
||||
}], false),
|
||||
},
|
||||
smooth: true,
|
||||
data: [20, 71, 8, 50, 57, 32]
|
||||
},]
|
||||
|
||||
};
|
||||
echartsRecords.setOption(option);
|
||||
|
||||
window.onresize = function () {
|
||||
echartsRecords.resize();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
146
view/console/index.html
Normal file
146
view/console/index.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>主页</title>
|
||||
<!-- 依 赖 样 式 -->
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<!-- 加 载 样 式 -->
|
||||
<link rel="stylesheet" href="/admin/css/loader.css" />
|
||||
<!-- 布 局 样 式 -->
|
||||
<link rel="stylesheet" href="/admin/css/admin.css" />
|
||||
</head>
|
||||
<!-- 结 构 代 码 -->
|
||||
|
||||
<body class="layui-layout-body pear-admin">
|
||||
<!-- 布 局 框 架 -->
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<!-- 顶 部 样 式 -->
|
||||
<div class="layui-header">
|
||||
<!-- 菜 单 顶 部 -->
|
||||
<div class="layui-logo">
|
||||
<!-- 图 标 -->
|
||||
<img class="logo">
|
||||
<!-- 标 题 -->
|
||||
<span class="title"></span>
|
||||
</div>
|
||||
<!-- 顶 部 左 侧 功 能 -->
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
|
||||
<li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- 多 系 统 菜 单 -->
|
||||
<div id="control" class="layui-layout-control"></div>
|
||||
<!-- 顶 部 右 侧 菜 单 -->
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item layui-hide-xs">
|
||||
<a href="#" class="menuSearch layui-icon layui-icon-search"></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs">
|
||||
<a href="#" title="全屏" class="fullScreen layui-icon layui-icon-screen-full"></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs">
|
||||
<a href="/" title="网站首页" class="layui-icon layui-icon-website"></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs message"></li>
|
||||
<li class="layui-nav-item user">
|
||||
<!-- 头 像 -->
|
||||
<a class="layui-icon layui-icon-username" href="javascript:;"></a>
|
||||
<!-- 功 能 菜 单 -->
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:void(0);" user-menu-url="/User/index" user-menu-id="userCenter"
|
||||
user-menu-title="基本资料">个人中心</a></dd>
|
||||
<dd><a href="javascript:void(0);" class="logout">注销登录</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<!-- 主 题 配 置 -->
|
||||
<li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 侧 边 区 域 -->
|
||||
<div class="layui-side layui-bg-black">
|
||||
<!-- 菜 单 顶 部 -->
|
||||
<div class="layui-logo">
|
||||
<!-- 图 标 -->
|
||||
<img class="logo">
|
||||
<!-- 标 题 -->
|
||||
<span class="title"></span>
|
||||
</div>
|
||||
<!-- 菜 单 内 容 -->
|
||||
<div class="layui-side-scroll">
|
||||
<div id="sideMenu"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 视 图 页 面 -->
|
||||
<div class="layui-body">
|
||||
<!-- 内 容 页 面 -->
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
<!-- 页脚 -->
|
||||
<div class="layui-footer layui-text">
|
||||
<span class="left">
|
||||
Released under the MIT license.
|
||||
</span>
|
||||
<span class="center"></span>
|
||||
<span class="right">
|
||||
Copyright © 2021-2022 pearadmin.com
|
||||
</span>
|
||||
</div>
|
||||
<!-- 遮 盖 层 -->
|
||||
<div class="pear-cover"></div>
|
||||
<!-- 加 载 动 画 -->
|
||||
<div class="loader-main">
|
||||
<!-- 动 画 对 象 -->
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 移 动 端 便 捷 操 作 -->
|
||||
<div class="pear-collapsed-pe collapse">
|
||||
<a href="#" class="layui-icon layui-icon-shrink-right"></a>
|
||||
</div>
|
||||
<!-- 依 赖 脚 本 -->
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<!-- 框 架 初 始 化 -->
|
||||
<script>
|
||||
layui.use(['admin', 'jquery', 'popup', 'drawer'], function () {
|
||||
var $ = layui.jquery;
|
||||
var admin = layui.admin;
|
||||
var popup = layui.popup;
|
||||
|
||||
admin.setConfigType("json");
|
||||
admin.setConfigPath("/config/pear.config.json");
|
||||
|
||||
admin.render();
|
||||
|
||||
// 登出逻辑
|
||||
admin.logout(function () {
|
||||
// 注销
|
||||
(async () => {
|
||||
const rep_logout = await fetch('/api/User/logout');
|
||||
if (rep_logout.status !== 200) {
|
||||
popup.failure('网终请求失败!');
|
||||
return;
|
||||
}
|
||||
const info = await rep_logout.json();
|
||||
if (info.code === 0) {
|
||||
popup.success("注销成功", function () {
|
||||
location.href = "/User/login";
|
||||
})
|
||||
} else {
|
||||
popup.failure(info.msg);
|
||||
}
|
||||
})();
|
||||
// 注销逻辑 返回 true / false
|
||||
return true;
|
||||
})
|
||||
// 消息点击回调
|
||||
admin.message(function (id, title, context, form) { });
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
309
view/index/index.html
Normal file
309
view/index/index.html
Normal file
@@ -0,0 +1,309 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" class=" ">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="x-dns-prefetch-control" content="on">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<title>码支付 - 扫码支付,免签支付,聚合支付,码支付免签约</title>
|
||||
<meta name="keywords" content="码支付,扫码支付,免签约接口,聚合支付接口,第三方支付">
|
||||
<meta name="description" content="码支付支付是一款集成微信支付,支付宝支付,三方支付,云闪付的多场景条件整合的聚合接口平台。">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/style.css" id="theme-opt">
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/index.css" id="theme-opt">
|
||||
<style>
|
||||
#topnav .navigation-menu {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#topnav .login-menu {
|
||||
float: right;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#topnav .login-menu>li {
|
||||
float: left;
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
#topnav .login-menu>li>a {
|
||||
padding-top: 25px;
|
||||
padding-bottom: 25px;
|
||||
min-height: 62px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#topnav .login-menu>li>a {
|
||||
display: block;
|
||||
color: #3c4858;
|
||||
font-size: 13px;
|
||||
background-color: transparent !important;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
line-height: 24px;
|
||||
text-transform: uppercase;
|
||||
transition: all .5s;
|
||||
font-family: Nunito, sans-serif;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
#topnav .navigation-menu {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
#topnav .login-menu {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#topnav .login-menu>li>a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="overflow: visible;">
|
||||
|
||||
<header id="topnav" class="defaultscroll sticky active">
|
||||
<div class="container">
|
||||
<a class="logo" href="/">码支付</a>
|
||||
</div>
|
||||
<div id="navigation" class="active">
|
||||
<ul class="navigation-menu">
|
||||
<li class="active"><a href="/">首页</a></li>
|
||||
<li><a href="https://yi-pay.com/doc.html">开发文档</a></li>
|
||||
<li><a href="http://paya.stspwsc.com/user/test.php">支付测试</a></li>
|
||||
</ul>
|
||||
<ul class="login-menu">
|
||||
<?php if(isset($nickname)){ ?>
|
||||
<li><a href="/Console/index" class="a-head-btn bdr-5 bg-color-white">
|
||||
<?php echo $nickname ?>
|
||||
</a></li>
|
||||
<?php }else{ ?>
|
||||
<li><a href="/User/login" class="a-head-btn bdr-5 bg-color-white">登录</a></li>
|
||||
<li><a href="/" class="a-head-btn bdr-5 bg-color-0055ff">注册</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="bg-half bg-light d-table w-100" id="home">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="title-heading mt-4">
|
||||
<h1 class="heading mb-3">码支付<small class="text-success" style="font-size: 50%">
|
||||
[ˈheɪloʊ]</small></h1>
|
||||
<p class="para-desc text-muted">源支付,扫码支付,免签支付,聚合支付,码支付免签约,聚合支付平台。</p>
|
||||
<div class="mt-4 pt-2">
|
||||
<a href="/User/login" class="btn btn-primary mr-2"><svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
|
||||
class="iconify iconify--ri w-5 h-5 mr-2" width="1em" height="1em"
|
||||
preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
|
||||
data-icon="ri:flashlight-line">
|
||||
<path fill="currentColor"
|
||||
d="M13 9h8L11 24v-9H4l9-15v9zm-2 2V7.22L7.532 13H13v4.394L17.263 11H11z"></path>
|
||||
</svg>快速开始</a>
|
||||
<a href="https://mazfu.com/doc" class="btn btn-outline-primary" target="_blank"><svg
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--ri w-5 h-5 mr-2" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
|
||||
data-icon="ri:book-read-line">
|
||||
<path fill="currentColor"
|
||||
d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM11 5H4v14h7V5zm2 0v14h7V5h-7zm1 2h5v2h-5V7zm0 3h5v2h-5v-2z">
|
||||
</path>
|
||||
</svg>官方文档</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 mt-4 pt-2 mt-sm-0 pt-sm-0">
|
||||
<img src="/static/img/support-team.svg" class="img-fluid" alt="hero image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 text-center">
|
||||
<div class="section-title mb-4 pb-2">
|
||||
<h4 class="title mb-4">特性</h4>
|
||||
<p class="para-desc mx-auto text-muted mb-0">我们会一直探索,追求更好的使用体验。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--wpf h1 text-primary" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 26 26"
|
||||
data-icon="wpf:security-checked">
|
||||
<path fill="currentColor"
|
||||
d="M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834M18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="content mt-4">
|
||||
<h5>接口安全</h5>
|
||||
<p class="text-muted mb-0">采用国内服务器,接口稳定传输,给顾客快速流畅的体验,安全可靠的服务您的每一笔订单</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--fa-solid h1 text-primary"
|
||||
width="1.25em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 512"
|
||||
data-icon="fa-solid:money-check-alt">
|
||||
<path fill="currentColor"
|
||||
d="M608 32H32C14.33 32 0 46.33 0 64v384c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32M176 327.88V344c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-16.29c-11.29-.58-22.27-4.52-31.37-11.35c-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73c3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19c0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39c0-24.52 19.05-44.44 42.67-45.07V152c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35c3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73c-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19c0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39c0 24.53-19.05 44.44-42.67 45.07M416 312c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8zm160 0c0 4.42-3.58 8-8 8h-80c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8zm0-96c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h272c4.42 0 8 3.58 8 8z">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="content mt-4">
|
||||
<h5>资金保障</h5>
|
||||
<p class="text-muted mb-0">商户订单信息,全部加密处理,专业技术24小时实时运维,您的帐户安全将得到充分的保障。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--ri h1 text-primary" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
|
||||
data-icon="ri:code-box-line">
|
||||
<path fill="currentColor"
|
||||
d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm16 7l-3.536 3.536l-1.414-1.415L17.172 12L15.05 9.879l1.414-1.415L20 12zM6.828 12l2.122 2.121l-1.414 1.415L4 12l3.536-3.536L8.95 9.88L6.828 12zm4.416 5H9.116l3.64-10h2.128l-3.64 10z">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="content mt-4">
|
||||
<h5>REST API</h5>
|
||||
<p class="text-muted mb-0">提供了完善的API接口,你可以用于平台应用通道接入,开发各种系统的对接通道插件等。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--uil h1 text-primary" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
|
||||
data-icon="uil:heart-rate">
|
||||
<path fill="currentColor"
|
||||
d="M21 11h-3.94a.78.78 0 0 0-.21 0h-.17a1.3 1.3 0 0 0-.15.1a1.67 1.67 0 0 0-.16.12a1 1 0 0 0-.09.13a1.32 1.32 0 0 0-.12.2l-1.6 4.41l-4.17-11.3a1 1 0 0 0-1.88 0L6.2 11H3a1 1 0 0 0 0 2h4.3a.86.86 0 0 0 .16-.1a1.67 1.67 0 0 0 .16-.12l.09-.13a1 1 0 0 0 .12-.2l1.62-4.53l4.16 11.42a1 1 0 0 0 .94.66a1 1 0 0 0 .94-.66l2.3-6.34H21a1 1 0 0 0 0-2">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="content mt-4">
|
||||
<h5>费率超低</h5>
|
||||
<p class="text-muted mb-0">接口渠道直接到自己账户,省去中间商赚差价,因此我们可以给商户提供更低廉的费率。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--ic h1 text-primary" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
|
||||
data-icon="ic:baseline-no-adult-content">
|
||||
<path fill="currentColor"
|
||||
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2M4 12c0-1.85.63-3.54 1.69-4.9L7.59 9h2.83L7.1 5.69A7.924 7.924 0 0 1 12 4c4.41 0 8 3.59 8 8c0 1.85-.63 3.54-1.69 4.9l-1.9-1.9h-2.83l3.31 3.31A7.874 7.874 0 0 1 12 20c-4.41 0-8-3.59-8-8">
|
||||
</path>
|
||||
<path fill="currentColor"
|
||||
d="m14.25 14l-1.5-2l1.5-2h-1.5L12 11l-.75-1h-1.5l1.5 2l-1.5 2h1.5l.75-1l.75 1zM8 10l-.75 1l-.75-1H5l1.5 2L5 14h1.5l.75-1L8 14h1.5L8 12l1.5-2zm8 4l.75-1l.75 1H19l-1.5-2l1.5-2h-1.5l-.75 1l-.75-1h-1.5l1.5 2l-1.5 2z">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="content mt-4">
|
||||
<h5>拒资金流</h5>
|
||||
<p class="text-muted mb-0">只负责交易处理不参与资金清算,资金全都实时到您的个人账户上,以此来保障您的资金安全。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-6 mt-5">
|
||||
<div class="features">
|
||||
<div class="image position-relative d-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true" role="img" class="iconify iconify--ep h1 text-primary" width="1em"
|
||||
height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"
|
||||
data-icon="ep:service">
|
||||
<path fill="currentColor"
|
||||
d="M864 409.6a192 192 0 0 1-37.888 349.44A256.064 256.064 0 0 1 576 960h-96a32 32 0 1 1 0-64h96a192.06 192.06 0 0 0 181.12-128H736a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h32c10.368 0 20.544.832 30.528 2.432a288 288 0 0 0-573.056 0A193 193 0 0 1 256 384h32a32 32 0 0 1 32 32v320a32 32 0 0 1-32 32h-32a192 192 0 0 1-96-358.4a352 352 0 0 1 704 0M256 448a128 128 0 1 0 0 256zm640 128a128 128 0 0 0-128-128v256a128 128 0 0 0 128-128">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="content mt-4">
|
||||
<h5>专属客服</h5>
|
||||
<p class="text-muted mb-0">专业客服团队,专属客服一对一贴心服务,7*24小时全天候在线为你解答。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer footer-bar">
|
||||
<div class="container text-center">
|
||||
<div class="row align-items-center">
|
||||
<div>
|
||||
<div class="links">
|
||||
<li><a target="_bank" href="javascript:" style="color: #adb5bd;">友情链接:</a></li>
|
||||
<li><a target="_bank" href="https://www.shouqianba.com/">收钱吧</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.links li {
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<div class="container text-center" style="margin-top:20px">
|
||||
<div class="row align-items-center">
|
||||
<div>
|
||||
<div class="text-sm-left">
|
||||
<p class="mb-0">Copyright ©
|
||||
<script>
|
||||
document.write(new Date().getFullYear());
|
||||
</script>2024 <a href="/">码支付</a> - All
|
||||
rights reserved<span class="sep"> | </span><a href="https://beian.miit.gov.cn/"
|
||||
target="_blank" rel="noreferrer nofollow">湘ICP备2023031541号-2</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
354
view/order/index.html
Normal file
354
view/order/index.html
Normal file
@@ -0,0 +1,354 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>订单明细</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
</head>
|
||||
|
||||
<body class="pear-container">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<form class="layui-form layui-form-pane" action="" id="serch-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="order_id" autocomplete="off" class="layui-input" placeholder="请输入">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">商户订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="out_trade_no" autocomplete="off" class="layui-input"
|
||||
placeholder="请输入">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">用户ID</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="pid" autocomplete="off" class="layui-input" placeholder="请输入">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">商品</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" autocomplete="off" class="layui-input" placeholder="请输入">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">支付状态</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="state">
|
||||
<option value="">请选择</option>
|
||||
<option value="1">支付成功</option>
|
||||
<option value="0">等待/过期</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">支付平台</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type">
|
||||
<option value="">请选择</option>
|
||||
<option value="wxpay">微信支付</option>
|
||||
<option value="alipay">支付宝</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">收款平台</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="platform">
|
||||
<option value="">收款平台</option>
|
||||
<?php foreach ($options as $key => $value) { ?>
|
||||
<option value="<?php echo $key ?>">
|
||||
<?php echo $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">创建时间</label>
|
||||
<div class="layui-inline" id="create_time">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="create_time_start" autocomplete="off" placeholder="开始"
|
||||
class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="create_time_end" autocomplete="off" placeholder="结束"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="text-align:right;">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button type="submit" class="pear-btn pear-btn-md pear-btn-primary" lay-submit
|
||||
lay-filter="order-query">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button type="button" lay-on="reset" class="pear-btn pear-btn-md">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="orders-table" lay-filter="orders-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="order-toolbar">
|
||||
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
批量删除
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-warming pear-btn-md" lay-event="batchTimeout">
|
||||
<i class="icon pear-icon pear-icon-history"></i>
|
||||
清空过期
|
||||
</button>
|
||||
</script>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['table', 'form', 'common', 'dropdown', 'laydate', 'util'], function () {
|
||||
let table = layui.table;
|
||||
let form = layui.form;
|
||||
let common = layui.common;
|
||||
let dropdown = layui.dropdown;
|
||||
let laydate = layui.laydate;
|
||||
let util = layui.util;
|
||||
|
||||
laydate.render({
|
||||
elem: '#create_time',
|
||||
range: ['input[name="create_time_start"]', 'input[name="create_time_end"]'],
|
||||
rangeLinked: true,
|
||||
type: 'datetime',
|
||||
fullPanel: true,
|
||||
weekStart: 1,
|
||||
shortcuts: [{
|
||||
text: "今天",
|
||||
value: function () {
|
||||
let now = new Date(); let today = new Date(); today.setHours(0, 0, 0, 0);
|
||||
return [today, now];
|
||||
}
|
||||
}, {
|
||||
text: "昨天",
|
||||
value: function () {
|
||||
let yesterday_start = new Date();
|
||||
yesterday_start.setDate(yesterday_start.getDate() - 1);
|
||||
yesterday_start.setHours(0, 0, 0, 0);
|
||||
let yesterday_end = new Date()
|
||||
yesterday_end.setDate(yesterday_end.getDate() - 1);
|
||||
yesterday_end.setHours(23, 59, 59, 999);
|
||||
return [yesterday_start, yesterday_end];
|
||||
}
|
||||
}, {
|
||||
text: "近七天",
|
||||
value: function () {
|
||||
let today = new Date();
|
||||
let endOfDayToday = new Date(today);
|
||||
endOfDayToday.setDate(endOfDayToday.getDate() - 1);
|
||||
endOfDayToday.setHours(23, 59, 59, 999);
|
||||
let startSevenDaysAgo = new Date(today);
|
||||
startSevenDaysAgo.setDate(startSevenDaysAgo.getDate() - 7);
|
||||
startSevenDaysAgo.setHours(0, 0, 0, 0);
|
||||
return [startSevenDaysAgo, endOfDayToday];
|
||||
}
|
||||
}, {
|
||||
text: "本月",
|
||||
value: function () {
|
||||
let today = new Date();
|
||||
let year = today.getFullYear();
|
||||
let month = today.getMonth();
|
||||
let startOfMonth = new Date(year, month, 1);
|
||||
startOfMonth.setHours(0, 0, 0, 0);
|
||||
return [startOfMonth, today];
|
||||
}
|
||||
}, {
|
||||
text: "上个月",
|
||||
value: function () {
|
||||
let today = new Date();
|
||||
let year = today.getFullYear();
|
||||
let month = today.getMonth();
|
||||
let startOfMonth = new Date(year, month - 1, 1);
|
||||
startOfMonth.setHours(0, 0, 0, 0);
|
||||
let thisMonthFirstDay = new Date(year, month, 1);
|
||||
let endOfMonth = new Date(thisMonthFirstDay - 1);
|
||||
endOfMonth.setHours(23, 59, 59, 999);
|
||||
return [startOfMonth, endOfMonth];
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
let cols = [[
|
||||
{ type: 'checkbox' },
|
||||
{ title: '订单号', field: 'order_id', align: 'center', minWidth: 165, templet: '<div><a href="javascript:;" class="layui-font-blue" lay-event="showOrder">{{= d.order_id }}</a></div>' },
|
||||
// { title: '用户', field: 'pid', align: 'center', width: 85 },
|
||||
{ title: '商家订单号', field: 'out_trade_no', align: 'center', minWidth: 180 },
|
||||
{ title: '商品', field: 'name', align: 'center', minWidth: 180 },
|
||||
{ title: '订单金额', field: 'money', align: 'center', minWidth: 85 },
|
||||
{ title: '成交金额', field: 'really_price', align: 'center', minWidth: 85 },
|
||||
{ title: '支付状态', field: 'state', align: 'center', minWidth: 85, templet: '<div>{{# if(d.state==1){return`<span class="layui-badge layui-bg-green">成功</span>`}else{if(new Date(d.close_time)>new Date("<?php echo $servertime ?>")){return`<span class="layui-badge layui-bg-orange">等待</span>`}else{return`<span class="layui-badge layui-bg-gray">过期</span>`} } }}</div>' },
|
||||
{ title: '支付时间', field: 'pay_time', align: 'center', minWidth: 160, templet: '<div>{{= d.pay_time == d.create_time ? "- -" : d.pay_time}}</div>' },
|
||||
{ title: '支付平台', field: 'type', align: 'center', width: 120, templet: '<div>{{# if(d.type=="wxpay"){return`<img src="/static/img/wxpay.ico"width="15"><span>微信支付</span>`}if(d.type=="alipay"){return`<img src="/static/img/alipay.ico"width="15"><span>支付宝</span>`} }}</div>' },
|
||||
{ title: '收款平台[账号:终端]', field: 'platform', align: 'center', minWidth: 160, templet: '<div>{{# return`${d.payAccount.platform} [${d.aid}:${d.cid}]` }}</div>' },
|
||||
{ title: '操作', align: 'center', width: 120, fixed: 'right', templet: '<div><strong><a href="javascript:;" data-id="{{= d.id }}" class="layui-font-green {{= d.state==1 ? "orderSet-paid" : "orderSet-paying" }}">设置</a></strong></div>' }
|
||||
]]
|
||||
|
||||
table.render({
|
||||
id: 'orders-table',
|
||||
elem: '#orders-table',
|
||||
url: '/api/Order/getOrders',
|
||||
page: true,
|
||||
cols: cols,
|
||||
skin: 'line',
|
||||
toolbar: '#order-toolbar',
|
||||
defaultToolbar: [{
|
||||
title: '刷新',
|
||||
layEvent: 'refresh',
|
||||
icon: 'layui-icon-refresh',
|
||||
}, 'filter', 'print', 'exports'],
|
||||
done: function () {
|
||||
dropdown.render({
|
||||
elem: '.orderSet-paying',
|
||||
data: [{ title: '改已支付', type: 1 }, { type: '-' }, { title: '手动补单', type: 3 }, { title: '删除订单', type: 0 }],
|
||||
click: function (data, othis) {
|
||||
order.setOrder(data, this.elem);
|
||||
}
|
||||
});
|
||||
dropdown.render({
|
||||
elem: '.orderSet-paid',
|
||||
data: [{ title: '改未支付', type: 2 }, { type: '-' }, { title: '重新通知', type: 4 }, { title: '删除订单', type: 0 }],
|
||||
click: function (data, othis) {
|
||||
order.setOrder(data, this.elem);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// 事件处理
|
||||
|
||||
// 表格单元格事件
|
||||
table.on('tool(orders-table)', function (obj) {
|
||||
if (obj.event === 'showOrder') {
|
||||
order.showOrder(obj.data.id);
|
||||
}
|
||||
});
|
||||
// 表格头部按钮事件
|
||||
table.on('toolbar(orders-table)', function (obj) {
|
||||
if (obj.event === 'refresh') {
|
||||
table.reload('orders-table');
|
||||
} else if (obj.event === 'batchRemove') {
|
||||
layer.confirm('批量删除订单?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
const pagedata = table.checkStatus(obj.config.id)
|
||||
let select_id = [];
|
||||
pagedata.data.forEach(val => {
|
||||
select_id.push(val.id);
|
||||
});
|
||||
httpJSON('/api/Order/batchRemove', { ids: select_id });
|
||||
layer.close(index);
|
||||
});
|
||||
} else if (obj.event === 'batchTimeout') {
|
||||
layer.confirm('确定清空超时订单?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
httpJSON('/api/Order/batchTimeout', { action: 'batchTimeout' })
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
});
|
||||
// 表单自定义事件监听
|
||||
form.on('submit(order-query)', function (obj) {
|
||||
const field = obj.field;
|
||||
let new_field = {};
|
||||
for (const key in field) {
|
||||
if (field.hasOwnProperty.call(field, key)) {
|
||||
const value = field[key];
|
||||
if (value) {
|
||||
new_field[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
table.reload('orders-table', { where: new_field });
|
||||
return false;
|
||||
});
|
||||
// 监听重置按钮
|
||||
util.on({
|
||||
reset: function () {
|
||||
document.querySelector('#serch-form').reset();
|
||||
table.reload('orders-table', { where: {} });
|
||||
}
|
||||
});
|
||||
|
||||
// 操作方法
|
||||
let order = {};
|
||||
|
||||
// 操作菜单
|
||||
order.setOrder = function (data, elem) {
|
||||
const dotype = data.type;
|
||||
const id = elem.attr("data-id");
|
||||
if (dotype == 1 || dotype == 2) {
|
||||
// 更改支付状态
|
||||
const state = dotype == 1 ? 1 : 0;
|
||||
httpJSON('/api/Order/changeOrderState', { id: id, state: state })
|
||||
} else if (dotype == 3) {
|
||||
// 手动补单
|
||||
layer.confirm('无论是否真实支付,直接确认支付?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
const state = 1;
|
||||
httpJSON('/api/Order/doPayOrder', { id: id, state: state })
|
||||
layer.close(index);
|
||||
});
|
||||
} else if (dotype == 4) {
|
||||
// 重新通知
|
||||
httpJSON('/api/Order/redoPayOrder', { id: id })
|
||||
} else if (dotype == 0) {
|
||||
//删除订单
|
||||
layer.confirm('确定删除订单?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
httpJSON('/api/Order/deleteOrder', { id: id })
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 订单详细
|
||||
order.showOrder = function (id) {
|
||||
layer.open({
|
||||
id: 'iframe-show-order',
|
||||
type: 2,
|
||||
title: '订单详细',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '100%' : '500px', common.isModile() ? '100%' : '800px'],
|
||||
content: `/Order/showOrder?id=${id}`,
|
||||
});
|
||||
}
|
||||
async function httpJSON(url, info) {
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => { table.reload('orders-table') });
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
245
view/order/show_order.html
Normal file
245
view/order/show_order.html
Normal file
@@ -0,0 +1,245 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>订单明细</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.list {
|
||||
padding: 9px 0 !important;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 20px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.container hr {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.alipay {
|
||||
color: #1677ff;
|
||||
}
|
||||
|
||||
.wxpay {
|
||||
color: #1AAD19;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-row container">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>订单号</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $order_id ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>用户ID</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo "<strong>{$pid}</strong>" ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款方式</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php $payway=['alipay'=>'支付宝','wxpay'=>'微信支付'];$payway_img=['alipay'=>'/static/img/alipay.ico','wxpay'=>'/static/img/wxpay.ico'];echo "<img src='{$payway_img[$type]}'width='16'><strong class='{$type}'>{$payway[$type]}</strong>" ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>商户订单号</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $out_trade_no ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>异步通知</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $notify_url ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>跳转通知</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $return_url ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>商品</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $name ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>成交金额</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $really_price ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>订单金额</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $money ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>客户IP</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $clientip ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>客户设备</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $device ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>支付状态</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php
|
||||
if ($state === 0 && time() > strtotime($close_time)){$state = -1;}
|
||||
$status = ['0'=>'等待支付','1'=>'支付成功','-1'=>'订单过期'];
|
||||
$bg_color = ['0'=>'orange','1'=>'green','-1'=>'gray'];
|
||||
echo "<span class='layui-badge layui-bg-{$bg_color[$state]}'>{$status[$state]}</span>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>创建时间</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $create_time ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>关闭时间</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $close_time ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>支付时间</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $pay_time == $create_time ? '- -' : $pay_time ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款平台</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $platform ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款流水号</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $platform_order ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款账号</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $account ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款终端</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<?php echo $channel ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款地址</strong></label></div>
|
||||
<div class="layui-col-xs9">
|
||||
<div class="list">
|
||||
<a href="javascript:;" class="layui-font-blue" lay-on="getQrcode"
|
||||
data-qrcode="<?php echo $qrcode ?>"><span class="icon pear-icon"></span></a>
|
||||
<?php echo $qrcode ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script src="/static/js/awesome-qr.min.js"></script>
|
||||
<script>
|
||||
const QR = AwesomeQR.AwesomeQR;
|
||||
layui.use(['util', 'layer'], function () {
|
||||
let util = layui.util;
|
||||
let layer = layui.layer;
|
||||
util.on({
|
||||
getQrcode: function () {
|
||||
(async () => {
|
||||
const qrcode_data = this.getAttribute("data-qrcode")
|
||||
const qrcode_img = await getQrcode(qrcode_data, QR);
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['200px', '200px'],
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shadeClose: true,
|
||||
content: `<img width="100%" src="${qrcode_img}">`
|
||||
});
|
||||
})()
|
||||
}
|
||||
});
|
||||
})
|
||||
// 生成二维码
|
||||
async function getQrcode(text, QR) {
|
||||
const qrcodeUrl = await new Promise((resolve) => {
|
||||
new QR({
|
||||
text: text,
|
||||
size: 500,
|
||||
}).draw().then((dataURL) => { resolve(dataURL); });
|
||||
})
|
||||
return qrcodeUrl;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
239
view/pay/console.html
Normal file
239
view/pay/console.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>收银台</title>
|
||||
<link rel="stylesheet" href="/static/css/layui.min.css">
|
||||
<style>
|
||||
body {
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 18px auto 18px;
|
||||
padding: 38px 16px 0px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 3px 3px 0 hsla(0, 0%, 92.5%, .44);
|
||||
box-shadow: 0 3px 3px 0 hsla(0, 0%, 92.5%, .44);
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
padding-bottom: 38px;
|
||||
}
|
||||
|
||||
.order {
|
||||
width: 340px;
|
||||
margin: 15px auto 21px;
|
||||
background: #fbfbfb;
|
||||
border-radius: 6px;
|
||||
line-height: 42px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.order span {
|
||||
color: #999;
|
||||
font-size: 15px;
|
||||
margin-left: 14px;
|
||||
}
|
||||
|
||||
.goods_name {
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.price {
|
||||
color: #386cfa;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.price>span:first-child {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.price>span:last-child {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.price span {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.qrcode>img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.msg {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.msg>p {
|
||||
color: red;
|
||||
font-weight: 700;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.msg>p:nth-child(1) {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.shanxinzha {
|
||||
margin-top: 32px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shanxinzha p {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: red;
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="layui-container">
|
||||
<div class="layui-row">
|
||||
<div class="card" style="padding-bottom: 18px;padding-top: 15px;">
|
||||
<div style="text-align: center;">
|
||||
<svg style="vertical-align: middle;" t="1610806307396" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="6171" width="26" height="26">
|
||||
<path
|
||||
d="M1024 199.18v410.38c0 110-89.54 199.18-200 199.18H200c-110.46 0-200-89.18-200-199.18V199.18C0 89.17 89.54 0 200 0h624c110.46 0 200 89.17 200 199.18z m-553.95 317v46.72q0.9 19.32 12 28.75t30.9 9.43q40.14 0 41.95-38.18v-47.58l86.6 0.45q11.73-0.9 18.49-8.76t7.67-19.54a33.48 33.48 0 0 0-7.67-19.32q-6.77-8.09-18.49-9h-86.6v-27.4l86.15-0.45q11.73-0.9 18.72-9a33.26 33.26 0 0 0 7.89-19.76q-0.9-11.23-7.67-18.42t-18.49-8.09h-66.3l69.91-113.2q9-11.68 9-24.71a50.37 50.37 0 0 0-4.28-15.27 24.48 24.48 0 0 0-7.22-9 27.29 27.29 0 0 0-9.92-4.49 74.75 74.75 0 0 0-12.4-1.8 43.43 43.43 0 0 0-19.4 7.19 54.51 54.51 0 0 0-14 13.48l-75.34 125.83L443 229.18A65.48 65.48 0 0 0 429 215a36.39 36.39 0 0 0-19.4-7.41q-18.49 2.25-25.26 10.11t-9 20.44a36.94 36.94 0 0 0 3.61 18.19 67.53 67.53 0 0 0 8.57 13.7l60.44 106H383q-12.18 0.9-18.72 8.09t-7.89 18.42q1.35 11.68 7.89 19.32t18.72 8.56l87.05 0.45v28.3H383q-12.18 0.9-18.72 8.09t-7.89 18.42a43.81 43.81 0 0 0 7.89 20.44q6.54 9.21 18.72 10.11h87.05z"
|
||||
fill="#4375ff" p-id="6172"></path>
|
||||
<path
|
||||
d="M264.96 903.6m60.2 0l373.67 0q60.2 0 60.2 60.2l0 0q0 60.2-60.2 60.2l-373.67 0q-60.2 0-60.2-60.2l0 0q0-60.2 60.2-60.2Z"
|
||||
fill="#4375ff" p-id="6173"></path>
|
||||
</svg>
|
||||
<img id="payType" style="vertical-align: middle;" src="" style="height:30px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="card">
|
||||
<div class="order"><span>商户订单号:<span id="order">
|
||||
<?php echo htmlentities($out_trade_no); ?>
|
||||
</span></span></div>
|
||||
<div class="goods_name"><span>商品名称:<span id="goods_name">
|
||||
<?php echo htmlentities($name); ?>
|
||||
</span></span></div>
|
||||
<div class="price"><span id="money">
|
||||
<?php echo htmlentities($really_price); ?>
|
||||
</span><span>元</span></div>
|
||||
<div class="qrcode"><img id="qrcode" src="/static/img/loading.gif">
|
||||
</div>
|
||||
<div class="msg">
|
||||
<p>请付款 <span id="s_money" class="note">
|
||||
<?php echo htmlentities($really_price); ?>
|
||||
</span> 元,注意不能多付或少付</p>
|
||||
<p>付款后,请等待5秒查看</p>
|
||||
<p id="divTime"></p>
|
||||
</div>
|
||||
<div class="shanxinzha">
|
||||
<p id="payTypeText"></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script src="/static/js/layui.min.js"></script>
|
||||
<script src="/static/js/awesome-qr.min.js"></script>
|
||||
<script>
|
||||
const payCode = '<?php echo $payUrl; ?>';
|
||||
const payType = '<?php echo htmlentities($type); ?>';
|
||||
const order = '<?php echo htmlentities($order_id); ?>';
|
||||
const QR = AwesomeQR.AwesomeQR;
|
||||
(async () => {
|
||||
// 支付类型
|
||||
const payTpeyImg = document.getElementById('payType');
|
||||
const payTypeText = document.getElementById('payTypeText');
|
||||
if (payType === 'wxpay') {
|
||||
payTpeyImg.src = '/static/img/weixin.jpg';
|
||||
payTypeText.innerText = '请使用微信扫码支付'
|
||||
} else if (payType === 'alipay') {
|
||||
payTpeyImg.src = '/static/img/alipay.jpg';
|
||||
payTypeText.innerText = '请使用支付宝扫码支付'
|
||||
}
|
||||
// 生成二维码
|
||||
document.getElementById('qrcode').src = await getQrcode(payCode, QR);
|
||||
// 订单倒计时
|
||||
const intDiff = <?php echo strtotime($close_time) - time() > 0 ? strtotime($close_time) - time() : 0; ?>;
|
||||
const timerId = timer(intDiff);
|
||||
// 订单状态查询
|
||||
let orderTimer = null;
|
||||
const queryOrder = async (url) => {
|
||||
if (orderTimer) { clearTimeout(orderTimer); }
|
||||
const res = await fetch(url);
|
||||
const jsonData = await res.json();
|
||||
orderTimer = setTimeout(() => { queryOrder(url) }, 1000);
|
||||
if (jsonData.state === 1) {
|
||||
clearInterval(timerId);
|
||||
clearTimeout(orderTimer);
|
||||
document.getElementById('divTime').innerHTML = '<small class="note">订单支付成功</small>';
|
||||
document.getElementById('qrcode').src = '/static/img/pay_ok.png';// 输出支付成功提示图片
|
||||
setTimeout(() => {
|
||||
location.href = jsonData.return_url;
|
||||
}, 1500);
|
||||
}
|
||||
if (jsonData.state === 2) {
|
||||
clearTimeout(orderTimer);
|
||||
}
|
||||
}
|
||||
if (intDiff > 0) {
|
||||
queryOrder(`/getOrderState/${order}`);
|
||||
}
|
||||
|
||||
})();
|
||||
// 生成二维码
|
||||
async function getQrcode(text, QR) {
|
||||
const qrcodeUrl = await new Promise((resolve) => {
|
||||
new QR({
|
||||
text: text,
|
||||
size: 500,
|
||||
}).draw().then((dataURL) => { resolve(dataURL); });
|
||||
})
|
||||
return qrcodeUrl;
|
||||
}
|
||||
// 计时
|
||||
function timer(intDiff) {
|
||||
const timerId = setInterval(() => {
|
||||
let day = 0, hour = 0, minute = 0, second = 0;//时间默认值
|
||||
if (intDiff > 0) {
|
||||
day = Math.floor(intDiff / (60 * 60 * 24));
|
||||
hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
|
||||
minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
|
||||
second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
|
||||
}
|
||||
if (minute <= 9) minute = '0' + minute;
|
||||
if (second <= 9) second = '0' + second;
|
||||
if (hour <= 0 && minute <= 0 && second <= 0) {
|
||||
document.getElementById('divTime').innerHTML = '<small class="note">订单二维码已过期</small>';
|
||||
document.getElementById('qrcode').src = '/static/img/qrcode_timeout.png';// 输出过期二维码提示图片
|
||||
} else {
|
||||
document.getElementById('divTime').innerHTML = `二维码有效时间: <small class="note">${minute}</small>分<small style="color:red; font-size:24px">${second}</small> 秒,失效勿付`;
|
||||
}
|
||||
if (intDiff < 0) {
|
||||
clearInterval(timerId);
|
||||
}
|
||||
intDiff--;
|
||||
}, 1000);
|
||||
return timerId;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
101
view/pay_manage/add_account.html
Normal file
101
view/pay_manage/add_account.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>添加账号</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.inputTxt {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="add-account" class="layui-form layui-form-pane" action="" lay-filter="add-account">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款平台</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="platform">
|
||||
<option value=""></option>
|
||||
<?php foreach ($options as $key => $value) { ?>
|
||||
<option value="<?php echo $key ?>">
|
||||
<?php echo $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">登陆密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="password" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">监听模式</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="pattern">
|
||||
<option value="请选择"></option>
|
||||
<?php include_once '../view/tpl/pattern.html'; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
||||
lay-filter="add-account">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
let form = layui.form;
|
||||
|
||||
form.on('submit(add-account)', function (obj) {
|
||||
const field = obj.field;
|
||||
(async () => {
|
||||
const url = '/api/PayManage/addAccount';
|
||||
const info = field;
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
parent.layui.table.reload("account-table");
|
||||
});
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
})()
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
85
view/pay_manage/add_channel.html
Normal file
85
view/pay_manage/add_channel.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加收款终端</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.inputTxt {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="set-channel" class="layui-form layui-form-pane" action="" lay-filter="channel-edit">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">终端编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="channel" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="qrcode" autocomplete="off" lay-affix="upload-drag"
|
||||
lay-filter="scanning" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
let form = layui.form;
|
||||
|
||||
form.on('input-affix(scanning)', function () {
|
||||
window.open('https://cli.im/deqr', '_blank');
|
||||
});
|
||||
|
||||
form.on('submit(save)', function (obj) {
|
||||
let field = obj.field;
|
||||
field.account_id = '<?php echo $aid ?>';
|
||||
(async () => {
|
||||
const url = '/api/PayManage/addChannel';
|
||||
const info = field;
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
parent.window.location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
})()
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
133
view/pay_manage/channel_list.html
Normal file
133
view/pay_manage/channel_list.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>终端列表</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.edit {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="pear-container">
|
||||
<div class="layui-row" id="mainbox">
|
||||
<!-- 通道列表 -->
|
||||
</div>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script src="/static/js/awesome-qr.min.js"></script>
|
||||
<script>
|
||||
const QR = AwesomeQR.AwesomeQR;
|
||||
layui.use(['form', 'common'], function () {
|
||||
let form = layui.form;
|
||||
let util = layui.util;
|
||||
let common = layui.common;
|
||||
let layer = layui.layer;
|
||||
|
||||
util.on({
|
||||
getQrcode: function () {
|
||||
(async () => {
|
||||
const qrcode_data = this.getAttribute("data-qrcode")
|
||||
const qrcode_img = await getQrcode(qrcode_data, QR);
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['200px', '200px'],
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shadeClose: true,
|
||||
content: `<img width="100%" src="${qrcode_img}">`
|
||||
});
|
||||
})()
|
||||
},
|
||||
edit: function () {
|
||||
const cid = this.getAttribute("data-cid")
|
||||
layer.open({
|
||||
id: 'iframe-channel-edit',
|
||||
type: 2,
|
||||
title: '添加收款终端',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '80%' : '400px', common.isModile() ? '70%' : '300px'],
|
||||
content: `/PayManage/editChannel?cid=${cid}`,
|
||||
});
|
||||
},
|
||||
add: function () {
|
||||
const aid = this.getAttribute("data-aid")
|
||||
layer.open({
|
||||
id: 'iframe-channel-add',
|
||||
type: 2,
|
||||
title: '添加收款终端',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '80%' : '400px', common.isModile() ? '70%' : '300px'],
|
||||
content: `/PayManage/addChannel?aid=${aid}`,
|
||||
});
|
||||
},
|
||||
});
|
||||
// 工具
|
||||
let channel = {};
|
||||
|
||||
channel.buildEle = function (item) {
|
||||
let card = document.createElement('div');
|
||||
card.className = 'layui-card';
|
||||
const qrcode = item.qrcode.length > 50 ? item.qrcode.slice(0, 50) + '...' : item.qrcode;
|
||||
let htmlstr = `
|
||||
<div class="layui-card-body">
|
||||
<span class="layui-badge layui-bg-cyan">终端编号</span><span class="layui-badge layui-bg-gray">${item.channel}</span><br>
|
||||
<span class="layui-badge layui-bg-cyan">收款地址</span><span class="layui-badge layui-bg-gray">${qrcode}</span>
|
||||
<a href="javascript:;" class="layui-font-blue" lay-on="getQrcode"data-qrcode="${item.qrcode}"><span class="icon pear-icon"></span></a><br>
|
||||
<span class="layui-badge layui-bg-cyan">最后使用</span><span class="layui-badge layui-bg-gray">${item.last_time}</span><br>
|
||||
<span class="layui-badge layui-bg-cyan">启用状态</span><span class="layui-badge layui-bg-${item.state == 1 ? 'green' : 'gray'}">${item.state == 1 ? '启用' : '禁用'}</span><br>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-radius layui-border-green layui-btn-sm edit" lay-on="edit" data-cid="${item.id}"><span class="icon pear-icon"></span>修改</button>
|
||||
</div>`;
|
||||
card.innerHTML = htmlstr;
|
||||
return card;
|
||||
}
|
||||
channel.getChannelLlist = async function (mainbox, aid) {
|
||||
const url = '/api/PayManage/getChannelList';
|
||||
const info = { aid: aid };
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
const lists = rec_info.data;
|
||||
lists.forEach(value => {
|
||||
const card = channel.buildEle(value);
|
||||
mainbox.appendChild(card);
|
||||
});
|
||||
channel.addBtn(mainbox, aid);
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
}
|
||||
channel.addBtn = function (mainbox, aid) {
|
||||
let btn = document.createElement('div');
|
||||
btn.className = 'layui-card';
|
||||
btn.innerHTML = `<button type="button" lay-on="add" data-aid="${aid}" class="layui-btn layui-btn-fluid">添加收款终端</button>`;
|
||||
mainbox.appendChild(btn);
|
||||
}
|
||||
// 生成二维码
|
||||
async function getQrcode(text, QR) {
|
||||
const qrcodeUrl = await new Promise((resolve) => {
|
||||
new QR({
|
||||
text: text,
|
||||
size: 500,
|
||||
}).draw().then((dataURL) => { resolve(dataURL); });
|
||||
})
|
||||
return qrcodeUrl;
|
||||
}
|
||||
|
||||
const mainbox = document.getElementById('mainbox');
|
||||
const aid = '<?php echo $id ?>';
|
||||
channel.getChannelLlist(mainbox, aid);
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
125
view/pay_manage/edit_account.html
Normal file
125
view/pay_manage/edit_account.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>编辑账号</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.inputTxt {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="edit-account" class="layui-form layui-form-pane" action="" lay-filter="edit-account">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">账号ID</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-mid inputTxt">
|
||||
<?php echo $id ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款平台</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="platform">
|
||||
<option value=""></option>
|
||||
<?php foreach ($options as $key => $value) { ?>
|
||||
<option value="<?php echo $key ?>">
|
||||
<?php echo $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">登陆密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="password" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">启用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="state" class="layui-input" lay-skin="switch" lay-text="启用|禁用">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">监听模式</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="pattern">
|
||||
<option value="请选择"></option>
|
||||
<?php include_once '../view/tpl/pattern.html'; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
||||
lay-filter="save-account">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
let form = layui.form;
|
||||
|
||||
form.val('edit-account', {
|
||||
"platform": "<?php echo $platform ?>",
|
||||
"account": "<?php echo $account ?>",
|
||||
"password": "<?php echo $password ?>",
|
||||
"state": '<?php echo $state ?>' == 1 ? true : false,
|
||||
"pattern": "<?php echo $pattern ?>",
|
||||
});
|
||||
|
||||
form.on('submit(save-account)', function (obj) {
|
||||
let field = obj.field;
|
||||
field.state = 'state' in field ? 1 : 0;
|
||||
field.id = '<?php echo $id ?>';
|
||||
(async () => {
|
||||
const url = '/api/PayManage/editAccount';
|
||||
const info = field;
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
parent.layui.table.reload("account-table");
|
||||
});
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
})()
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
126
view/pay_manage/edit_channel.html
Normal file
126
view/pay_manage/edit_channel.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改收款终端</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<style>
|
||||
.inputTxt {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="edit-channel" class="layui-form layui-form-pane" action="" lay-filter="edit-channel">
|
||||
<div class="mainBox">
|
||||
<div class="main-container">
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">平台</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-mid inputTxt">
|
||||
<?php echo $platform ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-mid inputTxt">
|
||||
<?php echo $account ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">终端编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="channel" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">付款链接</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="qrcode" autocomplete="off" lay-affix="upload-drag"
|
||||
lay-filter="scanning" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">最后使用</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-form-mid inputTxt">
|
||||
<?php echo $last_time ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">启用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="state" class="layui-input" lay-skin="switch" lay-text="启用|禁用">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="pear-btn pear-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['form'], function () {
|
||||
let form = layui.form;
|
||||
|
||||
form.val('edit-channel', {
|
||||
"platform": "<?php echo $platform ?>",
|
||||
"account": "<?php echo $account ?>",
|
||||
"channel": "<?php echo $channel ?>",
|
||||
"qrcode": "<?php echo $qrcode ?>",
|
||||
"state": '<?php echo $state ?>' == 1 ? true : false
|
||||
});
|
||||
|
||||
form.on('input-affix(scanning)', function () {
|
||||
window.open('https://cli.im/deqr', '_blank');
|
||||
});
|
||||
|
||||
form.on('submit(save)', function (obj) {
|
||||
let field = obj.field;
|
||||
field.state = 'state' in field ? 1 : 0;
|
||||
field.id = '<?php echo $cid ?>';
|
||||
(async () => {
|
||||
const url = '/api/PayManage/editChannel';
|
||||
const info = field;
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name)); //关闭当前页
|
||||
parent.window.location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
})()
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
250
view/pay_manage/index.html
Normal file
250
view/pay_manage/index.html
Normal file
@@ -0,0 +1,250 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>收款管理</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
</head>
|
||||
|
||||
<body class="pear-container">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<form class="layui-form layui-form-pane" action="" id="serch-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">收款平台</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="platform">
|
||||
<option value="">收款平台</option>
|
||||
<?php foreach ($options as $key => $value) { ?>
|
||||
<option value="<?php echo $key ?>">
|
||||
<?php echo $value ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">启用</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="state">
|
||||
<option value="">请选择</option>
|
||||
<option value="1">启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">监听模式</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="pattern">
|
||||
<option value="">请选择</option>
|
||||
<?php include_once '../view/tpl/pattern.html'; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">收款账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="account" autocomplete="off" class="layui-input" placeholder="请输入">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button type="submit" class="pear-btn pear-btn-md pear-btn-primary" lay-submit
|
||||
lay-filter="query">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button type="button" lay-on="reset" class="pear-btn pear-btn-md">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="account-table" lay-filter="account-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="account-toolbar">
|
||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="addAccount">
|
||||
<i class="layui-icon layui-icon-add-1"></i>
|
||||
添加
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="delAccount">
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
删除
|
||||
</button>
|
||||
</script>
|
||||
<script type="text/html" id="account-state">
|
||||
<input type="checkbox" name="state" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="accountEnable" {{ d.state == 1 ? 'checked' : '' }} />
|
||||
</script>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['table', 'form', 'common', 'util'], function () {
|
||||
let table = layui.table;
|
||||
let form = layui.form;
|
||||
let common = layui.common;
|
||||
let util = layui.util;
|
||||
|
||||
let cols = [[
|
||||
{ type: 'checkbox' },
|
||||
{ title: '平 台', field: 'platform', align: 'center', templet: '' },
|
||||
{ title: '账 号', field: 'account', align: 'center' },
|
||||
{ title: '密 码', field: 'password', align: 'center' },
|
||||
{ title: '启用状态', field: 'state', align: 'center', templet: '#account-state' },
|
||||
{ title: '监听模式', field: 'pattern', align: 'center' },
|
||||
{ title: '终端数量', field: 'channel', align: 'center', templet: '<div><a href="javascript:;" lay-event="channelList"><span class="layui-badge layui-bg-green">{{= d.channel }}</span></a></div>' },
|
||||
{ title: '操作', align: 'center', fixed: 'right', templet: '<div><a href="javascript:;" class="layui-font-green" lay-event="edit"><strong>编辑</strong></a></div>' }
|
||||
]]
|
||||
|
||||
table.render({
|
||||
id: 'account-table',
|
||||
elem: '#account-table',
|
||||
url: '/api/PayManage/getPayAccount',
|
||||
page: true,
|
||||
cols: cols,
|
||||
skin: 'line',
|
||||
toolbar: '#account-toolbar',
|
||||
defaultToolbar: [{
|
||||
title: '刷新',
|
||||
layEvent: 'refresh',
|
||||
icon: 'layui-icon-refresh',
|
||||
}, 'filter', 'print', 'exports']
|
||||
});
|
||||
|
||||
// 事件处理
|
||||
|
||||
// 表格单元格事件
|
||||
table.on('tool(account-table)', function (obj) {
|
||||
const id = obj.data.id;
|
||||
if (obj.event === 'edit') {
|
||||
account.editAccount(id);
|
||||
} else if (obj.event === 'channelList') {
|
||||
account.channelList(id);
|
||||
}
|
||||
});
|
||||
// 表格头部按钮事件
|
||||
table.on('toolbar(account-table)', function (obj) {
|
||||
if (obj.event === 'refresh') {
|
||||
table.reload('account-table');
|
||||
} else if (obj.event === 'addAccount') {
|
||||
account.addAccount();
|
||||
} else if (obj.event === 'delAccount') {
|
||||
layer.confirm('确定删除账户?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
const pagedata = table.checkStatus(obj.config.id)
|
||||
let select_id = [];
|
||||
pagedata.data.forEach(val => {
|
||||
select_id.push(val.id);
|
||||
});
|
||||
httpJSON('/api/PayManage/delAccount', { ids: select_id })
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
});
|
||||
// 表单自定义事件监听
|
||||
form.on('submit(query)', function (obj) {
|
||||
const field = obj.field;
|
||||
let new_field = {};
|
||||
for (const key in field) {
|
||||
if (field.hasOwnProperty.call(field, key)) {
|
||||
const value = field[key];
|
||||
if (value) {
|
||||
new_field[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
table.reload('account-table', { where: new_field });
|
||||
return false;
|
||||
});
|
||||
// 启用状态
|
||||
form.on('switch(accountEnable)', function (obj) {
|
||||
const state = obj.elem.checked == true ? 1 : 0;
|
||||
const id = obj.value;
|
||||
const field = { state: state, id: id };
|
||||
account.accountEnable(obj, field);
|
||||
return false;
|
||||
});
|
||||
// 监听重置按钮
|
||||
util.on({
|
||||
reset: function () {
|
||||
document.querySelector('#serch-form').reset();
|
||||
table.reload('account-table', { where: {} });
|
||||
}
|
||||
});
|
||||
|
||||
// 操作方法
|
||||
let account = {};
|
||||
|
||||
// 编辑
|
||||
account.editAccount = function (id) {
|
||||
layer.open({
|
||||
id: 'iframe-edit-account',
|
||||
type: 2,
|
||||
title: '收款账号编辑',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '100%' : '500px', common.isModile() ? '100%' : '600px'],
|
||||
content: `/PayManage/editAccount?id=${id}`,
|
||||
});
|
||||
}
|
||||
// 终端列表
|
||||
account.channelList = function (id) {
|
||||
layer.open({
|
||||
id: 'iframe-channel-list',
|
||||
type: 2,
|
||||
title: '收款终端',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '100%' : '500px', common.isModile() ? '100%' : '700px'],
|
||||
content: `/PayManage/channelList?id=${id}`,
|
||||
});
|
||||
}
|
||||
// 添加账号
|
||||
account.addAccount = function () {
|
||||
layer.open({
|
||||
id: 'iframe-add-account',
|
||||
type: 2,
|
||||
title: '添加账号',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '100%' : '500px', common.isModile() ? '100%' : '500px'],
|
||||
content: `/PayManage/addAccount`,
|
||||
});
|
||||
}
|
||||
// 账户启用
|
||||
account.accountEnable = async (obj, field) => {
|
||||
const res = await fetch('/api/PayManage/accountEnable', { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(field) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 }, () => { obj.elem.checked = !obj.elem.checked });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.tips(rec_info.msg, obj.othis, { tips: 1, time: 1200 });
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 }, () => { obj.elem.checked = !obj.elem.checked });
|
||||
}
|
||||
}
|
||||
// 请求封装
|
||||
async function httpJSON(url, info) {
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
if (res.status !== 200) {
|
||||
layer.msg('请求失败,请重试!', { tips: 2, time: 1200 });
|
||||
return false;
|
||||
}
|
||||
const rec_info = await res.json();
|
||||
if (rec_info.code === 0) {
|
||||
layer.msg(rec_info.msg, { icon: 1, time: 1200 }, () => { table.reload('orders-table') });
|
||||
} else {
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
24
view/tpl/account_config.html
Normal file
24
view/tpl/account_config.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php echo "<?php\n"; ?>
|
||||
// +----------------------------------------------------------------------
|
||||
// | 支付监听配置,一个文件,一个账号
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 用户账号配置
|
||||
'user' => [
|
||||
'pid' => <?php echo $pid; ?>,
|
||||
'key' => '<?php echo $key; ?>'
|
||||
],
|
||||
// 收款平台账号配置
|
||||
'pay' => [
|
||||
// 账号id
|
||||
'aid' => <?php echo $aid; ?>,
|
||||
// 收款平台
|
||||
'platform' => '<?php echo $platform; ?>',
|
||||
// 账号
|
||||
'account' => '<?php echo $account; ?>',
|
||||
// 密码
|
||||
'password' => '<?php echo $password; ?>',
|
||||
// 订单查询参数配置
|
||||
'query' => <?php echo $query; ?>,
|
||||
]
|
||||
];
|
2
view/tpl/pattern.html
Normal file
2
view/tpl/pattern.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<option value="0">单次监听·被动</option>
|
||||
<option value="1">连续监听·主动</option>
|
6
view/tpl/platform_config.html
Normal file
6
view/tpl/platform_config.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php echo "<?php\n"; ?>
|
||||
// +----------------------------------------------------------------------
|
||||
// | 支持平台
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return <?php echo var_export($data, true); ?>;
|
127
view/user/index.html
Normal file
127
view/user/index.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>个人资料</title>
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="/admin/css/other/person.css" />
|
||||
</head>
|
||||
|
||||
<body class="pear-container">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 25px;">
|
||||
<div class="text-center layui-text">
|
||||
<div class="user-info-head" id="userInfoHead">
|
||||
<img src="/admin/images/avatar.jpg" id="userAvatar" width="115px" height="115px" alt="">
|
||||
</div>
|
||||
<h2 style="padding-top: 20px;font-size: 20px;">就眠仪式</h2>
|
||||
<p style="padding-top: 8px;margin-top: 10px;font-size: 13.5px;">China , 中国</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="height: 45px;border-top: 1px whitesmoke solid;text-align: center;line-height: 45px;font-size: 13.5px;">
|
||||
<span>今日事 ,今日毕</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
归档
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="list">
|
||||
<li class="list-item"><span class="title">优化代码格式</span><span class="footer">2020-06-04 11:28</span></li>
|
||||
<li class="list-item"><span class="title">新增消息组件</span><span class="footer">2020-06-01 04:23</span></li>
|
||||
<li class="list-item"><span class="title">移动端兼容</span><span class="footer">2020-05-22 21:38</span></li>
|
||||
<li class="list-item"><span class="title">系统布局优化</span><span class="footer">2020-05-15 14:26</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
我的文章
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="/admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;" />
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="/admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;" />
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['jquery', 'element', 'layer', 'convert'], function () {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery,
|
||||
convert = layui.convert;
|
||||
|
||||
let MODULE_PATH = "operate/";
|
||||
|
||||
var image = new Image();
|
||||
image.src = "/admin/images/avatar.jpg";
|
||||
image.onload = function () {
|
||||
$("#userAvatar").attr("src", convert.imageToBase64(image));
|
||||
}
|
||||
|
||||
window.callback = function (data) {
|
||||
layer.close(data.index);
|
||||
$("#userAvatar").attr("src", data.newAvatar);
|
||||
}
|
||||
|
||||
$("#userAvatar").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更换图片',
|
||||
shade: 0.1,
|
||||
area: ["900px", "500px"],
|
||||
content: MODULE_PATH + 'profile.html',
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index, layero) {
|
||||
window['layui-layer-iframe' + index].submitForm();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
103
view/user/login.html
Normal file
103
view/user/login.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>登录</title>
|
||||
<!-- 样 式 文 件 -->
|
||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="/admin/css/other/login.css" />
|
||||
<style>
|
||||
.index-txt {
|
||||
margin-top: 10px;
|
||||
line-height: 18px;
|
||||
color: #5f5f5f;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.index-txt>a {
|
||||
color: #5FB878;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<!-- 代 码 结 构 -->
|
||||
|
||||
<body background="/admin/images/background.svg" style="background-size: cover;">
|
||||
<form class="layui-form" action="javascript:void(0);">
|
||||
<div class="layui-form-item">
|
||||
<img class="logo" src="/admin/images/logo.png" />
|
||||
<div class="title">码支付</div>
|
||||
<div class="desc">
|
||||
明 湖 区 最 具 影 响 力 的 设 计 规 范 之 一
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="text" name="username" placeholder="账 户" lay-verify="required" hover class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="password" name="password" placeholder="密 码" lay-verify="required" hover class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="text" name="captcha" placeholder="验证码" hover lay-verify="required"
|
||||
class="code layui-input layui-input-inline" />
|
||||
<img src="/admin/images/captcha.gif" class="codeImage" />
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-xs6"><input name="keep_login" type="checkbox" title="记住密码" lay-skin="primary" checked>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div class="index-txt"><a href="/">首 页</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button type="submit" class="pear-btn pear-btn-success login" lay-submit lay-filter="login">
|
||||
登 入
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- 资 源 引 入 -->
|
||||
<script src="/component/layui/layui.js"></script>
|
||||
<script src="/component/pear/pear.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'button', 'popup'], function () {
|
||||
var form = layui.form;
|
||||
var button = layui.button;
|
||||
var popup = layui.popup;
|
||||
|
||||
// 登 录 提 交
|
||||
form.on('submit(login)', function (data) {
|
||||
let field = data.field;
|
||||
const is_keep = 'keep_login' in field;
|
||||
if (!is_keep) {
|
||||
field.keep_login = 'off';
|
||||
}
|
||||
// 动画
|
||||
const act_btn = button.load({ elem: '.login' });
|
||||
// 登陆
|
||||
(async () => {
|
||||
const rep_login = await fetch('/api/user/login', { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(field) });
|
||||
if (rep_login.status !== 200) {
|
||||
popup.failure('请求失败,请重试!');
|
||||
act_btn.stop();
|
||||
return false;
|
||||
}
|
||||
const info = await rep_login.json();
|
||||
if (info.code === 0) {
|
||||
act_btn.stop();
|
||||
popup.success("登录成功", function () {
|
||||
location.href = "/Console/index"
|
||||
});
|
||||
} else {
|
||||
act_btn.stop();
|
||||
popup.failure(info.msg);
|
||||
}
|
||||
|
||||
})();
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user