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
biao
9 years ago
Commit
2d1579f46cb1afb0be70423d34f8a6ff12aa36ce
1 parent
08c1e795
购买咨询页面产看更多按钮功能更新
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
static/js/product/detail/comments-consults.js
static/sass/product/_comments-consults.scss
template/m.yohobuy.com/actions/product/detail/consults.phtml
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
static/js/product/detail/comments-consults.js
View file @
2d1579f
...
...
@@ -100,9 +100,9 @@ if ($('.goods-consults .consult-item').length > 10) {
if
(
readmoreHammer
)
{
readmoreHammer
.
on
(
'tap'
,
function
()
{
$
(
'.readmore'
).
hide
();
$
(
'.goods-consults .consult-item
:nth-child(n+11)
'
).
show
();
$
(
'.goods-consults .consult-item'
).
show
();
return
false
;
});
}
require
(
'./fav'
);
\ No newline at end of file
require
(
'./fav'
);
...
...
static/sass/product/_comments-consults.scss
View file @
2d1579f
...
...
@@ -74,12 +74,20 @@
.goods-consults
{
margin-top
:
5
.25rem
;
overflow
:
hidden
;
.consult-item
:nth-child
(
1
)
{
display
:
block
;
}
.consult-item
:nth-child
(
2
)
{
display
:
block
;
}
.consult-item
{
margin-top
:
pxToRem
(
30px
);
padding
:
pxToRem
(
20px
)
pxToRem
(
28px
);
background-color
:
#fff
;
border-bottom
:
1px
solid
$borderC
;
border-top
:
1px
solid
$borderC
;
display
:none
;
.question
{
font-size
:
pxToRem
(
24px
);
color
:
$mainFontC
;
...
...
template/m.yohobuy.com/actions/product/detail/consults.phtml
View file @
2d1579f
...
...
@@ -3,7 +3,7 @@
<div
class=
"goto-consult tap-hightlight"
id=
"goto-consult"
data-href=
"{{link}}"
>
<i
class=
"iconfont consult-logo"
>
639
;</i>
<span>我要咨询</span>
<a
href=
"
javascript:;
"
class=
"iconfont enter-consult-page"
>
604
;</a>
<a
href=
"
{{link}}
"
class=
"iconfont enter-consult-page"
>
604
;</a>
</div>
{
{#
consults
}
}
<div
class=
"goods-consults"
id=
"goods-consults"
>
...
...
@@ -43,7 +43,9 @@
</div>
{
{/
consults
}
}
{
{#showReadMore
}
}
<a
href=
"javascript:;"
id=
"readmore"
class=
"readmore tap-hightlight"
>查看更多
<i
class=
"iconfont"
>
604
;</i></a>
{
{/showReadMore
}
}
{
{#faq
}
}
<h
1
class=
"faq-title"
>
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
2d1579f
...
...
@@ -12,7 +12,7 @@ class DetailController extends AbstractAction
/**
* 商品详情
*
*
* @param int productId
* @param int goodsId
*/
...
...
@@ -50,7 +50,7 @@ class DetailController extends AbstractAction
/**
* 商品详情 (SKN)
*
*
* @param int productSkn
*/
public
function
showAction
()
...
...
@@ -100,7 +100,7 @@ class DetailController extends AbstractAction
/**
* 购买评价列表
*
*
* @param int productId
* @param int total
*/
...
...
@@ -132,7 +132,7 @@ class DetailController extends AbstractAction
/**
* 购买咨询列表
*
*
* @param int productId
* @param int total
*/
...
...
@@ -150,12 +150,14 @@ class DetailController extends AbstractAction
}
$this
->
setTitle
(
'购买咨询'
);
$consults
=
\Product\DetailModel
::
getConsults
(
$productId
);
$data
=
array
(
'goodsConsultsPage'
=>
true
,
'pageFooter'
=>
true
,
'consults'
=>
array
(
'list'
=>
\Product\DetailModel
::
getConsults
(
$productId
),
'list'
=>
$consults
),
'showReadMore'
=>
count
(
$consults
)
>
2
,
'link'
=>
Helpers
::
url
(
'/product/detail/consultform'
,
array
(
'product_id'
=>
$productId
)),
);
...
...
@@ -222,7 +224,7 @@ class DetailController extends AbstractAction
/**
* 添加咨询操作
*
*
* @param int product_id 商品ID
* @param string content 咨询内容
* @return json
...
...
@@ -243,7 +245,7 @@ class DetailController extends AbstractAction
/**
* 为你优选
*
*
* @param int productSkn 商品SKN号
* @return json
*/
...
...
Please
register
or
login
to post a comment