453 lines
18 KiB
HTML
453 lines
18 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/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/clipboard.min.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.8em;
|
|
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: #fff;
|
|
}
|
|
|
|
.slideBox .bd {
|
|
position: relative;
|
|
z-index: 0;
|
|
width: 100%;
|
|
max-height: 15em;
|
|
border-radius: 0.5em;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .bd li {
|
|
position: relative;
|
|
text-align: center;
|
|
width: 100%;
|
|
min-height: 10em;
|
|
border-radius: 0.5em;
|
|
background: url(/images/ajaxLoader.gif) center center no-repeat;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slideBox .bd li img {
|
|
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;
|
|
}
|
|
#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 viewId = 0;
|
|
var lat = "", lon = "", address="";
|
|
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");
|
|
var dviewId = $.getUrlParam("id");
|
|
if (dviewId != null) {
|
|
viewId = dviewId;
|
|
}
|
|
rdata(1);
|
|
|
|
var clipboard = new Clipboard('#copybtn');
|
|
|
|
clipboard.on('success', function (e) {
|
|
tishi3("复制成功");
|
|
});
|
|
|
|
clipboard.on('error', function (e) {
|
|
tishi3("复制失败");
|
|
});
|
|
|
|
|
|
});
|
|
function onkeyword() {
|
|
var key = fTrim($("#keyword0").val());
|
|
|
|
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");
|
|
var longitude = getlocalStorage("longitude");
|
|
var latitude = getlocalStorage("latitude");
|
|
var Start = $("#sysnew .databox").length;
|
|
if (ag == 1) {
|
|
Start = 0;
|
|
}
|
|
$(".ajaxLoader").removeClass("uhide");
|
|
$(".more_box").html("");
|
|
|
|
var datas = {
|
|
action: "getbusinessview",
|
|
userId: userId,
|
|
LoginId: LoginId,
|
|
longitude: (longitude != null ? longitude : ""),
|
|
latitude: (latitude != null ? latitude : ""),
|
|
viewId: viewId,
|
|
Start: Start
|
|
};
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "/apiajax.ashx?ifweb=0",
|
|
data: datas,
|
|
dataType: "json",
|
|
error: function (xhr) {
|
|
tishi3("发生错误:" + JSON.stringify(xhr));
|
|
},
|
|
success: function (data) {
|
|
|
|
|
|
if (data) {
|
|
|
|
if (data.status == 1) {
|
|
var title = data.name;
|
|
$("header h1").html(title);
|
|
$(document).attr("title", title);
|
|
$("title").html(title);
|
|
$("#view_tel").html("<a href=\"tel:" + data.tel + "\">" + data.tel + "</a>");
|
|
$("#view_yl").html(data.yl + "%");
|
|
$("#sjstatus_box").html(data.sjstatus);
|
|
$("#distance_box").html(data.distance);
|
|
$("#address_box").html(data.address);
|
|
$("#fwbody_box").html(data.fwbody);
|
|
address = data.address;
|
|
lat = data.lon;
|
|
lon = data.lat;
|
|
var showpics = data.pic;
|
|
var html = "";
|
|
if (showpics.length > 0) {
|
|
for (i = 0; i < showpics.length; i++) {
|
|
html += '<li>';
|
|
html += '<a class="pic" href="javascript:void(0);"><img src="' + showpics[i].img + '" /></a>';
|
|
html += '</li>';
|
|
}
|
|
}
|
|
$("#slideBox .bd ul").html(html);
|
|
|
|
if (showpics.length > 0) {
|
|
|
|
settimeout = setInterval(function () {
|
|
TouchSlide({
|
|
slideCell: "#slideBox",
|
|
titCell: ".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
|
|
mainCell: ".bd ul",
|
|
effect: "leftLoop",
|
|
delayTime: 200,
|
|
interTime: 6000,
|
|
autoPage: true, //自动分页
|
|
autoPlay: true //自动播放
|
|
});
|
|
clearInterval(settimeout);
|
|
}, 1000);
|
|
}
|
|
html = "";
|
|
|
|
var list = data.productlist;
|
|
if (ag == 1 || ag == 2) {
|
|
$("#sysnew").html(html);
|
|
}
|
|
if (list.length > 0) {
|
|
for (j = 0; j < list.length; j++) {
|
|
if ($api.domAll("#databox_" + list[j]._id).length == 0) {
|
|
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 += "</div>";
|
|
html += "</div>";
|
|
}
|
|
}
|
|
$(".more_box").html("");
|
|
|
|
if (ag == 1 || ag == 2) {
|
|
$("#sysnew").html(html);
|
|
if (ag == 1) {
|
|
onScroll0();
|
|
}
|
|
} else {
|
|
$("#sysnew").append(html);
|
|
}
|
|
} else {
|
|
if (Start > 0) {
|
|
if (Start > 10) {
|
|
$(".more_box").html("亲!找不到更多了");
|
|
isload = false;
|
|
}
|
|
} else {
|
|
$('#sysnew').html("");
|
|
$(".more_box").html("亲,暂无信息!");
|
|
}
|
|
}
|
|
|
|
$(".ajaxLoader").addClass("uhide");
|
|
} else {
|
|
|
|
tishi3(data.msg);
|
|
$(".ajaxLoader").addClass("uhide");
|
|
if (data.msg == "您未登录") {
|
|
onlink("/");
|
|
}
|
|
}
|
|
} else {
|
|
tishi3("网络错误!");
|
|
$(".ajaxLoader").addClass("uhide");
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
function oncopy0(font) {
|
|
$("#copyinput").val(font);
|
|
$("#copybtn").click();
|
|
}
|
|
function onlistmore(title, id) {
|
|
lbid = id;
|
|
rdata(1);
|
|
}
|
|
function ondetail(id) {
|
|
onlink("shop_view.html?id=" + id);
|
|
}
|
|
function appbus() {
|
|
if (sjuLevel == 0 || sjuLevel == 1) {
|
|
onloginlink('applicant.html');
|
|
} else {
|
|
onloginlink('mybusiness.html');
|
|
}
|
|
}
|
|
function onamap() {
|
|
|
|
layer.open({
|
|
type: 2,
|
|
title: false,
|
|
closeBtn: false,
|
|
content: "bzmap.html?t=1&xcoo=" + lon + "&ycoo=" + lat + "&key=" + address,
|
|
area: ['100%', '100%']
|
|
|
|
});
|
|
|
|
|
|
}
|
|
</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="color:#fff; margin:0; padding:0; min-width:4em; padding-right:1em;">
|
|
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<section class="ub-f1" id="wrapper">
|
|
<div id="slideBox" class="slideBox">
|
|
|
|
<div class="bd">
|
|
<ul></ul>
|
|
</div>
|
|
|
|
<div class="hd">
|
|
<ul></ul>
|
|
</div>
|
|
</div>
|
|
<div style="padding:0; margin-top:0.8em; box-sizing:border-box">
|
|
<div class="ub ub-ver business_view">
|
|
<div class="ub">
|
|
<div class="ub ub-f1 view_tel">电话:<span id="view_tel"></span></div>
|
|
<div class="ub view_yl"><div class="yl-font">服务费</div><div class="ub-f1" id="view_yl"></div></div>
|
|
</div>
|
|
<div class="ub view_sjstatus" id="sjstatus_box"></div>
|
|
<div class="ub view_distance"><div class="ub view_distance_box"><div class="ub-f1">距您直线距离<span id="distance_box"></span></div><div class="ub ico" onclick="event.cancelBubble=true"><img src="../image/Pin-Assistor.png" onclick="onamap()" /></div></div></div>
|
|
<div class="ub view_address"><div class="ub-f1">地址:<span id="address_box"></span></div><!--<div class="ub ico" onclick="event.cancelBubble=true"><img src="../image/copy.png" onclick="oncopy0()" /></div>--></div>
|
|
<div class="ub view_fwbody">服务内容:<div id="fwbody_box"></div></div>
|
|
|
|
</div>
|
|
<div class="Business_view_products">
|
|
<div class="products_box">
|
|
<div class="text">
|
|
<div class="line_flag"></div>
|
|
<span>商品列表</span>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="floor-product">
|
|
<div class="floor-product-item" style="padding:0 0.4em;box-sizing:border-box;">
|
|
<div class="product-item-cont" id="sysnew">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="more_box"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="more_box"></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>
|
|
<div style="width:0.1em;height:0.1em;overflow:hidden;"><input type="text" id="copyinput" style="color:#fff" value="" /><input type="button" id="copybtn" style="color:#fff" value="复制" data-clipboard-action="copy" data-clipboard-target="#copyinput" /></div>
|
|
</body>
|
|
|
|
|
|
</html>
|