OrderData.php
3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?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.
*/
static function getOrderData($type, $page, $limit, $uid) {
$param['limit'] = $limit;
$param['page'] = $page;
$param['type'] = $type;
$param['uid'] = $uid;
return Yohobuy::jsonPost(Yohobuy::YOHOBUY_ORDER.'orderInfo/getOrderList',$param);
}
/*
* 取消订单
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
static function cancelOrderData($order_code, $uid, $gender, $yh_channel, $method) {
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['method'] = $method;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/*
* 删除订单
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
static function deleteOrderData($order_code, $uid, $gender, $yh_channel, $method) {
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['method'] = $method;
$param['client_secret'] = Sign::getSign($param);
//调用接口删除订单
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/*
* 我的订单-查看物流
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
static function LogisticsData() {
//构建必传参数
$param = Yohobuy::param();
$param['method'] = 'app.express.li';
//$param['gender'] = $gender;
//$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get('http://api.open.yohobuy.com/', $param);
}
/*
* 支付url
* To change this template file, choose Tools | Templates
*/
static function paymentData($gender, $yh_channel, $code) {
//构建必传参数
$param = Yohobuy::param();
$param['content_code'] = $code;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param);
}
/*
* 随便逛逛url
* To change this template file, choose Tools | Templates
*/
static function strollData($gender, $yh_channel, $code) {
//构建必传参数
$param = Yohobuy::param();
$param['content_code'] = $code;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param);
}
}