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
Rock Zhang
9 years ago
Commit
a69398b57e923cf72ded851660bb3993030b1308
1 parent
bf3e4714
为获取商品咨询列表数据接口添加用户id参数,从而获得用户是否已点击的数据
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
library/LibModels/Wap/Product/DetailData.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
library/LibModels/Wap/Product/DetailData.php
View file @
a69398b
...
...
@@ -64,16 +64,22 @@ class DetailData
/**
* 咨询内容列表
*
* @param int $uid 用户ID
* @param int $productId 产品ID
* @param int $pageNum 页码数
* @param int $pageSize 每页显示个数
* @return array
*/
public
static
function
consultList
(
$productId
,
$pageNum
,
$pageSize
)
public
static
function
consultList
(
$
uid
,
$
productId
,
$pageNum
,
$pageSize
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.consult.li'
;
$param
[
'product_id'
]
=
$productId
;
if
(
!
empty
(
$uid
))
{
$param
[
'uid'
]
=
$uid
;
}
$param
[
'page'
]
=
$pageNum
;
$param
[
'limit'
]
=
$pageSize
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
a69398b
...
...
@@ -549,18 +549,19 @@ class DetailModel
/**
* 获取咨询列表
*
*
* @param int $uid 用户ID
* @param int $productId 产品ID
* @param int $pageNum 页码数
* @param int $pageSize 每页显示个数
* @return array
*/
public
static
function
getConsults
(
$productId
,
$pageNum
=
1
,
$pageSize
=
300
)
public
static
function
getConsults
(
$
uid
,
$
productId
,
$pageNum
=
1
,
$pageSize
=
300
)
{
$result
=
array
();
if
(
is_numeric
(
$productId
)
&&
is_numeric
(
$pageNum
)
&&
is_numeric
(
$pageSize
))
{
$consultList
=
DetailData
::
consultList
(
$productId
,
$pageNum
,
$pageSize
);
$consultList
=
DetailData
::
consultList
(
$
uid
,
$
productId
,
$pageNum
,
$pageSize
);
if
(
isset
(
$consultList
[
'code'
])
&&
$consultList
[
'code'
]
===
200
)
{
$consultList
=
$consultList
[
'data'
][
'list'
];
$build
=
array
();
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
a69398b
...
...
@@ -150,7 +150,8 @@ class DetailController extends AbstractAction
}
$this
->
setTitle
(
'购买咨询'
);
$consults
=
\Product\DetailModel
::
getConsults
(
$productId
);
$uid
=
$this
->
getUid
();
$consults
=
\Product\DetailModel
::
getConsults
(
$uid
,
$productId
);
$data
=
array
(
'goodsConsultsPage'
=>
true
,
'pageFooter'
=>
true
,
...
...
Please
register
or
login
to post a comment