<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>入驻缴费</title>
    {include file="public/user_head"}
    <style>
        li{
            list-style-type: none;
        }
        ul{
            margin: 0;
        }
        .clear{
            clear: both;
        }
        body{
            background:rgba(249,249,249,1);
        }
        /*菜单样式*/
        .content{
            width: 100%;
            font-size: 0;
            background:rgba(249,249,249,1);
        }
        .content .navBarBox{
            width: 100%;
            height: 50px;
            background: rgba(0,159,142,1);
        }
        .content .navBarBox ul{
            width: 1200px;
            height: 100%;
            margin: 0 auto;
            padding: 0;
            font-size: 16px;
            font-family: PingFangSC-Semibold;
            color:rgba(255,255,255,1);
        }
        .content .navBarBox ul li{
            width: 144px;
            height: 100%;
            line-height: 50px;
            list-style-type: none;
            float: left;
        }
        .content .navBarBox ul li a{
            color: rgba(255,255,255,1);
        }
        .content .titleImgContent{
            width: 100%;
            height: 146px;
        }
        .content .titleImgContent img{
            width: 100%;
            height: 100%;
        }
        /*主要内容*/
        .contentBox{
            width: 100%;
            margin-top: 12px;
        }
        .contentMain{
            margin: auto;
            width: 1200px;
        }
        .contentTop{
            height: 62px;
            line-height: 62px;
            margin-bottom: 10px;
            background:#fff;
        }
        .titleText{
            padding-left: 17px;
            height:22px;
            line-height:22px;
            font-size:16px;
            font-family:PingFang SC;
            font-weight:800;
            color:rgba(0,159,142,1);
            vertical-align: middle;
        }
        .titleLine{
            line-height: 20px;
            display: inline-block;
            width: 6px;
            height:20px;
            background:rgba(0,159,142,1);
            opacity:1;
            border-radius:2px;
            vertical-align: middle;
        }
        .contentList{
            padding: 40px;
            margin-bottom: 12px;
            background-color: #FFFFFF;
        }
        .settledPayTip{
            font-size:14px;
            font-family:PingFang SC;
            font-weight:400;
            color:rgba(69,77,87,1);
        }
        .settledPayBlock{
            padding: 19px 0;
            display: inline-block;
            width:182px;
            background:rgba(224,186,123,1);
            border-radius:2px;
            color:rgba(255,255,255,1);
            text-align: center;
            margin: 22px 16px 0 0;
        }
        .settledPaySvip{
            background:rgba(255,158,4,1);
        }
        .settledPayPrice{
            font-size:24px;
            font-family:PingFang SC;
        }
        .settledPayText img{
            width: 20px;
            height: 20px;
        }
        .settledPayText span{
            vertical-align: middle;
            font-size: 20px;
            font-family:PingFang SC;
            font-weight:bold;
        }
        .cityList{
            margin: 15px 0;
            padding: 24px 19px 24px 29px;
            width:824px;
            background:rgba(255,255,255,1);
            border:1px solid rgba(210,216,223,1);
            border-radius:8px;
        }
        .cityList .cityListTitle{
            display: inline-block;
            margin-bottom: 20px;
            font-size:16px;
            font-family:PingFang SC;
            font-weight:600;
            color:rgba(6,18,30,1);
        }
        .cityList ul li{
            width:80px;
            height:32px;
            border-radius:4px;
            line-height: 32px;
            text-align: center;
            cursor: pointer;
            font-size:14px;
            font-family:PingFang SC;
            font-weight:500;
            color:rgba(102,105,110,1);
            float: left;
            margin-right: 6px;
            margin-bottom: 6px;
            background:rgba(255,255,255,1);
            border:1px solid rgba(204,210,218,1);
            overflow: hidden;
            text-overflow:ellipsis;
            white-space: nowrap;
        }
        .cityActive{
            border:1px solid rgba(0,169,152,1)!important;
            color:rgba(0,159,142,1)!important;
        }
        .payBtn{
            background:rgba(0,159,142,1);
            border-radius:2px;
            color: #fff;
            width:382px;
            height:51px;
            font-size:18px;
            font-family:PingFang SC;
            font-weight:500;
            color:rgba(255,255,255,1);
            border: 0;
        }
        .payBtn:hover,.payBtn:visited,.payBtn:focus{
            color: #fff;
            color:rgba(255,255,255,1);
            border: 0;
        }
        .vipPrivilege{
            margin-top: 40px;
            margin-bottom: 80px;
            width: 812px;
        }
        .vipPrivilege div{
            font-size:14px;
            font-family:PingFang SC;
            font-weight:400;
            line-height:20px;
            color:rgba(102,105,110,1);
        }
        .vipPrivilegeTitle{
            display: inline-block;
            font-size:14px;
            font-family:PingFang SC;
            font-weight:500;
            color:rgba(6,18,30,1);
            margin-bottom: 6px;
        }


    </style>
