|
|
|
@ -2,16 +2,21 @@
|
|
|
|
|
<div style="padding-top: 10px">
|
|
|
|
|
<%= hidden_field_tag(:friendly_id, @friendly_id) %>
|
|
|
|
|
|
|
|
|
|
<!-- <div class="showPanel" id="payTypeLine" NavShow>-->
|
|
|
|
|
<% if @test_wxpay %>
|
|
|
|
|
<div class="showPanel" id="payTypeLine" NavShow>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="showPanel" id="payTypeLine">
|
|
|
|
|
<!-- <p class="clearfix pr">-->
|
|
|
|
|
<!-- <label>支付方式</label>-->
|
|
|
|
|
<!-- <span class="mr5" style="margin-right: 24px;" id="payTypeName"><%#= @training.training_payinfo.pay_type.to_i == 3 ? "线下支付" : "微信支付" %></span>-->
|
|
|
|
|
<!-- <span class="mr5" style="margin-right: 24px;">线下支付</span>-->
|
|
|
|
|
<!-- <i class="iconfont icon-gengduo1 rightArrow" style="color: #323232;right: 4px"></i>-->
|
|
|
|
|
<!-- </p>-->
|
|
|
|
|
<!-- <div class="<%#= @training.training_payinfo.pay_type.to_i == 3 ? "" : "none" %> mt5" id="payInfos">-->
|
|
|
|
|
<div class="mt5" id="payInfos">
|
|
|
|
|
<% end %>
|
|
|
|
|
<p class="clearfix pr">
|
|
|
|
|
<label>支付方式</label>
|
|
|
|
|
<% if @test_wxpay %>
|
|
|
|
|
<span class="mr5" style="margin-right: 24px;" id="payTypeName"><%= @training.training_payinfo.pay_type.to_i == 3 ? "线下支付" : "微信支付" %></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="mr5" style="margin-right: 24px;">线下支付</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<i class="iconfont icon-gengduo1 rightArrow" style="color: #323232;right: 4px"></i>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="<%= @training.training_payinfo.pay_type.to_i == 3 ? "" : "none" %> mt5" id="payInfos">
|
|
|
|
|
<div class="payInfo df">
|
|
|
|
|
<span class="fl accountIcon">
|
|
|
|
|
<i class="iconfont icon-yinhangqia blue"></i>
|
|
|
|
@ -60,10 +65,13 @@
|
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
|
<p>备注</p>
|
|
|
|
|
<textarea class="remarkAccount" name="info" id="info" placeholder="请您在此输入您的留言"><%= @training.training_payinfo.info %></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="infoBar mb10 pay-image <%= @training.training_payinfo.pay_type.to_i == 3 ? "" : "none" %>">
|
|
|
|
|
<p>上传转账凭证</p>
|
|
|
|
|
<!--图片上传-->
|
|
|
|
|
<%= render :partial => 'upload_img', :locals => {:training => @training} %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="infoBar mb10">
|
|
|
|
|
<p>费用明细
|
|
|
|
|
<% if @training.training_type == 3 %>
|
|
|
|
@ -228,7 +236,7 @@
|
|
|
|
|
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
|
|
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.href = "/trainings/<%= @tag_id %>/result";
|
|
|
|
|
window.location.href = "/trainings/<%= @friendly_id %>/result";
|
|
|
|
|
}, 500);
|
|
|
|
|
} else if (res.err_msg == 'get_brand_wcpay_request:cancel') {
|
|
|
|
|
|
|
|
|
@ -358,14 +366,14 @@
|
|
|
|
|
$("#payTypeName").html($(this).html().trim());
|
|
|
|
|
console.log($(this).index());
|
|
|
|
|
if ($(this).index() == 0) { //微信支付
|
|
|
|
|
$("#payInfos,#sendPhoto").addClass("none");
|
|
|
|
|
$("#payInfos,.pay-image").addClass("none");
|
|
|
|
|
//切换显示按钮
|
|
|
|
|
$("#offlinePaySubmitBtn").addClass("none");
|
|
|
|
|
$("#paySubmitBtn").removeClass("none");
|
|
|
|
|
|
|
|
|
|
$('#pay_type').val("1");
|
|
|
|
|
} else { //线下支付
|
|
|
|
|
$("#payInfos,#sendPhoto").removeClass("none");
|
|
|
|
|
$("#payInfos,.pay-image").removeClass("none");
|
|
|
|
|
//切换显示按钮
|
|
|
|
|
$("#offlinePaySubmitBtn").removeClass("none");
|
|
|
|
|
$("#paySubmitBtn").addClass("none");
|
|
|
|
|