cost.html 9.8 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_970727_urdo8lffop8.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
    <script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
    <script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
    <title>托管费用</title>
    <style>
        body{
            background: #F6F6F6;
        }
    </style>
</head>
<body>
<div class="agree_top">
    <div class="iconfont icon-xiangzuo"></div>
    <a href="javascript:history.back(-1);">返回</a>
</div>
<if condition="$type eq 1">
    <div class="costbox">
        <div id="text1">{$page_html1.content}</div>
    </div>
    <div class="regbtn collocation">免费托管</div>
    <div class="costbox costbottom">
        <div id="text2">{$page_html2.content}</div>
    </div>
    <div class="regbtn pay_btn"><a href="{:url('form/index')}">成为付费用户</a></div>
    <elseif condition="$type eq 2"/>
    <div class="costbox">
        <div>{$page_html2.content}</div>
    </div>
    <div class="regbtn collocation">付费托管</div>
</if>
<div class="cost_mold" style="display: none">
    <div class="costmoldmian">
        <div>
            您的托管信息已提交,请在个人信息里查看托管情况
        </div>
        <div class="costmold_btn "><a href="{:url('index/index')}">回到首页</a></div>
    </div>
</div>
<!--toast-->
<div id="toast" style="display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <p class="weui-toast__content">已完成</p>
    </div>
</div>
<input type="hidden" id="subjoin_guarantee_deadline_time_arr" value="<notempty name='$param.subjoin_guarantee_deadline_time_arr'>{$param.subjoin_guarantee_deadline_time_arr}</notempty>" />
<input type="hidden" id="subjoin_pay_method_price_arr" value="<notempty name='$param.subjoin_pay_method_price_arr'>{$param.subjoin_pay_method_price_arr}</notempty>" />
<input type="hidden" id="payment_time_arr" value="<notempty name='$param.payment_time_arr'>{$param.payment_time_arr}</notempty>" />
<input type="hidden" id="subjoin_time_arr" value="<notempty name='$param.subjoin_time_arr'>{$param.subjoin_time_arr}</notempty>" />
<input type="hidden" id="subjoin_price_arr" value="<notempty name='$param.subjoin_price_arr'>{$param.subjoin_price_arr}</notempty>" />
<input type="hidden" id="subjoin_insurance_type_id_arr" value="<notempty name='$param.subjoin_insurance_type_id_arr'>{$param.subjoin_insurance_type_id_arr}</notempty>" />
<input type="hidden" id="subjoin_product_name_arr" value="<notempty name='$param.subjoin_product_name_arr'>{$param.subjoin_product_name_arr}</notempty>" />
<input type="hidden" id="insurance_company_id" value="{$param.insurance_company_id}" />
<input type="hidden" id="product_name" value="{$param.product_name}" />
<input type="hidden" id="insurance_type_id" value="{$param.insurance_type_id}" />
<input type="hidden" id="insurance_price" value="{$param.insurance_price}" />
<input type="hidden" id="pay_method_id" value="{$param.pay_method_id}" />
<input type="hidden" id="payment_time" value="{$param.payment_time}" />
<input type="hidden" id="pay_method_price" value="{$param.pay_method_price}" />
<input type="hidden" id="guarantee_deadline_time" value="{$param.guarantee_deadline_time}" />
<input type="hidden" id="insurance_num" value="{$param.insurance_num}" />
<input type="hidden" id="application" value="{$param.application}" />
<input type="hidden" id="insurer" value="{$param.insurer}" />
<input type="hidden" id="relation" value="{$param.relation}" />
<input type="hidden" id="insurer_birthday" value="{$param.insurer_birthday}" />
<input type="hidden" id="insurer_time" value="{$param.insurer_time}" />
<input type="hidden" id="take_time" value="{$param.take_time}" />
<input type="hidden" id="insure_time" value="{$param.insure_time}" />
<input type="hidden" id="remit" value="{$param.remit}" />
<input type="hidden" id="remark" value="<notempty name='$param.remark'>{$param.remark}</notempty>" />
<input type="hidden" id="agent_name" value="<notempty name='$param.agent_name'>{$param.agent_name}</notempty>" />
<input type="hidden" id="agent_phone" value="<notempty name='$param.agent_phone'>{$param.agent_phone}</notempty>" />
<input type="hidden" id="imgs" value="<notempty name='$param.imgs'>{$param.imgs}</notempty>" />
<input type="hidden" id="recommend" value="{$param.recommend}" />
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>

