You've already forked qlg.tsgz.moe
addons
app_download_files
extend
hyhproject
mobile
oss
static
app
app2
css
img
js
1.js
ac1111next.js
ac1111next_.js
ac2.js
ac3.js
activity1.js
activity10.js
activity1111.js
activity2.js
activity3.js
activity4.js
activity5.js
activity6.js
activity7.js
activity8.js
activity9.js
addessay.js
addgoods.1.js
addgoods.2.js
addgoods.js
addhhrrz.js
addmemorandum.js
addproperties.js
addqrbb.js
addqrrz.js
addshopping.js
addyhk.js
applicationopen.js
appraise.js
bill.js
binaryajax.js
cancellation.js
canvasResize.js
cash-out.js
choiceness.js
classify.js
collect.js
collect_commodity.js
collect_store.js
commercial.js
common.js
common_home.js
compare.js
complain.js
confirmOrder.js
cooperative.js
details.js
details_ac.js
discount.js
discounts.js
distribution.js
dynamic.js
ect_address.js
ect_area.js
ect_index.js
ect_list.js
ect_pre_.js
ect_recharge.js
ect_recharge_list.js
ect_transfer_accounts.html.js
ect_transfer_accounts.js
ect_withdraw.js
ect_withdraw_deposit.js
editAddress.js
essay.js
essaylist.js
exif.js
family.js
friends.js
friendsList.js
god_ect.js
goodslist.js
guide.js
helpGet.js
hhrrz.js
home.js
home_new.js
income-details.js
indent.js
indentcon.js
index.js
individual.js
invest.js
investdetail.js
journalism.js
journalism_con.js
jquery-3.2.1.min.js
jquery-ui.min.js
jquery.cookie.js
jquery.qtip.min.js
jquery.validate.min.js
juan_goods.js
juan_index.js
login.js
logistics.js
logisticscon.js
lrz.bundle.js
main_guide.js
mapcommon.js
memorandumlist.js
msg.js
msg_con.js
mui.js
mui.min.js
my.js
my_help_sale.js
myshop.js
myshops.js
new_product.js
newuser.js
notepad.js
order_con.js
order_out.js
orsupermarket.js
paymentVoucher.js
perfect-scrollbar.min.js
photoswipe-ui-default.min.js
photoswipe.js
pj.js
plupload.full.min.js
properties.js
qrbb.js
qrcode.js
qrrz.js
recommend.js
reg.js
register.js
register1.js
reviewsmanage.js
rul.js
saoyisao.js
scrollToTop.js
self_shop.js
setting.js
setting_address.js
setting_fogetPayPwd.js
setting_fogetPwd.js
setting_loginInfo.js
setting_payPwd.js
setting_phone.js
setting_pwd.js
setting_recive.js
setting_user.js
shangdu.js
share.js
share_user_list.js
shopGoodsList.js
shop_decorate.js
shop_indent.js
shop_indentcon.js
shoperUploadVoucher.js
shopgoodlist.js
shoppingcart.js
shopsList.js
shopsetting.js
start.js
store_activity.js
store_class.js
store_commodity.js
store_home.1.js
store_home.js
store_info.js
store_new.js
storeout.js
supermarket.js
swiper.min.js
test.js
time.js
time_limit.js
trade_rule.js
upload.js
upload1.js
uploadVoucher.js
uploader.js
uploaderBatch.js
uploadqiniu.js
vouchers.js
yhk.js
zepto.min.js
zhugouba.js
zhuweiba.js
╕┤╓╞ activity7.js
╕┤╓╞ confirmOrder.js
╕┤╓╞ home.js
╕┤╓╞ indentcon.js
images
js
plugins
src
template
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
290 lines
11 KiB
JavaScript
Executable File
290 lines
11 KiB
JavaScript
Executable File
|
|
|
|
$('.search').css('display', 'none');
|
|
|
|
var num = 1;
|
|
var isOver = 1;
|
|
var recomId = '';
|
|
|
|
function getMsg(recomId, pageNum, pagesizeNum, classifyId,recomGoodsUrl) {
|
|
|
|
var data_msg = {
|
|
classifyId: classifyId,
|
|
recomId: recomId ? recomId : '',
|
|
page: pageNum ? pageNum : 1,
|
|
pagesize: pagesizeNum ? pagesizeNum : 10
|
|
}
|
|
|
|
if(isOver == 0) {
|
|
return;
|
|
} else {
|
|
isOver = 0;
|
|
}
|
|
mui.ajax(llUrl(recomGoodsUrl), {
|
|
data: data_msg,
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
var data = toJson(data, 1);
|
|
if(data.status == 1) {
|
|
var html = '';
|
|
data = data.data;
|
|
if(data.Rows == '') {
|
|
if(pageNum == 1) {
|
|
$('.food_class_list').html('<p style="float: left;width: 100%;text-align: center;padding-bottom: 9px; margin-top:10px">没有更多内容</p>');
|
|
} else if(pageNum > 1) {
|
|
$('.food_class_list').append('<p style="float: left;width: 100%;text-align: center;padding-bottom: 9px; margin-top:10px">没有更多内容</p>');
|
|
}
|
|
|
|
isOver = 0;
|
|
return;
|
|
}
|
|
$.each(data.Rows, function() {
|
|
html += '<div class="recommend_con_block shadown_wai" data-goodsId="' + this.goodsId + '"><img class="rcb_img" src="' + ectImgUrl(this.goodsImg) + '" alt="" /><div class="rcb_con"><div class="rcb_title"><span>精选</span>' + this.goodsName + '</div><div class="rcb_pay">¥' + this.shopPrice + '<span style="display:none;">满减</span></div><div class="rcb_bottom"><span>可用木吉抵扣20%货款</span></div></div></div>'
|
|
});
|
|
|
|
if(pageNum == 1) {
|
|
$('.food_class_list').html(html);
|
|
} else if(pageNum > 1) {
|
|
$('.food_class_list').append(html);
|
|
}
|
|
$('.rcb_img').height($('.rcb_img').width());
|
|
|
|
isOver = 1;
|
|
} else {
|
|
|
|
}
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
// alert(type);
|
|
}
|
|
});
|
|
|
|
}
|
|
mui.plusReady(function() {
|
|
var self = plus.webview.currentWebview();
|
|
var classifyId = self.classifyId;
|
|
|
|
if(classifyId == 2 ) {
|
|
$('.title').html('服饰');
|
|
}else if(classifyId == 4){
|
|
$('.title').html('家电');
|
|
}else if(classifyId == 3){
|
|
$('.title').html('家居');
|
|
}else if(classifyId == 9){
|
|
$('.title').html('生鲜');
|
|
}else if(classifyId == 1){
|
|
$('.title').html('桔子超市');
|
|
}else if(classifyId == 10){
|
|
$('.title').html('美妆');
|
|
}else if(classifyId == 11){
|
|
$('.title').html('数码');
|
|
}else if(classifyId == 12){
|
|
$('.title').html('箱包');
|
|
}else if(classifyId == 5){
|
|
$('.title').html('家电');
|
|
}else if(classifyId == 6){
|
|
$('.title').html('家纺');
|
|
}else if(classifyId == 7){
|
|
$('.title').html('配饰');
|
|
}else if(classifyId == 8){
|
|
$('.title').html('洗护');
|
|
}
|
|
// $('.oc_logo').attr('src', '../img/oc_logo' + classifyId + '.png');
|
|
var bannerUrl = '';
|
|
var recomactiveUrl = '';
|
|
var recomlistUrl = '';
|
|
if(classifyId == 2||classifyId == 4||classifyId == 3||classifyId == 9||classifyId == 1||classifyId == 10||classifyId == 11||classifyId == 12){
|
|
bannerUrl='addon/shuff-Shuff-topshow';
|
|
recomactiveUrl='addon/shuff-Shuff-recomactive';
|
|
recomlistUrl='addon/shuff-Shuff-recomlist';
|
|
recomGoodsUrl='addon/shuff-Shuff-recomgoods';
|
|
}else if(classifyId == 5||classifyId == 6||classifyId == 7||classifyId == 8){
|
|
bannerUrl='addon/selfmarket-selfmarket-selfSecBanner';
|
|
recomactiveUrl='addon/selfmarket-selfmarket-recomActive'
|
|
recomlistUrl='addon/selfmarket-selfmarket-recomList'
|
|
recomGoodsUrl='addon/selfmarket-selfmarket-recomGoods'
|
|
}
|
|
|
|
mui.ajax(llUrl(bannerUrl), {
|
|
data: {
|
|
classifyId: classifyId
|
|
},
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
// var data = toJson(data,1);
|
|
if(data.status == 1) {
|
|
var html = '';
|
|
var data = data.data;
|
|
$.each(data.banner, function() {
|
|
html += '<div class="swiper-slide" data-adURL="' + this.adURL + '" data-targetType="' + this.targetType + '"><img src="' + ectImgUrl(this.adFile) + '" /></div>'
|
|
})
|
|
$('#top_banner .swiper-wrapper').html(html);
|
|
$('#top_banner').height($('#top_banner').width() * 460 / 750);
|
|
var swiper = new Swiper('#top_banner', {
|
|
pagination: '#top_banner_pagination',
|
|
spaceBetween: 0,
|
|
loop: true,
|
|
autoplay: 3500,
|
|
autoplayDisableOnInteraction: false
|
|
});
|
|
|
|
if(data.left[0]) {
|
|
$('.add_top_left .food_p1').html(data.left[0].adName.split('|')[0]);
|
|
$('.add_top_left .food_p2').html(data.left[0].adName.split('|')[1]);
|
|
$('.add_top_left img').attr('src', ectImgUrl(data.left[0].adFile));
|
|
$('.add_top_left img').attr('data-adURL', data.left[0].adURL);
|
|
$('.add_top_left img').attr('data-targetType', data.left[0].targetType);
|
|
}
|
|
if(data.right_top[0]) {
|
|
$('.add_top_right_con .food_p1').html(data.right_top[0].adName.split('|')[0]);
|
|
$('.add_top_right .top .food_right_img1').attr('src', ectImgUrl(data.right_top[0].adFile));
|
|
$('.add_top_right .top .food_right_img1').attr('data-adURL', data.right_top[0].adURL);
|
|
$('.add_top_right .top .food_right_img1').attr('data-targetType', data.right_top[0].targetType);
|
|
$('.add_top_right .top .food_right_img2').attr('src', ectImgUrl(data.right_top[1].adFile));
|
|
$('.add_top_right .top .food_right_img2').attr('data-adURL', data.right_top[1].adURL);
|
|
$('.add_top_right .top .food_right_img2').attr('data-targetType', data.right_top[1].targetType);
|
|
}
|
|
if(data.right_bottom[0]) {
|
|
$('.add_top_right_con .food_p2').html(data.right_bottom[0].adName.split('|')[0]);
|
|
$('.add_top_right .bottom .food_right_img1').attr('src', ectImgUrl(data.right_bottom[0].adFile));
|
|
$('.add_top_right .bottom .food_right_img1').attr('data-adURL', data.right_bottom[0].adURL);
|
|
$('.add_top_right .bottom .food_right_img1').attr('data-targetType', data.right_bottom[0].targetType);
|
|
$('.add_top_right .bottom .food_right_img2').attr('src', ectImgUrl(data.right_bottom[1].adFile));
|
|
$('.add_top_right .bottom .food_right_img2').attr('data-adURL', data.right_bottom[1].adURL);
|
|
$('.add_top_right .bottom .food_right_img2').attr('data-targetType', data.right_bottom[1].targetType);
|
|
}
|
|
|
|
$('.add_top_left img').height($('.add_top_left img').width());
|
|
$('.add_top_right img').height($('.add_top_right img').width());
|
|
} else {
|
|
console.log(data.status);
|
|
}
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
console.log(errorThrown);
|
|
}
|
|
});
|
|
|
|
mui.ajax(llUrl(recomactiveUrl), {
|
|
data: {
|
|
type: 3,
|
|
classifyId: classifyId
|
|
},
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
var data = toJson(data, 1);
|
|
if(data.status == 1) {
|
|
var html = '';
|
|
data = data.data;
|
|
$.each(data, function() {
|
|
html += '<div class="reco_res" data-goodsId="' + this.goodsId + '"><img src="' + ectImgUrl(this.goodsImg) + '" class="reco_img" /><p class="p1">' + this.goodsName + '</p><p class="p2">¥ ' + this.shopPrice + '</p></div>'
|
|
});
|
|
$('.mujireco').html(html);
|
|
$('.mujireco').eq(0).attr('id', 'reco_1');
|
|
$('.reco_img').height($('.reco_img').width());
|
|
} else {
|
|
|
|
}
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
// alert(type);
|
|
}
|
|
});
|
|
|
|
mui.ajax(llUrl(recomlistUrl), {
|
|
data: {
|
|
classifyId: classifyId
|
|
},
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
// var data = toJson(data,1);
|
|
if(data.status == 1) {
|
|
var html = '';
|
|
var data = data.data;
|
|
$.each(data, function() {
|
|
html += '<div class="nav_block" data-recomId="' + this.recomId + '">' + this.recomName + '</div>';
|
|
})
|
|
$('.nav').html(html);
|
|
|
|
$('.nav_block').eq(0).addClass('on');
|
|
recomId=$('.nav_block').eq(0).attr('data-recomId');
|
|
// console.log(recomId)
|
|
getMsg(recomId, 1, 10, classifyId,recomGoodsUrl);
|
|
} else {
|
|
console.log(data.status);
|
|
}
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
console.log(errorThrown);
|
|
}
|
|
});
|
|
|
|
document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function(e) {
|
|
if(scroll.y == scroll.maxScrollY) {
|
|
if(isOver == 1) {
|
|
num++;
|
|
getMsg(recomId, num, 10, classifyId,recomGoodsUrl);
|
|
}
|
|
}
|
|
})
|
|
$('.nav').on('tap', '.nav_block', function() {
|
|
recomId = $(this).attr('data-recomId');
|
|
isOver = 1;
|
|
num = 1;
|
|
getMsg(recomId, num, 10, classifyId,recomGoodsUrl);
|
|
console.log(recomId)
|
|
})
|
|
//广告跳转
|
|
|
|
$('.rec_food').on('tap', 'img', function() {
|
|
openAds($(this));
|
|
});
|
|
//banner跳转
|
|
$('#top_banner').on('tap', '.swiper-slide', function() {
|
|
openAds($(this));
|
|
});
|
|
//展示跳转
|
|
$('.mujireco').on('tap', '.reco_res', function() {
|
|
var data_id = this.attributes["data-goodsId"].nodeValue;
|
|
// console.log(this.attributes["data-id"].nodeValue);
|
|
mui.openWindow({
|
|
url: 'details.html',
|
|
id: 'details.html' + data_id,
|
|
styles: {
|
|
top: '0px', //新页面顶部位置
|
|
bottom: '0px', //新页面底部位置
|
|
width: '100%', //新页面宽度,默认为100%
|
|
height: '100%' //新页面高度,默认为100%
|
|
},
|
|
extras: {
|
|
data_id: data_id
|
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
|
},
|
|
createNew: false, //是否重复创建同样id的webview,默认为false:不重复创建,直接显示
|
|
show: {
|
|
// autoShow: true, //页面loaded事件发生后自动显示,默认为true
|
|
// aniShow: animationType, //页面显示动画,默认为”slide-in-right“;
|
|
// duration: animationTime, //页面动画持续时间,Android平台默认100毫秒,iOS平台默认200毫秒;
|
|
// event: 'titleUpdate', //页面显示时机,默认为titleUpdate事件时显示
|
|
// extras: {} //窗口动画是否使用图片加速
|
|
},
|
|
waiting: {
|
|
autoShow: true, //自动显示等待框,默认为true
|
|
title: '正在加载...', //等待对话框上显示的提示内容
|
|
options: {
|
|
// width: waiting - dialog - widht, //等待框背景区域宽度,默认根据内容自动计算合适宽度
|
|
// height: waiting - dialog - height, //等待框背景区域高度,默认根据内容自动计算合适高度
|
|
// ......
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}) |