3 Star 1 Fork 0

jwangkun/jywhweixin_web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 19.68 KB
一键复制 编辑 原始数据 按行查看 历史
sdoxinxin1990 提交于 2016-11-03 11:23 . no commit message
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title></title>
<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="css/app.css" />
</head>
<body>
<header class="mui-bar mui-bar-nav">
<div class="mui-row">
<div class="mui-col-xs-3">
<!--<a id="btn-left" class="mui-icon mui-action-menu mui-icon-contact mui-pull-left" href="user-center.html"></a>-->
<img src="img/index_logo.png" style="height: 44px;padding: 4px 4px 4px 8px;" />
</div>
<div class="mui-col-xs-7" style="padding:0;">
<form action="" onkeydown="if(event.keyCode==13){return false;}">
<div class="mui-input-row mui-search">
<input onkeydown="return doSearch(event)" id="hmx-input-search" type="search" class="mui-input-clear" placeholder="">
</div>
</form>
</div>
<div class="mui-col-xs-2 mui-text-center">
<!--<span class="mui-icon icon-home"></span>-->
<img src="img/index_more.png" style="height: 44px;padding:10px 0;display: none;" />
</div>
</div>
</header>
<nav id="footer" class="mui-bar mui-bar-tab">
<a class="mui-tab-item mui-active" href="#tabbar1">
<span class="mui-icon icon-home"></span>
<span class="mui-tab-label">首页</span>
</a>
<a class="mui-tab-item" href="#tabbar2">
<span class="mui-icon icon-rss"></span>
<span class="mui-tab-label">订阅</span>
</a>
<a class="mui-tab-item" href="#tabbar3">
<span class="mui-icon icon-user"></span>
<span class="mui-tab-label">我的</span>
</a>
</nav>
<div class="mui-content">
<!-- 测试图片 -->
<!--<img id="testImg" src="" />-->
<div id="tabbar1" class="mui-control-content mui-active">
<div id="slider" class="mui-slider mui-fullscreen" style="height: 38px;position: fixed;top: 44px;z-index: 9999;">
<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<div class="mui-scroll">
<a class="mui-control-item mui-active" href="#item1mobile">推荐</a>
<a class="mui-control-item" href="#item2mobile">最新上架</a>
<a class="mui-control-item" href="#item3mobile">最受欢迎</a>
<a class="mui-control-item" href="#item4mobile">更多</a>
</div>
</div>
</div>
<div class="mui-slider-group hmx-index-tab">
<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
<div class="mui-slider">
<div class="mui-slider-group mui-slider-loop">
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="javascript:window.location.href = $.getContextPath()+'vipPay.html'"><img src="img/index_gallery.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_gallery.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_gallery.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_gallery.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_gallery.png" /></a>
</div>
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#"><img src="img/index_gallery.png" /></a>
</div>
</div>
</div>
<!-- 主页 >推荐>列表视图 -->
<div id="indexRecommendList">
<div class="mui-card" style="padding: 8px 8px 0 0;">
<!--页眉,放置标题-->
<!--<div class="mui-card-header">页眉</div>-->
<!--内容区-->
<div class="mui-card-content">
<div class="mui-row">
<div class="mui-col-xs-4 mui-text-center">
<img class="hmx-list-img-small" src="img/list_image.png" />
<button type="button" class="mui-btn hmx-btn-orange hmx-btn-orange-left-bottom">订阅</button>
<span class="hmx-text-md hmx-color-white hmx-text-left-bottom">¥2.00元</span>
</div>
<div class="mui-col-xs-4">
<img class="hmx-list-img-small" src="img/list_image.png" />
<button type="button" class="mui-btn hmx-btn-orange hmx-btn-orange-left-bottom">订阅</button>
<span class="hmx-text-md hmx-color-white hmx-text-left-bottom">¥2.00元</span>
</div>
<div class="mui-col-xs-4">
<img class="hmx-list-img-small" src="img/list_image.png" />
<button type="button" class="mui-btn hmx-btn-orange hmx-btn-orange-left-bottom">订阅</button>
<span class="hmx-text-md hmx-color-white hmx-text-left-bottom">¥2.00元</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="item2mobile" class="mui-slider-item mui-control-content">
<div class="mui-slider">
<div class="mui-slider-group mui-slider-loop">
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#"><img src="img/index_new.png" /></a>
</div>
</div>
</div>
<div class="mui-card">
<div class="mui-row" style="line-height: 21px;">
<div class="mui-col-xs-6">
<span class="hmx-text-orange icon-caret-right"></span>
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;">最新上架</span>
</div>
<div class="mui-col-xs-6 mui-text-right" onclick="go2LatestMore()">
<span class="hmx-test-xs" style="">更多</span>
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
</div>
<!-- 主页>最新上架>列表视图 -->
<div id="indexNewestList" class="index-list">
</div>
</div>
<div id="item3mobile" class="mui-slider-item mui-control-content">
<div class="mui-slider">
<div class="mui-slider-group mui-slider-loop">
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<div class="mui-slider-item">
<a href="#"><img src="img/index_new.png" /></a>
</div>
<!--支持循环,需要重复图片节点-->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#"><img src="img/index_new.png" /></a>
</div>
</div>
</div>
<div class="mui-card">
<div class="mui-row" style="line-height: 21px;">
<div class="mui-col-xs-6">
<span class="hmx-text-orange icon-caret-right"></span>
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;">最受欢迎</span>
</div>
<div class="mui-col-xs-6 mui-text-right" onclick="go2PopularMore()">
<span class="hmx-test-xs" style="">更多</span>
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
</div>
<!-- 主页>最受欢迎>列表视图 -->
<div id="indexPopularList" class="index-list">
</div>
</div>
<div id="item4mobile" class="mui-slider-item mui-control-content">
<div class="mui-row">
<ul id="moreSegmentedControl" class="hmx-test-xs hmx-nav">
<li class="hmx-li-active">专辑</li>
<!--<li>单曲</li>-->
<li>收费</li>
<li>免费</li>
<li>上架时间</li>
</ul>
</div>
<div class="mui-card">
<div class="mui-row" style="line-height: 21px;">
<div class="mui-col-xs-6">
<span class="hmx-text-orange icon-caret-right"></span>
<span id="labelMore" class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;">专辑</span>
</div>
<div class="mui-col-xs-6 mui-text-right mui-hidden">
<span class="hmx-test-xs" style="">更多</span>
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
</div>
<div id="indexMoreList" class="index-list">
</div>
</div>
</div>
</div>
<div id="tabbar2" class="mui-control-content">
<div id="slider" class="mui-slider mui-fullscreen" style="height: 38px;position: fixed;top: 44px;z-index: 9999;">
<div id="sliderSegmentedControl2" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<div class="mui-scroll">
<a class="mui-control-item mui-active" href="#listSubscribedAlbum">已订阅专辑</a>
<!--<a class="mui-control-item" href="#listSubscribedSingle">已订阅单曲</a>-->
</div>
</div>
</div>
<div class="mui-slider-group hmx-index-tab">
<div id="listSubscribedAlbum" class="mui-slider-item mui-control-content mui-active index-list" style="margin-top: 4px;">
</div>
<div id="listSubscribedSingle" class="mui-slider-item mui-control-content index-list" style="margin-top: 4px;">
</div>
</div>
</div>
<div id="tabbar3" class="mui-control-content">
<div class="mui-row">
<img src="img/mine_bg.png" style="width: 100%;" />
<img id="wxImageUrl" src="img/mine_avatar.png" style="width: 80px;height: 80px;position: absolute;top: -webkit-calc(50% - 120px);left: -webkit-calc(50% - 40px);border-radius: 40px;" />
<div style="padding: 0;position: absolute;top: 150px;left: 0;right: 0;">
<div class="mui-row mui-text-center">
<img id="iconVip" src="img/vip_account_icon_pressed.png" style="height: 28px;vertical-align:bottom;" />
<span id="WXNAME" class=" hmx-text-md hmx-color-white">张某某</span>
</div>
</div>
</div>
<div class="mui-card" style="font-size: 140%;">
<div onclick="go2Personal()" class="mui-row" style="line-height: 21px;border-bottom: 1px solid lightgray;padding:0 0 8px 0;">
<div class="mui-col-xs-1">
<span class="hmx-text-orange icon-user"></span>
</div>
<div class="mui-col-xs-9">
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;color: darkgray;">个人信息</span>
</div>
<div class="mui-col-xs-2 mui-text-right">
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
<div onclick="go2Order()" class="mui-row" style="line-height: 21px;border-bottom: 1px solid lightgray;padding:8px 0;">
<div class="mui-col-xs-1">
<span class="hmx-text-orange icon-shopping-cart"></span>
</div>
<div class="mui-col-xs-9">
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;color: darkgray;">我的订单</span>
</div>
<div class="mui-col-xs-2 mui-text-right">
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
<div onclick="go2Vip()" class="mui-row" style="line-height: 21px;border-bottom: 1px solid lightgray;padding:8px 0;">
<div class="mui-col-xs-1">
<span class="hmx-text-orange icon-coffee"></span>
</div>
<div class="mui-col-xs-9">
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;color: darkgray;">我的会员</span>
</div>
<div class="mui-col-xs-2 mui-text-right">
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
<div onclick="go2Feedback()" class="mui-row" style="line-height: 21px;padding:8px 0 0 0;">
<div class="mui-col-xs-1">
<span class="hmx-text-orange icon-comments"></span>
</div>
<div class="mui-col-xs-9">
<span class="hmx-test-xs" style="font-weight: 600;margin-left: 4px;color: darkgray;">反馈</span>
</div>
<div class="mui-col-xs-2 mui-text-right">
<span class="hmx-test-xs icon-angle-right"></span>
</div>
</div>
</div>
</div>
</div>
<!--<script src="js/zepto_1.1.3.js" type="text/javascript" charset="utf-8"></script>-->
<script src='js/jquery-2.1.4.min.js'></script>
<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
function go2detail($row) {
window.sessionStorage.setItem('$row', JSON.stringify($row));
window.location.href = 'detail.html';
};
function go2Player($row) {
window.sessionStorage.setItem('$row', JSON.stringify($row));
window.location.href = 'player.html';
};
function go2Feedback() {
window.location.href = 'feedback.html';
};
function go2Order() {
window.location.href = 'order.html';
};
function go2Vip() {
window.location.href = 'mineVip.html';
};
function go2Personal() {
window.location.href = 'personal.html';
};
function go2LatestMore() {
window.location.href = 'more.html?tag=最新上架';
};
function go2PopularMore() {
window.location.href = 'more.html?tag=最受欢迎';
};
function initEvent() {
$("#hmx-input-search").on('keypress', doSearch);
$('#footer').on('tap', 'a', function() {
var current;
switch($(this).attr('href')) {
case '#tabbar1':
current = $('#sliderSegmentedControl').find('a').eq(0);
break;
case '#tabbar2':
current = $('#sliderSegmentedControl2').find('a').eq(0);
break;
default:
break;
};
if(current) {
current.trigger("tap");
current.siblings().each(function() {
$(this).removeClass('mui-active');
$($(this).attr('href')).removeClass('mui-active');
});
current.addClass('mui-active');
$(current.attr('href')).addClass('mui-active');
}
});
$('#sliderSegmentedControl').on('tap', 'a', function() {
switch($(this).html()) {
case '推荐':
getHomePageReommended();
break;
case '最新上架':
getHomePageLatest();
break;
case '最受欢迎':
getHomePageMostPopular();
break;
case '更多':
//事件通知,通知更多页,专辑页签点击事件执行
$('#moreSegmentedControl').find('li').eq(0).trigger("tap");
break;
default:
break;
}
});
$('#sliderSegmentedControl2').on('tap', 'a', function() {
switch($(this).html()) {
case '已订阅专辑':
getSubscribeAlbum();
break;
case '已订阅单曲':
getSubscribeSong();
break;
default:
break;
}
});
$('#moreSegmentedControl').on('tap', 'li', function() {
$(this).addClass('hmx-li-active').siblings().removeClass('hmx-li-active');
$('#labelMore').html($(this).html());
switch($(this).html()) {
case '专辑':
getMoreAlbums();
break;
case '单曲':
getMoreSingleSongs();
break;
case '收费':
getMoreCharge();
break;
case '免费':
getMoreFree();
break;
case '上架时间':
getMoreUpTime();
break;
default:
break;
}
});
};
function doSearch(event) {
if(event.keyCode == "13") {
var KEYW = event.currentTarget.value.trim();
//需要处理的事情
if(KEYW.length > 0) {
alert("搜索关键字:" + KEYW);
//执行搜索
window.location.href = 'more.html?tag=search&KEYW=' + KEYW;
}
}
};
$(function() {
initEvent();
initPersonal();
getHomePageReommended();
//获得slider插件对象
var gallery = mui('.mui-slider');
gallery.slider({
interval: 5000 //自动轮播周期,若为0则不自动播放,默认为0;
});
});
function initPersonal() {
$.ajax({
type: "get",
url: $.getContextPath() + "/weixin/getClientUser",
async: true,
success: function(r) {
r = eval('(' + r + ')');
// alert(JSON.stringify(r));
$('#wxImageUrl').attr('src', r.data['WXIMAGEURL']);
$('#WXNAME').html(r.data['WXNAME']);
}
});
//20161029判断是否为会员且在有效期内
checkIsVip();
};
/**
* 首页-推荐(默认查询3条记录)
*/
function getHomePageReommended() {
$('#indexRecommendList').UIListView({
// dataUrl: "http://jwangkun.vicp.net/jywhweixin/weixin/front_index/reommended",
// ajaxType: "POST",
dataUrl: "data/front_index/reommended.json",
itemTplUrl: "tpl/indexRecommendListItem.tpl",
queryData: {
},
});
};
/**
* 首页-最新上架(默认查询3条记录)
*/
function getHomePageLatest() {
$('#indexNewestList').UIListView({
// dataUrl 'http://jwangkun.vicp.net/jywhweixin/weixin/front_index/latest',
dataUrl: "data/front_index/latest.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
};
/**
* 首页-最受欢迎-专辑(默认查询3条记录)
*/
function getHomePageMostPopular() {
$('#indexPopularList').UIListView({
// dataUrl 'http://jwangkun.vicp.net/jywhweixin/weixin/front_index/latest',
dataUrl: "data/front_index/latest.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
};
/**
* 更多-专辑
*/
function getMoreAlbums() {
$('#indexMoreList').UIListView({
dataUrl: "data/front_index/latestMore.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
};
/**
* 更多-单曲
*/
function getMoreSingleSongs() {
$('#indexMoreList').UIListView({
dataUrl: "data/front_index/moreSingleSongs.json",
itemTplUrl: "tpl/moreSingleSongsListItem.tpl",
});
};
/**
* 更多-收费
*/
function getMoreCharge() {
$('#indexMoreList').UIListView({
dataUrl: "data/front_index/latestMore.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
}
/**
* 更多-免费
*/
function getMoreFree() {
$('#indexMoreList').UIListView({
dataUrl: "data/front_index/latestMore.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
};
/**
* 更多-上架时间
*/
function getMoreUpTime() {
$('#indexMoreList').UIListView({
dataUrl: "data/front_index/latestMore.json",
itemTplUrl: "tpl/indexNewestListItem.tpl",
});
};
/**
* 已订阅专辑
*/
function getSubscribeAlbum() {
console.log("^^^^start:加载已订阅专辑……");
$('#listSubscribedAlbum').UIListView({
dataUrl: "data/front_subscribed/album.json",
itemTplUrl: "tpl/listSubscribedAlbumItem.tpl",
});
};
/**
* 已订阅单曲
*/
function getSubscribeSong() {
console.log("^^^^start:加载已订阅单曲……");
$('#listSubscribedSingle').UIListView({
dataUrl: "data/front_subscribed/audio.json",
itemTplUrl: "tpl/listSubscribedAudioItem.tpl",
});
};
/**
* 20161029判断是否为会员且在有效期内
*/
function checkIsVip() {
$.ajax({
type: "get",
url: $.getContextPath() + "/weixin/front_vip/deadline",
async: true,
success: function(r) {
r = eval("(" + r + ")");
if(r.data[0].status == 1) {
$('#iconVip').attr('src', 'img/vip_account_icon.png');
}
}
});
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jwangkun/jywhweixin_web.git
[email protected]:jwangkun/jywhweixin_web.git
jwangkun
jywhweixin_web
jywhweixin_web
master

搜索帮助