<script type="text/javascript" src="__TMPL__/public/assets/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/common.js"></script>
<script>
    $('.free_btn').click(function () {
       $('.cost_mold').show();
    });
    var type = {$type};
    $('.collocation').click(function(){
        var subjoin_guarantee_deadline_time_arr = $('#subjoin_guarantee_deadline_time_arr').val();
        var subjoin_pay_method_price_arr = $('#subjoin_pay_method_price_arr').val();
        var payment_time_arr = $('#payment_time_arr').val();
        var subjoin_time_arr = $('#subjoin_time_arr').val();
        var subjoin_price_arr = $('#subjoin_price_arr').val();
        var subjoin_insurance_type_id_arr = $('#subjoin_insurance_type_id_arr').val();
        var subjoin_product_name_arr = $('#subjoin_product_name_arr').val();
        var insurance_company_id = $('#insurance_company_id').val();
        var product_name = $('#product_name').val();
        var insurance_type_id = $('#insurance_type_id').val();
        var insurance_price = $('#insurance_price').val();
        var pay_method_id = $('#pay_method_id').val();
        var payment_time = $('#payment_time').val();
        var pay_method_price = $('#pay_method_price').val();
        var guarantee_deadline_time = $('#guarantee_deadline_time').val();
        var insurance_num = $('#insurance_num').val();
        var application = $('#application').val();
        var insurer = $('#insurer').val();
        var relation = $('#relation').val();
        var insurer_birthday = $('#insurer_birthday').val();
        var insurer_time = $('#insurer_time').val();
        var take_time = $('#take_time').val();
        var insure_time = $('#insure_time').val();
        var remit = $('#remit').val();
        var remark = $('#remark').val();
        var agent_name = $('#agent_name').val();
        var agent_phone = $('#agent_phone').val();
        var imgs = $('#imgs').val();
        var recommend = $('#recommend').val();
        $.ajax({
            url: "{:url('form/add_post')}",
            type: "GET",
            data: {'subjoin_guarantee_deadline_time_arr':subjoin_guarantee_deadline_time_arr?subjoin_guarantee_deadline_time_arr:0,'subjoin_pay_method_price_arr':subjoin_pay_method_price_arr ? subjoin_pay_method_price_arr : 0,'payment_time_arr':payment_time_arr ? payment_time_arr : 0,'subjoin_time_arr':subjoin_time_arr ? subjoin_time_arr : 0,'subjoin_price_arr':subjoin_price_arr ? subjoin_price_arr : 0,'subjoin_insurance_type_id_arr':subjoin_insurance_type_id_arr ? subjoin_insurance_type_id_arr : 0,'subjoin_product_name_arr':subjoin_product_name_arr ? subjoin_product_name_arr :0,'insurance_company_id':insurance_company_id,'product_name':product_name,'insurance_type_id':insurance_type_id,'insurance_price':insurance_price,'pay_method_id':pay_method_id,'payment_time':payment_time,'pay_method_price':pay_method_price,'guarantee_deadline_time':guarantee_deadline_time,'insurance_num':insurance_num,'application':application,'insurer':insurer,'relation':relation,'insurer_birthday':insurer_birthday,'insurer_time':insurer_time,'take_time':take_time,'insure_time':insure_time,'remit':remit,'remark':remark,'agent_name':agent_name,'agent_phone':agent_phone,'imgs':imgs,'recommend':recommend},
            success: function (data) {
                var result1 = eval("(" + data + ")");
                var collocation_id = result1.data;
                if(result1.code == 20000){
                    //生成订单
                    $.ajax({
                        url: "{:url('form/create_order')}",
                        type: "POST",
                        data:{'collocation_id':collocation_id,'type':type},
                        success:function (data){
                            var result2 = eval("(" + data + ")");
                            console.log(result2);
                            if(result2.code == 20000){
                                if(type == 1){
                                    $('.cost_mold').show();
                                }else if(type == 2){
                                    if(result2.status == 2){
                                        window.location.href="{:url('portal/pay/index','','')}"+'/id/'+result2.data;
                                    }else{
                                        $('.cost_mold').show();
                                    }
                                }
                            }else if(result2.code == 40000){
                                toast(result2.msg)
                            }else{
                                toast('与服务器断开连接')
                            }
                        }
                    })
                }else if(result1.code == 40000){
                    toast(result1.msg)
                }else{
                    toast('与服务器断开连接')
                }
            }
        })
    })
</script>
</body>
</html>