admin
2018-12-25 4cb15e222cd7d099d533ccbeb7f9a8cd99bf180c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
<!DOCTYPE html>
<html>
 
<head>
<meta charset="UTF-8">
<meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>栏目详情</title>
<!--css-->
<link rel="stylesheet" type="text/css" href="css/DOUI.min.css" />
<!--js-->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script>
<script src="js/DOUI.min.js" type="text/javascript" charset="utf-8"></script>
<style>
/*原样式*/
h1, h2, h3, h4, h5, h6, strong {
    font-weight: normal
}
 
h1, h2, h3, h4, h5, h6, p, ul, ol {
    margin: 0;
    font-weight: normal
}
 
ul, ol {
    list-style: none;
    padding: 0
}
 
a {
    text-decoration: none;
    color: #777;
    font-size: 12px
}
 
a:focus {
    background: transparent
}
 
a:focus {
    outline: 0
}
 
a:active {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
}
 
body {
    background: #efefef;
    font-family: "微软雅黑";
    margin: 0
}
 
.rich_media_title {
    margin: 0 !important
}
 
.titlePic {
    width: 100%;
    overflow: hidden;
    margin: 0;
    background: #fff
}
 
.titlePic img {
    width: 100%;
    float: left
}
 
.title {
    background: white;
    padding-top: 40px;
    padding-bottom: 4px
}
 
.line {
    border-top: 1px solid #efefef;
    height: 1px;
    position: relative
}
 
.line h5 {
    background: white;
    display: inline-block;
    width: 160px;
    text-align: center;
    font-size: 15px;
    color: #888;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -80px;
    margin-top: -11px
}
 
.cont-icon {
    overflow: hidden;
    box-sizing: border-box;
    padding: 5px;
    padding-top: 4px
}
 
.cont-icon li {
    width: 20%;
    padding: 5px;
    float: left;
    box-sizing: border-box
}
 
.cont-icon li a {
    display: inline-block;
    width: 100%;
    height: 100%;
    border-radius: 50%
}
 
.cont-icon li:first-of-type a {
    background: url(../img/wx.png) no-repeat bottom;
    background-size: 70% 70%
}
 
.cont-icon li:nth-of-type(2) a {
    background: url(../img/qqq.png) no-repeat bottom;
    background-size: 70% 70%
}
 
.cont-icon li:nth-of-type(3) a {
    background: url(../img/pyq.png) no-repeat bottom;
    background-size: 70% 70%
}
 
.cont-icon li:nth-of-type(4) a {
    background: url(../img/kj.png) no-repeat bottom;
    background-size: 70% 70%
}
 
.cont-icon li:nth-of-type(5) a {
    background: url(../img/wb.png) no-repeat bottom;
    background-size: 70% 70%
}
 
.goods {
    background: white;
    margin-top: 10px
}
 
.goods h5 {
    line-height: 40px;
    font-size: 15px;
    color: #333;
    text-align: center
}
 
.goods ul {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    border-top: 1px solid #efefef
}
 
.goods li {
    width: 50%;
    box-sizing: border-box;
    padding: 5px;
    border-bottom: 1px solid #efefef
}
 
.goods li a {
    display: inline-block;
    padding: 5px;
    width: 100%;
    color: #333;
    font-size: 14px;
    box-sizing: border-box
}
 
.goods li:nth-of-type(odd) {
    border-right: 1px solid #efefef
}
 
.goods li img {
    width: 100%;
    border-radius: 10px
}
 
.goods li p:first-of-type {
    line-height: 26px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}
 
.icon {
    display: inline-block;
    background: #ff3083;
    text-align: center;
    padding: 0 6px;
    font-size: 12px;
    border-radius: 4px;
    color: #fff;
    line-height: 20px;
    margin-right: 14px
}
 
.icon.tb {
    background: #f40
}
 
.icon.tm {
    background: #ff3083
}
 
.goods li p:nth-of-type(2) {
    padding: 6px 0;
    padding-bottom: 0;
    font-size: 18px;
    color: #ff3044;
    font-weight: bold
}
 
.goods li p:nth-of-type(2) span {
    font-size: 14px;
    font-weight: normal
}
 
.goods li p:nth-of-type(3) {
    font-size: 12px;
    color: #ff3044;
    line-height: 26px;
    overflow: hidden
}
 
.goods li p:nth-of-type(3) span:first-of-type {
    color: #999;
    text-decoration: line-through;
    float: left
}
 
