134 lines
6.0 KiB
PHP
134 lines
6.0 KiB
PHP
@extends('web.layouts.mpay')
|
|
@section('content')
|
|
|
|
<form class="" name="FormPay" id="FormPay" action="{{ route('web.order.orderPost') }}" method="post">
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
|
<input type="hidden" name="goods_id" value="{{ $good->id }}">
|
|
<input type="hidden" name="name" value="{{ $good->name }}">
|
|
|
|
<div class="h5ui-page top">
|
|
<h5 class="h5ui-group_title">
|
|
订单信息
|
|
</h5>
|
|
<div class="h5ui-form">
|
|
<label for="money" class="h5ui-form-label">充值金额</label>
|
|
<input type="text" name="order_money" value="{{ $good->money or 0 }}" id="money" class="h5ui-form-input" placeholder="请输入金额" onkeyup="clearNumber(this)">
|
|
<span class="h5ui-form-input_tip">元</span>
|
|
</div>
|
|
<div class="h5ui-group">
|
|
<div class="h5ui-list">
|
|
<div class="h5ui-list_bd">实付金额</div>
|
|
<div class="h5ui-list_ft">
|
|
<small>¥<span id="amount_total">{{ $good->money or 0 }}</span></small>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- start [radio] -->
|
|
<div class="h5ui-radio" data-toggle="buttons">
|
|
{{--<label for="wechat" data="wxwap" class="btn active">--}}
|
|
{{--<input type="radio" id="wechat" name="payType" checked="checked" value="wxwap">--}}
|
|
{{--<i class="h5ui-radio_hd"><img src="static/wx.png" width="28" height="28" align="wechat"></i>--}}
|
|
{{--<span class="h5ui-radio_bd">微信支付</span>--}}
|
|
{{--<span class="h5ui-radio_ft"></span>--}}
|
|
{{--</label>--}}
|
|
<label for="alipay" data="alipay" class="btn">
|
|
<input type="radio" id="alipay" name="" value="alipay">
|
|
<i class="h5ui-radio_hd"><img src="{{ $style_path }}/static/m/alipay.png" width="28" height="28" align="h5ui"></i>
|
|
<span class="h5ui-radio_bd">支付宝</span>
|
|
<span class="h5ui-radio_ft"></span>
|
|
</label>
|
|
<label for="alipay" data="alipayscan" class="btn">
|
|
<input type="radio" id="alipay" name="" value="alipayscan">
|
|
<i class="h5ui-radio_hd"><img src="{{ $style_path }}/static/m/alipay.png" width="28" height="28" align="h5ui"></i>
|
|
<span class="h5ui-radio_bd">支付宝扫码支付</span>
|
|
<span class="h5ui-radio_ft"></span>
|
|
</label>
|
|
{{--<label for="QQwap" data="QQwap" class="btn">--}}
|
|
{{--<input type="radio" id="QQwap" name="payType" value="QQwap">--}}
|
|
{{--<i class="h5ui-radio_hd"><img src="static/QQ.png" width="28" height="28" align="h5ui"></i>--}}
|
|
{{--<span class="h5ui-radio_bd">QQ钱包</span>--}}
|
|
{{--<span class="h5ui-radio_ft"></span>--}}
|
|
{{--</label>--}}
|
|
{{--<label for="unionpaywap" data="unionpaywap" class="btn">--}}
|
|
{{--<input type="radio" id="unionpaywap" name="payType" value="unionpaywap">--}}
|
|
{{--<i class="h5ui-radio_hd"><img src="static/union.png" width="28" height="28" align="h5ui"></i>--}}
|
|
{{--<span class="h5ui-radio_bd">网上银行</span>--}}
|
|
{{--<span class="h5ui-radio_ft"></span>--}}
|
|
{{--</label>--}}
|
|
</div>
|
|
<!-- end [radio] -->
|
|
</div>
|
|
<input type="hidden" value="" name=pay_type id=channelID>
|
|
|
|
|
|
<div class="h5ui-page spacing-cell">
|
|
<p>
|
|
<button type="button" class="h5ui-btn h5ui-btn_primary" id="goBuy">立即支付</button>
|
|
</p>
|
|
</div>
|
|
</form>
|
|
<!-- Copyright -->
|
|
<!-- start [长内容操作] -->
|
|
<div class="h5ui-modal" id="modal-middle" tabindex="-1" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog middle">
|
|
<div class="modal-content clearfix">
|
|
<div class="modal-header">
|
|
充值帮助
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="javascript:void(0);" class="h5ui-btn" data-dismiss="modal">我知道了</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end [长内容操作] -->
|
|
<!-- start [失败提示] -->
|
|
<div class="h5ui-alert h5ui-alert_error" id="alert-error">
|
|
<i class="h5ui-alert_error_icon"></i><span>请选择支付方式!</span>
|
|
</div>
|
|
<!-- end [失败提示] -->
|
|
<!-- start [失败提示] -->
|
|
<div class="h5ui-alert h5ui-alert_error" id="alert-error-amount">
|
|
<i class="h5ui-alert_error_icon"></i><span>请输入正确的充值金额!</span>
|
|
</div>
|
|
|
|
@endsection
|
|
@section('foot_js')
|
|
<script>
|
|
function clearNumber(obj) {
|
|
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) {
|
|
$("#faceValue").val(total);
|
|
$("#amount_total").html(total);
|
|
}
|
|
}
|
|
|
|
$(".h5ui-radio label").on("click", function() {
|
|
console.log($(this).attr("data"));
|
|
$("#channelID").val($(this).attr("data"));
|
|
});
|
|
|
|
$("#goBuy").on("click", function() {
|
|
//$("#alert-error").show().delay(2000).fadeOut();
|
|
if ($("#money").val() == "") {
|
|
$("#money").focus()
|
|
$("#alert-error-amount").show().delay(2000).fadeOut();
|
|
return false;
|
|
}
|
|
if ($("#channelID").val() == "") {
|
|
$("#alert-error").show().delay(2000).fadeOut();
|
|
return false;
|
|
}
|
|
$("#FormPay").submit();
|
|
});
|
|
</script>
|
|
@endsection |