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
1e0b93ec146b23fbafca5095c7c67dfc49f34053
1 parent
e69aed19
评论咨询tab跳转要绑定到外层元素上 -- code reviewed by zhaobiao
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
static/js/product/detail/comments-consults.js
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
static/js/product/detail/comments-consults.js
View file @
1e0b93e
...
...
@@ -4,12 +4,17 @@
* @date: 2015/11/18
*/
var
$
=
require
(
'jquery'
),
tip
=
require
(
'../../plugin/tip'
);
var
commentsNum
;
tip
=
require
(
'../../plugin/tip'
),
Hammer
=
require
(
'yoho.hammer'
);
var
commentsNum
,
consultsNum
;
var
consultFooterEle
=
document
.
getElementById
(
'consult-content-footer'
),
consultFooterHammer
=
consultFooterEle
&&
new
Hammer
(
consultFooterEle
);
(
function
()
{
var
consultsNum
=
$
(
'#nav-tab .consults-num'
).
html
()
-
0
;
consultsNum
=
$
(
'#nav-tab .consults-num'
).
html
()
-
0
;
commentsNum
=
$
(
'#nav-tab .comments-num'
).
html
()
-
0
;
...
...
@@ -50,4 +55,10 @@ $('#nav-tab li').on('touchend', function() {
$
(
'#feedback-content .content:eq('
+
index
+
')'
).
removeClass
(
'hide'
);
}
}
});
\ No newline at end of file
});
if
(
consultFooterHammer
)
{
consultFooterHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
consultFooterEle
).
find
(
'a'
).
attr
(
'href'
);
});
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
1e0b93e
...
...
@@ -122,7 +122,7 @@
<a
href=
"{{cartUrl}}"
class=
"num-incart iconfont"
>
62
c;</a>
{
{#if
addToCart
}
}
<a
href=
"{{addToCartUrl}}"
class=
"addto-cart"
>加入购物车</a>
<a
id=
"addtoCart"
href=
"{{addToCartUrl}}"
class=
"addto-cart"
>加入购物车</a>
{
{/if
}
}
{
{#if
soldOut
}
}
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
1e0b93e
...
...
@@ -49,7 +49,7 @@
</div>
{{/ consults}}
</div>
<div class="consult-content-footer">
<div class="consult-content-footer"
id="consult-content-footer"
>
<a href="{{link}}">
查看更多
<span class="iconfont"></span></a>
...
...
Please
register
or
login
to post a comment