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
Rock Zhang
9 years ago
Commit
446bc6a63a7a6c5b4da74e925d0e15073535b89e
1 parent
f711436c
修复在线咨询页面显示为空白的bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Home/Online.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
446bc6a
...
...
@@ -462,12 +462,18 @@ class HomeController extends AbstractAction
*/
public
function
onlineServiceDetailAction
()
{
$service
=
array
();
$service
=
array
();
$cateId
=
$this
->
get
(
'cateId'
,
0
);
$cateName
=
$this
->
get
(
'cateName'
,
''
);
if
(
$cateId
>
0
)
{
$service
=
Home\OnlineModel
::
getOnlineServiceDetail
(
$cateId
);
}
$service
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'service'
=>
$service
);
$this
->
setTitle
(
'在线客服'
);
$this
->
setNavHeader
(
$cateName
,
true
,
''
);
$this
->
_view
->
display
(
'online-service-detail'
,
$service
);
...
...
yohobuy/m.yohobuy.com/application/models/Home/Online.php
View file @
446bc6a
...
...
@@ -70,21 +70,17 @@ class OnlineModel
return
$result
;
}
$res
=
OnlineData
::
getOnlineServiceDetail
(
$cateId
,
$clinetType
);
$questionInfo
=
$res
[
'data'
];
if
(
$questionInfo
)
{
if
(
isset
(
$res
[
'code'
])
&&
$res
[
'code'
]
===
200
)
{
$questionInfo
=
$res
[
'data'
];
$list
=
array
();
if
(
$questionInfo
)
{
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'list'
=>
$list
);
!
empty
(
$list
)
&&
$result
[
'list'
]
=
$list
;
}
return
$result
;
}
...
...
Please
register
or
login
to post a comment