正在显示
4 个修改的文件
包含
121 行增加
和
101 行删除
@@ -705,7 +705,7 @@ | @@ -705,7 +705,7 @@ | ||
705 | <li> | 705 | <li> |
706 | <div class="customerInfo"> | 706 | <div class="customerInfo"> |
707 | <img src="{$c1.user.avatar}" alt="img"> | 707 | <img src="{$c1.user.avatar}" alt="img"> |
708 | - <p class="customerNickname">{$c1.user.username}</p> | 708 | + <p class="customerNickname">{$c1.user.nickname|default='****'}</p> |
709 | </div> | 709 | </div> |
710 | <div class="evaluateInfo"> | 710 | <div class="evaluateInfo"> |
711 | <div class="title"> | 711 | <div class="title"> |
@@ -744,7 +744,7 @@ | @@ -744,7 +744,7 @@ | ||
744 | <li> | 744 | <li> |
745 | <div class="customerInfo"> | 745 | <div class="customerInfo"> |
746 | <img src="{$c2.user.avatar}" alt="img"> | 746 | <img src="{$c2.user.avatar}" alt="img"> |
747 | - <p class="customerNickname">{$c2.user.username}</p> | 747 | + <p class="customerNickname">{$c2.user.nickname|default='****'}</p> |
748 | </div> | 748 | </div> |
749 | <div class="evaluateInfo"> | 749 | <div class="evaluateInfo"> |
750 | <div class="title"> | 750 | <div class="title"> |
@@ -783,7 +783,7 @@ | @@ -783,7 +783,7 @@ | ||
783 | <li> | 783 | <li> |
784 | <div class="customerInfo"> | 784 | <div class="customerInfo"> |
785 | <img src="{$c3.user.avatar}" alt="img"> | 785 | <img src="{$c3.user.avatar}" alt="img"> |
786 | - <p class="customerNickname">{$c3.user.username}</p> | 786 | + <p class="customerNickname">{$c3.user.nickname|default='****'}</p> |
787 | </div> | 787 | </div> |
788 | <div class="evaluateInfo"> | 788 | <div class="evaluateInfo"> |
789 | <div class="title"> | 789 | <div class="title"> |
@@ -822,7 +822,7 @@ | @@ -822,7 +822,7 @@ | ||
822 | <li> | 822 | <li> |
823 | <div class="customerInfo"> | 823 | <div class="customerInfo"> |
824 | <img src="{$c4.user.avatar}" alt="img"> | 824 | <img src="{$c4.user.avatar}" alt="img"> |
825 | - <p class="customerNickname">{$c4.user.username}</p> | 825 | + <p class="customerNickname">{$c4.user.nickname|default='****'}</p> |
826 | </div> | 826 | </div> |
827 | <div class="evaluateInfo"> | 827 | <div class="evaluateInfo"> |
828 | <div class="title"> | 828 | <div class="title"> |
@@ -1024,32 +1024,28 @@ | @@ -1024,32 +1024,28 @@ | ||
1024 | // Netscape/Firefox/Opera | 1024 | // Netscape/Firefox/Opera |
1025 | keyCode = e.which | 1025 | keyCode = e.which |
1026 | } | 1026 | } |
1027 | + if(is_impose == 1){ | ||
1028 | + if(parseInt($('.spinner input').val()) >= parseInt(imposenum)){ | ||
1029 | + $('#numberInput').val(parseInt(imposenum)); | ||
1030 | + var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); | ||
1031 | + $('#totalPrice').html('¥'+totalPrice.toFixed(2)); | ||
1032 | + return false; | ||
1033 | + }; | ||
1034 | + } | ||
1027 | if($('#numberInput').val()<=0){ | 1035 | if($('#numberInput').val()<=0){ |
1028 | $('#numberInput').val(1); | 1036 | $('#numberInput').val(1); |
1029 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); | 1037 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); |
1030 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); | 1038 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); |
1031 | return false; | 1039 | return false; |
1032 | } | 1040 | } |
1033 | - console.log(parseInt($('#numberInput').val())); | ||
1034 | - console.log(parseInt($('#inventory').text())); | ||
1035 | if(parseInt($('#numberInput').val()) >= parseInt($('#inventory').text())){ | 1041 | if(parseInt($('#numberInput').val()) >= parseInt($('#inventory').text())){ |
1036 | $('#numberInput').val(parseInt($('#inventory').text())); | 1042 | $('#numberInput').val(parseInt($('#inventory').text())); |
1037 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); | 1043 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); |
1038 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); | 1044 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); |
1039 | return false; | 1045 | return false; |
1040 | } | 1046 | } |
1041 | - if(is_impose == 1){ | ||
1042 | - console.log(imposenum); | ||
1043 | - console.log($('.spinner input').val()); | ||
1044 | - if(parseInt($('.spinner input').val()) >= parseInt(imposenum)){ | ||
1045 | - $('#numberInput').val(parseInt(imposenum)); | ||
1046 | - var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); | ||
1047 | - $('#totalPrice').html('¥'+totalPrice.toFixed(2)); | ||
1048 | - return false; | ||
1049 | - }; | ||
1050 | - } | ||
1051 | $('.spinner input').val(isNaN(parseFloat($('.spinner input').val()))?1:parseFloat($('.spinner input').val())); | 1047 | $('.spinner input').val(isNaN(parseFloat($('.spinner input').val()))?1:parseFloat($('.spinner input').val())); |
1052 | - $('#totalPrice').html('¥0.00'); | 1048 | + // $('#totalPrice').html('¥0.00'); |
1053 | if (keyCode>=48&&keyCode<=57 || keyCode>=96&&keyCode<=105 || keyCode==8){ | 1049 | if (keyCode>=48&&keyCode<=57 || keyCode>=96&&keyCode<=105 || keyCode==8){ |
1054 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); | 1050 | var totalPrice = parseFloat($('.spinner input').val()) * parseFloat($('#price').html().split('¥')[1]); |
1055 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); | 1051 | $('#totalPrice').html('¥'+totalPrice.toFixed(2)); |
@@ -341,7 +341,8 @@ | @@ -341,7 +341,8 @@ | ||
341 | <div id="banner-container" class="swiper-container"> | 341 | <div id="banner-container" class="swiper-container"> |
342 | <div class="swiper-wrapper"> | 342 | <div class="swiper-wrapper"> |
343 | {foreach name="$slide" item="s"} | 343 | {foreach name="$slide" item="s"} |
344 | - <div class="swiper-slide"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div> | 344 | + <div class="swiper-slide" style="height: auto; |
345 | + min-height: 540px;"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div> | ||
345 | {/foreach} | 346 | {/foreach} |
346 | </div> | 347 | </div> |
347 | <!--分页器。如果放置在swiper-container外面,需要自定义样式。--> | 348 | <!--分页器。如果放置在swiper-container外面,需要自定义样式。--> |
@@ -402,6 +403,7 @@ | @@ -402,6 +403,7 @@ | ||
402 | </a> | 403 | </a> |
403 | </div>--> | 404 | </div>--> |
404 | </div> | 405 | </div> |
406 | + <div class="without" style="height: 100px;text-align: center;font-size: 16px;line-height: 100px;display: none;">暂无更多</div> | ||
405 | <div class="pagingBox"> | 407 | <div class="pagingBox"> |
406 | <div class="paginationMyOrder" id="paginationAllOrder"> | 408 | <div class="paginationMyOrder" id="paginationAllOrder"> |
407 | <div class="whj_jqueryPaginationCss-1 "></div> | 409 | <div class="whj_jqueryPaginationCss-1 "></div> |
@@ -474,36 +476,42 @@ | @@ -474,36 +476,42 @@ | ||
474 | data:{"province_id":province_id,"page":page,"pageNum":pageNum,'paginate':1,'category_id':category_id}, | 476 | data:{"province_id":province_id,"page":page,"pageNum":pageNum,'paginate':1,'category_id':category_id}, |
475 | success:function(res){ | 477 | success:function(res){ |
476 | console.log(res); | 478 | console.log(res); |
477 | - var goods_html = ""; | ||
478 | - $(res.data.data).each(function (key1, vo) { | ||
479 | - var property = ""; | ||
480 | - $(vo.property).each(function (key2, p) { | ||
481 | - property += "<span>"+p+"</span>"; | ||
482 | - }); | ||
483 | - var insurance = ""; | ||
484 | - if(vo.insurance == '1'){ | ||
485 | - insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">"; | 479 | + if(res.code == 1) { |
480 | + if (res.data.length == 0) { | ||
481 | + $('.without').show(); | ||
482 | + return false; | ||
486 | } | 483 | } |
487 | - var str = "<div class=\"commodityBox\">\n" + | ||
488 | - " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\">\n" + | ||
489 | - " <div class=\"imgBox\">\n" + | ||
490 | - " <img src=\""+vo.thumbnail+"\" alt=\"img\">\n" + | ||
491 | - " <span>"+vo.store_name+"</span>\n" + | ||
492 | - " </div>\n" + | ||
493 | - " <p class=\"commodityPrice\">¥"+vo.price+"</p>\n" + | ||
494 | - " <p class=\"commodityName\">"+vo.goodsname+"</p>\n" + | ||
495 | - " <div class=\"labelBox\">\n" + | ||
496 | - " "+property+"\n" + | ||
497 | - " </div>\n" + | ||
498 | - " "+insurance+"\n" + | ||
499 | - " </a>\n" + | ||
500 | - " </div>"; | ||
501 | - goods_html += str.replace("GOODS_ID",vo.id); | ||
502 | - }); | ||
503 | - $('.goods_dom').html(goods_html); | ||
504 | - //初始化分页 | ||
505 | - var totalPage = Math.ceil(res.data.total/pageNum); | ||
506 | - initPaging(res.data.total,res.data.current_page,totalPage,pageNum); | 484 | + var goods_html = ""; |
485 | + $(res.data.data).each(function (key1, vo) { | ||
486 | + var property = ""; | ||
487 | + $(vo.property).each(function (key2, p) { | ||
488 | + property += "<span>" + p + "</span>"; | ||
489 | + }); | ||
490 | + var insurance = ""; | ||
491 | + if (vo.insurance == '1') { | ||
492 | + insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">"; | ||
493 | + } | ||
494 | + var str = "<div class=\"commodityBox\">\n" + | ||
495 | + " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\">\n" + | ||
496 | + " <div class=\"imgBox\">\n" + | ||
497 | + " <img src=\"" + vo.thumbnail + "\" alt=\"img\">\n" + | ||
498 | + " <span>" + vo.store_name + "</span>\n" + | ||
499 | + " </div>\n" + | ||
500 | + " <p class=\"commodityPrice\">¥" + vo.price + "</p>\n" + | ||
501 | + " <p class=\"commodityName\">" + vo.goodsname + "</p>\n" + | ||
502 | + " <div class=\"labelBox\">\n" + | ||
503 | + " " + property + "\n" + | ||
504 | + " </div>\n" + | ||
505 | + " " + insurance + "\n" + | ||
506 | + " </a>\n" + | ||
507 | + " </div>"; | ||
508 | + goods_html += str.replace("GOODS_ID", vo.id); | ||
509 | + }); | ||
510 | + $('.goods_dom').html(goods_html); | ||
511 | + //初始化分页 | ||
512 | + var totalPage = Math.ceil(res.data.total / pageNum); | ||
513 | + initPaging(res.data.total, res.data.current_page, totalPage, pageNum); | ||
514 | + } | ||
507 | }, | 515 | }, |
508 | error:function(res){ | 516 | error:function(res){ |
509 | toast('与服务器断开连接'); | 517 | toast('与服务器断开连接'); |
@@ -353,7 +353,8 @@ | @@ -353,7 +353,8 @@ | ||
353 | <div id="banner-container" class="swiper-container"> | 353 | <div id="banner-container" class="swiper-container"> |
354 | <div class="swiper-wrapper"> | 354 | <div class="swiper-wrapper"> |
355 | {foreach name="$slide" item="s"} | 355 | {foreach name="$slide" item="s"} |
356 | - <div class="swiper-slide"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div> | 356 | + <div class="swiper-slide" style="height: auto; |
357 | + min-height: 540px;"><img src="{$s.thumbnail}" alt="img" style="width: 100%;height:100%"></div> | ||
357 | {/foreach} | 358 | {/foreach} |
358 | </div> | 359 | </div> |
359 | <!--分页器。如果放置在swiper-container外面,需要自定义样式。--> | 360 | <!--分页器。如果放置在swiper-container外面,需要自定义样式。--> |
@@ -390,9 +391,8 @@ | @@ -390,9 +391,8 @@ | ||
390 | </div> | 391 | </div> |
391 | 392 | ||
392 | </div> | 393 | </div> |
393 | - | ||
394 | <!--特价清仓部分--> | 394 | <!--特价清仓部分--> |
395 | - <div class="clearanceBox"> | 395 | + <div class="clearanceBox" style="display: none"> |
396 | <div class="clearanceMain"> | 396 | <div class="clearanceMain"> |
397 | <div class="titleBox"> | 397 | <div class="titleBox"> |
398 | <span></span> | 398 | <span></span> |
@@ -450,6 +450,7 @@ | @@ -450,6 +450,7 @@ | ||
450 | </div> | 450 | </div> |
451 | {/foreach} | 451 | {/foreach} |
452 | </div> | 452 | </div> |
453 | + <div class="without" style="height: 100px;text-align: center;font-size: 16px;line-height: 100px;display: none;">暂无更多</div> | ||
453 | </div> | 454 | </div> |
454 | </div> | 455 | </div> |
455 | </div> | 456 | </div> |
@@ -518,30 +519,38 @@ | @@ -518,30 +519,38 @@ | ||
518 | data:{"province_id":province_id,'is_clearance':1}, | 519 | data:{"province_id":province_id,'is_clearance':1}, |
519 | success:function(res){ | 520 | success:function(res){ |
520 | console.log(res); | 521 | console.log(res); |
521 | - var clearance_goods_html = ""; | ||
522 | - $(res.data).each(function (key, vo) { | ||
523 | - var str = "<div class=\"swiper-slide\">\n" + | ||
524 | - " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" + | ||
525 | - " <div style=\"width:175px;height:175px;\"><img src=\""+vo.thumbnail+"\" alt=\"img\"></div>\n" + | ||
526 | - " <p class=\"commodityTitle\">"+vo.goodsname+"</p>\n" + | ||
527 | - " <div class=\"priceBox\">\n" + | ||
528 | - " <p class=\"presentPrice\">¥"+vo.price+"</p>\n" + | ||
529 | - " <p class=\"originalPrice\">¥"+vo.lineation+"</p>\n" + | ||
530 | - " </div>\n" + | ||
531 | - " </a>\n" + | ||
532 | - " </div>"; | ||
533 | - clearance_goods_html += str.replace("GOODS_ID",vo.id); | ||
534 | - }); | ||
535 | - $('.clearance_goods_dom').html(clearance_goods_html); | ||
536 | - //初始化swiper | ||
537 | - var myClearance = new Swiper('#clearanceList-container', { | ||
538 | - loop: false, | ||
539 | - slidesPerView: 6, | ||
540 | - autoplay: 3000, | ||
541 | - //前进后退按钮 | ||
542 | - nextButton: '#clearanceList-button-next', | ||
543 | - prevButton: '#clearanceList-button-prev', | ||
544 | - }) | 522 | + if(res.code == 1) { |
523 | + console.log(res.data) | ||
524 | + if(res.data.length == 0){ | ||
525 | + $('.clearanceBox').hide(); | ||
526 | + return false; | ||
527 | + } | ||
528 | + $('.clearanceBox').show(); | ||
529 | + var clearance_goods_html = ""; | ||
530 | + $(res.data).each(function (key, vo) { | ||
531 | + var str = "<div class=\"swiper-slide\">\n" + | ||
532 | + " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" + | ||
533 | + " <div style=\"width:175px;height:175px;\"><img src=\"" + vo.thumbnail + "\" alt=\"img\"></div>\n" + | ||
534 | + " <p class=\"commodityTitle\">" + vo.goodsname + "</p>\n" + | ||
535 | + " <div class=\"priceBox\">\n" + | ||
536 | + " <p class=\"presentPrice\">¥" + vo.price + "</p>\n" + | ||
537 | + " <p class=\"originalPrice\">¥" + vo.lineation + "</p>\n" + | ||
538 | + " </div>\n" + | ||
539 | + " </a>\n" + | ||
540 | + " </div>"; | ||
541 | + clearance_goods_html += str.replace("GOODS_ID", vo.id); | ||
542 | + }); | ||
543 | + $('.clearance_goods_dom').html(clearance_goods_html); | ||
544 | + //初始化swiper | ||
545 | + var myClearance = new Swiper('#clearanceList-container', { | ||
546 | + loop: false, | ||
547 | + slidesPerView: 6, | ||
548 | + autoplay: 3000, | ||
549 | + //前进后退按钮 | ||
550 | + nextButton: '#clearanceList-button-next', | ||
551 | + prevButton: '#clearanceList-button-prev', | ||
552 | + }) | ||
553 | + } | ||
545 | }, | 554 | }, |
546 | error:function(res){ | 555 | error:function(res){ |
547 | toast('与服务器断开连接'); | 556 | toast('与服务器断开连接'); |
@@ -557,33 +566,39 @@ | @@ -557,33 +566,39 @@ | ||
557 | data:{"province_id":province_id}, | 566 | data:{"province_id":province_id}, |
558 | success:function(res){ | 567 | success:function(res){ |
559 | console.log(res); | 568 | console.log(res); |
560 | - var goods_html = ""; | ||
561 | - $(res.data).each(function (key1, vo) { | ||
562 | - var property = ""; | ||
563 | - $(vo.property).each(function (key2, p) { | ||
564 | - property += "<span>"+p+"</span>"; | ||
565 | - }); | ||
566 | - var insurance = ""; | ||
567 | - if(vo.insurance == '1'){ | ||
568 | - insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">" | 569 | + if(res.code == 1){ |
570 | + if(res.data.length == 0){ | ||
571 | + $('.without').show(); | ||
572 | + return false; | ||
569 | } | 573 | } |
570 | - var str = "<div class=\"commodityBox\">\n" + | ||
571 | - " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" + | ||
572 | - " <div class=\"imgBox\">\n" + | ||
573 | - " <img src=\""+vo.thumbnail+"\" alt=\"img\">\n" + | ||
574 | - " <span>"+vo.store_name+"</span>\n" + | ||
575 | - " </div>\n" + | ||
576 | - " <p class=\"commodityPrice\">¥"+vo.price+"</p>\n" + | ||
577 | - " <p class=\"commodityName\">"+vo.goodsname+"</p>\n" + | ||
578 | - " <div class=\"labelBox\">\n" + | ||
579 | - " "+property+"\n" + | ||
580 | - " </div>\n" + | ||
581 | - " "+insurance+"\n" + | ||
582 | - " </a>\n" + | ||
583 | - " </div>"; | ||
584 | - goods_html += str.replace("GOODS_ID",vo.id); | ||
585 | - }); | ||
586 | - $('.goods_dom').html(goods_html); | 574 | + var goods_html = ""; |
575 | + $(res.data).each(function (key1, vo) { | ||
576 | + var property = ""; | ||
577 | + $(vo.property).each(function (key2, p) { | ||
578 | + property += "<span>"+p+"</span>"; | ||
579 | + }); | ||
580 | + var insurance = ""; | ||
581 | + if(vo.insurance == '1'){ | ||
582 | + insurance = "<img class=\"insurance_icon\" src=\"__CDN__/assets/store/images/insurance_icon.png\" alt=\"img\">" | ||
583 | + } | ||
584 | + var str = "<div class=\"commodityBox\">\n" + | ||
585 | + " <a href=\"{:url('index/goods/detail',array('goods_id'=>'GOODS_ID'))}\" target='_blank'>\n" + | ||
586 | + " <div class=\"imgBox\">\n" + | ||
587 | + " <img src=\""+vo.thumbnail+"\" alt=\"img\">\n" + | ||
588 | + " <span>"+vo.store_name+"</span>\n" + | ||
589 | + " </div>\n" + | ||
590 | + " <p class=\"commodityPrice\">¥"+vo.price+"</p>\n" + | ||
591 | + " <p class=\"commodityName\">"+vo.goodsname+"</p>\n" + | ||
592 | + " <div class=\"labelBox\">\n" + | ||
593 | + " "+property+"\n" + | ||
594 | + " </div>\n" + | ||
595 | + " "+insurance+"\n" + | ||
596 | + " </a>\n" + | ||
597 | + " </div>"; | ||
598 | + goods_html += str.replace("GOODS_ID",vo.id); | ||
599 | + }); | ||
600 | + $('.goods_dom').html(goods_html); | ||
601 | + } | ||
587 | }, | 602 | }, |
588 | error:function(res){ | 603 | error:function(res){ |
589 | toast('与服务器断开连接'); | 604 | toast('与服务器断开连接'); |
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | padding: 21px 24px; | 34 | padding: 21px 24px; |
35 | border: 0; | 35 | border: 0; |
36 | } | 36 | } |
37 | + .content .contentMain .searchBox .search:focus{ outline:none; } | ||
37 | .content .contentMain .searchBox .input-group-btn{ | 38 | .content .contentMain .searchBox .input-group-btn{ |
38 | width: 112px; | 39 | width: 112px; |
39 | height: 64px; | 40 | height: 64px; |
@@ -124,7 +125,7 @@ | @@ -124,7 +125,7 @@ | ||
124 | <img src="__CDN__/assets/store/images/hot.png" alt="hot"> | 125 | <img src="__CDN__/assets/store/images/hot.png" alt="hot"> |
125 | <span>热门搜索</span> | 126 | <span>热门搜索</span> |
126 | </div> | 127 | </div> |
127 | - <div class="labels"> | 128 | + <div class="labels" style="position: relative;"> |
128 | {foreach name="$hot" item="h"} | 129 | {foreach name="$hot" item="h"} |
129 | <div onclick="search('{$h.keyword}')">{$h.keyword}</div> | 130 | <div onclick="search('{$h.keyword}')">{$h.keyword}</div> |
130 | {/foreach} | 131 | {/foreach} |
-
请 注册 或 登录 后发表评论