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
Lynnic
9 years ago
Commit
8b2a7d31919c4787f0b164fcb984f8d3b0892de8
1 parent
42d1c57b
为块级元素添加tap跳转事件处理 --code reviewed by bikai
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
static/js/product/detail/comments-consults.js
template/m.yohobuy.com/actions/product/detail/consults.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
static/js/product/detail/comments-consults.js
View file @
8b2a7d3
...
...
@@ -9,7 +9,7 @@ var $ = require('jquery'),
var
commentsNum
,
consultsNum
;
var
consultFooterEle
=
document
.
getElementById
(
'consult-content-footer'
)
,
var
consultFooterEle
=
$
(
'.consult-content-footer'
)[
0
]
,
consultFooterHammer
=
consultFooterEle
&&
new
Hammer
(
consultFooterEle
),
navtabEle
=
document
.
getElementById
(
'nav-tab'
),
...
...
@@ -68,13 +68,13 @@ if (navtabHammer) {
if
(
consultFooterHammer
)
{
consultFooterHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
consultFooterEle
).
find
(
'a'
).
attr
(
'href'
);
location
.
href
=
$
(
consultFooterEle
).
data
(
'href'
);
});
}
if
(
gotoConsultHammer
)
{
gotoConsultHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
gotoConsultEle
).
find
(
'a'
).
attr
(
'href'
);
location
.
href
=
$
(
gotoConsultEle
).
data
(
'href'
);
});
}
...
...
template/m.yohobuy.com/actions/product/detail/consults.phtml
View file @
8b2a7d3
{
{>
layout/header
}
}
<div
class=
"goods-consults-page yoho-page"
>
<div
class=
"goto-consult"
id=
"goto-consult"
>
<div
class=
"goto-consult"
id=
"goto-consult"
data-href=
"{{link}}"
>
<i
class=
"iconfont consult-logo"
>
639
;</i>
<span>我要咨询</span>
<a
href=
"
{{link}}
"
class=
"iconfont enter-consult-page"
>
604
;</a>
<a
href=
"
javascript:;
"
class=
"iconfont enter-consult-page"
>
604
;</a>
</div>
{
{#
consults
}
}
<div
class=
"goods-consults"
id=
"goods-consults"
>
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
8b2a7d3
...
...
@@ -49,8 +49,8 @@
</div>
{{/ consults}}
</div>
<div class="consult-content-footer" id="consult-content-footer">
<a href="{{link}}">
<div class="consult-content-footer" data-href="{{link}}">
<a href="javascript:;">
查看更多
<span class="iconfont"></span></a>
</div>
...
...
@@ -58,8 +58,9 @@
<div class="consult-content-main content-main no-item">
<span class="iconfont"></span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="{{link}}">
<div class="consult-content-footer" data-href="{{link}}">
<a href="javascript:;">
我要咨询
<span class="iconfont"></span></a>
</div>
...
...
Please
register
or
login
to post a comment