lqmac 5 months ago
parent d24c6da609
commit 1ec0dafde7
  1. 9
      app/api/controller/Goods.php
  2. 14
      app/api/service/Goods.php
  3. 10
      app/store/model/Goods.php

@ -1,13 +1,4 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\api\controller;

@ -218,7 +218,7 @@ class Goods extends GoodsService
return [];
}
$list = $goodsList->toArray();
$list['data'] = $this->newFormatGoodsList($list['data']);
//$list['data'] = $this->newFormatGoodsList($list['data']);
return $list;
}
@ -257,7 +257,7 @@ class Goods extends GoodsService
}
$list = $goodsList->toArray();
$list['data'] = $this->newFormatGoodsList($list['data']);
//$list['data'] = $this->newFormatGoodsList($list['data']);
return $list;
}
@ -278,11 +278,11 @@ class Goods extends GoodsService
'paihang' => 1,
'categoryId' => $v['category_id'],
], 3);
$v['goods_list'] = [];
if (!$goodsList->isEmpty()) {
$list2 = $goodsList->toArray()['data'];
$v['goods_list'] = $this->newFormatGoodsList($list2);
}
$v['goods_list'] = $goodsList->toArray()['data'];
// if (!$goodsList->isEmpty()) {
// $list2 = $goodsList->toArray()['data'];
// $v['goods_list'] = $this->newFormatGoodsList($list2);
// }
}
return $list;

@ -1,13 +1,5 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\store\model;

Loading…
Cancel
Save