Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张丽霞
9 years ago
Commit
fdd67a430ab0fc9e09776bc351fb4011676a82ed
1 parent
1b5f877e
为你优选
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
52 deletions
static/js/cart/cart.js
static/js/me/index.js
static/js/product/recommend-for-you.js → static/js/product/recommend-for-you-cart.js
static/js/product/recommend-for-you-user-center.js
static/sass/_good.css
static/sass/cart/_index.css
template/m.yohobuy.com/actions/cart/index/index.phtml
template/m.yohobuy.com/partials/cart/cart-content.phtml
static/js/cart/cart.js
View file @
fdd67a4
...
...
@@ -35,16 +35,11 @@ function needLoadRecommandForYou() {
$
(
'.cart-goods'
).
length
<=
0
&&
!
isRefreshByDelete
:
$
(
'.cart-goods'
).
length
<=
0
;
}
require
(
'../product/recommend-for-you-cart'
);
if
(
needLoadRecommandForYou
())
{
require
(
'../product/recommend-for-you'
);
}
else
{
if
(
isRefreshByDelete
)
{
$
(
'body'
).
css
(
'background-color'
,
'#f0f0f0'
);
}
if
(
!
needLoadRecommandForYou
())
{
require
(
'./good'
);
}
}
$cartPage
.
css
(
'display'
,
'block'
);
loading
.
hideLoadingMask
();
...
...
static/js/me/index.js
View file @
fdd67a4
...
...
@@ -11,7 +11,7 @@ var $userAvatar = $('.user-avatar'),
var
myImage
=
new
Image
(),
avatar
;
require
(
'../product/recommend-for-you.js'
);
require
(
'../product/recommend-for-you
-user-center
.js'
);
require
(
'../product/suspend-cart.js'
);
// 部分老用户没有头像,显示默认头像
...
...
static/js/product/recommend-for-you.js → static/js/product/recommend-for-you
-cart
.js
View file @
fdd67a4
...
...
@@ -11,7 +11,7 @@ var Swiper = require('yoho.iswiper'),
var
recommendSwiper
,
$recommendForYou
=
$
(
'.recommend-for-you'
);
$
.
get
(
'/
home/preference
'
).
then
(
function
(
html
)
{
$
.
get
(
'/
product/recommend-for-you/cart
'
).
then
(
function
(
html
)
{
$recommendForYou
.
html
(
html
).
show
();
if
(
$
(
'#swiper-recommend'
).
length
)
{
recommendSwiper
=
new
Swiper
(
'#swiper-recommend'
,
{
...
...
static/js/product/recommend-for-you-user-center.js
0 → 100644
View file @
fdd67a4
/**
* 为您优选
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/16
*/
var
Swiper
=
require
(
'yoho.iswiper'
),
$
=
require
(
'jquery'
);
var
recommendSwiper
,
$recommendForYou
=
$
(
'.recommend-for-you'
);
$
.
get
(
'/product/recommend-for-you/userCenter'
).
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
();
});
\ No newline at end of file
...
...
static/sass/_good.css
View file @
fdd67a4
...
...
@@ -122,3 +122,10 @@
}
}
}
.goods-container
{
position
:
relative
;
padding-top
:
8px
;
padding-left
:
15px
;
min-height
:
880px
;
}
...
...
static/sass/cart/_index.css
View file @
fdd67a4
...
...
@@ -224,7 +224,8 @@
padding
:
20px
;
border-top
:
1px
solid
#e0e0e0
;
font-size
:
28px
;
margin-bottom
:
37px
;
.title
{
display
:
inline-block
;
width
:
175px
;
...
...
template/m.yohobuy.com/actions/cart/index/index.phtml
View file @
fdd67a4
...
...
@@ -10,48 +10,48 @@
</p>
{
{/if
}
}
{
{#if
isEmptyCart
}
}
<div
class=
"cart-zero"
>
<i
class=
"iconfont"
>
640
;</i>
<p>您的购物车暂无商品</p>
<a
href=
"/product/new"
>随便逛逛</a>
</div>
{
{>
product/recommend-for-you
}
}
<div
class=
"cart-zero"
>
<i
class=
"iconfont"
>
640
;</i>
<p>您的购物车暂无商品</p>
<a
href=
"/product/new"
>随便逛逛</a>
</div>
{
{>
product/recommend-for-you
}
}
{
{^
}
}
{
{#if
cartNav
}
}
<ul
class=
"cart-nav clearfix"
>
<li
class=
"active"
id=
"common-cart-nav"
>
<span
>
普通商品(
{
{commonGoodsCount
}
})
</span>
</li>
<li
id=
"presell-cart-nav"
>
<span
>
预售商品(
{
{presellGoodsCount
}
})
</span>
<div
id=
"presell-tip"
class=
"presell-tip hide"
>
<div
class=
"triangle"
></div>
<p
class=
"pt-content"
>预售商品点这里结算哦~</p>
</div>
</li>
</ul>
{
{/if
}
}
{
{#
commonCart
}
}
<div
class=
"cart-content common"
>
{
{>
cart/cart-content
}
}
</div>
{
{/
commonCart
}
}
{
{#
preSellCart
}
}
<div
class=
"cart-content presell hide"
>
<p
class=
"presell-info"
>
<span
class=
"iconfont"
>
61
a;</span>
<span
class=
"txt"
>由于商品上市期不同,先到的将先发货</span>
<span
class=
"txt"
>预售商品不参加活动,不可使用优惠券</span>
</p>
{
{>
cart/cart-content
}
}
</div>
{
{/
preSellCart
}
}
{
{#if
cartNav
}
}
<ul
class=
"cart-nav clearfix"
>
<li
class=
"active"
id=
"common-cart-nav"
>
<span
>
普通商品(
{
{commonGoodsCount
}
})
</span>
</li>
<li
id=
"presell-cart-nav"
>
<span
>
预售商品(
{
{presellGoodsCount
}
})
</span>
<div
id=
"presell-tip"
class=
"presell-tip hide"
>
<div
class=
"triangle"
></div>
<p
class=
"pt-content"
>预售商品点这里结算哦~</p>
</div>
</li>
</ul>
{
{/if
}
}
{
{#
commonCart
}
}
<div
class=
"cart-content common"
>
{
{>
cart/cart-content
}
}
</div>
{
{/
commonCart
}
}
{
{#
preSellCart
}
}
<div
class=
"cart-content presell hide"
>
<p
class=
"presell-info"
>
<span
class=
"iconfont"
>
61
a;</span>
<span
class=
"txt"
>由于商品上市期不同,先到的将先发货</span>
<span
class=
"txt"
>预售商品不参加活动,不可使用优惠券</span>
</p>
{
{>
cart/cart-content
}
}
</div>
{
{/
preSellCart
}
}
{
{/if
}
}
<input
id=
"cartType"
type=
"hidden"
value=
"{{cartType}}"
>
{
{/
shoppingCart
}
}
...
...
template/m.yohobuy.com/partials/cart/cart-content.phtml
View file @
fdd67a4
...
...
@@ -69,6 +69,8 @@
<p>{{formulaPrice}}</p>
</div>
{{> product/recommend-for-you}}
<div class="balance">
{{#if isAllSelected}}
<span class="checkbox icon-cb-checked iconfont"></span>
...
...
Please
register
or
login
to post a comment