.goods li p:nth-of-type(3) span:last-of-type {
    float: right
}
 
.goods li p:last-of-type {
    padding-top: 6px;
    overflow: hidden;
    font-size: 12px
}
 
.fl {
    float: left;
    color: #888;
    font-size: 13px
}
 
.fr {
    display: inline-block;
    float: right;
    background: #f8b551;
    color: #fff;
    border-radius: 4px;
    padding: 1px 4px 2px 4px
}
 
.zdy {
    background-color: white
}
 
.zdy img {
    max-width: 88%;
    height: auto;
    margin: auto
}
 
/*我的样式*/
/*商品单框*/
.homespdan {
    width: 49%;
    margin-bottom: 2vw;
    padding-bottom: 0.8rem;
    position: relative;
    background-color: white;
}
 
.homespcon {
    width: 94%;
    margin-left: 3%;
    position: relative;
    overflow: hidden;
}
/*商品图片*/
.homespimg {
    width: 49vw;
    height: 49vw;
}
 
.homespimg>img {
    width: 100%;
    height: 100%;
    display: block;
}
/*商品标题*/
.homesptype {
    width: 2rem;
    height: 1rem;
    position: absolute;
    left: 0;
    top: 0.4rem;
}
/*返利图标*/
.homespfanimg {
    width: 1.4rem;
    height: 1.1rem;
    margin-right: 0.2rem;
    display: block;
}
/*商品券*/
.homespquan {
    padding: 0.3rem 1rem;
    color: white;
    background-image: url(img/index_quan.png);
    background-size: 100% 100%;
}
</style>
</head>
 
<body class="displayNone">
    <div id="allwai" class="allwai">
 
        <!--好像是标题栏区域-->
        <div id="test"></div>
 
        <!--好像是文字内容区域-->
        <div class="page">
            <div class="titlePic">
                <img src="./img/hcj_banner_default.png" />
            </div>
            <div class="zdy"></div>
            <div class="title" style="display: none;">
                <div class="line">
                    <h5>分享给朋友</h5>
                </div>
                <ul class="cont-icon">
                    <li><a href="#"></a></li>
                    <li><a href="#"></a></li>
                    <li><a href="#"></a></li>
                    <li><a href="#"></a></li>
                    <li><a href="#"></a></li>
                </ul>
            </div>
            <div class="goods">
                <h5>编辑推荐</h5>
                <ul class="content"></ul>
            </div>
        </div>
 
        <!--商品卡片区域-->
        <div class="fboxWrap Xbetween" style="width: 100%;">
 
            <!--Vue循环添加商品单框-->
            <div v-for="item in splist.list" class="homespdan do-click"
                v-on:click="click_spdan(item.auctionId,'',item.title)">
 
                <!--商品图片-->
                <div class="homespimg fboxRow Xcenter Ycenter">
                    <img v-bind:src="item.pictUrl" />
                </div>
                <!--商品标题-->
                <div class="homespcon" style="margin-top: 0.5rem;">
                    <!--来源-->
                    <img v-if='item.shopType==1' class="homesptype"
                        src="img/index_type1.png" /> <img v-if='item.shopType==2'
                        class="homesptype" src="img/index_type2.png" />
                    <!--标题文字-->
                    <div class="font-ell2 font3" style="line-height: 1.5;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{item.title}}</div>
                </div>
                <!--商品返利和销量-->
                <div class="homespcon fboxRow Ycenter" style="margin-top: 1rem;">
                    <!--返利-->
                    <div class="fboxRow Ycenter">
                        <img class="homespfanimg" src="img/index_fan.png" />
                        <div v-if="item.taoBaoHongBaoInfo.hongbao>0"
                            class="font-gray font1">¥{{item.taoBaoHongBaoInfo.hongbao}}</div>
                        <div v-if="item.taoBaoHongBaoInfo.hongbao<=0"
                            class="font-gray font1">{{item.taoBaoHongBaoInfo.rate}}</div>
                    </div>
                    <!--销量-->
                    <div class="flex1 fboxRow Xend Ycenter"
                        style="margin-left: 1rem; overflow: hidden;">
                        <div class="font-gray font-ell1 font1">月销量:{{item.biz30day}}</div>
                    </div>
                </div>
                <!--价格相关-->
                <div v-if="item.taoBaoQuanInfo" class="homespcon"
                    style="margin-top: 1.2rem;">
                    <!--淘宝原划掉价格-->
                    <div v-if='item.shopType==1' class="font-gray font1">淘宝价:¥{{item.zkPrice}}</div>
                    <div v-if='item.shopType==2' class="font-gray font1">天猫价:¥{{item.zkPrice}}</div>
                    <!--目前支付价格-->
                    <div class="fboxRow Xbetween Ycenter" style="margin-top: 0.5rem;">
                        <!--价格-->
                        <div class="font6" style="color: #F12A23; font-weight: bold;">¥{{item.quanPrice}}</div>
                        <!--券-->
                        <div class="homespquan fboxRow Ycenter font1">券¥{{item.taoBaoQuanInfo.couponAmount}}</div>
                    </div>
                </div>
                <div v-if="!item.taoBaoQuanInfo" class="homespcon"
                    style="margin-top: 1.2rem;">
                    <!--淘宝原划掉价格-->
                
                    <div v-if='item.shopType==1' class="font-gray font1">淘宝价:¥{{item.reservePrice}}</div>
                    <div v-if='item.shopType==2' class="font-gray font1">天猫价:¥{{item.reservePrice}}</div>
                     
                    <!--目前支付价格-->
                    <div class="fboxRow Xbetween Ycenter" style="margin-top: 0.5rem;">
                        <!--价格-->
                        <div class="font6" style="color: #F12A23; font-weight: bold;">¥{{item.zkPrice}}</div>
                    </div>
                </div>
 
            </div>
            <!--Vue循环结束-->
 
        </div>
        <!--商品卡片区域结束-->
 
    </div>
