Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
16970e264855007f6089ecf8632a81a8362adcf4
1 parent
4f48fd2d
更新到201512051727静态资源
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
139 deletions
static/dist/myohobuy/1.2.0/index-debug.js
static/dist/myohobuy/1.2.0/index.js
static/dist/myohobuy/1.2.0/index-debug.js
View file @
16970e2
...
...
@@ -3226,9 +3226,10 @@ require("js/product/newsale/newarrival");
require
(
"js/product/newsale/discount"
);
require
(
"js/product/list"
);
require
(
"js/product/detail/detail"
);
require
(
"js/product/detail/loadmore"
);
require
(
"js/product/detail/consultform"
);
require
(
"js/product/newsale/hot-rank"
);
});
define
(
"js/product/newsale/newarrival"
,
[
"jquery"
,
"swiper"
,
"lazyload"
,
"hammer"
,
"index"
],
function
(
require
,
exports
,
module
){
/**
...
...
@@ -4734,6 +4735,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
require
(
"js/product/detail/desc"
);
require
(
"js/product/detail/comments-consults"
);
require
(
"js/product/recommend-for-you-product-desc"
);
//add extra marign-bottom for footer to show the yoho copyright
function
showFooter
()
{
...
...
@@ -4810,13 +4812,14 @@ var introUrl = $('#introUrl').val(),
var
sizeSwiper
,
refSwiper
;
require
(
"js/product/recommend-for-you"
);
//判断是否要显示向左滑动提示
function
hiddenTips
(
$ele
)
{
var
offsetContainer
,
offsetLastColumn
;
if
(
$ele
.
length
>
0
)
{
var
offsetContainer
=
$ele
[
0
].
getBoundingClientRect
().
right
;
var
offsetLastColumn
=
$ele
.
find
(
'.swiper-slide:last-child'
)[
0
].
getBoundingClientRect
().
right
;
offsetContainer
=
$ele
[
0
].
getBoundingClientRect
().
right
;
offsetLastColumn
=
$ele
.
find
(
'.swiper-slide:last-child'
)[
0
].
getBoundingClientRect
().
right
;
if
(
offsetLastColumn
-
offsetContainer
<
0
)
{
...
...
@@ -4884,35 +4887,6 @@ $(window).scroll(function() {
});
define
(
"js/product/recommend-for-you"
,
[
"swiper"
,
"jquery"
,
"index"
],
function
(
require
,
exports
,
module
){
/**
* 为您优选
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/16
*/
var
Swiper
=
require
(
"swiper"
),
$
=
require
(
"jquery"
);
var
recommendSwiper
,
$recommendForYou
=
$
(
'.recommend-for-you'
);
$
.
get
(
'/home/preference'
).
then
(
function
(
html
)
{
$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
();
});
});
define
(
"js/product/detail/comments-consults"
,
[
"jquery"
],
function
(
require
,
exports
,
module
){
/**
* 商品详情 --评论和咨询tab
...
...
@@ -4968,6 +4942,39 @@ $('#nav-tab li').on('touchend', function() {
}
});
});
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
)
{
$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
();
});
}
});
define
(
"js/product/detail/like"
,
[
"jquery"
,
"hammer"
],
function
(
require
,
exports
,
module
){
/**
* 商品详情 --添加收藏
...
...
@@ -5048,111 +5055,6 @@ addToCartHammer.on('tap', function(e) {
});
define
(
"js/product/detail/loadmore"
,
[],
function
(
require
,
exports
,
module
){
/**
* 商品详情 --滚动页面加载
* @author: Lynnic
* @date: 2015/11/25
*/
// var $ = require('jquery'),
// loading = require('../../plugin/loading'),
// tip = require('../../plugin/tip');
// var loadMoreUrl = $('#loadMoreUrl').val(),
// $commentsDiv = $('#goods-comments'),
// $consultsDiv = $('#goods-consults'),
// winH = $(window).height(),
// searching = false,
// end = false;
// var jsonObj;
// //插入评论列表底部
// function insertCommentsDiv(json) {
// var html = '';
// var i;
// for (i = 0; i < json.length; i++) {
// html += '<div class="comment-item">';
// html += '<span class="user-name">' + json[i].userName + '</span>';
// html += '<span class="goods-spec">' + json[i].desc + '</span>';
// html += '<span class="goods-spec">' + json[i].content + '</span>';
// html += '<span class="goods-spec">' + json[i].time + '</span>';
// }
// $commentsDiv.append(html);
// }
// //插入咨询列表底部
// function insertConsultsDiv(json) {
// var html = '';
// var i;
// for (i = 0; i < json.length; i++) {
// html += '<div class="consult-item"> ';
// html += '<div class="question"> ';
// html += '<span class="iconfont"></span> ';
// html += '<p> ';
// html += json[i].question + '<br> ';
// html += '<span class="time">' + json[i].time + '</span> ';
// html += '</p> ';
// html += '</div> ';
// html += '<div class="answer"> ';
// html += '<span class="iconfont"></span> ';
// html += '<p>' + json[i].answer + '</p> ';
// html += '</div> ';
// html += '</div> ';
// }
// $consultsDiv.append(html);
// }
// function search() {
// if (searching || end) {
// return;
// }
// searching = true;
// loading.showLoadingMask();
// $.ajax({
// type: 'GET',
// url: loadMoreUrl,
// success: function(data) {
// if (data.length > 0) {
// jsonObj = JSON.parse(data);
// if ($commentsDiv.length > 0) {
// insertCommentsDiv(jsonObj);
// } else if ($consultsDiv.length > 0) {
// insertConsultsDiv(jsonObj);
// }
// }
// searching = false;
// end = true;
// loading.hideLoadingMask();
// },
// error: function() {
// tip.show('网络断开连接了~');
// searching = false;
// loading.hideLoadingMask();
// }
// });
// }
// function scrollHandler() {
// if (!end || $(window).scrollTop() + winH >= $(document).height() - 50) {
// search();
// }
// }
// //srcoll to load more
// $(window).scroll(function() {
// window.requestAnimationFrame(scrollHandler);
// });
});
define
(
"js/product/detail/consultform"
,
[
"jquery"
],
function
(
require
,
exports
,
module
){
/**
* 我要咨询提交页面
...
...
@@ -7090,6 +6992,35 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item', function() {
});
});
define
(
"js/product/recommend-for-you"
,
[
"swiper"
,
"jquery"
,
"index"
],
function
(
require
,
exports
,
module
){
/**
* 为您优选
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/16
*/
var
Swiper
=
require
(
"swiper"
),
$
=
require
(
"jquery"
);
var
recommendSwiper
,
$recommendForYou
=
$
(
'.recommend-for-you'
);
$
.
get
(
'/home/preference'
).
then
(
function
(
html
)
{
$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
();
});
});
define
(
"js/me/coupons"
,
[
"jquery"
,
"hammer"
,
"mlellipsis"
],
function
(
require
,
exports
,
module
){
var
$
=
require
(
"jquery"
),
Hammer
=
require
(
"hammer"
),
...
...
static/dist/myohobuy/1.2.0/index.js
View file @
16970e2
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment