181 lines
9.5 KiB
PHP
181 lines
9.5 KiB
PHP
@extends('web.layouts.pay')
|
|
@section('content')
|
|
|
|
<form id="FormPay" action="{{ route('web.order.orderPost') }}" method="post" target="_blank" name="FormPay">
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
|
<input type="hidden" value="" name=pay_type id=channelID>
|
|
|
|
|
|
<div class=tastesdk>
|
|
|
|
<div class=tastesdk-box>
|
|
<div class=main>
|
|
<input type=radio class="tab left" name=choosetypedemo>
|
|
<input type=radio checked=checked class="tab mid" name=choosetypedemo>
|
|
<label class="tab-btn mid">PC网页支付</label>
|
|
<div class=typedemo>
|
|
<div class=tit>提交支付订单</div>
|
|
<div class=demo-pc>
|
|
|
|
<div class="pay-jd" style="display:block">
|
|
<ul class=jdt>
|
|
<li>提交支付订单</li>
|
|
<li>选择支付方式</li>
|
|
<li>在线付款</li>
|
|
</ul>
|
|
<div class=first-step>
|
|
<div class=address>
|
|
<h5>定制价格</h5>
|
|
<p><input type="text" placeholder="自定义价格" value="{{ $good->money ?? '' }}"
|
|
id="amount" name="money"
|
|
onkeyup="clearNumber(this)"/></p>
|
|
</div>
|
|
<div class=order-infor>
|
|
<h5>订单信息</h5>
|
|
<table border=0>
|
|
<tr>
|
|
<th></th>
|
|
<th>金额</th>
|
|
<th>总计</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<span>在线充值</span>
|
|
|
|
</p>
|
|
</td>
|
|
<td id="amount_singel">¥{{ $good->money or 0 }}</td>
|
|
<td id="amount_total">¥{{ $good->money or 0 }}</td>
|
|
</tr>
|
|
</table>
|
|
<div class=pay-box>应付金额:<strong id="amount_order">{{ $good->money or 0 }}
|
|
<span></span></strong>
|
|
<button type="button" class="pcdemo-btn sbt-btn" ta=提交订单></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="two-step" style="display:none;">
|
|
<p><strong>请您及时付款,以便订单尽快处理!</strong>请您在提交订单后<span>24小时</span>内完成支付,否则订单会自动取消。</p>
|
|
<ul class=pay-infor>
|
|
<li>支付金额:<strong id="pay_order">{{ $good->money or 0 }}<span>元</span></strong>
|
|
</li>
|
|
<li>收款方:{{ config_cache('config.sitename') }}</li>
|
|
<li>商品名称:{{ $good->name }}</li>
|
|
</ul>
|
|
<h5>选择支付方式</h5>
|
|
<ul class=pay-label>
|
|
<li>
|
|
<input type=radio value=alipay name=channel id=alipay>
|
|
<label for=alipay style="width: 180px">
|
|
<img src="{{ $style_path }}/static/AliPay.png">
|
|
<span>直接支付</span>
|
|
</label>
|
|
</li>
|
|
<li>
|
|
<input type=radio value=alipayscan name=channel id=alipayscan>
|
|
<label for=alipayscan style="width: 180px">
|
|
<img src="{{ $style_path }}/static/AliPay.png">
|
|
<span>扫码支付</span>
|
|
</label>
|
|
</li>
|
|
{{--<li>--}}
|
|
{{--<input type=radio value=weixin name=channel id=weixin>--}}
|
|
{{--<label for=weixin>--}}
|
|
{{--<img src="{{ $style_path }}/static/wx.png">--}}
|
|
{{--</label>--}}
|
|
{{--</li>--}}
|
|
{{----}}
|
|
|
|
{{--<li>--}}
|
|
{{--<input type=radio value=QQbao name=channel id=QQbao>--}}
|
|
{{--<label for=QQbao>--}}
|
|
{{--<img src="{{ $style_path }}/static/tencent.png">--}}
|
|
{{--</label>--}}
|
|
{{--</li>--}}
|
|
|
|
{{--<li>--}}
|
|
{{--<input type=radio value=uniopnpay name=channel id=uniopnpay>--}}
|
|
{{--<label for=uniopnpay>--}}
|
|
{{--<img src="{{ $style_path }}/static/uniopnpay.png">--}}
|
|
{{--</label>--}}
|
|
{{--</li>--}}
|
|
|
|
</ul>
|
|
<input type="hidden" name="goods_id" value="{{ $good->id }}">
|
|
<input type="hidden" name="title" value="{{ $good->name }}">
|
|
|
|
|
|
<div class=btns>
|
|
<button type="button" class="pcdemo-btn sbpay-btn" ta=立即支付></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="pay-res" id="pay-success" style="display:none;">
|
|
<h4>支付成功</h4>
|
|
|
|
|
|
<div class=suc-btns>
|
|
<button type="button" class="pcdemo-btn back-demo-btn" ta=返回收银台首页></button>
|
|
<a class="gocheckorderid" href=#nogo>查询订单</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="pay-res" id="pay-error" style="display:none;">
|
|
<h4>支付失败</h4>
|
|
|
|
|
|
<div class=suc-btns>
|
|
<button type="button" class="pcdemo-btn back-demo-btn" ta=返回首页></button>
|
|
<a class="gocheckorderid" href=#nogo>查询订单</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="confirm-pop" style="display:none;">
|
|
<div class=confirm>
|
|
<h4>确认支付</h4>
|
|
<p>请在新打开的页面进行支付!<span>支付完成前请不要关闭此窗口</span>
|
|
</p>
|
|
<div class=confirm-btns>
|
|
<button type="button" class=finish-btn ta=已完成支付></button>
|
|
<button type="button" class=change-pay ta=更换支付方式></button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type=radio class="tab right" name=choosetypedemo>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
@endsection
|
|
@section('foot_js')
|
|
<script>
|
|
function clearNumber(obj) {
|
|
layui.use('jquery', function () {
|
|
var $ = layui.jquery;
|
|
|
|
obj.value = obj.value.replace(/[^\d.]/g, "");
|
|
obj.value = obj.value.replace(/^\./g, "");
|
|
obj.value = obj.value.replace(/\.{2,}/g, ".");
|
|
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
|
|
|
|
var total = parseFloat(obj.value);
|
|
if (total > 0) {
|
|
$("#amount_singel,#amount_total,#amount_order").html("¥" + total);
|
|
$("#pay_order").html(total + "<span>元</span>");
|
|
$("#faceValue").val(total);
|
|
$(".res_amount").html(total);
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
@endsection |