</body>
 
</html>
 
 
<script type="text/javascript" src="../js/base64.js"></script>
<script type="text/javascript"
    src="//g.alicdn.com/mtb/lib-applink/0.3.4/??callApp.js,linksdk.js"></script>
<script type="text/javascript">
    var falg = false;
 
    $(function() {
 
        var agent = navigator.userAgent;
        //        $("#test").text(agent);
        var index1 = agent.indexOf("QQ");
        var index2 = agent.indexOf("Windows");
        var index3 = agent.indexOf("360");
        var index4 = agent.indexOf("UCBrowser");
        var index5 = agent.indexOf("MicroMessenger");
        var index6 = agent.indexOf("Weibo");
        var index7 = agent.indexOf("Firefox");
 
        if (index1 >= 0 || index2 >= 0 || index3 >= 0 || index4 >= 0
                || index5 >= 0 || index6 >= 0 || index7 >= 0) {
            falg = true;
            $.getScript("../js/tbsdk.js");
        }
 
        var id = getArgsFromHref(location.href, "id");
 
        $.post("../getRecommendSectionDetail", {
            "id" : id
        }, function(data) {
            if (data.code == 0) {
                setData(data.data);
            }
        }, 'json');
 
        $.post("../getRecommendSectionGoodsList", {
            "id" : id
        }, function(data) {
            if (data.code == 0) {
                setGoodsData(data.data);
            }
        }, 'json');
 
    });
 
    function setGoodsData(data) {
        var goodsList = data.goodsList;
        allwai.splist.list = goodsList;
    }
 
    function setData(data) {
        var picUrl = data.picUrl;
        var html = data.html;
        //        $(".titlePic").attr("href",picUrl);
        $(".titlePic img").attr("src", picUrl);
        $(".zdy").append(html);
    }
 
    function getArgsFromHref(sHref, sArgName) {
 
        var args = sHref.split("?");
        var retval = "";
 
        if (args[0] == sHref) /*参数为空*/{
            return retval; /*无需做任何处理*/
        }
 
        var str = args[1];
        args = str.split("&");
 
        for (var i = 0; i < args.length; i++) {
            str = args[i];
            var arg = str.split("=");
            if (arg.length <= 1)
                continue;
            if (arg[0] == sArgName)
                retval = arg[1];
        }
        return retval;
    }
 
    // ================================================================= 页面数据
    // vue 实例化
    var allwai = new Vue({
        el : "#allwai",
        // 数据
        data : {
            // 商品列表
            splist : {
                yema : 1, // 当前页码
                yemamax : 1, // 最大页码
                pagesize : 20, // 每页数量
                list : [], // 商品列表数据
            },
        },
    });
 
    function click_spdan(idC, url, title) {
        var base64 = new Base64();
        var entitle = base64.encode(title);
        var clickHref = "yestv://getgoodsdetail#" + idC + "#" + url + "#"
                + entitle;
        window.location.href = clickHref;
    }
 
    $("body").removeClass("displayNone");
</script>