Authored by 梁志锋

添加app文件

define("index", ["jquery","swiper","index"], function(require, exports, module){
var yohobuy;
//require('./js/common');
//equire('./js/category/entry');
//require('./js/guang/entry');
//require('./js/home/entry');
//require('./js/index/entry');
//require('./js/passport/entry');
require("js/product/entry");
//require('./js/me/entry');
module.exports = yohobuy;
});
define("js/product/entry", ["jquery","swiper","index"], function(require, exports, module){
/*
*
* 产品打包入口
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/12
*/
require("js/product/detail/detail-app");
});
define("js/product/detail/detail-app", ["jquery","swiper","index"], function(require, exports, module){
/**
* 商品详情 --for app web view
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/19
*/
var $ = require("jquery"),
loading = require("js/plugin/loading"),
Swiper = require("swiper");
var sizeSwiper,
refSwiper;
loading.showLoadingMask();
require("js/product/recommend-for-you-product-desc");
//判断是否要显示向左滑动提示
function hiddenTips($ele) {
var offsetContainer,
offsetLastColumn;
if ($ele.length > 0) {
offsetContainer = $ele[0].getBoundingClientRect().right;
offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right;
if (offsetLastColumn - offsetContainer < 0) {
$ele.next('.tips').css('display', 'none');
} else {
$ele.next('.tips').css('display', 'block');
}
}
}
function wrapElements(selector, count) {
var elArr = null;
$(selector).each(function(idx, el) {
elArr = $(selector).slice(idx, idx + count);
if (elArr.length === count && idx % count === 0) {
$(elArr).wrapAll($('<div class="js-wraper"></div>'));
}
});
}
//function showRecommend() {
// var recommendSwiper,
// $recommendForYou = $('.recommend-for-you'),
// $recommndEl = $('#swiper-recommend a');
//
// if ($recommndEl.length === 0){
// $recommendForYou.hide();
// return;
// }
//
// $recommendForYou.show();
//
// if ($('#swiper-recommend').length) {
// recommendSwiper = new Swiper('#swiper-recommend', {
// slidesPerView: 'auto',
// grabCursor: true,
// slideElement: 'a',
// lazyLoading: true,
// watchSlidesVisibility: true
// });
// }
//}
function hideHeaderFooter() {
$('#yoho-header').hide();
$('#yoho-footer').hide();
}
function initPage() {
var $page = $('#app-detail');
$page.removeClass('hide');
loading.hideLoadingMask();
hideHeaderFooter();
//showRecommend();
sizeSwiper = new Swiper('#size-swiper-container',{
slidesPerView: 'auto'
});
//模特试穿左右滑动
refSwiper = new Swiper('#reference-swiper-container',{
slidesPerView: 'auto'
});
hiddenTips($('#size-swiper-container'));
hiddenTips($('#reference-swiper-container'));
wrapElements('.detail .column', 2);
}
$(document).ready(initPage);
});
define("js/plugin/loading", ["jquery"], function(require, exports, module){
/**
* Loading mask
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/29
*/
var $ = require("jquery");
var $page = $('.yoho-page');
var $loading,
hasInit = false;
/** modify by liangzhifeng at 2015.11.2 */
// 初始化
function init($container) {
var html = '<div class="loading-mask hide">' +
'<div class="loading">' +
'<div></div><div></div><div></div>' +
'</div>' +
'</div>';
hasInit = true;
if ($container === undefined) {
$container = $page;
}
$container.append(html);
$loading = $container.children('.loading-mask');
}
//显示loading
function showLoadingMask() {
if (!hasInit) {
init();
hasInit = true;
}
$loading.removeClass('hide');
}
//隐藏loading
function hideLoadingMask() {
$loading.addClass('hide');
}
exports.init = init;
exports.showLoadingMask = showLoadingMask;
exports.hideLoadingMask = hideLoadingMask;
});
define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){
/**
* 为您优选
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/11/16
*/
var Swiper = require("swiper"),
$ = require("jquery");
var recommendSwiper,
$recommendForYou = $('.recommend-for-you'),
preferenceUrl = $('#preferenceUrl').val();
if (preferenceUrl) {
$.get(preferenceUrl).then(function(html) {
if (html.length < 5) {
$recommendForYou.css('display', 'none');
} else {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}
}).fail(function() {
$recommendForYou.hide();
});
}
});
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
define("index",["jquery","swiper","index"],function(e,i,n){var d;e("js/product/entry"),n.exports=d}),define("js/product/entry",["jquery","swiper","index"],function(e,i,n){e("js/product/detail/detail-app")}),define("js/product/detail/detail-app",["jquery","swiper","index"],function(e,i,n){function d(e){var i,n;e.length>0&&(i=e[0].getBoundingClientRect().right,n=e.find(".swiper-slide:last-child")[0].getBoundingClientRect().right,0>n-i?e.next(".tips").css("display","none"):e.next(".tips").css("display","block"))}function r(e,i){var n=null;c(e).each(function(d,r){n=c(e).slice(d,d+i),n.length===i&&d%i===0&&c(n).wrapAll(c('<div class="js-wraper"></div>'))})}function o(){c("#yoho-header").hide(),c("#yoho-footer").hide()}function s(){var e=c("#app-detail");e.removeClass("hide"),l.hideLoadingMask(),o(),t=new u("#size-swiper-container",{slidesPerView:"auto"}),a=new u("#reference-swiper-container",{slidesPerView:"auto"}),d(c("#size-swiper-container")),d(c("#reference-swiper-container")),r(".detail .column",2)}var t,a,c=e("jquery"),l=e("js/plugin/loading"),u=e("swiper");l.showLoadingMask(),e("js/product/recommend-for-you-product-desc"),c(document).ready(s)}),define("js/plugin/loading",["jquery"],function(e,i,n){function d(e){var i='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';c=!0,void 0===e&&(e=a),e.append(i),s=e.children(".loading-mask")}function r(){c||(d(),c=!0),s.removeClass("hide")}function o(){s.addClass("hide")}var s,t=e("jquery"),a=t(".yoho-page"),c=!1;i.init=d,i.showLoadingMask=r,i.hideLoadingMask=o}),define("js/product/recommend-for-you-product-desc",["swiper","jquery","index"],function(e,i,n){var d,r=e("swiper"),o=e("jquery"),s=o(".recommend-for-you"),t=o("#preferenceUrl").val();t&&o.get(t).then(function(e){e.length<5?s.css("display","none"):(s.html(e).show(),o("#swiper-recommend").length&&(d=new r("#swiper-recommend",{slidesPerView:"auto",grabCursor:!0,slideElement:"a",lazyLoading:!0,watchSlidesVisibility:!0})))}).fail(function(){s.hide()})});
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>如何获得限购码</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta content="telephone=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<style>
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
}
ol, ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
q, blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
a img {
border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn {
display: block;
}
/*Reset End*/
.clearfix:after{
content: '';
display: table;
clear: both;
}
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-moz-tap-highlight-color: rgba(0,0,0,0);
tap-highlight-color: rgba(0,0,0,0);
}
html, body {
font-family: helvetica,Arial,"黑体";
width: 100%;
font-size: 12PX;
line-height: 1.4;
}
button, input, select, textarea {
font-size: 100%;
margin: 0;
}
img {
max-width: 100%;
display: block;
border: 0;
margin: 0 auto;
}
a {
text-decoration: none;
outline: none;
color: #000
}
a:link, a:visited, a:hover, a:actived{
color: #000;
}
*:focus {
outline: none;
}
.hide {
display: none;
}
.overflow-hidden {
overflow: hidden;
}
@font-face {
font-family: "iconfont";
src: url('../font/iconfont.eot'); /* IE9*/
src: url('../font/iconfont.eot?#iefix') format('embedded-opentype'),
url('../font/iconfont.woff') format('woff'),
url('../font/iconfont.ttf') format('truetype'),
url('../font/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16PX;
font-style: normal;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2PX;
-moz-osx-font-smoothing: grayscale;
}
.limit-help-page{
padding: 0.7rem;
color: #444;
}
.limit-help-page h2{
font-size: 0.75rem;
font-weight: bold;
}
.limit-help-page .method{
display: block;
width: 2.3rem;
height: 0.875rem;
line-height: 0.9rem;
background-color: #444;
color: #fff;
border-radius: 0.5rem;
text-align: center;
margin: 0.5rem 0;
}
.limit-help-page li{
font-size: 0.6rem;
}
.limit-help-page .intro-img{
width: 100%;
height: 5.5rem;
background-size: 100%;
background-repeat: no-repeat;
margin: 0.5rem 0;
}
.limit-help-page .method-1 li:nth-child(1) .intro-img{
background-image: url('img/1.png');
}
.limit-help-page .method-1 li:nth-child(2) .intro-img{
background-image: url('img/2.png');
}
.limit-help-page .method-1 li:nth-child(3) .intro-img{
background-image: url('img/3.png');
}
.limit-help-page .method-2 li:nth-child(1) .intro-img{
background-image: url('img/4.png');
}
.limit-help-page .method-2 li:nth-child(2) .intro-img{
background-image: url('img/5.png');
}
.limit-help-page .method-2 li:nth-child(3) .intro-img{
background-image: url('img/6.png');
}
.limit-help-page .method-2 li:nth-child(4) .intro-img{
background-image: url('img/7.png');
}
.limit-help-page .how li:nth-child(1) .intro-img{
background-image: url('img/8.png');
}
.limit-help-page .how li:nth-child(2) .intro-img{
background-image: url('img/9.png');
margin-bottom: 0;
}
</style>
</head>
<body>
<div class="limit-help-page yoho-page">
<h2>不同限定商品获取限购码方式不同,获取限购码目前有两种方式:</h2>
<span class="method">方式一</span>
<ul class="method-1">
<li>1.在限定发售详情页点击分享或者底部“获取限购码”图标。
<div class="intro-img"></div>
</li>
<li>2.从弹出的分享中选取需要分享的渠道。
<div class="intro-img"></div>
</li>
<li>3.分享成功后返回Yoho!Buy有货APP会提示已获得限购码。
<div class="intro-img"></div>
</li>
</ul>
<span class="method">方式二</span>
<ul class="method-2">
<li>1.在限定发售详情页点击参加排队赢取限购码图标。
<div class="intro-img"></div>
</li>
<li>2.进入限定发售排队页面,点击参加排队。
<div class="intro-img"></div>
</li>
<li>3.排队成功后凭用户个人信息作为抽奖凭证,等待开奖时间。
<div class="intro-img"></div>
</li>
<li>4.开奖后,排队页面会公布中奖名单,限购码会直接发送至账户。
<div class="intro-img"></div>
</li>
</ul>
<h2>查看和使用限购码</h2>
<ul class="how">
<li>1.从个人中心进入我的限购码页面,可查看所获取的限购码。
<div class="intro-img"></div>
</li>
<li>2.商品开售后,需要有限购码才有抢购资格,无法确保可以买到适合尺码,库存有限,抢完为止。
<div class="intro-img"></div>
</li>
</ul>
</div>
</body>
</html>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>如何获得限购码</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta content="telephone=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<style>
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
}
ol, ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
q, blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
a img {
border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn {
display: block;
}
/*Reset End*/
.clearfix:after{
content: '';
display: table;
clear: both;
}
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-moz-tap-highlight-color: rgba(0,0,0,0);
tap-highlight-color: rgba(0,0,0,0);
}
html, body {
font-family: helvetica,Arial,"黑体";
width: 100%;
font-size: 12PX;
line-height: 1.4;
}
button, input, select, textarea {
font-size: 100%;
margin: 0;
}
img {
max-width: 100%;
display: block;
border: 0;
margin: 0 auto;
}
a {
text-decoration: none;
outline: none;
color: #000
}
a:link, a:visited, a:hover, a:actived{
color: #000;
}
*:focus {
outline: none;
}
.hide {
display: none;
}
.overflow-hidden {
overflow: hidden;
}
@font-face {
font-family: "iconfont";
src: url('../font/iconfont.eot'); /* IE9*/
src: url('../font/iconfont.eot?#iefix') format('embedded-opentype'),
url('../font/iconfont.woff') format('woff'),
url('../font/iconfont.ttf') format('truetype'),
url('../font/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16PX;
font-style: normal;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2PX;
-moz-osx-font-smoothing: grayscale;
}
.limit-help-page{
padding: 0.7rem;
color: #444;
}
.limit-help-page h2{
font-size: 0.75rem;
font-weight: bold;
}
.limit-help-page .method{
display: block;
width: 2.3rem;
height: 0.875rem;
line-height: 0.9rem;
background-color: #444;
color: #fff;
border-radius: 0.5rem;
text-align: center;
margin: 0.5rem 0;
}
.limit-help-page li{
font-size: 0.6rem;
}
.limit-help-page .intro-img{
width: 100%;
height: 5.5rem;
background-size: 100%;
background-repeat: no-repeat;
margin: 0.5rem 0;
}
.limit-help-page .method-1 li:nth-child(1) .intro-img{
background-image: url('img/1.png');
}
.limit-help-page .method-1 li:nth-child(2) .intro-img{
background-image: url('img/2.png');
}
.limit-help-page .method-1 li:nth-child(3) .intro-img{
background-image: url('img/3.png');
}
.limit-help-page .method-2 li:nth-child(1) .intro-img{
background-image: url('img/4.png');
}
.limit-help-page .method-2 li:nth-child(2) .intro-img{
background-image: url('img/5.png');
}
.limit-help-page .method-2 li:nth-child(3) .intro-img{
background-image: url('img/6.png');
}
.limit-help-page .method-2 li:nth-child(4) .intro-img{
background-image: url('img/7.png');
}
.limit-help-page .how li:nth-child(1) .intro-img{
background-image: url('img/8.png');
}
.limit-help-page .how li:nth-child(2) .intro-img{
background-image: url('img/9.png');
margin-bottom: 0;
}
</style>
</head>
<body>
<div class="limit-help-page yoho-page">
<ul class="method-2">
<li>1.在限定发售详情页点击参加排队赢取限购码图标。
<div class="intro-img"></div>
</li>
<li>2.进入限定发售排队页面,点击参加排队。
<div class="intro-img"></div>
</li>
<li>3.排队成功后凭用户个人信息作为抽奖凭证,等待开奖时间。
<div class="intro-img"></div>
</li>
<li>4.开奖后,排队页面会公布中奖名单,限购码会直接发送至账户。
<div class="intro-img"></div>
</li>
</ul>
<h2>查看和使用限购码</h2>
<ul class="how">
<li>1.从个人中心进入我的限购码页面,可查看所获取的限购码。
<div class="intro-img"></div>
</li>
<li>2.商品开售后,需要有限购码才有抢购资格,无法确保可以买到适合尺码,库存有限,抢完为止。
<div class="intro-img"></div>
</li>
</ul>
</div>
</body>
</html>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>什么是限购码</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<style>
html, body, p {
margin: 0;
padding: 0;
font-family: helvetica,Arial,"黑体";
}
body {
background-color: #f4f4f4;
}
.container {
padding: 0.7rem;
background-color: #fff;
}
.block {
margin-top: 1rem;
margin-bottom: 0.8rem
}
p {
font-size: 0.7rem;
color: #444;
margin: 0.3rem 0;
line-height: 1rem;
}
div p {
margin: 0.2rem 0 0 0;
}
</style>
</head>
<body>
<div class="container">
<p> 1.当稀缺商品上架,同一用户账号在一定时间段内,仅支持购买1件该商品。 </p>
<p> 2.可通过分享或其他活动获得该商品的限购码,每个商品仅可获得1次限购码。 </p>
<p> 3.若下单未付款导致交易取消,不会扣限购额度。已付款状态下,无论是否退款则扣除限购额度。 </p>
<div class="block">
<p>
Q:限购码可以送给我的朋友吗?
</p>
<p>
A:限购码不可赠送,只能自己账号使用。可以把活动告诉朋友,参与即可获得限购码。
</p>
</div>
<div>
<p>
Q:下单发现买错码数了,取消订单后我还能再买吗?
</p>
<p>
A:尚未付款的订单取消后,可以再次购买。
</p>
</div>
</div>
</body>
</html>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>什么是限购码</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<style>
html, body, p {
margin: 0;
padding: 0;
font-family: helvetica,Arial,"黑体";
}
body {
background-color: #f4f4f4;
}
.container {
padding: 0.7rem;
background-color: #fff;
}
.block {
margin-top: 1rem;
margin-bottom: 0.8rem
}
p {
font-size: 0.7rem;
color: #444;
margin: 0.3rem 0;
line-height: 1rem;
}
div p {
margin: 0.2rem 0 0 0;
}
</style>
</head>
<body>
<div class="container">
<p> 1.当稀缺商品上架,同一用户账号在一定时间段内,仅支持购买1件该商品。 </p>
<p> 2.可通过分享或其他活动获得该商品的限购码,每个商品仅可获得1次限购码。 </p>
<p> 3.若下单未付款导致交易取消,不会扣限购额度。已付款状态下,无论是否退款则扣除限购额度。 </p>
<div class="block">
<p>
Q:限购码可以送给我的朋友吗?
</p>
<p>
A:限购码不可赠送,只能自己账号使用。可以把活动告诉朋友,参与即可获得限购码。
</p>
</div>
<div>
<p>
Q:下单发现买错码数了,取消订单后我还能再买吗?
</p>
<p>
A:尚未付款的订单取消后,可以再次购买。
</p>
</div>
</div>
</body>
</html>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="telephone=no" name="format-detection">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>签到规则</title>
<style>
html, body, p {
margin: 0;
padding: 0;
}
body {
padding: 0.6rem;
font-family: helvetica,Arial,"黑体";
}
p {
font-size: 0.9rem;
color: #414141;
margin-bottom: 0.4rem;
}
</style>
</head>
<body>
<p>
1、签到可以获得YOHO币奖励哟,YOHO币可以在有货购买商品时折算相应的支付金额呢
</p>
<p>
2、连续的签到7天会获得更多惊喜,一定要坚持哦
</p>
<p>
3、对于使用作弊、攻击系统等手段参与签到活动的,有货君有权取消其活动资格并追回相应奖励
</p>
</body>
</html>
... ...