You've already forked qlg.tsgz.moe
addons
app_download_files
extend
hyhproject
admin
app
common
home
home2
mobile2
common
conf
controller
model
validate
view
default
articles
css
frozenui
goodsconsult
img
js
izimodal
laytpl
photoclip
share
brands.js
carts.js
common.js
common_xs.js
echo.min.js
forget_pass.js
goods_category.js
goods_detail.js
goods_list.js
index-lxy.js
index.js
jquery.min.js
login.js
qrcode.js
reg.js
self_shop.js
settlement.js
shop_goods_list.js
shop_home.js
shops_list.js
swiper.jquery.min.js
users
base.html
bash.html
brands.html
carts.html
day_new.html
demo.html
dialog.html
error_lost.html
error_switch.html
error_sys.html
footer.html
forget_pass.html
forget_pass2.html
forget_pass3.html
goods_category.html
goods_detail.html
goods_detail2.html
goods_list.html
goods_search.html
header.html
index.html
index2.html
index3.html
index┤°╧▐╩▒├ы╔▒.html
index鈹ぢ扳暓鈻愨暕鈻掆敎褘鈺斺枓.html
juhui.html
login.html
rebate.html
reg.html
register.html
self_shop.html
settlement.html
settlement_quick.html
shop_goods_list.html
shop_home.html
shop_index.html
shop_street.html
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5436787D.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
93 lines
3.2 KiB
JavaScript
Executable File
93 lines
3.2 KiB
JavaScript
Executable File
//排序条件
|
|
function orderCondition(obj,condition){
|
|
var classContent = $(obj).attr('class');
|
|
var status = $(obj).attr('status');
|
|
var theSiblings = $(obj).siblings('.sorts');
|
|
theSiblings.removeClass('active').attr('status','down');
|
|
$(obj).addClass('active');
|
|
if(classContent.indexOf('active')==-1){
|
|
$(obj).children('i').addClass('down2').removeClass('down');
|
|
theSiblings.children('i').addClass('down').removeClass('down2');
|
|
}
|
|
if(status.indexOf('down')>-1){
|
|
if(classContent.indexOf('active')==-1){
|
|
$(obj).children('i').addClass('down2').removeClass('up2');
|
|
$('#desc').val('0');
|
|
}else{
|
|
$(obj).children('i').addClass('up2').removeClass('down2');
|
|
$(obj).attr('status','up');
|
|
$('#desc').val('1');
|
|
}
|
|
}else{
|
|
$(obj).children('i').addClass('down2').removeClass('up2');
|
|
$(obj).attr('status','down');
|
|
$('#desc').val('0');
|
|
}
|
|
$('#condition').val(condition);//排序条件
|
|
$('#currPage').val('0');//当前页归零
|
|
$('#goods-list').html('');
|
|
goodsList();
|
|
}
|
|
//切换
|
|
function switchList(obj){
|
|
if($('#goods-list').hasClass('wst-go-switch')){
|
|
$(obj).removeClass('wst-se-icon2');
|
|
$('#goods-list').removeClass('wst-go-switch');
|
|
}else{
|
|
$(obj).addClass('wst-se-icon2');
|
|
$('#goods-list').addClass('wst-go-switch');
|
|
}
|
|
$('.j-imgAdapt').removeAttr('style');
|
|
$('.j-imgAdapt a').removeAttr('style');
|
|
$('.j-imgAdapt a img').removeAttr('style');
|
|
$('#currPage').val('0');
|
|
$('#goods-list').html('');
|
|
goodsList();
|
|
}
|
|
//获取商品列表
|
|
function goodsList(){
|
|
$('#Load').show();
|
|
loading = true;
|
|
var param = {};
|
|
param.catId = $('#catId').val();
|
|
param.brandId = $('#brandId').val();
|
|
param.condition = $('#condition').val();
|
|
param.desc = $('#desc').val();
|
|
param.keyword = $('#keyword').val();
|
|
param.pagesize = 10;
|
|
param.page = Number( $('#currPage').val() ) + 1;
|
|
$.post(WST.U('mobile/goods/pageQuery'), param,function(data){
|
|
var json = WST.toJson(data);
|
|
$('#currPage').val(json.CurrentPage);
|
|
$('#totalPage').val(json.TotalPage);
|
|
var gettpl = document.getElementById('list').innerHTML;
|
|
laytpl(gettpl).render(json.Rows, function(html){
|
|
$('#goods-list').append(html);
|
|
});
|
|
WST.imgAdapt('j-imgAdapt');
|
|
loading = false;
|
|
$('#Load').hide();
|
|
echo.init();//图片懒加载
|
|
});
|
|
}
|
|
var currPage = totalPage = 0;
|
|
var loading = false;
|
|
$(document).ready(function(){
|
|
WST.initFooter('home');
|
|
$('.wst-se-search').on('submit', '.input-form', function(event){
|
|
event.preventDefault();
|
|
})
|
|
goodsList();
|
|
WST.imgAdapt('j-imgRec');
|
|
$('.wst-gol-adsb').css('height',$('.j-imgRec').width()+20);
|
|
$(window).scroll(function(){
|
|
if (loading) return;
|
|
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
|
currPage = Number( $('#currPage').val() );
|
|
totalPage = Number( $('#totalPage').val() );
|
|
if( totalPage > 0 && currPage < totalPage ){
|
|
goodsList();
|
|
}
|
|
}
|
|
});
|
|
}); |