621 lines
23 KiB
HTML
621 lines
23 KiB
HTML
<!doctype html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
|
|
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
|
<title></title>
|
|
<link rel="stylesheet" type="text/css" href="/css/api.css" />
|
|
<link rel="stylesheet" type="text/css" href="/css/content.css" />
|
|
<script type="text/javascript" src="/scripts/jquery-2.0.2.min.js"></script>
|
|
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
|
|
<!--<script type="text/javascript" src="/scripts/iscroll.js"></script>-->
|
|
<script type="text/javascript" src="/script/main.js?t=0"></script>
|
|
<script type="text/javascript" src="/layer/layer.js"></script>
|
|
<script type="text/javascript" src="/Scripts/long.js"></script>
|
|
<script type="text/javascript" src="/script/moment.js"></script>
|
|
<script type="text/javascript" src="/Scripts/TouchSlide.1.1.js"></script>
|
|
<script type="text/javascript" src="/script/api.js"></script>
|
|
<style type="text/css">
|
|
html, body {
|
|
overflow: hidden;
|
|
}
|
|
|
|
#wrapper {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.pullDown {
|
|
position: absolute;
|
|
top: -1.25rem;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 100;
|
|
text-align: center;
|
|
display: none;
|
|
}
|
|
|
|
.pullUp {
|
|
position: absolute;
|
|
bottom: -1.25rem;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 100;
|
|
text-align: center;
|
|
display: none;
|
|
}
|
|
|
|
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
|
|
display: block;
|
|
}
|
|
|
|
.choice_box .text {
|
|
padding-left: 0.8em;
|
|
box-sizing: border-box;
|
|
}
|
|
/* 本例子css -------------------------------------- */
|
|
.slideBox {
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin: 0 auto;
|
|
max-width: 100%; /* 设置焦点图最大宽度 */
|
|
padding: 0;
|
|
padding-bottom: 0;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .hd {
|
|
position: absolute;
|
|
height: 28px;
|
|
line-height: 28px;
|
|
bottom: 0.3em;
|
|
right: 2em;
|
|
z-index: 1;
|
|
}
|
|
|
|
.slideBox .hd li {
|
|
display: inline-block;
|
|
width: 5px;
|
|
height: 5px;
|
|
-webkit-border-radius: 5px;
|
|
-moz-border-radius: 5px;
|
|
border-radius: 5px;
|
|
background: #333;
|
|
text-indent: -9999px;
|
|
overflow: hidden;
|
|
margin: 0 6px;
|
|
}
|
|
|
|
.slideBox .hd li.on {
|
|
background: #fff;
|
|
}
|
|
|
|
.slideBox .bd {
|
|
position: relative;
|
|
z-index: 0;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .bd li {
|
|
position: relative;
|
|
text-align: center;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .bd li img {
|
|
background: url(/images/loading.gif) center center no-repeat;
|
|
border-radius: 0.5em;
|
|
vertical-align: top;
|
|
width: 100%; /* 图片宽度100%,达到自适应效果 */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .bd li a {
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
}
|
|
/* 去掉链接触摸高亮 */
|
|
.slideBox .bd li .tit {
|
|
display: block;
|
|
width: 100%;
|
|
position: absolute;
|
|
bottom: 0;
|
|
text-indent: 10px;
|
|
height: 28px;
|
|
line-height: 28px;
|
|
background: url(/images/focusBg.png) repeat-x;
|
|
color: #fff;
|
|
text-align: left;
|
|
}
|
|
.choice_box{
|
|
margin-top:0.8em;
|
|
}
|
|
.choice_box .text {
|
|
background: linear-gradient(to right,#1C7A47,#1C7A47);
|
|
color: #fff;
|
|
border-radius: 0.4em;
|
|
}
|
|
.choice_box .choice_list .choice_item {
|
|
margin-top: 0.8em;
|
|
background-color: #fff;
|
|
border: 1px solid #dfdfdf;
|
|
border-radius: 0.4em;
|
|
}
|
|
.choice_box .choice_list .choice_item .choice_item_box {
|
|
display: flex;
|
|
flex-direction: row;
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.choice_box .choice_list .choice_item .choice_image {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 9em;
|
|
height: 7em;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.choice_box .choice_list .choice_item .choice_image img {
|
|
width: 7.4em;
|
|
height: 7.4em;
|
|
}
|
|
|
|
.choice_box .choice_list .right_title {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
margin-top:0;
|
|
padding: 0;
|
|
height: 7em;
|
|
width: 70%;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.choice_box .choice_list .right_name {
|
|
display:block;
|
|
float: left;
|
|
margin-top: -0.4em;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 2em;
|
|
text-align: left;
|
|
overflow:hidden;
|
|
box-sizing: border-box;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
color: #000;
|
|
}
|
|
.choice_box .choice_list .right_name0 {
|
|
float: left;
|
|
display: block;
|
|
width: 100%;
|
|
height: 3em;
|
|
line-height: 1.2em;
|
|
color: #000;
|
|
text-align: left;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
|
|
.choice_box .choice_list .jeto {
|
|
float: left;
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-top: 0;
|
|
font-size: 0.85em;
|
|
color: #333;
|
|
width: 100%;
|
|
}
|
|
|
|
|
|
.choice_box .choice_list .jeto .hyje {
|
|
color: #333;
|
|
line-height: 1.5em;
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
.choice_box .choice_list .jeto .hyje span {
|
|
|
|
}
|
|
|
|
|
|
.choice_box .choice_list .right_button {
|
|
float: left;
|
|
display: block;
|
|
margin: 0;
|
|
margin-top:0em;
|
|
width: 100%;
|
|
}
|
|
|
|
.choice_box .choice_list .right_button div {
|
|
float: right;
|
|
display: block;
|
|
margin: 0;
|
|
margin-right: 0;
|
|
width: 5em;
|
|
text-align: center;
|
|
padding: 0.2em 0em;
|
|
box-sizing: border-box;
|
|
background: linear-gradient(to left,#00B050,#00B050);
|
|
color: #fff;
|
|
border-radius: 0.5em;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.choice_box .choice_list .right_button div.visited {
|
|
background: linear-gradient(to left,#e1e1e1,#e8e8e8);
|
|
border: 1px solid #dfdfdf;
|
|
color: #aaa;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var userId = null;
|
|
var LoginId = null;
|
|
var CartId = null;
|
|
var opentimes = null;
|
|
var t = 2;
|
|
var title = "兑换专区";
|
|
var productlb_data = null;
|
|
var myScroll = null;
|
|
var pullDown = 1; // 下拉刷新避免多次执行
|
|
var pullUp = 1; // 上拉加载避免多次执行
|
|
var downHeight = 0;
|
|
var upHeight = 0;
|
|
var isload = true;//设置是否终止滚动加载
|
|
var curScrollHeight = 0;//当前滚动位置
|
|
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
|
$(document).ready(function () {
|
|
userId = getlocalStorage("userId");
|
|
LoginId = getlocalStorage("LoginId");
|
|
CartId = getlocalStorage("CartId");
|
|
var dParam = $.getUrlParam("t");
|
|
if (dParam != null) {
|
|
t = dParam;
|
|
}
|
|
|
|
if (t == 4) {
|
|
title = "惠客厅";
|
|
}
|
|
if (t == 5) {
|
|
title = "流量专区";
|
|
}
|
|
if (t == 6) {
|
|
title = "体验区";
|
|
}
|
|
if (t == 7) {
|
|
title = "品牌展示";
|
|
}
|
|
if (t == 9) {
|
|
title = "大象家簇";
|
|
}
|
|
if (t == 10) {
|
|
title = "门店部";
|
|
}
|
|
if (t == 11) {
|
|
title = "爆品专区";
|
|
}
|
|
if (t == 12) {
|
|
title = "补贴专区";
|
|
}
|
|
if (t == 13) {
|
|
title = "体验区";
|
|
$(document).attr("title", title);
|
|
$("title").html(title);
|
|
var html = '';
|
|
html += '<div class="tab flex-around">';
|
|
html += '<a class="on">体验区</a>';
|
|
html += '<a>镇街服务商</a>';
|
|
html += '</div>';
|
|
$("header h1").html(html);
|
|
$(".tab a").on("click", function () {
|
|
var num = $(this).index();
|
|
$(this).addClass("on").siblings().removeClass("on");
|
|
if (num == 1) {
|
|
t = 15;
|
|
} else {
|
|
t = 13;
|
|
}
|
|
rdata(1);
|
|
$("#wrapper").animate({ scrollTop: 0 }, 500);
|
|
});
|
|
} else {
|
|
$("header h1").html(title);
|
|
$(document).attr("title", title);
|
|
$("title").html(title);
|
|
}
|
|
|
|
rdata(1);
|
|
|
|
|
|
|
|
|
|
});
|
|
function qhnav() {
|
|
$("#choice_box_text").css("display", "flex");
|
|
$("#choice_box_text0").css("display", "none");
|
|
if (t == 2) {
|
|
$("#xxddh").css("display", "block");
|
|
} else {
|
|
$("#xxddh").css("display", "none");
|
|
}
|
|
if (t == 4 || t == 7) {
|
|
$("#choice_box_text").css("display", "none");
|
|
$("#choice_box_text0").css("display", "flex");
|
|
var nav = 0;
|
|
if (t == 7) {
|
|
nav = 1;
|
|
}
|
|
$("#tab" + nav).addClass("on").siblings().removeClass("on");
|
|
|
|
}
|
|
}
|
|
function onScroll0() {
|
|
isload = true;//设置是否终止滚动加载
|
|
curScrollHeight = 0;//当前滚动位置
|
|
curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
|
$("#wrapper").scroll(function () {
|
|
var pageHeight = $("#sysnew").height();
|
|
var showHeight = $("#wrapper").height();
|
|
var scrollHeight = $("#wrapper").scrollTop();
|
|
|
|
if (curScrollHeight - scrollHeight < 10 && curScrollHeight > 0) {
|
|
if (curCount == 1 && isload) {
|
|
|
|
rdata(0);
|
|
}
|
|
curCount++; //加载下一页后计数器+1
|
|
}
|
|
if (curScrollHeight < scrollHeight) {
|
|
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
|
|
curCount = 1;
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
function rdata(ag) {
|
|
userId = getlocalStorage("userId");
|
|
LoginId = getlocalStorage("LoginId");
|
|
var Start = $(".choice_list .choice_item").length;
|
|
if (ag == 1) {
|
|
Start = 0;
|
|
}
|
|
|
|
$(".ajaxLoader").removeClass("uhide");
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: "/apiajax.ashx",
|
|
data: "&action=getothershopdata0&ifweb=1&t=" + t + "&Start=" + Start +"&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
|
dataType: "JSON",
|
|
error: function (xhr, type) {
|
|
tishi3("发生错误:" + JSON.stringify(xhr));
|
|
},
|
|
success: function (data) {
|
|
|
|
|
|
if (data) {
|
|
if (data.status == 1) {
|
|
|
|
if (t == 15) {
|
|
$("#xfje_title").css("display", "block");
|
|
if (ag == 1) {
|
|
$("#xfje_title").html(" 达到镇街服务商的消费金额:" + data.maxmoney);
|
|
}
|
|
} else {
|
|
$("#xfje_title").css("display", "none");
|
|
}
|
|
var html = "";
|
|
/*if (ag == 1) {
|
|
if (data.pic.length > 0) {
|
|
for (i = 0; i < data.pic.length; i++) {
|
|
html += '<li>';
|
|
html += '<a class="pic" href="javascript:void(0);"><img src="' + data.pic[i].img + '" /></a>';
|
|
html += '</li>';
|
|
}
|
|
}
|
|
$("#slideBox .bd ul").html(html);
|
|
TouchSlide({
|
|
slideCell: "#slideBox",
|
|
titCell: ".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
|
|
mainCell: ".bd ul",
|
|
effect: "leftLoop",
|
|
interTime: 6000,
|
|
autoPage: true, //自动分页
|
|
autoPlay: true //自动播放
|
|
});
|
|
}*/
|
|
|
|
html = "";
|
|
var list = data.productlist;
|
|
for (j = 0; j < list.length; j++) {
|
|
var bifshow = 0;
|
|
if (ag == 0) {
|
|
if ($api.domAll(".choice_list .choice_item#databox_" + list[j]._id).length == 0) {
|
|
bifshow = 1;
|
|
}
|
|
} else {
|
|
bifshow = 1;
|
|
}
|
|
if (bifshow == 1) {
|
|
html += '<div class="choice_item" onclick="ondetail(' + list[j]._id + ')" id="databox_' + list[j]._id + '">';
|
|
html += '<div class="choice_item_box">';
|
|
html += '<div class="choice_image">';
|
|
html += '<div class="choice_image_box">';
|
|
html += '<img src="' + list[j].image + '"></img>';
|
|
html += '</div>';
|
|
html += '</div>';
|
|
html += '<div class="right_title">';
|
|
html += '<div class="right_name' + (t != 2 ? "" : "0") +'" >' + list[j].name + '</div>';
|
|
html += '<div class="jeto">';
|
|
if (t == 7) {
|
|
html += '<div class="hyje">金额:<span>¥' + list[j].hyje + '</span></div>';
|
|
html += '<div class="hyje">贡献值:<span>' + list[j].hyje0 + '</span></div>';
|
|
html += '<div class="hyje">展示次数:<span>' + list[j].hyje1 + '</span></div>';
|
|
|
|
} else {
|
|
if (t != 2) {
|
|
html += '<div class="hyje">零售价:<del>¥' + list[j].scje + '</del></div>';
|
|
}
|
|
if (t == 2) {
|
|
html += '<div class="hyje">兑换价:<span>¥' + list[j].hyje + '</span></div>';
|
|
} else {
|
|
html += '<div class="hyje">会员价:<span>¥' + list[j].hyje + '</span></div>';
|
|
}
|
|
if (t == 11) {
|
|
//html += '<div class="hyje">权益分红:<span>' + list[j].hyje0 + '</span></div>';
|
|
} else {
|
|
//html += '<div class="hyje">贡献值:<span>' + list[j].hyje0 + '</span></div>';
|
|
}
|
|
|
|
}
|
|
html += '</div>';
|
|
html += '<div class="right_button" >';
|
|
if (t == 7) {
|
|
html += '<div>立即申请</div>';
|
|
} else {
|
|
html += '<div>立即购买</div>';
|
|
}
|
|
html += '</div>';
|
|
html += '</div>';
|
|
html += '</div>';
|
|
html += '</div>';
|
|
}
|
|
}
|
|
if (ag == 1 || ag == 2) {
|
|
$(".choice_list").html(html);
|
|
if (ag == 1) {
|
|
onScroll0();
|
|
}
|
|
if (list.length == 0) {
|
|
$(".more_box").html("亲,暂无信息!");
|
|
}
|
|
} else {
|
|
$(".choice_list").append(html);
|
|
}
|
|
$(".ajaxLoader").addClass("uhide");
|
|
} else {
|
|
|
|
tishi3(data.msg);
|
|
$(".ajaxLoader").addClass("uhide");
|
|
if (data.msg == "您未登录") {
|
|
onlink("/");
|
|
}
|
|
}
|
|
} else {
|
|
tishi3("网络错误!");
|
|
$(".ajaxLoader").addClass("uhide");
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
function onlistmore(id) {
|
|
$(".item-menu .item-menu-li").removeClass("hover");
|
|
$(".item-menu .item-menu-li#menu-li" + id).addClass("hover");
|
|
t0 = id;
|
|
rdata(1);
|
|
}
|
|
function ondetail(id) {
|
|
setlocalStorage("indexnav", t);
|
|
if (t == 7) {
|
|
onlink("fnst_app.html?id=" + id);
|
|
} else {
|
|
onlink("shop_view.html?id=" + id);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="wrap">
|
|
<header class="shoplheader">
|
|
<div class="ub">
|
|
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="closeWin()">
|
|
|
|
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
|
|
|
|
|
|
</div>
|
|
<h1 class="ub-f1">
|
|
|
|
</h1>
|
|
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:3em; ">
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<section class="ub-f1" id="wrapper">
|
|
<div id="wrapper_content">
|
|
<p class="pullDown">下拉刷新...</p>
|
|
<!--<div class="clear"></div>
|
|
<div id="index_content">
|
|
<div id="slideBox" class="slideBox">
|
|
|
|
<div class="bd">
|
|
<ul></ul>
|
|
</div>
|
|
|
|
<div class="hd">
|
|
<ul></ul>
|
|
</div>
|
|
</div>
|
|
</div>-->
|
|
<div class="clear"></div>
|
|
<div style="padding:0 0.8em;">
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="clear"></div>
|
|
<div class="choice_box">
|
|
<div class="choice_box_to">
|
|
<div class="text" id="choice_box_text" style="display:none">
|
|
<div class="line_flag"></div>
|
|
<text style="flex-grow:1;">商品列表</text>
|
|
<span id="xxddh" style="float:right;width:auto; display:none; margin-top:0em; height:2.2em; line-height:2.2em; color:#fff;background-color:#00B050;border-radius: 1.2em;padding:0 0.8em;border:1px solid #02662F;" onclick='tishi3("正在建设中...")'>线下店兑换</span>
|
|
</div>
|
|
<div id="xfje_title" style="display:none"></div>
|
|
<div class="text" id="choice_box_text0" style="display:none">
|
|
<div class="tab flex-around">
|
|
<a class="on" id="tab0">创客商品</a>
|
|
<a id="tab1">品牌展示</a>
|
|
</div>
|
|
</div>
|
|
<div class="choice_list" id="sysnew">
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="more_box"></div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<p class="pullUp">上拉加载...</p>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
|
|
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|