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
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
4a6a1547e4ff144d87d494ce0ce5efa526b6775e
2 parents
d55b83de
cbb5783c
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
48 deletions
static/js/me/address.js
static/js/me/online-service.js
static/sass/me/_address.scss
static/sass/me/_online-service.scss
static/sass/product/_comments-consults.scss
static/sass/product/_detail.scss
template/m.yohobuy.com/actions/index/home/i-help.phtml
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
static/js/me/address.js
View file @
4a6a154
...
...
@@ -28,7 +28,6 @@ var $action = $('.action'),
// 清除返回按钮原有链接
$backBtn
.
attr
(
'href'
,
'javascript:void(0);'
);
window
.
rePosFooter
();
// 自定义返回按钮事件
...
...
@@ -39,6 +38,7 @@ $backBtn.on('touchend', function(e) {
e
.
preventDefault
();
currentPage
=
'address'
;
$navTitle
.
html
(
'地址管理'
);
window
.
rePosFooter
();
}
else
if
(
currentPage
===
'list'
)
{
$pageWrap
.
hide
();
$editAddressPage
.
show
();
...
...
@@ -60,9 +60,10 @@ function editAddress(data) {
$addressForm
.
find
(
'[name="address"]'
).
val
(
data
.
address
||
''
);
currentPage
=
'edit'
;
$footer
.
hide
();
$pageWrap
.
hide
();
$editAddressPage
.
show
();
$footer
.
addClass
(
'bottom'
);
}
$confim
.
on
(
'touchend'
,
'.cancel'
,
function
()
{
...
...
@@ -94,30 +95,7 @@ $confim.on('touchend', '.cancel', function() {
});
});
// 添加地址
$addAddress
.
on
(
'touchend'
,
function
()
{
if
(
$addressItem
.
length
>=
5
)
{
tip
.
show
(
'您最多添加5个收货地址'
);
return
false
;
}
editAddress
();
$navTitle
.
html
(
'添加新地址'
);
});
// 编辑或删除
$action
.
on
(
'touchend'
,
'.edit'
,
function
()
{
editAddress
(
$
(
this
).
data
());
$navTitle
.
html
(
'修改地址'
);
}).
on
(
'touchend'
,
'.del'
,
function
()
{
deleteId
=
$
(
this
).
data
(
'id'
);
$confim
.
show
();
});
$submit
.
on
(
'touchend'
,
function
()
{
$addressForm
.
submit
();
return
false
;
});
// 提交表单请求
$addressForm
.
on
(
'submit'
,
function
()
{
if
(
isSubmiting
)
{
return
false
;
...
...
@@ -126,12 +104,14 @@ $addressForm.on('submit', function() {
// 简单的表单校验
if
(
!
$
(
this
).
find
(
'[name="consignee"]'
).
val
())
{
tip
.
show
(
'收件人不能为空'
);
$
(
this
).
find
(
'[name="consignee"]'
).
focus
();
// $(this).find('[name="consignee"]').focus();
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="mobile"]'
).
val
())
{
tip
.
show
(
'手机号不能为空'
);
$
(
this
).
find
(
'[name="mobile"]'
).
focus
();
// $(this).find('[name="mobile"]').focus();
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="area_code"]'
).
val
()
||
!
$
(
this
).
find
(
'[name="area"]'
).
val
())
{
...
...
@@ -140,7 +120,8 @@ $addressForm.on('submit', function() {
}
if
(
!
$
(
this
).
find
(
'[name="address"]'
).
val
())
{
tip
.
show
(
'地址不能为空'
);
$
(
this
).
find
(
'[name="address"]'
).
focus
();
// $(this).find('[name="address"]').focus();
return
false
;
}
...
...
@@ -168,6 +149,34 @@ $addressForm.on('submit', function() {
return
false
;
});
// 添加地址
$addAddress
.
on
(
'touchend'
,
function
()
{
if
(
$addressItem
.
length
>=
5
)
{
tip
.
show
(
'您最多添加5个收货地址'
);
return
false
;
}
editAddress
();
$navTitle
.
html
(
'添加新地址'
);
});
// 编辑或删除
$action
.
on
(
'touchend'
,
'.edit'
,
function
()
{
editAddress
(
$
(
this
).
data
());
$navTitle
.
html
(
'修改地址'
);
}).
on
(
'touchend'
,
'.del'
,
function
()
{
deleteId
=
$
(
this
).
data
(
'id'
);
$confim
.
show
();
});
$submit
.
on
(
'touchend'
,
function
()
{
$addressForm
.
submit
();
return
false
;
}).
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
// 省市区
$area
.
on
(
'touchend'
,
function
()
{
$footer
.
hide
();
...
...
@@ -176,10 +185,9 @@ $area.on('touchend', function() {
currentPage
=
'list'
;
});
// 省市区联动
$addressListPage
.
on
(
'touchend'
,
'.address'
,
function
()
{
var
caption
=
$
(
this
).
children
(
'.caption'
).
text
();
newArea
.
push
(
caption
);
newArea
.
push
(
$
(
this
).
children
(
'.caption'
).
text
());
$
(
this
).
siblings
().
hide
();
$
(
this
).
children
(
'ul'
).
show
();
return
false
;
...
...
@@ -193,6 +201,7 @@ $addressListPage.on('touchend', '.address', function() {
$editAddressPage
.
show
();
currentPage
=
'edit'
;
$navTitle
.
html
(
'修改地址'
);
$footer
.
show
();
// 恢复默认的三级选择
$addressListPage
.
hide
();
...
...
@@ -201,3 +210,17 @@ $addressListPage.on('touchend', '.address', function() {
newArea
=
[];
return
false
;
});
$
(
$editAddressPage
,
$addressListPage
).
css
(
'min-height'
,
function
()
{
return
$
(
window
).
height
()
-
$
(
'#yoho-header'
).
height
();
});
$pageWrap
.
first
().
css
(
'min-height'
,
function
()
{
return
$
(
window
).
height
()
-
$
(
'#yoho-header'
).
height
()
-
$footer
.
height
();
});
$
(
'input, textarea'
).
on
(
'focus'
,
function
()
{
$footer
.
hide
();
}).
on
(
'blur'
,
function
()
{
$footer
.
show
();
});
\ No newline at end of file
...
...
static/js/me/online-service.js
View file @
4a6a154
...
...
@@ -18,3 +18,10 @@ $questionTab.on('touchend', function() {
$
(
'.question-list'
).
removeClass
(
'current'
);
$
(
clickTab
).
addClass
(
'current'
);
});
$
(
'.yoho-page'
).
on
(
'touchstart'
,
'.connect-item, .question-item'
,
function
()
{
$
(
this
).
siblings
().
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'.connect-item, .question-item'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
...
...
static/sass/me/_address.scss
View file @
4a6a154
.my-address-page
{
width
:
100%
;
background
:
#f0f0f0
;
padding-bottom
:
pxToRem
(
20px
);
.page-wrap
:first-child
{
padding-bottom
:
pxToRem
(
10px
);
}
.address-item
{
padding
:
pxToRem
(
20px
)
pxToRem
(
30px
);
...
...
@@ -169,6 +172,10 @@
text-align
:
center
;
font-size
:
pxToRem
(
32px
);
line-height
:
pxToRem
(
88px
);
&
.highlight
{
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
}
}
}
...
...
static/sass/me/_online-service.scss
View file @
4a6a154
...
...
@@ -31,6 +31,7 @@
margin
:
0
rem
(
32
);
border-left
:
1px
solid
#b0b0b0
;
}
}
.question-list
{
...
...
@@ -43,15 +44,15 @@
}
li
{
margin-left
:
rem
(
30
);
width
:
rem
(
610
);
font-size
:
rem
(
28
);
line-height
:
rem
(
90
);
border-bottom
:
1px
solid
#ccc
;
a
{
display
:
block
;
color
:
#444
;
width
:
rem
(
610
);
margin-left
:
rem
(
30
);
border-bottom
:
1px
solid
#ccc
;
}
.iconfont
{
...
...
@@ -64,6 +65,10 @@
&
:last-child
{
border-bottom
:
none
;
}
&
.highlight
{
background
:
#eee
;
}
}
}
...
...
@@ -112,6 +117,9 @@
content
:
none
;
}
}
&
.highlight
{
background
:
#eee
;
}
}
.icon
{
display
:
inline-block
;
...
...
@@ -132,6 +140,7 @@
border-bottom
:
1px
solid
#c8c7cc
;
color
:
#444
;
background
:
#fff
;
&
:last-child
{
margin-bottom
:
0
;
}
...
...
@@ -146,6 +155,7 @@
.question
{
@extend
%qa
;
position
:
relative
;
color
:
#000
;
&
:after
{
content
:
''
;
position
:
absolute
;
...
...
static/sass/product/_comments-consults.scss
View file @
4a6a154
...
...
@@ -256,6 +256,13 @@
}
}
}
&
.no-item
{
height
:
pxToRem
(
200px
);
line-height
:
pxToRem
(
200px
);
color
:
#e0e0e0
;
text-align
:
center
;
}
}
}
...
...
static/sass/product/_detail.scss
View file @
4a6a154
...
...
@@ -100,8 +100,8 @@ $basicBtnC:#eb0313;
margin-left
:
.5px
;
font-size
:
pxToRem
(
23px
);
text-align
:
center
;
line-height
:
pxToRem
(
35px
);
padding
:
0
8px
;
line-height
:
pxToRem
(
33px
);
padding
:
0
5px
;
}
.new-tag
{
background-color
:
#78dc7e
;
...
...
@@ -121,6 +121,7 @@ $basicBtnC:#eb0313;
}
.limit-tag
{
border
:
1px
solid
#000
;
background-color
:
#fff
;
color
:
#000
;
}
.soonSoldOut-tag
{
...
...
@@ -219,6 +220,7 @@ $basicBtnC:#eb0313;
.periodOfMarket
{
font-size
:
pxToRem
(
24px
);
float
:
right
;
color
:
#d0021b
;
h1
{
display
:
inline-block
;
line-height
:
pxToRem
(
88px
);
...
...
@@ -316,7 +318,7 @@ $basicBtnC:#eb0313;
.store-logo
{
// padding-right: 35rem/$pxConvertRem;
img
{
width
:
pxToRem
(
109px
)
;
width
:
auto
;
height
:
pxToRem
(
68px
);
margin-left
:
0
;
margin-right
:
pxToRem
(
-25px
);
...
...
@@ -390,9 +392,11 @@ $basicBtnC:#eb0313;
}
}
.recommend-for-you
{
margin-bottom
:
pxToRem
(
12
0px
);
margin-bottom
:
pxToRem
(
3
0px
);
}
}
.bottom-blank
{
height
:
pxToRem
(
120px
);
}
@import
"comments-consults"
;
@import
"product-description"
;
...
...
template/m.yohobuy.com/actions/index/home/i-help.phtml
View file @
4a6a154
{
{>
layout/header
}
}
<div
class=
"iHelp"
>
<div
class=
"helpSearch"
>
<input
type=
"text"
>
<input
type=
"text"
placeholder=
"查找关键字"
>
<i
class=
"iconfont"
>
60
f;</i>
</div>
<ul>
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
4a6a154
...
...
@@ -2,7 +2,7 @@
<div
class=
"good-detail-page yoho-page"
>
<div
class=
"banner-container"
>
<div
class=
"tag-container"
>
<!--
<p
class=
"good-tag
soonSoldOut-tag"
>即将售罄
</p>
-->
<!--
<p
class=
"good-tag
new-tag"
>NEW
</p>
-->
{
{#
tags
}
}
{
{#
is_new
}
}
<p
class=
"good-tag new-tag"
>NEW</p>
...
...
@@ -44,12 +44,12 @@
</div>
{
{/
goodsPrice
}
}
{
{#
periodOfMarket
}
}
{
{#
if
periodOfMarket
}
}
<div
class=
"periodOfMarket"
>
<h
1
>上市期:</h
1
>
<h
1
>
{
{
.
}
}</h
1
>
<h
1
>
{
{
peridOfMarket
}
}</h
1
>
</div>
{
{/
periodOfMarket
}
}
{
{/
if
}
}
</div>
{
{#
vipLevel
}
}
...
...
@@ -140,4 +140,5 @@
{
{/if
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
<div
class=
"bottom-blank"
></div>
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
4a6a154
...
...
@@ -55,7 +55,7 @@
<span class="iconfont"></span></a>
</div>
{{else}}
<div class="co
mmen
t-content-main content-main no-item">
<div class="co
nsul
t-content-main content-main no-item">
<span class="iconfont"></span>暂无咨询
</div>
<div class="consult-content-footer">
...
...
Please
register
or
login
to post a comment