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
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
2086efacfa18ddad8193fc720b8aebe03b89ca3d
2 parents
a4e6b296
6c8c6797
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
103 deletions
static/sass/product/_detail.scss
static/sass/product/_product-description.scss
template/m.yohobuy.com/partials/product/product-description.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/home/Online.php → yohobuy/m.yohobuy.com/application/models/Home/Online.php
static/sass/product/_detail.scss
View file @
2086efa
...
...
@@ -388,4 +388,5 @@ $basicBtnC:#eb0313;
}
}
@import
"comments-consults"
;
@import
"product-description"
;
\ No newline at end of file
@import
"product-description"
;
...
...
static/sass/product/_product-description.scss
View file @
2086efa
.good-detail-page
{
.goods-desc
{
.service
{
width
:
pxToRem
(
4
89
px
);
width
:
pxToRem
(
4
94
px
);
height
:
pxToRem
(
28px
);
margin-top
:
pxToRem
(
22px
);
margin-left
:
pxToRem
(
40px
);
background
:
image-url
(
'product/service.png'
)
no-repeat
;
background-size
:
cover
;
}
.detail
{
background-color
:
$tableCellC
;
...
...
template/m.yohobuy.com/partials/product/product-description.phtml
View file @
2086efa
{
{#goodsDescription
}
}
<div
class=
"goods-desc page-block"
>
<
img
class=
"service lazy"
data-original=
"http://static.dev.yohobuy.com/img/product/service.png"
alt=
""
>
<
div
class=
"service"
></div
>
<h
1
class=
"title"
>
{
{title
}
}
<span
class=
"en-title"
>
{
{enTitle
}
}</span>
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
2086efa
...
...
@@ -323,7 +323,7 @@ class HomeController extends AbstractAction
$this
->
_view
->
display
(
'online-service'
,
array
(
'onlineServicePage'
=>
true
,
//
'pageFooter' => true,
'pageFooter'
=>
true
,
'service'
=>
$service
));
}
...
...
yohobuy/m.yohobuy.com/application/models/
h
ome/Online.php → yohobuy/m.yohobuy.com/application/models/
H
ome/Online.php
View file @
2086efa
<?php
namespace
Home
;
use
LibModels\Wap\Home\OnlineData
;
use
Plugin\Helpers
;
/**
* 在线客服相关数据处理
*/
class
OnlineModel
{
/*
* 获取在线帮助分类
* $clientType客户端类型
*/
public
static
function
getOnlineServiceInfo
(
$clientType
=
'iphone'
)
{
//调用接口获取数据
$res
=
OnlineData
::
getOnlineServiceInfo
(
$clientType
);
$cateInfo
=
$res
[
'data'
];
$question
=
array
();
$tab
=
array
();
if
(
$cateInfo
)
{
foreach
(
$cateInfo
as
$key
=>
$value
)
{
//强制截成3个tab
if
(
$key
>
2
)
{
break
;
}
$tab
[
$key
][
'tabid'
]
=
'tab'
.
$value
[
'id'
];
$tab
[
$key
][
'tabname'
]
=
$value
[
'category_name'
];
$tab
[
$key
][
'iscut'
]
=
true
;
$tab
[
$key
][
'current'
]
=
(
!
$key
)
?
TRUE
:
FALSE
;
$question
[
$key
][
'name'
]
=
'tab'
.
$value
[
'id'
];
$question
[
$key
][
'current'
]
=
(
!
$key
)
?
TRUE
:
FALSE
;
$sub
=
$value
[
'sub'
];
$qTmp
=
array
();
if
(
$sub
)
{
foreach
(
$sub
as
$sk
=>
$sv
)
{
$qTmp
[
$sk
][
'title'
]
=
$sv
[
'category_name'
];
$qTmp
[
$sk
][
'link'
]
=
Helpers
::
url
(
'/home/onlineservicedetail'
,
array
(
'cateId'
=>
$sv
[
'id'
],
'cateName'
=>
$sv
[
'category_name'
]));
}
}
$question
[
$key
][
'list'
]
=
$qTmp
;
}
$question
[
0
][
'current'
]
=
true
;
$tab
[
count
(
$tab
)
-
1
][
'iscut'
]
=
false
;
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'tab'
=>
$tab
,
'question'
=>
$question
);
return
$result
;
}
/*
* 加载分类下的问题和解决方法
* cateId问题分类ID
* clientType客户端
*/
public
static
function
getOnlineServiceDetail
(
$cateId
,
$clinetType
=
'iphone'
)
{
$result
=
array
();
if
(
!
$cateId
)
{
return
$result
;
}
$res
=
OnlineData
::
getOnlineServiceDetail
(
$cateId
,
$clinetType
);
$questionInfo
=
$res
[
'data'
];
if
(
$questionInfo
)
{
$list
=
array
();
if
(
$questionInfo
)
{
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'list'
=>
$list
);
}
return
$result
;
}
}
<?php
namespace
Home
;
use
LibModels\Wap\Home\OnlineData
;
use
Plugin\Helpers
;
/**
* 在线客服相关数据处理
*/
class
OnlineModel
{
/*
* 获取在线帮助分类
* $clientType客户端类型
*/
public
static
function
getOnlineServiceInfo
(
$clientType
=
'iphone'
)
{
//调用接口获取数据
$res
=
OnlineData
::
getOnlineServiceInfo
(
$clientType
);
$cateInfo
=
$res
[
'data'
];
$question
=
array
();
$tab
=
array
();
if
(
$cateInfo
)
{
foreach
(
$cateInfo
as
$key
=>
$value
)
{
//强制截成3个tab
if
(
$key
>
2
)
{
break
;
}
$tab
[
$key
][
'tabid'
]
=
'tab'
.
$value
[
'id'
];
$tab
[
$key
][
'tabname'
]
=
$value
[
'category_name'
];
$tab
[
$key
][
'iscut'
]
=
true
;
$tab
[
$key
][
'current'
]
=
(
!
$key
)
?
TRUE
:
FALSE
;
$question
[
$key
][
'name'
]
=
'tab'
.
$value
[
'id'
];
$question
[
$key
][
'current'
]
=
(
!
$key
)
?
TRUE
:
FALSE
;
$sub
=
$value
[
'sub'
];
$qTmp
=
array
();
if
(
$sub
)
{
foreach
(
$sub
as
$sk
=>
$sv
)
{
$qTmp
[
$sk
][
'title'
]
=
$sv
[
'category_name'
];
$qTmp
[
$sk
][
'link'
]
=
Helpers
::
url
(
'/home/onlineservicedetail'
,
array
(
'cateId'
=>
$sv
[
'id'
],
'cateName'
=>
$sv
[
'category_name'
]));
}
}
$question
[
$key
][
'list'
]
=
$qTmp
;
}
$question
[
0
][
'current'
]
=
true
;
$tab
[
count
(
$tab
)
-
1
][
'iscut'
]
=
false
;
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'tab'
=>
$tab
,
'question'
=>
$question
);
return
$result
;
}
/*
* 加载分类下的问题和解决方法
* cateId问题分类ID
* clientType客户端
*/
public
static
function
getOnlineServiceDetail
(
$cateId
,
$clinetType
=
'iphone'
)
{
$result
=
array
();
if
(
!
$cateId
)
{
return
$result
;
}
$res
=
OnlineData
::
getOnlineServiceDetail
(
$cateId
,
$clinetType
);
$questionInfo
=
$res
[
'data'
];
if
(
$questionInfo
)
{
$list
=
array
();
if
(
$questionInfo
)
{
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'list'
=>
$list
);
}
return
$result
;
}
}
...
...
Please
register
or
login
to post a comment