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
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
282 lines
9.3 KiB
JavaScript
Executable File
282 lines
9.3 KiB
JavaScript
Executable File
$('.mui-title').html('ECT专区');
|
|
var ect_top = '<div class="ect_top"><p class="ect_m">最新价</p><p class="ect_m">24H成交量</p><img src="http://img.heyuanhui.cn/Upload/app/icon/star.png" /><p class="ect_m" id="last"></p><p class="ect_m" id="vol"></p></div>';
|
|
$('header').before(ect_top);
|
|
var time_ = '距活动开始还有<span id="_d"></span>天';
|
|
$('.mui-scroll-wrapper').removeClass('scroll_out1').addClass('scroll_out3');
|
|
var info = '<img src="http://img.heyuanhui.cn/Upload/app/icon/info.png" class="tanhao" />';
|
|
$('header').append(info);
|
|
var nav = '<div class="nav clearfix"></div>';
|
|
$('.ect_top').before(nav);
|
|
var html_con = '<div class="ten clearfix"></div><div class="title_img"></div><div class="time_"></div><div class="con_"></div>'
|
|
|
|
$('.con').html(html_con);
|
|
$('.time_').html(time_);
|
|
var nav_data = [];
|
|
var secTypeId = 0;
|
|
var timestamp1 = Date.parse(new Date());
|
|
if(timestamp1 >= 1537027200000) {
|
|
secTypeId = 4;
|
|
nav_data = [{
|
|
"secTypeId": 4,
|
|
"name": "海鲜大咖"
|
|
}, {
|
|
"secTypeId": 5,
|
|
"name": "为您推荐"
|
|
}];
|
|
} else {
|
|
secTypeId = 1;
|
|
nav_data = [{
|
|
"secTypeId": 1,
|
|
"name": "9.15元专区"
|
|
}, {
|
|
"secTypeId": 2,
|
|
"name": "满199减100"
|
|
}, {
|
|
"secTypeId": 3,
|
|
"name": "买二赠一专区"
|
|
}, {
|
|
"secTypeId": 4,
|
|
"name": "海鲜大咖"
|
|
}, {
|
|
"secTypeId": 5,
|
|
"name": "为您推荐"
|
|
}];
|
|
}
|
|
|
|
var issx = 0;
|
|
var doller = 0;
|
|
|
|
function getData(secTypeId) {
|
|
// mui('').pullRefresh().scroll(0, 0, 0);
|
|
backTop();
|
|
var data_set = {
|
|
secTypeId: secTypeId,
|
|
topTypeId: 1
|
|
};
|
|
mui.ajax(llUrl('addon/hyhlimitactive-Hyhlimitactive-frontList'), {
|
|
data: data_set,
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'post', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒
|
|
success: function(data) {
|
|
//服务器返回响应,根据响应结果,分析是否登录成功;
|
|
var data = toJson(data, 1);
|
|
if(data.status == 1) {
|
|
|
|
data = data.data;
|
|
var html_ = '';
|
|
var htmlcon = '';
|
|
|
|
doller = data.doller;
|
|
if(data.secTypeId == 5 || data.secTypeId == 4) {
|
|
htmlcon = '<div class="ect_activity"><img src="http://img.heyuanhui.cn/static/app/img/e' + secTypeId + '.png" class="ect_hd" /></div>'
|
|
} else {
|
|
htmlcon = '<div class="ect_activity_"><img src="http://img.heyuanhui.cn/static/app/img/countdown.png" class="ect_djs" /> <span id="_h">00</span><span id="_m">00</span><span id="_s">00</span></div>'
|
|
html_ = '<div class="day"><p>此活动仅限14-15号两天</p></div>';
|
|
}
|
|
|
|
$.each(data.list, function() {
|
|
htmlcon += '<div class="ect_com" data-id="' + this.goodsId + '"><div class="com_img1" ><img src="' + hyhImgUrl(this.goodsImg) + '" /></div><p class="p1"><img src="http://img.heyuanhui.cn/static/app/img/ectb.png" class="com_img2" />' + this.goodsName + '</p><p class="p3"><l></l>CNY <o>' + this.shopPrice + '</o></p>' + html_ + '</div>';
|
|
});
|
|
$('.con').html(htmlcon);
|
|
|
|
setTimeout(function() {
|
|
$('.com_img1').height($('.com_img1').width());
|
|
}, 200)
|
|
countTime();
|
|
|
|
} else {
|
|
console.log(data);
|
|
}
|
|
|
|
},
|
|
|
|
error: function(xhr, type, errorThrown) {
|
|
//异常处理;
|
|
// alert(type);
|
|
}
|
|
});
|
|
}
|
|
|
|
function countTime() {
|
|
|
|
//获取当前时间
|
|
var date = new Date();
|
|
var now = date.getTime();
|
|
//设置截止时间
|
|
var endDate = new Date("2018/09/16 00:00:00");
|
|
var end = endDate.getTime();
|
|
//时间差
|
|
var leftTime = end - now;
|
|
//定义变量 d,h,m,s保存倒计时的时间
|
|
var h, m, s;
|
|
if(leftTime >= 0) {
|
|
d = Math.floor(leftTime / 1000 / 60 / 60 /24);
|
|
h = Math.floor(leftTime / 1000 / 60 / 60);
|
|
m = Math.floor(leftTime / 1000 / 60 % 60);
|
|
s = Math.floor(leftTime / 1000 % 60);
|
|
//将倒计时赋值到div中
|
|
if(d < 10) {
|
|
d = "0" + d;
|
|
}
|
|
if(h < 10) {
|
|
h = "0" + h;
|
|
}
|
|
if(m < 10) {
|
|
m = "0" + m;
|
|
}
|
|
if(s < 10) {
|
|
s = "0" + s;
|
|
}
|
|
document.getElementById("_d").innerHTML = d;
|
|
// document.getElementById("_h").innerHTML = h;
|
|
// document.getElementById("_m").innerHTML = m;
|
|
// document.getElementById("_s").innerHTML = s;
|
|
}
|
|
|
|
//递归每秒调用countTime方法,显示动态时间效果
|
|
setTimeout(countTime, 1000);
|
|
|
|
}
|
|
|
|
mui.plusReady(function() {
|
|
window.addEventListener('refresh', function(e) { //执行刷新
|
|
location.reload();
|
|
|
|
});
|
|
getData(secTypeId);
|
|
|
|
var html = '';
|
|
$.each(nav_data, function() {
|
|
if(timestamp1 >= 1537027200000) {
|
|
html += '<div class="nav_block" style="width:50%;" data-secTypeId="' + this.secTypeId + '">' + this.name + '</div>';
|
|
} else {
|
|
html += '<div class="nav_block" data-secTypeId="' + this.secTypeId + '">' + this.name + '</div>';
|
|
}
|
|
|
|
});
|
|
$('.nav').html(html);
|
|
$('.nav_block').eq(0).addClass('on');
|
|
|
|
setInterval(function() {
|
|
|
|
mui.ajax('https://api.tokencan.com/exchange-open-api/open/api/get_ticker?symbol=ectusdt&random=' + Math.random(), {
|
|
|
|
dataType: 'json', //服务器返回json格式数据
|
|
type: 'get', //HTTP请求类型
|
|
timeout: 10000, //超时时间设置为10秒
|
|
success: function(data) {
|
|
//服务器返回响应,根据响应结果,分析是否登录成功;
|
|
// var data = toJson(data, 1);
|
|
$('#last').html(Math.floor((+data.data.last) * doller * 100) / 100);
|
|
$('#vol').html(data.data.vol);
|
|
$('.p3').each(function(num) {
|
|
$(this).children('l').html('ECT ' + (Math.floor(+$(this).children('o').html() / (+data.data.last) / (+doller) * 100)) / 100 + '≈');
|
|
})
|
|
|
|
},
|
|
|
|
error: function(xhr, type, errorThrown) {
|
|
//异常处理;
|
|
// alert(type);
|
|
}
|
|
});
|
|
|
|
}, 2000)
|
|
|
|
mui("body").on('tap', '.nav_block', function() {
|
|
secTypeId = this.attributes["data-secTypeId"].nodeValue;
|
|
$(this).addClass('on').siblings().removeClass('on');
|
|
getData(secTypeId)
|
|
})
|
|
|
|
mui(".con").on('tap', '.ect_com', function() {
|
|
// var tj = plus.webview.create('search.html');
|
|
// tj.show();
|
|
// alert(e.target.attributes["data-id"].nodeValue);
|
|
var data_id = this.attributes["data-id"].nodeValue;
|
|
var isEct = 1;
|
|
// 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,
|
|
isEct: isEct
|
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
|
},
|
|
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, //等待框背景区域高度,默认根据内容自动计算合适高度
|
|
// ......
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function(e) {
|
|
if(scroll.y == scroll.maxScrollY) {
|
|
// if(isjiazai == 1) {
|
|
// page++;
|
|
// }
|
|
|
|
} else if(scroll.y > 100 && issx == 0) {
|
|
issx = 1;
|
|
setTimeout(function() {
|
|
location.reload()
|
|
}, 1000)
|
|
}
|
|
|
|
})
|
|
|
|
$('header').on('tap', '.tanhao', function() {
|
|
mui.openWindow({
|
|
url: 'activity8.html',
|
|
id: 'activity8.html',
|
|
styles: {
|
|
top: '0px', //新页面顶部位置
|
|
bottom: '0px', //新页面底部位置
|
|
width: '100%', //新页面宽度,默认为100%
|
|
height: '100%' //新页面高度,默认为100%
|
|
},
|
|
extras: {
|
|
// data_keyword: searchName
|
|
// ..... //自定义扩展参数,可以用来处理页面间传值
|
|
},
|
|
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, //等待框背景区域高度,默认根据内容自动计算合适高度
|
|
// ......
|
|
}
|
|
}
|
|
})
|
|
});
|
|
}) |