审查视图

public/themes/simpleboot3/portal/goodsdetails/goods_details.html 6.3 KB
anyv authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!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">
</head>

<body>
<div class="detail_box">
    <!-- 顶部 -->
    <div class="detail_top order_top">
anyv authored
17
        <a href="javascript:history.go(-1)">
anyv authored
18 19
            <img src="__TMPL__/public/assets/images/left2.png" alt="">
        </a>
anyv authored
20
        <p style="color:white">商品详情</p>
anyv authored
21 22 23 24 25
    </div>
    <!-- banner 顶部 -->
    <div class="de_top">
        <!-- 图片 -->
        <div class="de_topImg">
anyv authored
26
            <img src="{:cmf_get_image_url($data.show_img)}" alt="">
anyv authored
27 28 29 30 31
        </div>
        <!-- 文字 -->
        <div class="de_topTxt">
            <!-- 价格 -->
            <div class="de_topTxt1">
anyv authored
32 33
                <p class="de_topTxt1_1"><span>{$data.price0}</span>.{$data.price1}</p>
                <p class="de_topTxt1_2"><span>{$data.pricing0}</span>.{$data.pricing1}</p>
anyv authored
34 35
            </div>
            <!-- 名字 -->
anyv authored
36
            <div class="de_topTxt2 txt-cut">{$data.book_name}</div>
anyv authored
37 38
            <!-- 其他 -->
            <div class="de_topTxt3">
anyv authored
39 40 41
                <span>作者:{$data.author}</span>
                <span>适合年级:{$data.grade}</span>
                <span>销量:{$data.sales}</span>
anyv authored
42 43 44 45 46 47 48 49
            </div>
        </div>
    </div>
    <!-- 出版 -->
    <div class="de_main2">
        <ul class="de_main2_1">
            <li>
                <p class="de_main2Txt1">出版社</p>
anyv authored
50
                <span class="de_main2Txt2">{$data.press}</span>
anyv authored
51 52 53 54
                <img class="de_main2Img" src="__TMPL__/public/assets/images/29.png" alt="">
            </li>
            <li>
                <p class="de_main2Txt1">出版时间</p>
anyv authored
55
                <span class="de_main2Txt2">{$data.press_time}</span>
anyv authored
56 57 58 59 60 61
                <img class="de_main2Img" src="__TMPL__/public/assets/images/29.png" alt="">
            </li>
        </ul>
        <!-- 提示 -->
        <div class="de_main2_2">
            <ul>
anyv authored
62 63 64
                <volist name="data_label" id="vo">
                    <li>{$vo.name}</li>
                </volist>
anyv authored
65 66 67 68
            </ul>
        </div>
    </div>
    <!-- 相关推荐 -->
anyv authored
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
    <if condition="$is_recomm eq 1">
        <div class="de_main3">
            <div class="de_main3Tiele"><span>相关推荐</span></div>
            <ul class="de_main3_list">
                <volist name="data_recomm" id="vo">
                    <a href="{:url('Goodsdetails/Goods_details',array('goods_id'=>$vo.id))}">
                        <li>
                            <div class="de_main3Img">
                                <img src="{:cmf_get_image_url($vo.show_img)}" alt="">
                            </div>
                            <p class="one-txt-cut">{$vo.book_name}</p>
                        </li>
                    </a>
                </volist>
            </ul>
        </div>
    </if>
anyv authored
86 87
    <!-- 商品详情 -->
    <div class="de_main4">
anyv authored
88
        <div class="de_main3Tiele"><span>商品详情</span></div>
anyv authored
89 90 91 92 93
        <!-- 参数 -->
        <div class="de_main4Parameter">
            <h1>基本信息:</h1>
            <ul class="de_main4ParaCon">
                <li>
anyv authored
94 95
                    <p>书号:{$data.book_number}</p>
                    <p>开本:{$data.book_size}</p>
anyv authored
96 97
                </li>
                <li>
anyv authored
98 99
                    <p>纸张:{$data.paper}</p>
                    <p>印刷:{$data.printing}</p>
anyv authored
100 101
                </li>
                <li>
anyv authored
102 103
                    <p>装订:{$data.binding}</p>
                    <p>套装:{$data.suit}</p>
anyv authored
104 105 106 107 108
                </li>
            </ul>
        </div>
        <!-- 图片 -->
        <div class="de_main4Img">
anyv authored
109 110 111
            <volist name="det_img" id="vo">
                <img src="{:cmf_get_image_url($vo)}" alt="">
            </volist>
anyv authored
112 113 114 115
        </div>
    </div>
    <!-- 精彩推荐 -->
    <div class="de_main5">
anyv authored
116 117
        <div class="de_main5Tit">商品说明</div>
        <div class="de_main5Con">{$data.instr}</div>
anyv authored
118 119 120 121
    </div>

    <!-- 底部 -->
    <div class="de_footer">
5  
anyv authored
122
        <div class="de_footerLeft" onclick="goods_collection({$data.id})">
anyv authored
123 124 125 126
            <div class="de_footerLeftLi">
                <div class="de_footerLeftImg">
                    <img src="__TMPL__/public/assets/images/26.png" alt="">
                </div>
anyv authored
127
                <p>收藏</p>
anyv authored
128 129 130
            </div>
        </div>
        <div class="de_footerRight">
5  
anyv authored
131
            <div class="de_footerRight1" onclick="add_cart({$data.id})">加入购物车</div>
anyv authored
132
            <div class="de_footerRight2" onclick="buy_now({$data.id})">立即购买</div>
anyv authored
133 134 135 136
        </div>
    </div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
4  
anyv authored
137
<script src="__TMPL__/public/assets/js/jquery.js"></script>
5  
anyv authored
138 139
<script>
    /**
anyv authored
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
     * 点击立即购买
     */
    function buy_now(id){
        price = {$price};
       $.post("{:url('Goodsdetails/goodsdetails_go_pay')}",{id:id,myprice:price},function(data){
           obj = JSON.parse(data);
           if(obj.type == 3){
               alert('业务员商品和平台商品不能同时购买!');
           }else if(obj.type == 1){
               window.location.href = "{:url('Orderpage/order_page')}?indet_id="+obj.indet_id;
           }else if(obj.type == 2){
               window.location.href = "{:url('Orderpage/order_salesman_ty')}?indet_id="+obj.indet_id;
           }
       });
    }



    /**
5  
anyv authored
159 160 161
     *点击收藏
     */
    function goods_collection(id){
anyv authored
162 163 164 165 166 167 168
        $.post("{:url('Goodsdetails/goods_collection')}",{goods_id:id},function(data){
            if(data){
                alert('收藏成功');
            }else{
                alert('收藏失败');
            }
        });
5  
anyv authored
169
    }
1  
anyv authored
170 171 172 173

    /**
     *点击加入购物车
     */
5  
anyv authored
174 175 176 177 178 179 180 181 182 183
    function add_cart(id){
        $.post("{:url('Shopcart/add_cart')}",{goods_id:id},function(data){
            if(data == 2){
                alert('已添加购物车');
            }else if(data == 3){
                alert('添加失败');
            }else if(data == 1){
                alert('添加成功');
            }
        });
1  
anyv authored
184
    }
5  
anyv authored
185
</script>
anyv authored
186 187 188
</body>

</html>