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
yangyang
9 years ago
Commit
3a352c78b25dd5a55981bccc070ae34794f2d55c
1 parent
a72e1a2a
修改了home.php,增加了order控制器。增加了orderdata.php和模型层order.php
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
3 deletions
library/LibModels/Wap/Home/OrderData.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/home/Order.php
library/LibModels/Wap/Home/OrderData.php
0 → 100644
View file @
3a352c7
<?php
namespace
LibModels\Wap\Home
;
use
Api\Yohobuy
;
use
Api\Sign
;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of OrderData
*
* @author Administrator
*/
class
OrderData
{
/*
* 获取订单数据
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
public
function
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
){
$param
=
Yohobuy
::
param
();
$param
[
'gender'
]
=
$gender
;
$param
[
'limit'
]
=
$limit
;
$param
[
'method'
]
=
'app.SpaceOrders.get'
;
$param
[
'page'
]
=
$page
;
$param
[
'type'
]
=
$type
;
$param
[
'uid'
]
=
$uid
;
$param
[
'yh_channel'
]
=
$yh_channel
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
print_r
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
3a352c7
...
...
@@ -2,6 +2,7 @@
use
Action\AbstractAction
;
use
home\GradeModel
;
use
home\OrderModel
;
use
Plugin\Helpers
;
/**
...
...
@@ -259,7 +260,7 @@ class HomeController extends AbstractAction
/**
* 会员等级展示页
*/
*/
public
function
gradeAction
(){
//设置网站seo信息
$this
->
setTitle
(
'会员等级'
);
...
...
@@ -276,7 +277,7 @@ class HomeController extends AbstractAction
}
/*
*会员特权查看页
*/
*/
public
function
preferentialAction
(){
//设置网站seo信息
$this
->
setTitle
(
'会员等级'
);
...
...
@@ -289,5 +290,32 @@ class HomeController extends AbstractAction
$data
[
'pageFooter'
]
=
true
;
$this
->
_view
->
display
(
'privilege'
,
$data
);
}
/*
*我的订单页面
*/
public
function
orderAction
(){
do
{
//判断是不是ajax请求
// if(!$this -> isAjax()){
// break;
// }
//判断参数是否有效
$type
=
$this
->
get
(
'type'
,
1
);
$page
=
$this
->
get
(
'page'
,
1
);
$limit
=
$this
->
get
(
'limit'
,
10
);
$gender
=
Helpers
::
getGenderByCookie
();
$yh_channel
=
$this
->
get
(
'yh_channel'
,
1
);
$uid
=
$this
->
getUid
();
if
(
!
empty
(
$type
)
&&
!
is_numeric
(
$type
)){
break
;
}
//$data = OrderModel::getOrder();
$data
=
OrderModel
::
getOrder
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
//print_r($data);
}
while
(
false
);
//$this -> _view -> display('order',$data);
}
}
...
...
yohobuy/m.yohobuy.com/application/models/home/Order.php
0 → 100644
View file @
3a352c7
<?php
namespace
home
;
use
LibModels\Wap\Home\OrderData
;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Order
*
*/
class
OrderModel
{
/**
* 订单相关数据处理
*/
public
function
getOrder
(
$type
=
1
,
$page
=
1
,
$limit
,
$gender
,
$yh_channel
,
$uid
){
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
return
$data
;
}
}
...
...
Please
register
or
login
to post a comment