You've already forked qlg.tsgz.moe
addons
app_download_files
extend
hyhproject
admin
app
common
home
home2
behavior
common
conf
controller
model
validate
view
default
articles
css
img
js
shops
sql
users
cashdraws
favorites
favorites.js
list_goods.html
list_shops.html
informs
logmoneys
messages
orders
recharge
security
useraddress
userscores
base.html
index.html
my_consult.html
user.js
user_edit.html
base.html
base_js.html
box_login.html
brands_list.html
carts.html
error_lost.html
error_msg.html
error_switch.html
error_sys.html
footer.html
forget_pass.html
forget_pass2.html
forget_pass3.html
forget_pass4.html
goods_contrast.html
goods_detail.html
goods_list.html
goods_search.html
header.html
header_lite.html
index.html
invoices.html
order_pay.html
order_pay_step1.html
order_pay_step2.html
order_pay_step3.html
order_pay_wallets.html
order_success.html
regist.html
right_cart.html
self_shop.html
self_shop_header.html
settlement.html
settlement2.html
settlement_quick.html
shop_apply.html
shop_home.html
shop_join.html
shop_join_step1.html
shop_join_step2.html
shop_join_step3.html
shop_join_step35.html
shop_join_step4.html
shop_join_step5.html
shop_join_success.html
shop_login.html
shop_street.html
top.html
user_login.html
user_protocol.html
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
hyhproject.tar.gz
index.html
index.php
reg.lock
robots.txt
120 lines
4.0 KiB
JavaScript
Executable File
120 lines
4.0 KiB
JavaScript
Executable File
//关注的商品列表
|
|
function freGoodsList(pages){
|
|
var param = {};
|
|
param.pagesize = 8;
|
|
param.page = pages;
|
|
$.post(WST.U('home/favorites/listGoodsQuery'),param,function(data){
|
|
var json = WST.toJson(data);
|
|
if(json.status==1){
|
|
json = json.data;
|
|
if(param.page>json.TotalPage && json.TotalPage >0){
|
|
freGoodsList(json.TotalPage);
|
|
return;
|
|
}
|
|
var gettpl = document.getElementById('list').innerHTML;
|
|
laytpl(gettpl).render(json.Rows, function(html){
|
|
$('#list-goods').html(html);
|
|
});
|
|
laypage({
|
|
cont: 'goodsPage',
|
|
pages:json.TotalPage,
|
|
curr: json.CurrentPage,
|
|
skip: true, //是否开启跳页
|
|
skin: '#f46442',
|
|
groups: 3,
|
|
prev: '<<',
|
|
next: '>>',
|
|
jump: function(e, first){
|
|
if(!first){
|
|
freGoodsList(e.curr);
|
|
}
|
|
}
|
|
});
|
|
$(".wst-fav-goimg").hover(function(){
|
|
$(this).find(".js-operate").slideDown();
|
|
},function(){
|
|
$(this).find(".js-operate").slideUp();
|
|
});
|
|
$('.goodsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
|
}
|
|
});
|
|
}
|
|
function getGoods(id){
|
|
location.href=WST.U('home/goods/detail','id='+id);
|
|
}
|
|
function cancelFavorite(id,type){
|
|
WST.confirm({content:"您确定要取消关注吗?", yes:function(tips){
|
|
var load = WST.load({msg:'请稍后...'});
|
|
var param = {};
|
|
param.id = id;
|
|
param.type = type;
|
|
$.post(WST.U('home/favorites/cancel'),param,function(data,textStatus){
|
|
layer.close(load);
|
|
var json = WST.toJson(data);
|
|
if(json.status=='1'){
|
|
WST.msg(json.msg,{icon:1},function(){
|
|
if(type==0){
|
|
freGoodsList(WSTCurrPage);
|
|
}else{
|
|
freShopList(WSTCurrPage);
|
|
}
|
|
|
|
});
|
|
}else{
|
|
WST.msg(json.msg,{icon:5});
|
|
}
|
|
});
|
|
}});
|
|
}
|
|
//关注的店铺列表
|
|
function freShopList(pages){
|
|
var param = {};
|
|
param.pagesize = 3;
|
|
param.page = pages;
|
|
$.post(WST.U('home/favorites/listShopQuery'),param,function(data){
|
|
var json = WST.toJson(data);
|
|
if(json.status==1){
|
|
json = json.data;
|
|
if(param.page>json.TotalPage && json.TotalPage >0){
|
|
freShopList(json.TotalPage);
|
|
return;
|
|
}
|
|
var gettpl = document.getElementById('list').innerHTML;
|
|
laytpl(gettpl).render(json.Rows, function(html){
|
|
$('#list-shops').html(html);
|
|
});
|
|
//商品滑动
|
|
var goodsNum = json.Rows.length;
|
|
for(var i=0;i<goodsNum;++i){
|
|
$("#js-goods"+i).als({
|
|
visible_items: 5,
|
|
scrolling_items: 1,
|
|
orientation: "horizontal",
|
|
circular: "yes",
|
|
autoscroll: "no",
|
|
start_from: 2
|
|
});
|
|
}
|
|
$('.goodsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
|
|
$('.shopsImg2').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.SHOP_LOGO});//店铺默认头像
|
|
laypage({
|
|
cont: 'shopsPage',
|
|
pages:json.TotalPage,
|
|
curr: json.CurrentPage,
|
|
skip: true, //是否开启跳页
|
|
skin: '#f46442',
|
|
groups: 3,
|
|
prev: '<<',
|
|
next: '>>',
|
|
jump: function(e, first){
|
|
if(!first){
|
|
freShopList(e.curr);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function getShop(id){
|
|
location.href=WST.U('home/shops/home','shopId='+id);
|
|
} |