$(function () { $('#yii-debug-toolbar').hide(); $('img[alt="code"]').css({"width": "40%", "margin": "0 auto"}); //单独处理二维码的问题样式 function getParams(url) { var theRequest = new Object(); if (!url) url = location.href; if (url.indexOf("?") !== -1) { var str = url.substr(url.indexOf("?") + 1) + "&"; var strs = str.split("&"); for (var i = 0; i < strs.length - 1; i++) { var key = strs[i].substring(0, strs[i].indexOf("=")); var val = strs[i].substring(strs[i].indexOf("=") + 1); theRequest[key] = val; } } return theRequest; } var objUrl = {}; //获取get参数 var url = window.location.href; var searchParams = ''; //最后拼接的参数 var urlParams = ''; var params = getParams(url); //获取get请求的参数 if (!$.isEmptyObject(params)) { $.each(params, function (key, val) { objUrl[key] = val; urlParams += key + '=' + val + '&'; }) urlParams = urlParams.substring(0, urlParams.length - 1); searchParams = '&' + urlParams; } // 相册ajax function index_lp() { var html = ''; $('.hu_box ul').html('') $.ajax({ url: "/json/albumlist", // url: "/overseas/js/index/index_lp.json", data: {hid: hid, album_id: album_id}, type: "POST", dataType: "json", success: function (data) {//请求成功完成后要执行的方法 if (data.code == 200) { html += '
'; if(data.path || data.panorama){ html += '
' } html += ''; if (data.title != 'null' && data.title != '') { html += '' + data.title + ''; } html += '