go_add_address.html 5.4 KB
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>学考无忧-收获地址</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
    <style>
        .haha{

        }
    </style>
</head>

<body style="background-color:white;">
<div class="address_box">
    <!-- 顶部 -->
    <div class="ad_top">
        <a href="javascript:history.back(-1)">
            <img class="ad_topImg" src="__TMPL__/public/assets/images/left.png" alt="">
        </a>
        <h1>收货地址</h1>
        <a href="{:url('Orderpage/add_shop_address',array('indet_id'=>$indent_id,'type'=>$type))}">
            <p>新增地址</p>
        </a>
    </div>
    <!-- 内容 -->
    <div class="ad_content">
        <ul id="ad_contentUl">
            <volist name="data" id="vo">
                <li>
                    <div class="" style="display: flex;justify-content: flex-start;align-items: center;">
                        <div style="width: 0.4rem;height: 0.4rem;margin-right: 0.25rem;" class="select_img" data-id="{$vo.id}">
                            <img src="__TMPL__/public/assets/images/39_0.png" style="width:100%;height: 100%;" />
                        </div>
                        <div class="contant" style="width: 6rem;">
                            <div class="ad_conBox">
                                <div class="ad_con1">
                                    <p class="ad_conName">{$vo.name}</p>
                                    <if condition="$vo.default_address eq 1">
                                        <p class="ad_conMo" style="display:block;">默认</p>
                                        <else/>
                                        <p class="ad_conMo">默认</p>
                                    </if>
                                    <p class="ad_conPhone">{$vo.phone}</p>
                                    <img class="ad_conImg" src="__TMPL__/public/assets/images/35.png" alt="" ontouchstart="address_edit({$vo.id})">
                                </div>
                            </div>
                            <div class="jiantou" style="display: flex;display: -webkit-flex;justify-content: space-between;align-items: center">
                                <div class="jiantou_title"><p class="ad_conAddress">收货地址:{$vo.region}{$vo.detailed}</p></div>
                                <div class="jiantou_img" style="margin-top: 0.15rem;"><img class="ad_conImg" src="__TMPL__/public/assets/images/zuojiantou.png" alt=""></div>
                            </div>
                            <div class="ad_MoRemove">
                                <div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div>
                                <div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>
                            </div>
                        </div>
                    </div>
                </li>
            </volist>
        </ul>
    </div>
    <div onclick="deter_sub()" style="width: 1.5rem;height: 0.8rem;background:linear-gradient(344deg,rgba(255,78,0,1) 0%,rgba(255,157,45,1) 100%);border-radius: 0.025rem;text-align: center;line-height: 0.8rem;font-size: 0.3rem;color: #fff;margin: 0.5rem 0.5rem 0 auto;">确定</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/address.js"></script>
<script src="__TMPL__/public/assets/js/address(1).js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
    /**
     *点击确认
     */
    function deter_sub(){
        type = "{$type}";
        id = $('.haha').attr('data-id');
        if(typeof(id) == 'undefined'){

            if(type == 5){
                window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}";
            }else{
                window.location.href = "{:url('Orderpage/order_salesman_kd',array('indet_id'=>$indent_id))}";
            }

        }else{
            if(type == 5){
                window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}?address_id="+id;
            }else{
                window.location.href = "{:url('Orderpage/order_salesman_kd',array('indet_id'=>$indent_id))}?address_id="+id;
            }

        }

    }
</script>
<script>
    $("#btn").click(function(){
        console.log("确定成功")
    })
</script>
<script>
    function fors() {
        console.log(111)
    }

    /**
     *点击设置默认
     */
    function set_default(id){
        $.post("{:url('Personalcenter/set_default_address')}",{id:id},function(data){
            if(data){
            }else{
                alert('设置失败!');
            }
        });
    }

    /**
     * 点击删除地址
     */
    function address_del(id){
        $.post("{:url('Personalcenter/address_del')}",{id:id},function(data){
            if($data){
            }else{
                alert('删除失败!');
            }
        });
    }

    /**
     *编辑地址
     */
    function address_edit(id){
        window.location.href = "{:url('Orderpage/address_edit',array('indet_id'=>$indent_id,'type'=>$type))}?id="+id;
    }
</script>
</body>

</html>