Bläddra i källkod

修复手机话费充值记录列表问题前端没有分页后端没有排序

sunxbiao 1 år sedan
förälder
incheckning
88b3af8c85
1 ändrade filer med 10 tillägg och 9 borttagningar
  1. 10 9
      app/controller/api/store/service/Huafei.php

+ 10 - 9
app/controller/api/store/service/Huafei.php

@@ -270,18 +270,19 @@ class Huafei extends BaseController
270 270
 	}
271 271
 
272 272
 	//话费充值记录
273
-	public function record(){
274
-		$uid = $this->request->uid();
275
-		[$page, $limit] = $this->getPage();
276
-		$where = [];
277
-		$where[] = ['uid', '=', $uid];
278
-		$query = Db::name("order_huafei");
273
+    public function record(){
274
+        $uid = $this->request->uid();
275
+        [$page, $limit] = $this->getPage();
276
+        $where = [];
277
+        $where[] = ['uid', '=', $uid];
278
+        $query = Db::name("order_huafei");
279 279
         $count = $query->where($where)->count();
280
-        $list = $query->page($page, $limit)->where($where)->select()->each(function ($item){
280
+        // ->page($page, $limit)
281
+        $list = $query->where($where)->order('order_huafei_id DESC')->select()->each(function ($item){
281 282
             return $item;
282 283
         });
283
-		return app('json')->success('获取话费充值记录成功', ['list'=>$list, 'count'=>$count, 'uid'=>$uid]);
284
-	}
284
+        return app('json')->success('获取话费充值记录成功', ['list'=>$list, 'count'=>$count, 'uid'=>$uid]);
285
+    }
285 286
 
286 287
 
287 288