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
biao
9 years ago
Commit
8f2125bc07291ad6bed2bf21e8cb28d8434eb3fd
1 parent
ca7d86e8
1修复频道一览页面banner被遮挡问题, 2购买咨询页面加入常见问题
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
34 deletions
static/sass/category/_brand.scss
static/sass/product/_comments-consults.scss
template/m.yohobuy.com/actions/product/detail/consults.phtml
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
static/sass/category/_brand.scss
View file @
8f2125b
...
...
@@ -135,7 +135,7 @@
}
.banner-top
{
padding-top
:
17
8rem
/
$pxConvertRem
;
padding-top
:
25
8rem
/
$pxConvertRem
;
background-color
:
#f8f8f8
;
}
...
...
static/sass/product/_comments-consults.scss
View file @
8f2125b
...
...
@@ -71,23 +71,26 @@
color
:
$subFontC
;
}
}
.goods-consults
{
margin-top
:
5
.25rem
;
overflow
:
hidden
;
.goods-consults.customer-consults
{
.consult-item
:nth-child
(
1
)
{
display
:
block
;
}
.consult-item
:nth-child
(
2
)
{
display
:
block
;
}
.consult-item
{
display
:
none
;
}
}
.goods-consults
{
margin-top
:
5
.25rem
;
overflow
:
hidden
;
.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 @
8f2125b
...
...
@@ -6,7 +6,7 @@
<a
href=
"{{link}}"
class=
"iconfont enter-consult-page"
>
604
;</a>
</div>
{
{#
consults
}
}
<div
class=
"goods-consults"
id=
"goods-consults"
>
<div
class=
"goods-consults
customer-consults
"
id=
"goods-consults"
>
{
{#list
}
}
<div
class=
"consult-item"
data-id=
"{{id}}"
>
<div
class=
"question"
>
...
...
@@ -55,7 +55,7 @@
{
{#faq
}
}
<div
class=
"goods-consults"
style=
"margin-top:0"
>
{
{#
list
}
}
{
{#
commonConsults
}
}
<div
class=
"faq-item"
>
<div
class=
"question"
>
<span
class=
"iconfont"
>
639
;</span>
...
...
@@ -69,7 +69,7 @@
<p>
{
{answer
}
}</p>
</div>
</div>
{
{/
list
}
}
{
{/
commonConsults
}
}
</div>
{
{/faq
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
8f2125b
...
...
@@ -7,7 +7,7 @@ use Plugin\Helpers;
/**
* 商品详情页模板相关的数据模型
*
*
* @name DetailModel
* @package Product
* @copyright yoho.inc
...
...
@@ -19,7 +19,7 @@ class DetailModel
/**
* 商品基本信息
*
*
* @param int $productId 商品ID SKN 和 ID 只需要传一个
* @param int $goodsId 某个颜色的商品
* @param int $uid 当前登录用户ID, 未登录为0
...
...
@@ -309,7 +309,7 @@ class DetailModel
/**
* 商品尺码信息
*
*
* @param int $productSkn
* @return array
*/
...
...
@@ -520,7 +520,7 @@ class DetailModel
/**
* 获取评价列表
*
*
* @param int $productId 产品ID
* @param int $pageNum 页码数
* @param int $pageSize 每页显示个数
...
...
@@ -571,9 +571,9 @@ class DetailModel
$build
[
'answer'
]
=
$value
[
'answer'
];
$build
[
'id'
]
=
$value
[
'id'
];
$build
[
'isLike'
]
=
$value
[
'is_like'
]
===
'Y'
;
$build
[
'like'
]
=
$value
[
'like'
]
;
$build
[
'like'
]
=
intval
(
$value
[
'like'
])
;
$build
[
'isUseful'
]
=
$value
[
'is_useful'
]
===
'Y'
;
$build
[
'useful'
]
=
$value
[
'useful'
]
;
$build
[
'useful'
]
=
intval
(
$value
[
'useful'
])
;
$result
[]
=
$build
;
}
}
...
...
@@ -667,7 +667,7 @@ class DetailModel
/**
* 获取为你优选的商品
*
*
* @param int $productSkn 商品SKN
* @return array
*/
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
8f2125b
...
...
@@ -158,6 +158,7 @@ class DetailController extends AbstractAction
'consults'
=>
array
(
'list'
=>
$consults
),
'faq'
=>
\Product\DetailModel
::
getCommonConsults
(),
'showReadMore'
=>
count
(
$consults
)
>
2
,
'link'
=>
Helpers
::
url
(
'/product/detail/consultform'
,
array
(
'product_id'
=>
$productId
)),
);
...
...
@@ -166,24 +167,6 @@ class DetailController extends AbstractAction
$this
->
_view
->
display
(
'consults'
,
$data
);
}
/*
* 异步获取咨询常见问题
*/
public
function
commonconsultsAction
()
{
$result
=
array
();
if
(
$this
->
isAjax
())
{
$result
=
\Product\DetailModel
::
getCommonConsults
();
}
if
(
empty
(
$result
))
{
echo
' '
;
}
else
{
print_r
(
$result
);
$this
->
_view
->
display
(
'common-consults'
,
$result
);
}
}
/*
* 咨询点赞
...
...
Please
register
or
login
to post a comment