</head>
<body>
{include file="public/header"}
<!--主要内容-->
<div class="content">
    {include file="public/nav"}
    <!--主要内容-->
    <div class="contentBox">
        <div class="contentMain">
            <div class="contentTop">
                <span class="titleLine"></span>
                <span class="titleText">
                    入驻缴费
                </span>
            </div>
            <div class="contentList">
                <div class="settledPayTip">感谢您对工品达平台的支持和信赖,请确认缴费信息</div>
                <div>
                    <div class="settledPayBlock settledPaySvip">
                          <span id="totalPrice" class="settledPayPrice">
                             {$price.vipprice}
                          </span>
                        <div class="settledPayText">
                            <img src="__CDN__/assets/store/images/vip.png" alt="">
                            <span>VIP</span>
                        </div>
                    </div>
                    <a href="{:url('svip')}">
                        <div class="settledPayBlock">
                            <span class="settledPayPrice">
                             {$price.svipprice}
                            </span>
                            <div class="settledPayText">
                                <img src="__CDN__/assets/store/images/vip.png" alt="">
                                <span>SVIP</span>
                            </div>
                        </div>
                    </a>
                </div>
                <div class="cityList">
                    <span class="cityListTitle">
                          城市列表
                    </span>
                    <ul>
                        {foreach name="$province" item="p"}
                        {if condition="$store_type eq 1 && $is_valid eq 1"}
                        <li class="cityActive" data-id="{$p.id}" title="{$p.name}">{$p.name}
                        </li>
                        {else/}
                        <li class="{eq name='$key' value='0'}cityActive{/eq}" data-id="{$p.id}"
                            onclick="cityClick(this)" title="{$p.name}">{$p.name}
                        </li>
                        {/if}
                        {/foreach}
                        <div class="clear"></div>
                    </ul>
                </div>
                <button type="button" class="btn payBtn" onclick="pay()">立即缴费</button>
                <div class="vipPrivilege">
                    <span class="vipPrivilegeTitle">会员特权</span>
                    <div>{$vipdesc.content}</div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer"}
<script>
    var unitPrice = {$price.vipprice};
    var selectCity = '';
    function cityClick(obj) {
        if($(obj).hasClass('cityActive')){
            $(obj).removeClass('cityActive');
        }else{
            $(obj).addClass('cityActive');
        }
        var num = $('.cityActive').length;
        $('#totalPrice').html((unitPrice * num).toFixed(2))
    }

    //立即缴费
    function pay() {
        var province_ids_length = $('.cityActive').length;//省份id
        var province_ids = [];
        var base_url = "{$url}";
        var base_arr = base_url.split('.');
        //普通会员
        if (province_ids_length == '' || province_ids_length == undefined) {
            toast('请至少选择一个省份~');
            return false;
        }
        //获取省份id
        $($('.cityActive')).each(function (key, c) {
            province_ids.push($('.cityActive').eq(key).attr('data-id'));
        });
        province_ids = province_ids.join(',');
        var url = base_arr[0] + '/province_ids/' + province_ids + '.' + base_arr[1];
        window.location.href = url;
    }
</script>
</body>
</html>