mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-17 17:26:40 +08:00
删除文件 view
This commit is contained in:
parent
667869bad8
commit
f92cf30922
File diff suppressed because one or more lines are too long
@ -1,146 +0,0 @@
|
|||||||
<!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>
|
|
@ -1,309 +0,0 @@
|
|||||||
<!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>
|
|
@ -1,359 +0,0 @@
|
|||||||
<!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>
|
|
||||||
</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];
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
// 渲染插件选项
|
|
||||||
(async () => {
|
|
||||||
const data = await fetch('/api/Plugin/pluginOption').then(res => res.json());
|
|
||||||
let option_str = `<option value="">收款平台</option>`;
|
|
||||||
data.forEach(val => {
|
|
||||||
option_str += `<option value="${val.platform}">${val.name}</option>`;
|
|
||||||
});
|
|
||||||
const select = document.querySelector('select[name="platform"]');
|
|
||||||
select.innerHTML = option_str;
|
|
||||||
form.render('select');
|
|
||||||
})()
|
|
||||||
// 表格列参数
|
|
||||||
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>
|
|
@ -1,245 +0,0 @@
|
|||||||
<!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>
|
|
@ -1,269 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>收银台</title>
|
|
||||||
<link rel="stylesheet" href="/component/pear/css/pear.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: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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: 22px;
|
|
||||||
}
|
|
||||||
</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 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="/component/layui/layui.js"></script>
|
|
||||||
<script src="/static/js/awesome-qr.min.js"></script>
|
|
||||||
<script>
|
|
||||||
const payCode = '<?php echo htmlentities($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);
|
|
||||||
// 订单过期时间
|
|
||||||
let passtime = 0;
|
|
||||||
// 订单状态查询
|
|
||||||
let orderTimer = 0;
|
|
||||||
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) {
|
|
||||||
clearTimeout(orderTimer);
|
|
||||||
layer.closeAll();
|
|
||||||
document.getElementById('divTime').innerHTML = '<small class="note">订单支付成功</small>';
|
|
||||||
document.getElementById('qrcode').src = '/static/img/pay_ok.png';// 输出支付成功提示图片
|
|
||||||
setTimeout(() => {
|
|
||||||
location.href = jsonData.return_url;
|
|
||||||
}, 1500);
|
|
||||||
}
|
|
||||||
passtime = jsonData.passtime;
|
|
||||||
if (passtime <= 0) {
|
|
||||||
clearTimeout(orderTimer);
|
|
||||||
}
|
|
||||||
timer(passtime);
|
|
||||||
}
|
|
||||||
queryOrder(`/getOrderState/${order}`);
|
|
||||||
})();
|
|
||||||
/* <?php if ($patt == 0 && $passtime > 0) { ?> */
|
|
||||||
// 验证支付结果
|
|
||||||
const id = '<?php echo htmlentities($id);?>';
|
|
||||||
const reVali = (step) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
layer.confirm('是否已支付?', { icon: 3, title: '提示', closeBtn: 0 },
|
|
||||||
(index) => {
|
|
||||||
(async () => {
|
|
||||||
const res = await validatePayResult(id, 1);
|
|
||||||
if (res) { reVali(8000) }
|
|
||||||
})()
|
|
||||||
layer.close(index);
|
|
||||||
}, (index) => {
|
|
||||||
reVali(5000);
|
|
||||||
layer.close(index);
|
|
||||||
})
|
|
||||||
}, step);
|
|
||||||
}
|
|
||||||
reVali(10000);
|
|
||||||
// 验证支付结果
|
|
||||||
async function validatePayResult(id, patt) {
|
|
||||||
const lay = layer.load(2);
|
|
||||||
let data = { id: id, patt: patt };
|
|
||||||
const res1 = await fetch(`/validatePayResult`, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) });
|
|
||||||
const rec1_info = await res1.json();
|
|
||||||
const info = await new Promise((resolve, reject) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
data.patt = 0;
|
|
||||||
fetch(`/validatePayResult`, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) })
|
|
||||||
.then((res2) => { return res2.json() }).then((rec2_info) => {
|
|
||||||
if (rec2_info.code == 0) {
|
|
||||||
layer.close(lay);
|
|
||||||
layer.msg('验证失败,稍后重新验证!');
|
|
||||||
resolve(true);
|
|
||||||
} else {
|
|
||||||
layer.close(lay);
|
|
||||||
layer.msg(rec2_info.msg);
|
|
||||||
resolve(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 5000);
|
|
||||||
})
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
/* <?php } ?> */
|
|
||||||
// 生成二维码
|
|
||||||
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(passtime) {
|
|
||||||
let minute = 0, second = 0; // 时间默认值
|
|
||||||
if (passtime > 0) {
|
|
||||||
minute = Math.floor(passtime / 60);
|
|
||||||
second = Math.floor(passtime) - (minute * 60);
|
|
||||||
}
|
|
||||||
if (passtime <= 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 class="note">${second}</small> 秒,失效勿付`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,108 +0,0 @@
|
|||||||
<!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>
|
|
||||||
</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;
|
|
||||||
|
|
||||||
// 渲染插件选项
|
|
||||||
(async () => {
|
|
||||||
const data = await fetch('/api/Plugin/pluginOption').then(res => res.json());
|
|
||||||
let option_str = `<option value="">收款平台</option>`;
|
|
||||||
data.forEach(val => {
|
|
||||||
option_str += `<option value="${val.platform}">${val.name}</option>`;
|
|
||||||
});
|
|
||||||
const select = document.querySelector('select[name="platform"]');
|
|
||||||
select.innerHTML = option_str;
|
|
||||||
form.render('select');
|
|
||||||
})()
|
|
||||||
|
|
||||||
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>
|
|
@ -1,85 +0,0 @@
|
|||||||
<!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>
|
|
@ -1,141 +0,0 @@
|
|||||||
<!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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-card {
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mainbox {
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
</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>
|
|
@ -1,131 +0,0 @@
|
|||||||
<!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>
|
|
||||||
</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;
|
|
||||||
|
|
||||||
// 渲染插件选项
|
|
||||||
(async () => {
|
|
||||||
const data = await fetch('/api/Plugin/pluginOption').then(res => res.json());
|
|
||||||
let option_str = `<option value="">收款平台</option>`;
|
|
||||||
data.forEach(val => {
|
|
||||||
option_str += `<option value="${val.platform}">${val.name}</option>`;
|
|
||||||
});
|
|
||||||
const select = document.querySelector('select[name="platform"]');
|
|
||||||
select.innerHTML = option_str;
|
|
||||||
form.render('select');
|
|
||||||
// 初始化表单
|
|
||||||
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>
|
|
@ -1,124 +0,0 @@
|
|||||||
<!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', {
|
|
||||||
"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>
|
|
@ -1,257 +0,0 @@
|
|||||||
<!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>
|
|
||||||
</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;
|
|
||||||
|
|
||||||
// 渲染插件选项
|
|
||||||
(async () => {
|
|
||||||
const data = await fetch('/api/Plugin/pluginOption').then(res => res.json());
|
|
||||||
let option_str = `<option value="">收款平台</option>`;
|
|
||||||
data.forEach(val => {
|
|
||||||
option_str += `<option value="${val.platform}">${val.name}</option>`;
|
|
||||||
});
|
|
||||||
const select = document.querySelector('select[name="platform"]');
|
|
||||||
select.innerHTML = option_str;
|
|
||||||
form.render('select');
|
|
||||||
})()
|
|
||||||
|
|
||||||
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('account-table') });
|
|
||||||
} else {
|
|
||||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,145 +0,0 @@
|
|||||||
<!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" />
|
|
||||||
<style>
|
|
||||||
.header-th div.layui-table-header th div {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.divider-vl {
|
|
||||||
display: inline-block;
|
|
||||||
width: 1px;
|
|
||||||
height: 1em;
|
|
||||||
margin: 0 8px;
|
|
||||||
vertical-align: middle;
|
|
||||||
position: relative;
|
|
||||||
background-color: #dcdfe6;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="pear-container">
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-body">
|
|
||||||
<div class="layui-row">
|
|
||||||
<div class="layui-col-xs12"></div>
|
|
||||||
<div class="layui-col-xs12">
|
|
||||||
<table id="plugin-table" lay-filter="plugin-table"></table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script type="text/html" id="plugin-toolbar">
|
|
||||||
<button class="layui-btn layui-btn-primary layui-bg-gray layui-btn-sm" grp-btn lay-event="showAllPlugin">全部</button>
|
|
||||||
<button class="layui-btn layui-btn-primary layui-bg-green layui-btn-sm" grp-btn lay-event="showInstalled">已安装</button>
|
|
||||||
<button class="layui-btn layui-btn-primary layui-bg-gray layui-btn-sm" grp-btn lay-event="showWaitInstall">待安装</button>
|
|
||||||
</script>
|
|
||||||
<script type="text/html" id="plugin-state">
|
|
||||||
<input type="checkbox" name="state" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="pluginEnable" {{ d.state == 1 ? 'checked' : '' }} />
|
|
||||||
</script>
|
|
||||||
<script type="text/html" id="plugin-action">
|
|
||||||
<a href="javascript:;" class="layui-font-green" lay-event="createConfig">配置</a><div class="divider-vl"></div>
|
|
||||||
<a href="javascript:;" class="layui-font-green" lay-event="pluginUpdate">更新</a><div class="divider-vl"></div>
|
|
||||||
<a href="javascript:;" class="layui-font-green" lay-event="pluginUninstall">卸载</a>
|
|
||||||
</script>
|
|
||||||
<script src="/component/layui/layui.js"></script>
|
|
||||||
<script src="/component/pear/pear.js"></script>
|
|
||||||
<script>
|
|
||||||
layui.use(['layer', 'form', 'common', 'layer'], function () {
|
|
||||||
let table = layui.table;
|
|
||||||
let layer = layui.layer;
|
|
||||||
let form = layui.form;
|
|
||||||
let common = layui.common;
|
|
||||||
let util = layui.util;
|
|
||||||
|
|
||||||
const cols = [[
|
|
||||||
{ title: '收款平台名称', field: 'name', align: 'center', maxWidth: 180 },
|
|
||||||
{ title: '官网', field: 'name', align: 'left', maxWidth: 220, templet: `<div><a href="{{= d.website }}" class="layui-font-green" target="_blank">{{= d.website }}</a></div>` },
|
|
||||||
{ title: '说明', field: 'describe', align: 'left' },
|
|
||||||
{ title: '价格', field: 'price', align: 'center', maxWidth: 180, templet: `<div>{{= d.price==0 ? '免费' : d.price }}</div>` },
|
|
||||||
{ title: '状态', field: 'state', align: 'center', maxWidth: 180, templet: `#plugin-state` },
|
|
||||||
{ title: '操作', align: 'right', maxWidth: 180, fixed: 'right', templet: `#plugin-action` },
|
|
||||||
]]
|
|
||||||
|
|
||||||
table.render({
|
|
||||||
id: 'plugin-table',
|
|
||||||
elem: '#plugin-table',
|
|
||||||
url: '/api/Plugin/getPluginList',
|
|
||||||
page: true,
|
|
||||||
skin: 'line',
|
|
||||||
cols: cols,
|
|
||||||
className: 'header-th',
|
|
||||||
toolbar: '#plugin-toolbar',
|
|
||||||
defaultToolbar: [{ title: '刷新', layEvent: 'refresh', icon: 'layui-icon-refresh' }]
|
|
||||||
});
|
|
||||||
// 表头工具事件
|
|
||||||
table.on('toolbar(plugin-table)', function (obj) {
|
|
||||||
if (obj.event === 'showAllPlugin') {
|
|
||||||
plugin.changClass(this);
|
|
||||||
} else if (obj.event === 'showInstalled') {
|
|
||||||
plugin.changClass(this);
|
|
||||||
} else if (obj.event === 'showWaitInstall') {
|
|
||||||
plugin.changClass(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
// 单元格事件
|
|
||||||
table.on('tool(plugin-table)', function (obj) {
|
|
||||||
const id = obj.data.id;
|
|
||||||
if (obj.event === 'createConfig') {
|
|
||||||
layer.msg(obj.event);
|
|
||||||
} else if (obj.event === 'pluginUpdate') {
|
|
||||||
layer.msg(obj.event);
|
|
||||||
} else if (obj.event === 'pluginUninstall') {
|
|
||||||
layer.msg(obj.event);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 启用状态
|
|
||||||
form.on('switch(pluginEnable)', function (obj) {
|
|
||||||
const state = obj.elem.checked == true ? 1 : 0;
|
|
||||||
const id = obj.value;
|
|
||||||
const field = { state: state, id: id };
|
|
||||||
plugin.enable(obj, field);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 处理点击btn切换class
|
|
||||||
let plugin = {};
|
|
||||||
plugin.changClass = (ele) => {
|
|
||||||
const select = 'layui-btn layui-btn-primary layui-bg-green layui-btn-sm';
|
|
||||||
const unselect = 'layui-btn layui-btn-primary layui-bg-gray layui-btn-sm';
|
|
||||||
ele.className = select;
|
|
||||||
const btns = document.querySelectorAll(`button[grp-btn]`);
|
|
||||||
btns.forEach(val => {
|
|
||||||
if (ele != val) {
|
|
||||||
val.className = unselect;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 启用
|
|
||||||
plugin.enable = async (obj, field) => {
|
|
||||||
const res = await fetch('/api/Plugin/pluginEnable', { 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 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,26 +0,0 @@
|
|||||||
<?php echo "<?php\n"; ?>
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 支付监听配置,一个文件,一个账号
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
return [
|
|
||||||
// 用户账号配置
|
|
||||||
'user' => [
|
|
||||||
'pid' => <?php echo $pid; ?>,
|
|
||||||
'key' => '<?php echo $key; ?>'
|
|
||||||
],
|
|
||||||
// 收款平台账号配置
|
|
||||||
'pay' => [
|
|
||||||
// 账号id
|
|
||||||
'aid' => <?php echo $aid; ?>,
|
|
||||||
// 收款平台
|
|
||||||
'platform' => '<?php echo $platform; ?>',
|
|
||||||
// 收款平台
|
|
||||||
'payclass' => '<?php echo $payclass; ?>',
|
|
||||||
// 账号
|
|
||||||
'account' => '<?php echo $account; ?>',
|
|
||||||
// 密码
|
|
||||||
'password' => '<?php echo $password; ?>',
|
|
||||||
// 订单查询参数配置
|
|
||||||
'query' => <?php echo $query; ?>,
|
|
||||||
]
|
|
||||||
];
|
|
@ -1,2 +0,0 @@
|
|||||||
<option value="0">单次监听·被动</option>
|
|
||||||
<option value="1">连续监听·主动</option>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?php echo "<?php\n"; ?>
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 支持平台
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
return <?php echo var_export($data, true); ?>;
|
|
@ -1,150 +0,0 @@
|
|||||||
<!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" />
|
|
||||||
<style>
|
|
||||||
.userset {
|
|
||||||
position: absolute;
|
|
||||||
right: 20px;
|
|
||||||
top: 20px;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="pear-container">
|
|
||||||
<div style="padding: 8px;">
|
|
||||||
<div class="layui-row layui-col-space16">
|
|
||||||
<div class="layui-col-md4">
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="userset"><a href="javascript:;" lay-on="setUser" title="设置">
|
|
||||||
<span class="icon pear-icon pear-icon-setting" style="font-size: 20px;"></span></a></div>
|
|
||||||
<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;">
|
|
||||||
<?php echo $nickname ?>
|
|
||||||
</h2>
|
|
||||||
<p style="padding-top: 8px;margin-top: 10px;font-size: 16px;">
|
|
||||||
<?php echo $username ?>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-elip"
|
|
||||||
style="height: 45px;border-top: 1px whitesmoke solid;text-align: center;line-height: 45px;font-size: 13.5px; padding: 0 32px;">
|
|
||||||
<span id="yiyan"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-header">API 密钥</div>
|
|
||||||
<div class="layui-card-body">
|
|
||||||
<div class="layui-form layui-form-pane">
|
|
||||||
<div class="layui-form-item" pane>
|
|
||||||
<label class="layui-form-label">API 接口</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<div class="layui-form-mid" style="margin-left: 10px;color: #5f5f5f;float: none;">
|
|
||||||
<?php echo $url ?>
|
|
||||||
<a href="javascript:;" lay-on="copyinfo" data-info="<?php echo $url ?>"
|
|
||||||
style="float: right;" title="复制"><span
|
|
||||||
class="icon pear-icon pear-icon-survey"></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item" pane>
|
|
||||||
<label class="layui-form-label">商户 PID</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<div class="layui-form-mid" style="margin-left: 10px;color: #5f5f5f;float: none;">
|
|
||||||
<?php echo $pid ?>
|
|
||||||
<a href="javascript:;" lay-on="copyinfo" data-info="<?php echo $pid ?>"
|
|
||||||
style="float: right;" title="复制"><span
|
|
||||||
class="icon pear-icon pear-icon-survey"></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item" pane>
|
|
||||||
<label class="layui-form-label">商户密钥 <a href="javascript:;" lay-on="resetKey"
|
|
||||||
title="重置密钥"><span class="icon pear-icon pear-icon-refresh"></span></a></label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<div class="layui-form-mid layui-elip"
|
|
||||||
style="margin-left: 10px;color: #5f5f5f;float: none;">
|
|
||||||
<?php echo $secret_key ?>
|
|
||||||
<a href="javascript:;" lay-on="copyinfo" data-info="<?php echo $secret_key ?>"
|
|
||||||
style="float: right;" title="复制"><span
|
|
||||||
class="icon pear-icon pear-icon-survey"></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-col-md8">
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-header">
|
|
||||||
我的文章
|
|
||||||
</div>
|
|
||||||
<div class="layui-card-body">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="/component/layui/layui.js"></script>
|
|
||||||
<script src="/component/pear/pear.js"></script>
|
|
||||||
<script>
|
|
||||||
layui.use(['layer', 'util'], () => {
|
|
||||||
let util = layui.util;
|
|
||||||
let layer = layui.layer;
|
|
||||||
|
|
||||||
util.on({
|
|
||||||
'copyinfo': (ele) => {
|
|
||||||
const info = ele.attr('data-info');
|
|
||||||
navigator.clipboard.writeText(info).then(() => { layer.msg('复制成功') });
|
|
||||||
},
|
|
||||||
'resetKey': (ele) => {
|
|
||||||
layer.confirm('重置密钥后,将无法使用原密钥,是否继续?', { icon: 3, title: '重置密钥' }, function (index) {
|
|
||||||
layer.close(index);
|
|
||||||
tool.resetKey();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'setUser': (ele) => {
|
|
||||||
tool.setUser();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
let tool = {};
|
|
||||||
tool.resetKey = async (id) => {
|
|
||||||
const res = await fetch(`/api/user/resetKey?id=${id}`);
|
|
||||||
const data = await res.json();
|
|
||||||
if (data.code === 0) {
|
|
||||||
layer.msg('密钥重置成功');
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tool.setUser = async () => {
|
|
||||||
layer.open({
|
|
||||||
id: 'iframe-set-user',
|
|
||||||
type: 2,
|
|
||||||
title: '修改',
|
|
||||||
shade: 0.1,
|
|
||||||
area: ['500px', '400px'],
|
|
||||||
content: `/User/setUser`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
fetch('https://tenapi.cn/v2/yiyan').then(res => res.text()).then(data => { document.getElementById('yiyan').innerHTML = data || '人无横财不富,马无夜草不肥'; })
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,103 +0,0 @@
|
|||||||
<!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>
|
|
@ -1,103 +0,0 @@
|
|||||||
<!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-user" class="layui-form layui-form-pane" action="" lay-filter="set-user">
|
|
||||||
<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 $pid ?>
|
|
||||||
</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 $username ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">昵称</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="nickname" 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>
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<div class="button-container">
|
|
||||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
|
||||||
lay-filter="user-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('set-user', {
|
|
||||||
"nickname": "<?php echo $nickname ?>",
|
|
||||||
"password": "<?php echo $password ?>",
|
|
||||||
});
|
|
||||||
|
|
||||||
form.on('submit(user-save)', function (obj) {
|
|
||||||
let field = obj.field;
|
|
||||||
(async () => {
|
|
||||||
const url = '/api/User/editUser';
|
|
||||||
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.location.reload();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 });
|
|
||||||
}
|
|
||||||
})()
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user