mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-17 17:26:40 +08:00
更新支持云闪付通道
This commit is contained in:
parent
eeb877bd87
commit
62989e4100
BIN
public/static/img/unionpay.ico
Normal file
BIN
public/static/img/unionpay.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
public/static/img/unionpay.jpg
Normal file
BIN
public/static/img/unionpay.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -751,6 +751,10 @@
|
|||||||
<td>wxpay</td>
|
<td>wxpay</td>
|
||||||
<td>微信支付</td>
|
<td>微信支付</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>unionpay</td>
|
||||||
|
<td>云闪付</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 id="pay5"><a name="设备类型列表" class="reference-link"></a><span
|
<h3 id="pay5"><a name="设备类型列表" class="reference-link"></a><span
|
||||||
|
@ -5,6 +5,19 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>订单明细</title>
|
<title>订单明细</title>
|
||||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||||
|
<style>
|
||||||
|
.paytype {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paytype>span {
|
||||||
|
margin-left: 3px;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="pear-container">
|
<body class="pear-container">
|
||||||
@ -56,6 +69,7 @@
|
|||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
<option value="wxpay">微信支付</option>
|
<option value="wxpay">微信支付</option>
|
||||||
<option value="alipay">支付宝</option>
|
<option value="alipay">支付宝</option>
|
||||||
|
<option value="unionpay">云闪付</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -207,7 +221,7 @@
|
|||||||
{ title: '成交金额', field: 'really_price', 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: '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: '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: 'type', align: 'center', width: 120, templet: '<div>{{# if(d.type=="wxpay"){return`<div class="paytype"><img src="/static/img/wxpay.ico"width="15"><span>微信支付</span></div>`}if(d.type=="alipay"){return`<div class="paytype"><img src="/static/img/alipay.ico"width="15"><span>支付宝</span></div>`}if(d.type=="unionpay"){return`<div class="paytype"><img src="/static/img/unionpay.ico"width="15"><span>云闪付</span></div>`} }}</div>' },
|
||||||
{ title: '收款平台[账号:终端]', field: 'platform', align: 'center', minWidth: 160, templet: '<div>{{# return`${d.payAccount.platform} [${d.aid}:${d.cid}]` }}</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>' }
|
{ 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>' }
|
||||||
]]
|
]]
|
||||||
|
@ -23,6 +23,15 @@
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paytype {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paytype>strong {
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.alipay {
|
.alipay {
|
||||||
color: #1677ff;
|
color: #1677ff;
|
||||||
}
|
}
|
||||||
@ -30,6 +39,10 @@
|
|||||||
.wxpay {
|
.wxpay {
|
||||||
color: #1AAD19;
|
color: #1AAD19;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unionpay {
|
||||||
|
color: #d81e06;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -54,8 +67,8 @@
|
|||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款方式</strong></label></div>
|
<div class="layui-col-xs3"><label class="layui-form-label"><strong>收款方式</strong></label></div>
|
||||||
<div class="layui-col-xs9">
|
<div class="layui-col-xs9">
|
||||||
<div class="list">
|
<div class="list paytype">
|
||||||
<?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>" ?>
|
<?php $payway=['alipay'=>'支付宝','wxpay'=>'微信支付','unionpay'=>'云闪付'];$payway_img=['alipay'=>'/static/img/alipay.ico','wxpay'=>'/static/img/wxpay.ico','unionpay'=>'/static/img/unionpay.ico'];echo "<img src='{$payway_img[$type]}'width='16'><strong class='{$type}'>{$payway[$type]}</strong>" ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>订单明细</title>
|
<title>支付测试</title>
|
||||||
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
<link rel="stylesheet" href="/component/pear/css/pear.css" />
|
||||||
<style>
|
<style>
|
||||||
.paybtn {
|
.paybtn {
|
||||||
@ -60,6 +60,10 @@
|
|||||||
<img src="/static/img/alipay.ico" width="16">
|
<img src="/static/img/alipay.ico" width="16">
|
||||||
<span>支付宝</span>
|
<span>支付宝</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="pear-btn unionpay">
|
||||||
|
<img src="/static/img/unionpay.ico" width="16">
|
||||||
|
<span>云闪付</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -91,6 +95,9 @@
|
|||||||
document.querySelector('.alipay').addEventListener('click', function () {
|
document.querySelector('.alipay').addEventListener('click', function () {
|
||||||
crateOrder('alipay');
|
crateOrder('alipay');
|
||||||
});
|
});
|
||||||
|
document.querySelector('.unionpay').addEventListener('click', function () {
|
||||||
|
crateOrder('unionpay');
|
||||||
|
});
|
||||||
// 创建订单
|
// 创建订单
|
||||||
function crateOrder(paytype) {
|
function crateOrder(paytype) {
|
||||||
form.submit('paytest', function (data) {
|
form.submit('paytest', function (data) {
|
||||||
|
@ -166,6 +166,9 @@
|
|||||||
} else if (payType === 'alipay') {
|
} else if (payType === 'alipay') {
|
||||||
payTpeyImg.src = '/static/img/alipay.jpg';
|
payTpeyImg.src = '/static/img/alipay.jpg';
|
||||||
payTypeText.innerText = '请使用支付宝扫码支付'
|
payTypeText.innerText = '请使用支付宝扫码支付'
|
||||||
|
} else if (payType === 'unionpay') {
|
||||||
|
payTpeyImg.src = '/static/img/unionpay.jpg';
|
||||||
|
payTypeText.innerText = '请使用云闪付扫码支付'
|
||||||
}
|
}
|
||||||
// 生成二维码
|
// 生成二维码
|
||||||
if (codeType == 0) {
|
if (codeType == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user