1307 lines
49 KiB
HTML
1307 lines
49 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="/scripts/navbarscroll.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="/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;
|
||
}
|
||
/* 本例子css -------------------------------------- */
|
||
.slideBox {
|
||
position: relative;
|
||
overflow: hidden;
|
||
margin: 0 auto;
|
||
max-width: 100%; /* 设置焦点图最大宽度 */
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.slideBox .hd {
|
||
position: absolute;
|
||
height: 28px;
|
||
line-height: 28px;
|
||
width: 100%;
|
||
bottom: 0.8em;
|
||
right: 0em;
|
||
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%;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.slideBox .bd li {
|
||
position: relative;
|
||
text-align: center;
|
||
padding: 0.8em;
|
||
padding-bottom:0;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.slideBox .bd li img {
|
||
background: url(image/loading.gif) center center no-repeat;
|
||
border-radius: 0.7em;
|
||
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 .bd li img {
|
||
background: url(image/loading.gif) center center no-repeat;
|
||
border-radius: 0.7em;
|
||
vertical-align: top;
|
||
width: 100%; /* 图片宽度100%,达到自适应效果 */
|
||
overflow: hidden;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
|
||
.showthjto {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.showthjto_box {
|
||
border-radius: 0.5em;
|
||
margin: 5%;
|
||
width: 90%;
|
||
bottom: 2.5em;
|
||
}
|
||
|
||
.showthjto h3 span {
|
||
float: left;
|
||
margin-top: 0.8em;
|
||
margin-left: 0em;
|
||
display: block;
|
||
width: 100%;
|
||
height: 2em;
|
||
text-align: center;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.notice_box {
|
||
padding-bottom: 0;
|
||
}
|
||
|
||
.notice_box_to {
|
||
background: #1B7509;
|
||
}
|
||
|
||
.layer, .notice-layer {
|
||
width: 100%;
|
||
height: 100%;
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
z-index: 100;
|
||
background: rgba(0, 0, 0, .5);
|
||
text-align: center;
|
||
padding: 0;
|
||
display: none;
|
||
}
|
||
|
||
.notice-layer .notice-box {
|
||
float: none;
|
||
width: 95%;
|
||
margin: 0 auto;
|
||
margin-top: 3em;
|
||
position: relative;
|
||
overflow: hidden;
|
||
background: #fff;
|
||
border-radius: 10px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
|
||
.notice-box .n-tit {
|
||
width: 100%;
|
||
margin-top: 0;
|
||
height: 4rem;
|
||
position: relative;
|
||
padding: 0;
|
||
line-height: 4rem;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
font-size: 1.2em;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.notice-box .cont {
|
||
margin: 0;
|
||
height: 28rem;
|
||
padding: 0.8em;
|
||
box-sizing: border-box;
|
||
overflow-y: scroll;
|
||
text-align: left;
|
||
}
|
||
|
||
.notice-box .cont p {
|
||
font-size: 1em;
|
||
line-height: 2.2rem;
|
||
margin-bottom: .8rem;
|
||
}
|
||
|
||
.notice-box .cont img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
.notice-box .btn {
|
||
padding: .5rem 0 1.8rem;
|
||
}
|
||
|
||
.notice-box .btn div {
|
||
display: block;
|
||
width: 50%;
|
||
height: 2.8rem;
|
||
line-height: 2.8rem;
|
||
text-align: center;
|
||
color: #fff;
|
||
margin: 0 auto;
|
||
border-radius: 15px;
|
||
font-size: 1.6rem;
|
||
text-decoration: none;
|
||
}
|
||
.nav_box1 .nav li {
|
||
width: 20%;
|
||
}
|
||
.nav_box1 .nav.navb {
|
||
padding-top: 0;
|
||
}
|
||
|
||
.tab-header {
|
||
float: left;
|
||
width: 100%;
|
||
padding: 0.8em 0.8em;
|
||
padding-top: 0;
|
||
height: 2.5em;
|
||
line-height: 2.5em;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.tab-header ul {
|
||
float: left;
|
||
width: 100%;
|
||
}
|
||
|
||
.tab-header ul li {
|
||
float: left;
|
||
width: 5em;
|
||
|
||
}
|
||
.tab-header ul li.active {
|
||
color: #000;
|
||
font-weight: 900;
|
||
}
|
||
.choice_box {
|
||
padding: 0.8em;
|
||
padding-bottom:0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.choice_box .text {
|
||
background-color: #1C7A47;
|
||
color: #fff;
|
||
border-radius: 0.4em;
|
||
}
|
||
.choice_box .choice_list {
|
||
width:100%;
|
||
|
||
}
|
||
.choice_box .choice_list .choice_item {
|
||
margin-top: 0.8em;
|
||
background-color: #fff;
|
||
border: 1px solid #f1f1f1;
|
||
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: 6.6em;
|
||
height: 6.6em;
|
||
padding: 0;
|
||
border-radius: 0.8em;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.choice_box .choice_list .choice_item .choice_image img {
|
||
width: 6.6em;
|
||
height: 6.6em;
|
||
border-radius: 0.8em;
|
||
}
|
||
|
||
.choice_box .choice_list .right_title {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex-grow: 1;
|
||
margin-top: 0;
|
||
padding: 0;
|
||
height: 7em;
|
||
width: 11em;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
|
||
|
||
.choice_box .choice_list .right_name {
|
||
display: block;
|
||
float: left;
|
||
margin-top: -0.4em;
|
||
margin-left: 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;
|
||
margin-left: 0.4em;
|
||
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 {
|
||
}
|
||
.floor-product-item .product-item-cont .product-cont {
|
||
float: left;
|
||
width: 50%;
|
||
padding: 0.8em;
|
||
padding-left: 0;
|
||
padding-right: 0.4em;
|
||
display: block;
|
||
overflow: hidden;
|
||
box-sizing: border-box;
|
||
-moz-box-sizing: border-box;
|
||
-webkit-box-sizing: border-box;
|
||
}
|
||
|
||
.floor-product-item .product-item-cont .product-cont.product-cont0 {
|
||
padding-left: 0.4em;
|
||
padding-right: 0em;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
var userId = null;
|
||
var LoginId = null;
|
||
var CartId = null;
|
||
var etype = 0;
|
||
var ifapp = 0, ifvideo = 0;
|
||
var opentimes = null;
|
||
var sInterval0 = null;
|
||
var navindex = 0, categoryid=0;
|
||
var shoppic1 = 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 () {
|
||
CartId = getlocalStorage("CartId");
|
||
userId = $.getUrlParam("userId");
|
||
LoginId = $.getUrlParam("LoginId");
|
||
if (userId != null && LoginId != null) {
|
||
setlocalStorage("userId", userId);
|
||
setlocalStorage("LoginId", LoginId);
|
||
ifzzlogin = 1;
|
||
}
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
var app = $.getUrlParam("app");
|
||
if (app != null) {
|
||
ifapp = app;
|
||
setlocalStorage("ifapp", 1);
|
||
} else {
|
||
var aifapp = getlocalStorage("ifapp");
|
||
if (aifapp != null) {
|
||
ifapp = aifapp;
|
||
}
|
||
}
|
||
var aifvideo = getlocalStorage("ifvideo");
|
||
if (aifvideo != null) {
|
||
ifvideo = aifvideo;
|
||
}
|
||
if (ifapp == 1 && ifvideo == 0) {
|
||
$("#index_1_box").removeClass("uhide");
|
||
} else {
|
||
$("#index_1_box").addClass("uhide");
|
||
}
|
||
rdata(0);
|
||
|
||
|
||
|
||
//var h = $("#section_midFrame").height();
|
||
//$("#midFrame").css("height", h);
|
||
document.onkeydown = function (event) {
|
||
var e = event || window.event;
|
||
if (e.keyCode === 13) {
|
||
onkeyword();
|
||
}
|
||
};
|
||
|
||
|
||
});
|
||
|
||
function onScroll0() {
|
||
isload = true;//设置是否终止滚动加载
|
||
curScrollHeight = 0;//当前滚动位置
|
||
curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
||
$("#wrapper").scroll(function () {
|
||
var pageHeight = $((navindex == 0 ? "#products_list1" : ".floor-product .product-item-cont")).height();
|
||
var showHeight = $("#wrapper").height();
|
||
var scrollHeight = $("#wrapper").scrollTop();
|
||
|
||
if (curScrollHeight - scrollHeight < 300 && curScrollHeight > 0) {
|
||
if (curCount == 1 && isload) {
|
||
|
||
|
||
rdata(1);
|
||
|
||
}
|
||
curCount++; //加载下一页后计数器+1
|
||
}
|
||
if (curScrollHeight < scrollHeight) {
|
||
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
|
||
curCount = 1;
|
||
}
|
||
|
||
});
|
||
}
|
||
function rdata(ag) {
|
||
|
||
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
var Start = $("#products_list1 .product-cont").length;
|
||
if (ag == 0) {
|
||
|
||
Start = 0;
|
||
}
|
||
if ($(".ajaxLoader.uhide").length > 0) {
|
||
$(".ajaxLoader").removeClass("uhide");
|
||
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: "/apiajax.ashx?action=getshopdata&ifweb=1&categoryid=" + categoryid + "&Start=" + Start + "&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
||
dataType: "json",
|
||
success: function (data) {
|
||
|
||
$(".ajaxLoader").addClass("uhide");
|
||
if (data) {
|
||
|
||
if (data.status == '1') {
|
||
|
||
rdatato(data, ag);
|
||
|
||
} else {
|
||
etishi3(data.msg);
|
||
if (data.msg == (etype == 0 ? "您未登录!" : "You are not logged in!")) {
|
||
clearlocalStorage("userId");
|
||
clearlocalStorage("LoginId");
|
||
}
|
||
}
|
||
} else {
|
||
|
||
etishi3("读取数据错误0");
|
||
}
|
||
},
|
||
error: function (xhr, type) {
|
||
etishi3("读取数据错误");
|
||
}
|
||
});
|
||
}
|
||
}
|
||
var cnum = 0;
|
||
function rdatato(data, ag) {
|
||
|
||
if (ag == 0) {
|
||
var html0 = "";
|
||
if (data.news.length > 0) {
|
||
for (j = 0; j < data.news.length; j++) {
|
||
html0 += "<a href=\"news_details.html?id=" + data.news[j].id + "\">" + data.news[j].title + "</a>";//
|
||
}
|
||
}
|
||
$("#notice_body").html(html0);
|
||
var showthjto_title = data.showtitle, showthjto_body = data.showbody;
|
||
try {
|
||
var showbody = getlocalStorage("showbody");
|
||
var showb = true;
|
||
if (showthjto_body != "") {
|
||
if (showbody != null) {
|
||
if (showbody == showthjto_body) {
|
||
showb = false;
|
||
}
|
||
}
|
||
|
||
} else {
|
||
showb = false;
|
||
}
|
||
if (showb) {
|
||
$("#read_title0").html(showthjto_title);
|
||
$("#read_body").html(showthjto_body);
|
||
$("#notice-detial").fadeIn();
|
||
setlocalStorage("showbody", showthjto_body);
|
||
}
|
||
} catch (err) {
|
||
tishi3(err);
|
||
}
|
||
}
|
||
var html = "";
|
||
var list;
|
||
if (ag == 0) {
|
||
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 = "";
|
||
if (data.pic1.length > 0 && categoryid == 0) {
|
||
for (i = 0; i < data.pic1.length; i++) {
|
||
var sclass = "";
|
||
if (categoryid == data.pic1[i].id) {
|
||
sclass = " class=\"active\"";
|
||
}
|
||
html += '<li' + sclass + ' id="category' + data.pic1[i].id + '">' + data.pic1[i].label + '</li>';
|
||
}
|
||
$(".tab-header ul").html(html);
|
||
$(".tab-header ul").css("width", (data.pic1.length * 5) + "em");
|
||
|
||
$(".tab-header ul li").click(function () {
|
||
try {
|
||
var moveX = $(this).position().left + $(".tab-header").scrollLeft();
|
||
var pageX = $(".tab-header").width();//设备的宽度
|
||
var blockwidth = $(this).width();
|
||
var left = moveX - (pageX / 2) + (blockwidth / 2);
|
||
//alert(moveX + "|" + pageX + "|" + blockwidth);
|
||
$(".tab-header").animate({ scrollLeft: left }, 400);
|
||
$(this).addClass("active").siblings().removeClass("active");
|
||
var num = $(this).index();
|
||
|
||
var id = $(this).attr("id").replace("category", "");
|
||
cnum = num;
|
||
oncategoryid(id);
|
||
} catch (err) {
|
||
alert(err);
|
||
}
|
||
});
|
||
|
||
}
|
||
|
||
|
||
html = "";
|
||
|
||
list = data.products;
|
||
if (list.length > 0) {
|
||
for (var j = 0; j < list.length; j++) {
|
||
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" >' + list[j].name + '</div>';
|
||
html += '<div class="jeto">';
|
||
html += '<div class="hyje">首购价:<span>' + list[j].hyje + '</span></div>';
|
||
html += '<div class="hyje">复购价:<span>' + list[j].scje + '</span></div>';
|
||
html += '</div>';
|
||
html += '<div class="right_button" >';
|
||
|
||
html += '<div>立即购买</div>';
|
||
|
||
html += '</div>';
|
||
html += '</div>';
|
||
html += '</div>';
|
||
html += '</div>';
|
||
|
||
}
|
||
$("#products_list_box").removeClass("uhide");
|
||
$("#products_list").html(html);
|
||
} else {
|
||
$("#products_list_box").addClass("uhide");
|
||
}
|
||
|
||
html = "";
|
||
list = data.products0;
|
||
if (list.length > 0) {
|
||
for (var 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 class=\"hyje\" style=\"float:right;\">" + list[j].hyje + "元</span></span>";
|
||
html += "<span class=\"rmb\" style=\" margin-top: -0.6em;\"><span class=\"hyje0\">补贴券:" + list[j].hyjf + "</span></span>";
|
||
html += "</div>";
|
||
html += "</div>";
|
||
}
|
||
$("#products_list0").html(html);
|
||
$("#products_list_box").removeClass("uhide");
|
||
} else {
|
||
$("#products_list0_box").addClass("uhide");
|
||
}
|
||
|
||
}
|
||
html = "";
|
||
list = data.products1;
|
||
for (j = 0; j < list.length; j++) {
|
||
var bifshow = 0;
|
||
if (ag == 1) {
|
||
if ($("#products_list1 #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" >' + list[j].name + '</div>';
|
||
html += '<div class="jeto">';
|
||
html += '<div class="hyje">会员价:<span>' + list[j].hyje + '</span></div>';
|
||
html += '<div class="hyje">零售价:<span><del>' + list[j].scje + '</del></span></div>';
|
||
html += '</div>';
|
||
html += '<div class="right_button" >';
|
||
|
||
html += '<div>立即购买</div>';
|
||
|
||
html += '</div>';
|
||
html += '</div>';
|
||
html += '</div>';
|
||
html += '</div>';
|
||
/*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 class=\"hyje\" style=\"float:right;\">¥" + list[j].hyje + "</span></span>";
|
||
|
||
html += "</div>";
|
||
html += "</div>";*/
|
||
}
|
||
|
||
}
|
||
if (ag == 0) {
|
||
$("#products_list1").html(html);
|
||
onScroll0();
|
||
if (Start > 10) {
|
||
if (list.length == 0) {
|
||
$(".more_box").html("亲!找不到更多了");
|
||
}
|
||
}
|
||
} else {
|
||
$("#products_list1").append(html);
|
||
if (list.length == 0) {
|
||
$(".more_box").html("亲,暂无信息!");
|
||
}
|
||
}
|
||
|
||
if (data.iflogin == 2) {
|
||
clearlocalStorage("userId");
|
||
clearlocalStorage("LoginId");
|
||
}
|
||
else if (data.iflogin == 1) {
|
||
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
|
||
|
||
if (data.CloseEnable != null) {
|
||
if (data.CloseEnable == "1") {
|
||
clearlocalStorage("userId");
|
||
clearlocalStorage("LoginId");
|
||
api.openWin("login", "/");
|
||
}
|
||
}
|
||
|
||
|
||
|
||
}
|
||
|
||
}
|
||
|
||
function rdata0() {
|
||
var msgCount = getlocalStorage("msgCount");
|
||
if (msgCount != null) {
|
||
$("#MsgCount").html(msgCount);
|
||
}
|
||
}
|
||
function oncategoryid(id) {
|
||
categoryid = id;
|
||
|
||
rdata(0);
|
||
}
|
||
function showhtml(index) {
|
||
navindex = index;
|
||
var h = 0;
|
||
if (navindex == 0) {
|
||
$("#index_content").css("display", "block");
|
||
$("#index_content0").css("display", "none");
|
||
h = $("#index_content").height();
|
||
} else {
|
||
$("#index_content0").css("display", "block");
|
||
$("#index_content").css("display", "none");
|
||
getlist(1);
|
||
h = $("#index_content0").height();
|
||
|
||
}
|
||
|
||
}
|
||
function getlist(ag) {
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
var categoryid = 0;
|
||
if (shoppic1 != null) {
|
||
|
||
categoryid = shoppic1[navindex].id;
|
||
|
||
}
|
||
|
||
var Start = $(".floor-product .product-cont").length;
|
||
if (ag == 1) {
|
||
Start = 0;
|
||
}
|
||
$(".ajaxLoader").removeClass("uhide");
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: "/apiajax.ashx?action=getwxshoplist&ifweb=1&categoryid=" + categoryid + "&Start=" + Start + "&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
||
dataType: "json",
|
||
success: function (data) {
|
||
|
||
|
||
if (data) {
|
||
if (data.status == 1) {
|
||
var html = "";
|
||
if (data.productlist.length > 0) {
|
||
var list = data.productlist;
|
||
if (Start == 0) {
|
||
|
||
html += "<div class=\"floor-product-item\">";
|
||
html += "<div class=\"product-item-cont\">";
|
||
}
|
||
for (j = 0; j < list.length; j++) {
|
||
if (document.getElementsByClassName(".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 class=\"hyje\">" + list[j].hyje + "元</span></span>";
|
||
//html += "<span class=\"rmb\"><span class=\"hyje\">贡献值" + list[j].hyje0 + "元</span></span>";
|
||
html += "</div>";
|
||
html += "</div>";
|
||
}
|
||
}
|
||
if (Start == 0) {
|
||
html += "</div>";
|
||
html += "</div>";
|
||
|
||
}
|
||
if (ag == 1 || ag == 2) {
|
||
$(".floor-product").html(html);
|
||
|
||
if (ag == 1) {
|
||
onScroll0();
|
||
}
|
||
} else {
|
||
$(".floor-product .product-item-cont").append(html);
|
||
}
|
||
$(".more_box").html("");
|
||
} else {
|
||
if (Start > 0) {
|
||
if (Start > 10) {
|
||
$(".more_box").html(etype == 0 ? "亲!找不到更多了" : "dear! No more");
|
||
}
|
||
} else {
|
||
$('.floor-product').html("");
|
||
$(".more_box").html(etype == 0 ? "亲,暂无信息!" : "Dear, no information!");
|
||
}
|
||
}
|
||
$(".ajaxLoader").addClass("uhide");
|
||
} else {
|
||
|
||
etishi3(data.msg);
|
||
$(".ajaxLoader").addClass("uhide");
|
||
|
||
}
|
||
} else {
|
||
etishi3(etype == 0 ? "网络错误!" : "Network error!");
|
||
$(".ajaxLoader").addClass("uhide");
|
||
}
|
||
},
|
||
error: function (xhr, type) {
|
||
etishi3("读取数据错误");
|
||
}
|
||
});
|
||
|
||
}
|
||
function onread(id) {
|
||
onlink("news_details.html?id=" + id);
|
||
}
|
||
function ondetail(id) {
|
||
onlink("shop_view.html?id=" + id);
|
||
}
|
||
function showbox(type) {
|
||
$("#showthjto" + type).removeClass("uhide");
|
||
}
|
||
function hideshowthjto(type) {
|
||
$("#showthjto" + type).addClass("uhide");
|
||
}
|
||
function rmenu(shopdatas) {
|
||
var html = "";
|
||
if (shopdatas.length > 0) {
|
||
for (i = 0; i < shopdatas.length; i++) {
|
||
var sclass = "";
|
||
if (i == 0) {
|
||
sclass = " class=\"cur\"";
|
||
}
|
||
html += '<li' + sclass + '><a href="javascript:void(0)">' + shopdatas[i].label + '</a></li>';
|
||
}
|
||
$("#wrapper03 .scroller ul").html(html);
|
||
//demo示例一到四 通过lass调取,一句可以搞定,用于页面中可能有多个导航的情况
|
||
$('#wrapper03').navbarscroll({
|
||
defaultSelect: 0,
|
||
endClickScroll: function (obj) {
|
||
var index = obj.index();
|
||
|
||
showhtml(index);
|
||
$("#wrapper").animate({ scrollTop: 0 }, 500);
|
||
//$(window.parent.$('#midFrame'))[0].contentWindow.
|
||
}
|
||
});
|
||
|
||
}
|
||
|
||
|
||
}
|
||
|
||
function onkeyword() {
|
||
var key = fTrim($("#keyword0").val());
|
||
if (key != "") {
|
||
setlocalStorage("search_keyword", key);
|
||
onlink("shop_search.html");
|
||
} else {
|
||
$("#keyword0").attr("placeholder", "请输入商品关键字");
|
||
tishi3("搜索关键字不能为空");
|
||
}
|
||
}
|
||
function onCategory(t, id, title) {
|
||
setlocalStorage("shopcategorytype", t);
|
||
setlocalStorage("shopcategoryid", id);
|
||
setlocalStorage("showshoplist", title);
|
||
onlink("shop_list.html?iflb=1");
|
||
}
|
||
function oncart() {
|
||
onlink("shop_cart.html");
|
||
}
|
||
function onmy2wm() {
|
||
userId = getlocalStorage("userId");
|
||
if (userId != null) {
|
||
var userdata = JSON.parse(getlocalStorage("userinfo"));
|
||
yaoqingma = userdata.yaoqingma;
|
||
onlink("my2wm.html?yaoqingma=" + yaoqingma);
|
||
} else {
|
||
onlink("/");
|
||
}
|
||
}
|
||
function onksd() {
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
if (userId != null) {
|
||
onlink("http://www.ksd2023.com/?userId=" + userId + "&LoginId=" + LoginId + "&app=" + ifapp);
|
||
} else {
|
||
onlink("/");
|
||
}
|
||
}
|
||
function onfwzx() {
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
if (userId != null && LoginId) {
|
||
var userdata = JSON.parse(getlocalStorage("userinfo"));
|
||
if (userdata.dluLevel > 1) {
|
||
onlink("shop_other0.html?t=4");
|
||
} else {
|
||
tishi3("未达到代理级别");
|
||
}
|
||
} else {
|
||
onlink("/");
|
||
}
|
||
}
|
||
function onfnst() {
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
if (userId != null && LoginId) {
|
||
var userdata = JSON.parse(getlocalStorage("userinfo"));
|
||
if (userdata.ckuLevel > 0) {
|
||
onlink("fnst.html");
|
||
} else {
|
||
tishi3("未达到创客级别");
|
||
}
|
||
} else {
|
||
onlink("/");
|
||
}
|
||
}
|
||
function onbusiness() {
|
||
userId = getlocalStorage("userId");
|
||
LoginId = getlocalStorage("LoginId");
|
||
if (userId != null && LoginId) {
|
||
if (ifapp == 1) {
|
||
var longitude = getlocalStorage("longitude");
|
||
var latitude = getlocalStorage("latitude");
|
||
if (longitude != null && latitude != null) {
|
||
onlink("business.html");
|
||
} else {
|
||
try {
|
||
$(".ajaxLoader").removeClass("uhide");
|
||
var permission = 'location';
|
||
var resultList = api.hasPermission({
|
||
list: [permission]
|
||
});
|
||
var granted = resultList[0].granted;
|
||
if (!granted) {
|
||
var _index = layer.confirm('应用需要您的授权才能访问定位,是否要授权定位?', {
|
||
btn: ['是', '否'] //按钮
|
||
}, function () {
|
||
api.requestPermission({
|
||
list: [permission],
|
||
}, function (res) {
|
||
if (res.list[0].granted) {
|
||
// 已授权,可以继续下一步操作
|
||
layer.close(_index);
|
||
tishi3("授权成功!");
|
||
GetLocation();
|
||
} else {
|
||
$(".ajaxLoader").addClass("uhide");
|
||
onlink("business.html");
|
||
}
|
||
});
|
||
}, function () {
|
||
$(".ajaxLoader").addClass("uhide");
|
||
onlink("business.html");
|
||
});
|
||
} else {
|
||
GetLocation();
|
||
}
|
||
} catch (err) {
|
||
$(".ajaxLoader").addClass("uhide");
|
||
onlink("business.html");
|
||
}
|
||
}
|
||
} else {
|
||
onlink("business.html");
|
||
}
|
||
} else {
|
||
onlink("/");
|
||
}
|
||
}
|
||
function GetLocation() {
|
||
api.startLocation({
|
||
accuracy: '100m',
|
||
filter: 1,
|
||
autoStop: true
|
||
}, function (ret, err) {
|
||
if (ret && ret.status) {
|
||
setlocalStorage("longitude", ret.longitude);
|
||
setlocalStorage("latitude", ret.latitude);
|
||
api.stopLocation();
|
||
$(".ajaxLoader").addClass("uhide");
|
||
onlink("business.html");
|
||
} else {
|
||
$(".ajaxLoader").addClass("uhide");
|
||
onlink("business.html");
|
||
}
|
||
});
|
||
}
|
||
</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; padding-left: 0.8em; padding-right: 0.8em; min-width: 3em; font-family: YouYuan">
|
||
银花优选
|
||
</div>
|
||
<h1 class="ub-f1" tabindex="0" style=" margin:0; padding:0; position:relative; ">
|
||
<div class="header-search-box">
|
||
<div class="header-search-keyword-box">
|
||
<input id="keyword0" name="keyword0" onfocus="placeholder='';" onblur="onkeyword()" class="keyword" value="" placeholder="请输入商品关键字" type="search" />
|
||
</div>
|
||
</div>
|
||
</h1>
|
||
<div class="nav-btn blue" onclick="onlink('shop_cart.html')" id="nav-right" style=" margin:0; padding:0; min-width:3.5em">
|
||
<img src="../image/addcart.png" style="margin-left:0; margin-top:0.5em; height:1.2em;width:1.2em;" />
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</header>
|
||
<section class="ub-f1" id="wrapper">
|
||
|
||
<div id="index_content">
|
||
<div id="slideBox" class="slideBox">
|
||
|
||
<div class="bd">
|
||
<ul></ul>
|
||
</div>
|
||
|
||
<div class="hd">
|
||
<ul></ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
<div class="notice_box">
|
||
<div class="notice_box_to">
|
||
<div class="notice_title"><img src="../images/notice_ico.png" /><!--<span>最新公告</span>--></div>
|
||
<div class="notice_body">
|
||
<marquee direction="left" id="notice_body" behavior="scroll" scrollamount="3" scrolldelay="0" loop="-1" width="200" height="50" hspace="10" vspace="10">
|
||
|
||
</marquee>
|
||
|
||
</div>
|
||
<div class="notice_more" onclick="onlink('news.html')"><img src="../image/notice_more.png" /></div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div class="nav_box1">
|
||
<ul class="nav">
|
||
<li><div onclick="onloginlink('news_details.html?id=235213')"><img src="../image/appindex_ico.png"><span>企业介绍</span></div></li>
|
||
<li><div onclick="onloginlink('jiaocheng.html')"><img src="../image/appindex_ico3.png"><span>操作教程</span></div></li>
|
||
|
||
<li><div onclick="onloginlink('ftsc.html')"><img src="../image/appindex_ico1.png"><span>发图素材</span></div></li>
|
||
<li><div onclick="onloginlink('jkzs.html')"><img src="../image/appindex_ico4.png"><span>健康知识</span></div></li>
|
||
<li><div onclick="onloginlink('mykf.html')"><img src="../image/appindex_ico2.png"><span>客服专区</span></div></li>
|
||
</ul>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div class="clear"></div>
|
||
<div class="choice_box" id="products_list_box">
|
||
<div class="choice_box_to">
|
||
<div class="text" id="choice_box_text">
|
||
<div class="line_flag"></div>
|
||
<text style="flex-grow:1;">热卖推荐</text>
|
||
|
||
</div>
|
||
<div class="choice_list" id="products_list">
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div class="choice_box" id="products_list0_box">
|
||
<div class="choice_box_to">
|
||
<div class="text" id="choice_box_text">
|
||
<div class="line_flag"></div>
|
||
<text style="flex-grow:1;">热卖商品</text>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div class="floor-product-item">
|
||
<div class="product-item-cont" id="products_list0">
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="choice_box">
|
||
<div class="choice_box_to">
|
||
<div class="text" id="choice_box_text2">
|
||
<div class="line_flag"></div>
|
||
<text style="flex-grow:1;">兑换商城</text>
|
||
|
||
</div>
|
||
|
||
<!--<div class="clear"></div>
|
||
<div class="tab-header">
|
||
<ul></ul>
|
||
</div>-->
|
||
<div class="clear"></div>
|
||
<div class="choice_list" id="products_list1">
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="index_content0" class="floor-product" style="padding-bottom:3em; ">
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div class="more_box"></div>
|
||
<div class="clear"></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 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_2" class="ub-f1 ub ub-ver" onclick='onloginlink("news.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 uhide" id="index_1_box">
|
||
<div id="index_1" class="ub-f1 ub ub-ver " onclick='onloginlink("dvideo.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("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_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>
|
||
<div class="notice-layer" id="notice-detial">
|
||
<div class="notice-box">
|
||
<div class="n-tit" id="read_title0"></div>
|
||
<div class="cont">
|
||
<p id="read_body"></p>
|
||
</div>
|
||
<div class="btn">
|
||
<div onclick='$("#notice-detial").fadeOut();' class="mybtn" id="yreaded">已阅读完</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="showthjto uhide" id="showthjto0" onclick='hideshowthjto(0);'>
|
||
<div class="showthjto_box" onclick="stopPropagation(event)">
|
||
<h3><span>用户服务协议和隐私政策</span><!--<span class="close" onclick='hideshowthjto(0);'>X</span>--></h3>
|
||
|
||
<div class="ub ub-ac" id="showthjto_body" style="background-color: #FFFFFF; color:#848484; margin-bottom: .08em; padding:0.8em 0;">
|
||
请您务必审慎阅读、充分理解<span class="blue" onclick="onread(341)">《用户服务协议》</span>和<span class="blue" onclick="onread(224167)">《隐私政策》</span>各条款,
|
||
包括但不限于:为了更好的向您提供服务,我们需要收集您的设备标识、操作日志等信息用于分析、优化应用性能。您可阅读
|
||
<span class="blue" onclick="onread(341)">《用户服务协议》</span>和<span class="blue" onclick="onread(224167)">《隐私政策》</span>了解详细信息。如果您同意,请点击
|
||
下面按钮开始接受我们的服务。
|
||
</div>
|
||
|
||
<div class="ub ub-ac ub-pc" style="margin-bottom: .08em;">
|
||
<input type="button" class="ulev-3 tx-c" id="btntj" onclick="setreadprivacy()" value="同意并接受" />
|
||
<input type="button" class="ulev-3 tx-c" id="btnqx" onclick='hideshowthjto(0);' value="暂不同意" />
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
|
||
|
||
|
||
</html>
|