123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- function getUrlParam(name){
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if (r!=null) return decodeURI(r[2]);
- return null;
- }
- var _albumid = getUrlParam('album_id');
- var _hid = getUrlParam('hid');
- var _index = getUrlParam('mindex');
- index_lp();
- function index_lp (){
- var html = '';
- $('.m_swiper_ajax').html('')
- $.ajax({
- url: "/house/albumlist",
- data:{hid:_hid,album_id:_albumid},
- type: "POST",
- dataType: "json",
- success: function(data) {
- if (data.code == 200) {
- html+='<div class="m_swiper_box">';
- html+='<div class="m_swiper_head">';
- html+='<div class="m_swiper_fh"><a href="javascript:history.back(-1)"><img src="/image/v2/lpindex3.png" alt=""></a></div>';
- html+='<div class="swiper-pagination" id="swiperzs"></div>';
- html+='<div class="m_swiper_qb"><a href="javascript:void(0)">全部图片</a></div>';
- html+='</div>';
- html+='<div class="m_swiper swiper-container">';
- html+='<div class="m_swiper_ul swiper-wrapper">';
- $.each(data.data, function (i, data) {
- html+='<div class="m_swiper_li swiper-slide">';
- html+='<div class="swiper-zoom-container" data-style="'+data.album_id+'"><img src="'+data.img+'"></div>';
- html+='</div>';
- });
- html+='</div>';
- html+='</div>';
- html+='</div>';
- };
- $('.m_swiper_ajax').html(html);
-
- var swipercx = new Swiper('.m_swiper', {
-
- zoom: true,
-
- initialSlide :_index,
- nextButton: '.swiper-button-next',
- prevButton: '.swiper-button-prev',
- pagination : '.swiper-pagination',
- paginationType : 'custom',
- paginationCustomRender: function (swiper, current, total) {
- return current + ' / ' + total;
- },
-
-
-
- observer:true,
-
-
-
- });
-
-
- $('.m_swiper_qb a').on('click',function(){
-
- console.log(_albumid);
- window.location='/house/album/'+_hid+'?album_id='+_albumid+'';
- })
- }
- });
- }
- $('#demo06').navbarscroll({
- defaultSelect:0,
- scrollerWidth:6,
- fingerClick:1,
- endClickScroll:function(obj){
-
- }
- });
- $('.scroller ul li[data-id="'+_albumid+'"]').attr('class','cur').siblings().attr('class','');
- $('.scroller ul li').on('click',function(){
- _hid = $(this).attr('hid');
- _albumid = $(this).attr('data-id');
- _index = 0;
- index_lp();
- })
|