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
毕凯
9 years ago
Commit
66231a8139af7f9ad456b60ec1dd75f1184db5e5
2 parents
e5f28169
6b5585d0
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
255 additions
and
77 deletions
library/Action/AbstractAction.php
library/LibModels/Wap/Home/HelpData.php
library/LibModels/Wap/Product/DetailData.php
static/js/common.js
static/sass/layout/_header.scss
static/sass/me/_ihelp.scss
template/m.yohobuy.com/actions/index/home/helpDetail.phtml
template/m.yohobuy.com/actions/index/home/i-help.phtml
template/m.yohobuy.com/partials/layout/header.phtml
template/m.yohobuy.com/partials/layout/page_header.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Home/Help.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
library/Action/AbstractAction.php
View file @
66231a8
...
...
@@ -442,7 +442,7 @@ class AbstractAction extends Controller_Abstract
break
;
}
}
$this
->
_view
->
assign
(
'pageHeader'
,
$header
);
}
...
...
library/LibModels/Wap/Home/HelpData.php
0 → 100644
View file @
66231a8
<?php
namespace
LibModels\Wap\Home
;
use
Api\Yohobuy
;
use
Api\Sign
;
/**
* 帮助中心数据模型
*
*/
class
HelpData
{
/*
* 获取帮助列表(分类),缓存1h
* clientType客户端
*/
public
static
function
serviceInfo
()
{
//构建必传参数
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.help.li'
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
post
(
Yohobuy
::
API_URL
,
$param
,
$param
);
}
}
...
...
library/LibModels/Wap/Product/DetailData.php
View file @
66231a8
...
...
@@ -73,6 +73,7 @@ class DetailData
$param
[
'limit'
]
=
$pageSize
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
...
...
@@ -86,7 +87,15 @@ class DetailData
*/
public
static
function
commentList
(
$productId
,
$pageNum
,
$pageSize
)
{
// 暂未提供提口
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.comment.li'
;
$param
[
'product_id'
]
=
$productId
;
$param
[
'page'
]
=
$pageNum
;
$param
[
'limit'
]
=
$pageSize
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
/**
...
...
static/js/common.js
View file @
66231a8
...
...
@@ -182,6 +182,10 @@ $yohoPage.on('touchstart', '.tap-hightlight', function() {
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'.tap-hightlight'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
$
(
'.nav-home'
).
on
(
'touchstart'
,
function
()
{
$
(
'.homebuttom'
).
toggleClass
(
'none'
);
});
(
function
()
{
...
...
static/sass/layout/_header.scss
View file @
66231a8
...
...
@@ -123,4 +123,47 @@
padding-top
:
90rem
/
$pxConvertRem
;
}
}
}
.homebuttom
{
display
:
block
;
width
:
100%
;
height
:
90rem
/
$pxConvertRem
;
overflow
:
hidden
;
@include
background-image
(
linear-gradient
(
#323232
,
#414141
));
border-top
:
1px
solid
#444
;
color
:
#fff
;
// position: absolute;
// top: 90rem / $pxConvertRem;
// left: 0;
// z-index: 10;
ul
{
width
:
100%
;
height
:
90%
;
overflow
:
hidden
;
padding-top
:
12rem
/
$pxConvertRem
;
li
{
width
:
25%
;
height
:
100%
;
overflow
:
hidden
;
float
:
left
;
text-align
:
center
;
i
{
width
:
100%
;
height
:
40%
;
overflow
:
hidden
;
display
:
block
;
}
span
{
width
:
100%
;
height
:
auto
;
overflow
:
hidden
;
display
:
block
;
line-height
:
40rem
/
$pxConvertRem
;
}
}
}
}
.none
{
display
:
none
;
}
\ No newline at end of file
...
...
static/sass/me/_ihelp.scss
View file @
66231a8
...
...
@@ -2,28 +2,6 @@
width
:
100%
;
height
:
auto
;
overflow
:
hidden
;
.helpSearch
{
width
:
90%
;
height
:
84rem
/
$pxConvertRem
;
overflow
:
hidden
;
position
:
relative
;
margin
:
0
auto
;
input
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
border
:none
;
font-size
:
54em
/
$pxConvertRem
;
}
i
{
height
:
100%
;
line-height
:
88rem
/
$pxConvertRem
;
position
:
absolute
;
right
:
20rem
/
$pxConvertRem
;
top
:
0
;
color
:
#e0e0e0
;
}
}
ul
{
width
:
100%
;
height
:
auto
;
...
...
@@ -31,7 +9,7 @@
display
:
block
;
border-top
:
1px
solid
#e0e0e0
;
li
{
width
:
95
%
;
width
:
100
%
;
height
:
80rem
/
$pxConvertRem
;
line-height
:
84rem
/
$pxConvertRem
;
overflow
:
hidden
;
...
...
@@ -43,10 +21,11 @@
border-bottom
:none
;
}
span
{
width
:
8
8
%
;
width
:
8
5
%
;
height
:
100%
;
overflow
:
hidden
;
float
:
left
;
padding-left
:
5%
;
}
i
{
color
:
#e0e0e0
;
...
...
template/m.yohobuy.com/actions/index/home/helpDetail.phtml
0 → 100644
View file @
66231a8
{
{>
layout/header
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/home/i-help.phtml
View file @
66231a8
{
{>
layout/header
}
}
<div
class=
"iHelp"
>
<div
class=
"helpSearch"
>
<input
type=
"text"
placeholder=
"查找关键字"
>
<i
class=
"iconfont"
>
60
f;</i>
</div>
<ul>
{
{#
iHelp
}
}
<li><a
href=
"
{{ url }}"
><span>
{
{
name
}
}</span><i
class=
"iconfont num"
>
604
;</i></a></li>
<li><a
href=
"
/home/helpDetail?caption={{ caption}}"
><span>
{
{
caption
}
}</span><i
class=
"iconfont num"
>
604
;</i></a></li>
{
{/
iHelp
}
}
</ul>
</div>
...
...
template/m.yohobuy.com/partials/layout/header.phtml
View file @
66231a8
...
...
@@ -49,4 +49,4 @@
<span>
X
</span>
</div>
{{/if}}
{{> layout/page_header}}
\ No newline at end of file
{{> layout/page_header}}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/page_header.phtml
View file @
66231a8
...
...
@@ -4,13 +4,34 @@
<a
href=
"{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}"
class=
"iconfont nav-back"
>
610
;</a>
{
{/navBack
}
}
{
{#navHome
}
}
<a
href=
"{{.}}"
class=
"iconfont nav-home"
>
611
;</a>
<a
class=
"iconfont nav-home"
>
611
;</a>
{
{/navHome
}
}
{
{#navTitle
}
}
<p
class=
"nav-title"
>
{
{.
}
}</p>
{
{/navTitle
}
}
{
{#
navBtn
}
}
<span
class=
"nav-btn"
>
{
{.
}
}</span>
<!--
<span
class=
"nav-btn"
>
{
{.
}
}</span>
-->
<i
class=
"iconfont nav-home"
>
638
;</i>
{
{/
navBtn
}
}
</header>
<div
class=
"homebuttom none"
>
<ul>
<li>
<i
class=
"iconfont"
>
62
e;</i>
<span>首页</span>
</li>
<li>
<i
class=
"iconfont"
>
62
e;</i>
<span>分类</span>
</li>
<li>
<i
class=
"iconfont"
>
62
e;</i>
<span>购物车</span>
</li>
<li>
<i
class=
"iconfont"
>
62
e;</i>
<span>我的</span>
</li>
</ul>
</div>
{
{/pageHeader
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
66231a8
...
...
@@ -41,14 +41,14 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this
->
setTitle
(
'个人中心'
);
$this
->
setNavHeader
(
'个人中心'
,
SITE_MAIN
.
'/?go=1'
);
$this
->
setNavHeader
(
'个人中心'
,
SITE_MAIN
.
'/?go=1'
,
''
,
true
);
$data
=
array
(
'myIndexPage'
=>
true
,
'showDownloadApp'
=>
true
,
'pageFooter'
=>
true
,
'cartUrl'
=>
Helpers
::
url
(
'/cart/index/index'
,
null
),
'signinUrl'
=>
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
Helpers
::
url
(
'/home'
))),
'signinUrl'
=>
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
Helpers
::
url
(
'/home'
))
),
);
$uid
=
$this
->
getUid
(
false
);
if
(
$uid
)
{
...
...
@@ -781,14 +781,14 @@ class HomeController extends AbstractAction
// 审判跳转登录页
$this
->
auditJumpLogin
();
$this
->
setTitle
(
'支付中心'
);
$this
->
setNavHeader
(
'支付中心'
);
$orderCode
=
$this
->
get
(
'order_code'
);
if
(
empty
(
$orderCode
))
{
$this
->
error
();
}
$this
->
setTitle
(
'支付中心'
);
$this
->
setNavHeader
(
'支付中心'
);
$this
->
_view
->
display
(
'pay'
,
array
(
'payCenterPage'
=>
true
,
'payAppInfo'
=>
array
(
...
...
@@ -814,40 +814,90 @@ class HomeController extends AbstractAction
));
}
// /*
// * 我的订单-确认收货
// */
// private function confirmAction(){
// //
// $gender = Helpers::getGenderByCookie();
// $order_code = $this->get('id');
// $order_code = '';
// $yh_channel = $this->get('yh_channel', 1);
// $data = OrderData::confirmData($gender,$order_code,$yh_channel,$this->_uid);
// $this->echoJson($data);
// }
/**
* 订单详情页
*/
public
function
orderDetailAction
()
{
// 审判跳转登录页
$this
->
auditJumpLogin
();
$orderCode
=
$this
->
get
(
'order_code'
,
1507880870
);
if
(
empty
(
$orderCode
))
{
$this
->
error
();
}
$this
->
setTitle
(
'订单详情'
);
$this
->
setNavHeader
(
'订单详情'
);
$this
->
_view
->
display
(
'order-detail'
,
array
(
'orderDetailPage'
=>
true
,
'orderDetail'
=>
OrderModel
::
orderDetail
(
$orderCode
,
967016
/*$this->_uid*/
,
'a3aadd4cce408f8ee062a9add02e8faa'
/*$this->_session*/
),
));
}
// /**
// * 帮助列表页
// */
// public function helpAction()
// {
// $this->setTitle('帮助中心');
// $this->setNavHeader('帮助中心');
// $data = array(
// 'iHelp' => array(
// array('name' => '新用户注册', 'url' => 'http://m.dev.yohobuy.com/'),
// )
// );
// $this->_view->display('i-help', $data);
// }
$data
=
array
(
'name'
=>
'毛毛莉Lydia'
,
'phoneNum'
=>
'18600001133'
,
'address'
=>
'南京市建邺区嘉陵江东街18号国家广告产业园5栋17楼'
,
'orderStatus'
=>
'订单取消'
,
'orderNum'
=>
'418358063'
,
'orderTime'
=>
'2014-03-10 17:25:10'
,
'orderCancel'
=>
true
,
'goods'
=>
array
(
array
(
'id'
=>
1
,
'thumb'
=>
'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'Adidas Originals ZX FLUXM22508'
,
'color'
=>
'黄'
,
'size'
=>
'43'
,
'price'
=>
'699.00'
,
'count'
=>
'2'
),
array
(
'id'
=>
1
,
'thumb'
=>
'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
,
'name'
=>
'B.Duck浴室玩伴mini浮水鸭'
,
'gift'
=>
true
,
'color'
=>
'黄'
,
'size'
=>
'43'
,
'price'
=>
'0.00'
,
'count'
=>
'1'
)
),
'sumPrice'
=>
799
,
'salePrice'
=>
80
,
'freight'
=>
5
,
'coupon'
=>
0
,
'yohoCoin'
=>
5
,
'price'
=>
719
);
$this
->
_view
->
display
(
'order-detail'
,
array
(
'orderDetail'
=>
$data
,
'orderDetailPage'
=>
true
));
}
/**
* 帮助列表页
*/
public
function
helpAction
()
{
$this
->
setTitle
(
'帮助中心'
);
$this
->
setNavHeader
(
'帮助中心'
);
$data
=
array
(
'iHelp'
=>
array
(
array
(
'caption'
=>
'新用户注册'
),
)
);
$this
->
_view
->
display
(
'i-help'
,
$data
);
}
/**
* 帮助列表页
*/
public
function
helpDetailAction
()
{
$this
->
setTitle
(
'帮助中心'
);
$this
->
setNavHeader
(
'帮助中心'
);
$data
=
array
(
'iHelp'
=>
array
(
array
(
'name'
=>
'新用户注册'
),
)
);
$this
->
_view
->
display
(
'helpDetail'
,
$data
);
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Home/Help.php
0 → 100644
View file @
66231a8
<?php
namespace
Home
;
use
LibModels\Wap\Home\HelpData
;
use
Plugin\Helpers
;
/**
* 帮助中心相关数据处理
*/
class
HelpModel
{
/*
* 获取帮助中心列表
*/
public
static
function
serviceInfo
()
{
//调用接口获取数据
$res
=
json_decode
(
HelpData
::
serviceInfo
(),
TRUE
);
$cateInfo
=
$res
[
'data'
];
$iHelp
=
array
();
$list
=
array
();
if
(
$cateInfo
)
{
foreach
(
$cateInfo
as
$key
=>
$value
)
{
$iHelp
[
$key
][
'name'
]
=
$value
[
'caption'
];
$iHelp
[
$key
][
'code'
]
=
$value
[
'code'
];
}
}
return
$iHelp
;
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
66231a8
...
...
@@ -449,6 +449,11 @@ class DetailModel
/**
* 获取评价列表
*
* @param int $productId 产品ID
* @param int $pageNum 页码数
* @param int $pageSize 每页显示个数
* @return array
*/
public
static
function
getComments
(
$productId
,
$pageNum
=
1
,
$pageSize
=
300
)
{
...
...
@@ -456,13 +461,13 @@ class DetailModel
if
(
is_numeric
(
$productId
)
&&
is_numeric
(
$pageNum
)
&&
is_numeric
(
$pageSize
))
{
$commentList
=
DetailData
::
commentList
(
$productId
,
$pageNum
,
$pageSize
);
if
(
!
empty
(
$commentList
))
{
if
(
!
empty
(
$commentList
[
'data'
]
))
{
$build
=
array
();
foreach
(
$commentList
as
$value
)
{
$build
[
'userName'
]
=
''
;
$build
[
'desc'
]
=
''
;
$build
[
'content'
]
=
''
;
$build
[
'time'
]
=
''
;
foreach
(
$commentList
[
'data'
]
as
$value
)
{
$build
[
'userName'
]
=
$value
[
'nickname'
];
$build
[
'desc'
]
=
$value
[
'color_name'
]
.
'/'
.
$value
[
'size_name'
];
$build
[
'content'
]
=
$value
[
'content'
];
$build
[
'time'
]
=
$value
[
'create_time'
];
$result
[]
=
$build
;
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
66231a8
...
...
@@ -90,7 +90,7 @@ class DetailController extends AbstractAction
'goodsCommentsPage'
=>
true
,
'pageFooter'
=>
true
,
'comments'
=>
array
(
'list'
=>
\Product\DetailModel
::
getCo
nsul
ts
(
$productId
),
'list'
=>
\Product\DetailModel
::
getCo
mmen
ts
(
$productId
),
),
);
...
...
Please
register
or
login
to post a comment