作者 何书鹏

购物车倒叙

@@ -171,6 +171,7 @@ class Cart extends Api @@ -171,6 +171,7 @@ class Cart extends Api
171 $list = $model 171 $list = $model
172 ->with(['goods','sku']) 172 ->with(['goods','sku'])
173 ->where('user_id',$this->auth->id) 173 ->where('user_id',$this->auth->id)
  174 + ->order('createtime desc')
174 ->select(); 175 ->select();
175 foreach ($list as $key => $value){ 176 foreach ($list as $key => $value){
176 $value->getRelation('goods')->visible(['goods_name','goods_id']); 177 $value->getRelation('goods')->visible(['goods_name','goods_id']);