作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

11

@@ -33,8 +33,9 @@ class Order extends Api @@ -33,8 +33,9 @@ class Order extends Api
33 'msg':'返回成功' 33 'msg':'返回成功'
34 }) 34 })
35 */ 35 */
36 - public function index($type) 36 + public function index()
37 { 37 {
  38 + $type = $this->request->get('type');
38 $list = $this->model->getList($this->user['id'], $type); 39 $list = $this->model->getList($this->user['id'], $type);
39 $this->success(__('成功'),compact('list')); 40 $this->success(__('成功'),compact('list'));
40 } 41 }
@@ -53,8 +54,10 @@ class Order extends Api @@ -53,8 +54,10 @@ class Order extends Api
53 'msg':'返回成功' 54 'msg':'返回成功'
54 }) 55 })
55 */ 56 */
56 - public function editAddress($order_id,$user_address_id) 57 + public function editAddress()
57 { 58 {
  59 + $order_id = $this->request->get('order_id',0);
  60 + $user_address_id = $this->request->get('user_address_id',0);
58 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 61 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
59 $this->error($this->model->getError()); 62 $this->error($this->model->getError());
60 } 63 }
@@ -85,8 +88,9 @@ class Order extends Api @@ -85,8 +88,9 @@ class Order extends Api
85 'msg':'返回成功' 88 'msg':'返回成功'
86 }) 89 })
87 */ 90 */
88 - public function detail($order_id) 91 + public function detail()
89 { 92 {
  93 + $order_id = $this->request->get('order_id',0);
90 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 94 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
91 $this->error($this->model->getError()); 95 $this->error($this->model->getError());
92 } 96 }
@@ -106,8 +110,9 @@ class Order extends Api @@ -106,8 +110,9 @@ class Order extends Api
106 'msg':'返回成功' 110 'msg':'返回成功'
107 }) 111 })
108 */ 112 */
109 - public function cancel($order_id) 113 + public function cancel()
110 { 114 {
  115 + $order_id = $this->request->get('order_id',0);
111 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 116 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
112 $this->error($this->model->getError()); 117 $this->error($this->model->getError());
113 } 118 }
@@ -130,8 +135,9 @@ class Order extends Api @@ -130,8 +135,9 @@ class Order extends Api
130 'msg':'返回成功' 135 'msg':'返回成功'
131 }) 136 })
132 */ 137 */
133 - public function pay($order_id) 138 + public function pay()
134 { 139 {
  140 + $order_id = $this->request->get('order_id',0);
135 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 141 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
136 $this->error($this->model->getError()); 142 $this->error($this->model->getError());
137 } 143 }
@@ -167,8 +173,9 @@ class Order extends Api @@ -167,8 +173,9 @@ class Order extends Api
167 'msg':'返回成功' 173 'msg':'返回成功'
168 }) 174 })
169 */ 175 */
170 - public function remind($order_id) 176 + public function remind()
171 { 177 {
  178 + $order_id = $this->request->get('order_id',0);
172 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 179 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
173 $this->error($this->model->getError()); 180 $this->error($this->model->getError());
174 } 181 }
@@ -191,8 +198,9 @@ class Order extends Api @@ -191,8 +198,9 @@ class Order extends Api
191 'msg':'返回成功' 198 'msg':'返回成功'
192 }) 199 })
193 */ 200 */
194 - public function receive($order_id) 201 + public function receive()
195 { 202 {
  203 + $order_id = $this->request->get('order_id',0);
196 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 204 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
197 $this->error($this->model->getError()); 205 $this->error($this->model->getError());
198 } 206 }
@@ -215,8 +223,9 @@ class Order extends Api @@ -215,8 +223,9 @@ class Order extends Api
215 'msg':'返回成功' 223 'msg':'返回成功'
216 }) 224 })
217 */ 225 */
218 - public function refundView($order_id) 226 + public function refundView()
219 { 227 {
  228 + $order_id = $this->request->get('order_id',0);
220 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 229 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
221 $this->error($this->model->getError()); 230 $this->error($this->model->getError());
222 } 231 }
@@ -267,8 +276,9 @@ class Order extends Api @@ -267,8 +276,9 @@ class Order extends Api
267 'msg':'返回成功' 276 'msg':'返回成功'
268 }) 277 })
269 */ 278 */
270 - public function returnGoodsView($order_id) 279 + public function returnGoodsView()
271 { 280 {
  281 + $order_id = $this->request->get('order_id',0);
272 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){ 282 if(!$order = $this->model->getUserOrderDetail($order_id, $this->user['id'])){
273 $this->error($this->model->getError()); 283 $this->error($this->model->getError());
274 } 284 }