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
220 lines
8.5 KiB
JavaScript
Executable File
220 lines
8.5 KiB
JavaScript
Executable File
var msort = 1;
|
|
var page = 1;
|
|
var condition = 2;
|
|
var desc = 0;
|
|
var catId;
|
|
var keyword;
|
|
var isjiazai = 1;
|
|
var count = 1;
|
|
var goodsType;
|
|
|
|
function pullupRefresh() {
|
|
// setTimeout(function() {
|
|
|
|
// mui('#pullrefresh').pullRefresh().endPullupToRefresh();
|
|
count += 1;
|
|
|
|
var data_set = {
|
|
page: count,
|
|
pagesize: 10,
|
|
condition: condition,
|
|
desc: desc
|
|
}
|
|
// //console.log(order_class)
|
|
if (catId) {
|
|
data_set.catId = catId;
|
|
} else if (keyword) {
|
|
data_set.keyword = keyword;
|
|
}
|
|
if (goodsType) {
|
|
data_set.goodsType = goodsType;
|
|
}
|
|
mui.ajax(qlgUrl('app/Goods/pageQuery'), {
|
|
|
|
data: data_set,
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
// //console.log(data.data.goodsFavoritesNum)
|
|
// //console.log(data.data.Rows)
|
|
|
|
var data = toJson(data);
|
|
data = data.data;
|
|
var html = '';
|
|
if (data.Rows == '') {
|
|
$('.mui-scroll').append('<p style="float: left;width: 100%;text-align: center;padding-bottom: 9px;">没有更多商品</p>');
|
|
return;
|
|
}
|
|
$.each(data.Rows, function() {
|
|
html += '<div class="recommend_con_block shadown_wai" data-goodsId="' + this.goodsId +
|
|
'"data-goodsType=2><img class="rcb_img" src="' + ectImgUrl(this.goodsImg) +
|
|
'" alt="" /><div class="rcb_con"><div class="rcb_title"><span style="display:none;" data-shopId="' + this.shopId +
|
|
'">自营</span>' + this.goodsName + '</div><div class="rcb_pay">¥' + this.shopPrice +
|
|
' <span style="display:none;">满减</span></div><div class="rcb_bottom"><div><span>' + this.saleNum +
|
|
'</span><span>人购买</span></div><div style="display:none"><span>优惠率 </span><span>' + this.discountRate +
|
|
'%</span></div></div></div><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
// 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 style="display:none;" data-shopId="' + this.shopId + '">自营</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><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
});
|
|
$('.recommend_con').append(html);
|
|
$('.rcb_img').height($('.rcb_img').width());
|
|
isjiazai = 1;
|
|
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
// mui.alert(type);
|
|
}
|
|
});
|
|
// }, 500);
|
|
}
|
|
|
|
/**
|
|
* 下拉刷新具体业务实现
|
|
*/
|
|
// function pulldownRefresh() {
|
|
// setTimeout(function() {
|
|
// window.location.reload();
|
|
// mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
|
|
// }, 1500);
|
|
// }
|
|
mui.plusReady(function() {
|
|
var costnum = 0;
|
|
var self = plus.webview.currentWebview();
|
|
catId = self.data_catId;
|
|
keyword = self.data_keyword;
|
|
goodsType = self.goodsType?self.goodsType :"";
|
|
from_id = self.from_id?self.from_id:0;
|
|
$('.commoditylistnav').on('tap', '.nav_block', function() {
|
|
page = 1;
|
|
count = 1;
|
|
$(this).addClass('on').siblings().removeClass('on');
|
|
|
|
condition = $(this).attr('data-condition');
|
|
|
|
if ($('#cost_btn').hasClass('on')) {
|
|
|
|
costnum += 1;
|
|
|
|
if (costnum % 2 == 1) {
|
|
|
|
$('#cost_btn').html('价格 <img src="../img/cost3.png"/>');
|
|
|
|
desc = 1;
|
|
|
|
} else if (costnum % 2 == 0) {
|
|
|
|
$('#cost_btn').html('价格 <img src="../img/cost2.png"/>');
|
|
|
|
desc = 0;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$('#cost_btn').html('价格 <img src="../img/cost1.png"/>')
|
|
|
|
costnum = 0;
|
|
desc = 0
|
|
}
|
|
|
|
var data = {
|
|
pagesize: 10,
|
|
page: 1,
|
|
condition: condition,
|
|
desc: desc,
|
|
goodsType :goodsType,
|
|
from: from_id
|
|
}
|
|
if (catId) {
|
|
data.catId = catId;
|
|
} else if (keyword) {
|
|
data.keyword = keyword;
|
|
}
|
|
|
|
mui.ajax(qlgUrl('app/Goods/pageQuery'), {
|
|
data: data,
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
var data = toJson(data);
|
|
data = data.data;
|
|
var html = '';
|
|
$.each(data.Rows, function() {
|
|
html += '<div class="recommend_con_block shadown_wai" data-goodsId="' + this.goodsId +
|
|
'" data-goodsType="'+goodsType+'"><img class="rcb_img" src="' + ectImgUrl(this.goodsImg) +
|
|
'" alt="" /><div class="rcb_con"><div class="rcb_title"><span style="display:none;" data-shopId="' +
|
|
this.shopId +
|
|
'">自营</span>' + this.goodsName + '</div><div class="rcb_pay">¥' + this.shopPrice +
|
|
' <span style="display:none;">满减</span></div><div class="rcb_bottom"><div><span>' + this.saleNum +
|
|
'</span><span>人购买</span></div><div style ="display:none"><span>优惠率 </span><span>' +
|
|
this.discountRate +
|
|
'%</span></div></div></div><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
// 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 style="display:none;" data-shopId="' + this.shopId + '">自营</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><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
});
|
|
$('.recommend_con').html(html);
|
|
$('.rcb_img').height($('.rcb_img').width());
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
// mui.alert(type);
|
|
}
|
|
});
|
|
})
|
|
var data_1 = {
|
|
pagesize: 10,
|
|
page: 1,
|
|
condition: 2,
|
|
desc: 0,
|
|
from: from_id,
|
|
}
|
|
if (catId) {
|
|
data_1.catId = catId;
|
|
} else if (keyword) {
|
|
data_1.keyword = keyword;
|
|
}
|
|
mui.ajax(qlgUrl('app/Goods/pageQuery'), {
|
|
data: data_1,
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒;
|
|
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
|
var data = toJson(data);
|
|
data = data.data;
|
|
var html = '';
|
|
$.each(data.Rows, function() {
|
|
html += '<div class="recommend_con_block shadown_wai" data-goodsId="' + this.goodsId +
|
|
'" data-goodsType="'+goodsType+'"><img class="rcb_img" src="' + ectImgUrl(this.goodsImg) +
|
|
'" alt="" /><div class="rcb_con"><div class="rcb_title"><span style="display:none;" data-shopId="' + this.shopId +
|
|
'">自营</span>' + this.goodsName + '</div><div class="rcb_pay">¥' + this.shopPrice +
|
|
' <span style="display:none;">满减</span></div><div class="rcb_bottom"><div><span>' + this.saleNum +
|
|
'</span><span>人购买</span></div><div style ="display:none"><span>优惠率 </span><span>' + this.discountRate +
|
|
'%</span></div></div></div><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
// 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 style="display:none;" data-shopId="' + this.shopId + '">自营</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><img style="display:none;" class="icon_icon" src="../img/icon_sscl.png" alt="" /></div>';
|
|
});
|
|
$('.recommend_con').html(html);
|
|
$('.rcb_img').height($('.rcb_img').width());
|
|
},
|
|
error: function(xhr, type, errorThrown) { //异常处理;
|
|
// mui.alert(type);
|
|
}
|
|
});
|
|
|
|
|
|
document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function(e) {
|
|
// //console.log(scroll.y);
|
|
// //console.log(scroll.maxScrollY);
|
|
if (scroll.y == scroll.maxScrollY) {
|
|
if (isjiazai == 1) {
|
|
isjiazai = 0;
|
|
pullupRefresh()
|
|
}
|
|
}
|
|
})
|
|
|
|
})
|
|
|
|
// setInterval(function() {
|
|
// $('.cnxh_block img').height($('.cnxh_block img').width());
|
|
// $('.cnxh_block').height($('.cnxh_block').width() * 266 / 198);
|
|
// }, 100)
|