代码修改后的版本,全部提交
This commit is contained in:
470
Mtxfw.VipSite/mobile/shop_other.html
Normal file
470
Mtxfw.VipSite/mobile/shop_other.html
Normal file
@@ -0,0 +1,470 @@
|
||||
<!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;
|
||||
}
|
||||
/* 本例子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;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
bottom: 0em;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.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: #00B050;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.slideBox#slideBox0 .bd li {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
width: 25%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slideBox#slideBox0 .bd li {
|
||||
width: 25%;
|
||||
height: 5.8em;
|
||||
float: left;
|
||||
text-align: center;
|
||||
font-size: 0.85em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slideBox#slideBox0 .bd li img {
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
border: 1px solid #dfdfdf;
|
||||
border-radius: 0.4em;
|
||||
}
|
||||
|
||||
.slideBox#slideBox0 .bd li span {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
line-height: 2em;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
.floor-product-item .product-item-cont {
|
||||
margin-top: 0.8em;
|
||||
}
|
||||
|
||||
.floor-product-item .product-item-cont .product-cont {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
.floor-product-item .product-item-cont .product-cont.product-cont0 {
|
||||
padding-right: 0em;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var userId = null;
|
||||
var LoginId = null;
|
||||
var CartId = null;
|
||||
var opentimes = null;
|
||||
var t = 8;
|
||||
var ifapp = 0, ifvideo = 0;
|
||||
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 aifapp = getlocalStorage("ifapp");
|
||||
if (aifapp != null) {
|
||||
ifapp = aifapp;
|
||||
}
|
||||
var aifvideo = getlocalStorage("ifvideo");
|
||||
if (aifvideo != null) {
|
||||
ifvideo = aifvideo;
|
||||
}
|
||||
if (ifapp == 1 && ifvideo == 0) {
|
||||
$("#index_0_box").removeClass("uhide");
|
||||
} else {
|
||||
$("#index_0_box").addClass("uhide");
|
||||
}
|
||||
rdata(1);
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
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");
|
||||
if (userId != null && LoginId != null) {
|
||||
var userinfo = getlocalStorage("userinfo");
|
||||
var userdata = JSON.parse(userinfo);
|
||||
if (userdata.bdshEnable == "1") {
|
||||
$("#footer-business").addClass("uhide");
|
||||
}
|
||||
}
|
||||
$(".ajaxLoader").removeClass("uhide");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "/apiajax.ashx",
|
||||
data: "&action=getothershopdata&ifweb=1&t=" + t + "&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) {
|
||||
var html = "";
|
||||
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);
|
||||
if (data.pic.length > 0) {
|
||||
TouchSlide({
|
||||
slideCell: "#slideBox",
|
||||
titCell: ".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
|
||||
mainCell: ".bd ul",
|
||||
effect: "leftLoop",
|
||||
interTime: 6000,
|
||||
autoPage: true, //自动分页
|
||||
autoPlay: true //自动播放
|
||||
});
|
||||
}
|
||||
var list;
|
||||
html = "";
|
||||
var html0 = "";
|
||||
var l = data.productlb.length;
|
||||
var ii = 0;
|
||||
for (i = 0; i < l; i++) {
|
||||
if (i == 0 || i == 8) {
|
||||
html0 += '<ul class="nav">';
|
||||
}
|
||||
html0 += '<li onclick="onlistmore(\'' + data.productlb[i].name + '\',' + data.productlb[i]._id + ')" class="ico1">';
|
||||
html0 += '<div><img src="' + data.productlb[i].img + '" /></div><span>' + data.productlb[i].name + '</span>';
|
||||
html0 += '</li>';
|
||||
if (i == 7 || i == l - 1) {
|
||||
html0 += '</ul>';
|
||||
}
|
||||
list = data.productlb[i].productlist;
|
||||
if (list.length > 0) {
|
||||
html += "<div class=\"floor-product-item\">";
|
||||
html += "<div class=\"product-hd\">";
|
||||
html += "<span class=\"product-hd-txt\"><span>" + (ii + 1) + "F</span> " + data.productlb[i].name + "</span>";
|
||||
html += "<span class=\"ub-f1 ub-img5 mar_b product-hd-more\" onclick=\"onlistmore('" + data.productlb[i].name + "'," + data.productlb[i]._id + ")\">更多...</span>";
|
||||
html += "</div>";
|
||||
html += "<div class=\"product-item-cont\">";
|
||||
for (j = 0; j < list.length; j++) {
|
||||
html += "<div class=\"product-cont" + (j % 2 == 0 ? "" : " product-cont0") + " databox_" + list[j]._id + "\">";
|
||||
html += "<div onclick=\"ondetail(" + list[j]._id + ")\" class=\"product-cont-box\">";
|
||||
html += "<img src=\"" + list[j].image + "\" />";
|
||||
html += "<span class=\"txt\">" + list[j].name + "</span>";
|
||||
html += "<span class=\"rmb\">零售价:<del>¥" + list[j].scje + "</del></span>";
|
||||
html += "<span class=\"rmb\">会员价:<span class=\"hyje\">¥" + list[j].hyje + "</span></span>";
|
||||
//html += "<span class=\"rmb\">增值积分:<span class=\"hyje\">" + list[j].zzjf + "</span></span>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
ii += 1;
|
||||
}
|
||||
|
||||
}
|
||||
/*$("#nav_box").html(html0);
|
||||
TouchSlide({
|
||||
slideCell: "#slideBox0",
|
||||
titCell: ".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
|
||||
mainCell: ".bd",
|
||||
effect: "leftLoop",
|
||||
interTime: 6000,
|
||||
autoPage: true, //自动分页
|
||||
autoPlay: true //自动播放
|
||||
});*/
|
||||
$(".floor-product").html(html);
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
} else {
|
||||
|
||||
tishi3(data.msg);
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
if (data.msg == "您未登录") {
|
||||
onlink("/");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tishi3("网络错误!");
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function onlistmore(title, id) {
|
||||
setlocalStorage("showshoplist", title);
|
||||
setlocalStorage("shopcategoryid", id);
|
||||
setlocalStorage("shopcategorytype", t);
|
||||
onlink("shop_list.html?iflb=0");
|
||||
}
|
||||
function ondetail(id) {
|
||||
onlink("shop_view.html?id=" + id);
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="wrap">
|
||||
<header>
|
||||
<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="slideBox" class="slideBox">
|
||||
|
||||
<div class="bd">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
<div class="hd">
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="nav_box">
|
||||
|
||||
<div id="slideBox0" class="slideBox">
|
||||
|
||||
<div class="bd" id="nav_box">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
<div class="hd">
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div id="sysnew" style="padding:0 0.8em; margin-top:0.8em; box-sizing:border-box">
|
||||
|
||||
<div class="floor-product" style="padding:0;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="more_box"></div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<p class="pullUp">上拉加载...</p>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<footer style="">
|
||||
<!--overflow:hidden;box-sizing:border-box;-->
|
||||
<div class="ub">
|
||||
<div class="pos_re ub ub-f1 footer-box">
|
||||
<div id="index_0" class="ub-f1 ub ub-ver" onclick='onloginlink("/mobile/")'>
|
||||
<div class="ub-img5 icon"></div>
|
||||
<div class="uinn-a13 tx-c">
|
||||
首页
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pos_re ub ub-f1 footer-box">
|
||||
<div id="index_2" class="ub-f1 ub ub-ver" onclick='onloginlink("jiaocheng.html")'>
|
||||
<div class="ub-img5 icon icon_act"></div>
|
||||
<div class="uinn-a13 uinn-a13-hover tx-c">
|
||||
操作教程
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pos_re ub ub-f1 footer-box">
|
||||
<div id="index_1" class="ub-f1 ub ub-ver " onclick='onloginlink("business.html")'>
|
||||
<div class="ub-img5 icon"></div>
|
||||
<div class="uinn-a13 tx-c">
|
||||
门店联盟
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pos_re ub ub-f1 footer-box">
|
||||
<div id="index_3" class="ub-f1 ub ub-ver " onclick='onloginlink("shop_other.html")'>
|
||||
<div class="ub-img5 icon icon_act"></div>
|
||||
<div class="uinn-a13 uinn-a13-hover tx-c">
|
||||
事业部
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pos_re ub ub-f1 footer-box">
|
||||
<div id="index_4" class="ub-f1 ub ub-ver " onclick='onloginlink("my.html")'>
|
||||
<div class="ub-img5 icon"></div>
|
||||
<div class="uinn-a13 tx-c">
|
||||
我的
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<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>
|
||||
Reference in New Issue
Block a user