审查视图

public/themes/simpleboot3/portal/orderpage/go_add_address.html 5.0 KB
anyv authored
1 2 3 4 5 6 7 8 9 10
<!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">
5  
anyv authored
11 12 13 14 15
    <style>
        .haha{

        }
    </style>
anyv authored
16 17 18 19 20 21 22 23 24 25
</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>
1  
anyv authored
26
        <a href="{:url('Orderpage/add_shop_address',array('indet_id'=>$indent_id,'type'=>$type))}">
anyv authored
27 28 29 30 31 32
            <p>新增地址</p>
        </a>
    </div>
    <!-- 内容 -->
    <div class="ad_content">
        <ul id="ad_contentUl">
anyv authored
33 34
            <volist name="data" id="vo">
                <li>
5  
anyv authored
35
                    <div class="" style="display: flex;justify-content: flex-start;align-items: center;">
7  
anyv authored
36
                        <div style="width: 0.4rem;height: 0.4rem;margin-right: 0.25rem;" class="select_img" data-id="{$vo.id}">
anyv authored
37 38 39 40 41 42 43 44 45 46 47 48
                            <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>
5  
anyv authored
49
                                    <img class="ad_conImg" src="__TMPL__/public/assets/images/35.png" alt="" ontouchstart="address_edit({$vo.id})">
anyv authored
50 51 52 53 54 55 56 57 58 59
                                </div>
                            </div>
                            <p class="ad_conAddress">收货地址:{$vo.region}{$vo.detailed}</p>
                            <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>
anyv authored
60 61 62
            </volist>
        </ul>
    </div>
7  
anyv authored
63
    <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>
anyv authored
64 65 66
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/address.js"></script>
anyv authored
67
<script src="__TMPL__/public/assets/js/address(1).js"></script>
anyv authored
68 69
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
7  
anyv authored
70 71 72 73
    /**
     *点击确认
     */
    function deter_sub(){
4  
anyv authored
74
        type = "{$type}";
7  
anyv authored
75 76
        id = $('.haha').attr('data-id');
        if(typeof(id) == 'undefined'){
4  
anyv authored
77 78 79 80 81 82 83

            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))}";
            }
7  
anyv authored
84
        }else{
4  
anyv authored
85 86 87 88 89 90
            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;
            }
7  
anyv authored
91 92 93 94 95
        }

    }
</script>
<script>
anyv authored
96 97 98 99 100
    $("#btn").click(function(){
        console.log("确定成功")
    })
</script>
<script>
anyv authored
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
    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){
1  
anyv authored
133
        window.location.href = "{:url('Orderpage/address_edit',array('indet_id'=>$indent_id,'type'=>$type))}?id="+id;
anyv authored
134 135 136 137 138
    }
</script>
</body>

</html>