Merge pull request #1 from NimaQu/yftpay
加入易付通支付
commit
bfa0de017e
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
class PayConfig{
|
||||
|
||||
public $pay_config;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->pay_config = [
|
||||
"notify_url" => "/yft/notify",
|
||||
"return_url" => "/yft/notify",
|
||||
"type" => "aliPay"
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by 傲慢与偏见.
|
||||
* OSUser: D-L
|
||||
* Date: 2017/10/22
|
||||
* Time: 21:09
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
class YftOrder extends Model
|
||||
{
|
||||
protected $connection = "default";
|
||||
protected $table = "yft_order_info";
|
||||
protected $primaryKey = 'id';
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
{include file='admin/main.tpl'}
|
||||
|
||||
<main class="content">
|
||||
<div class="content-header ui-content-header">
|
||||
<div class="container">
|
||||
<h1 class="content-heading">充值记录</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="col-lg-12 col-sm-12">
|
||||
<section class="content-inner margin-top-no">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-main">
|
||||
<div class="card-inner">
|
||||
<p>系统中充值记录。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
{$orderList->render()}
|
||||
<table class="table ">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>订单号</th>
|
||||
<th>金额</th>
|
||||
<th>充值时间</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
{if sizeof($orderList) > 0}
|
||||
{foreach $orderList as $order}
|
||||
<tr>
|
||||
<td>#{$order->id}</td>
|
||||
<td>{$order->yft_order}</td>
|
||||
<td>{$order->price} 元</td>
|
||||
<td>{$order->create_time}</td>
|
||||
{if ($order->state == 1)}<td>已支付</td>{else}<td>未支付</td>{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="5">暂无充值记录!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
<span>总共{$countPage}页</span>
|
||||
<input type="hidden" id="countPage" value="{$countPage}">
|
||||
<span>当前第{$currentPage}页</span>
|
||||
<input type="hidden" id="currentPage" value="{$currentPage}">
|
||||
<a class="btn btn-brand" href="/admin/yftOrder">首页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="pre" onclick="goto('pre')">上一页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="nxt" onclick="goto('next')">下一页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="end" onclick="goto('end')">尾页</a>
|
||||
{$orderList->render()}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{include file='admin/footer.tpl'}
|
||||
<script>
|
||||
function goto(type) {
|
||||
var countPage = $("#countPage").val();
|
||||
var currentPage = $("#currentPage").val();
|
||||
if ("pre" == type){
|
||||
if (currentPage == 1 || currentPage == ""){
|
||||
$("#pre").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/admin/yftOrder?page=" + (currentPage - 1);
|
||||
}
|
||||
}else if ("next" == type){
|
||||
if (currentPage == countPage){
|
||||
$("#pre").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/admin/yftOrder?page=" + (currentPage + 1);
|
||||
}
|
||||
}else if ("end" == type){
|
||||
if (countPage == currentPage){
|
||||
$("#end").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/admin/yftOrder?page=" + countPage;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,7 @@
|
||||
<form name="paysubmit" action="/user/code/yft/pay" method="post">
|
||||
<input name="subject" type="hidden" value="余额充值" size="35"/>
|
||||
<input name="total_fee" type="hidden" value="{$price}" size="35"/>
|
||||
</form>
|
||||
<script>
|
||||
document.forms['paysubmit'].submit();
|
||||
</script>
|
||||
@ -0,0 +1,85 @@
|
||||
{include file='user/main.tpl'}
|
||||
|
||||
<main class="content">
|
||||
<div class="content-header ui-content-header">
|
||||
<div class="container">
|
||||
<h1 class="content-heading">充值记录</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="col-lg-12 col-sm-12">
|
||||
<section class="content-inner margin-top-no">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-main">
|
||||
<div class="card-inner">
|
||||
<p>系统中您的充值记录。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
{$orderList->render()}
|
||||
<table class="table ">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>订单号</th>
|
||||
<th>金额</th>
|
||||
<th>充值时间</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
{if sizeof($orderList) > 0}
|
||||
{foreach $orderList as $order}
|
||||
<tr>
|
||||
<td>#{$order->id}</td>
|
||||
<td>{$order->yft_order}</td>
|
||||
<td>{$order->price} 元</td>
|
||||
<td>{$order->create_time}</td>
|
||||
{if ($order->state == 1)}<td>已支付</td>{else}<td>未支付</td>{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="5">暂无充值记录!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
<span>总共{$countPage}页</span>
|
||||
<input type="hidden" id="countPage" value="{$countPage}">
|
||||
<span>当前第{$currentPage}页</span>
|
||||
<input type="hidden" id="currentPage" value="{$currentPage}">
|
||||
<a class="btn btn-brand" href="/user/yftOrder">首页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="pre" onclick="goto('pre')">上一页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="nxt" onclick="goto('next')">下一页</a>
|
||||
<a class="btn btn-brand" href="javascript:void(0)" id="end" onclick="goto('end')">尾页</a>
|
||||
{$orderList->render()}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{include file='user/footer.tpl'}
|
||||
<script>
|
||||
function goto(type) {
|
||||
var countPage = $("#countPage").val();
|
||||
var currentPage = $("#currentPage").val();
|
||||
if ("pre" == type){
|
||||
if (currentPage == 1 || currentPage == ""){
|
||||
$("#pre").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/user/yftOrder?page=" + currentPage - 1;
|
||||
}
|
||||
}else if ("next" == type){
|
||||
if (currentPage == countPage){
|
||||
$("#pre").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/user/yftOrder?page=" + currentPage + 1;
|
||||
}
|
||||
}else if ("end" == type){
|
||||
if (countPage == currentPage){
|
||||
$("#end").removeAttr('onclick');
|
||||
}else {
|
||||
window.location.href = "/user/yftOrder?page=" + countPage;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue