|
|
|
@ -4,52 +4,13 @@ namespace App\Service\v3\Implementations; |
|
|
|
|
|
|
|
use App\Service\v3\Interfaces\GoodsServiceInterface; |
|
|
|
use Hyperf\DbConnection\Db; |
|
|
|
use App\Model\v3\Goods; |
|
|
|
|
|
|
|
class GoodsService implements GoodsServiceInterface |
|
|
|
{ |
|
|
|
public function detail() |
|
|
|
{ |
|
|
|
/* |
|
|
|
* 返回商品 封面图 |
|
|
|
* * 返回商品 轮播图 |
|
|
|
* 返回商品信息 包括名称 规格 tag等 |
|
|
|
* 返回店铺信息 |
|
|
|
* 返回商品规格信息 |
|
|
|
* 猜你喜欢 |
|
|
|
* 限时抢购 |
|
|
|
* 为你推荐 |
|
|
|
* */ |
|
|
|
// $goods['detail'] = [
|
|
|
|
// "id" => 170,
|
|
|
|
// "market_id" => 2,
|
|
|
|
// "store_id" => 39,
|
|
|
|
// "goods_type_id" => 39,
|
|
|
|
// "on_sale" => 1,
|
|
|
|
// "sort" => 0,
|
|
|
|
// "is_infinite" => 2,
|
|
|
|
// "start_num" => 0,
|
|
|
|
// "restrict_num" => 0,
|
|
|
|
// "inventory" => 1000,
|
|
|
|
// "name" => "冬菜",
|
|
|
|
// "cover_img" => "https => //store.lanzu.vip/attachment/images/2/2020/06/en2nQYncqN4f44qnA7CwnNOG2WqQ2q.jpg",
|
|
|
|
// "price" => "2.50",
|
|
|
|
// "original_price" => "2.50",
|
|
|
|
// "vip_price" => "0.00",
|
|
|
|
// "sales" => 0,
|
|
|
|
// "good_unit" => "",
|
|
|
|
// "tags" => null,
|
|
|
|
// "details_imgs" => null,
|
|
|
|
// "spec" => null,
|
|
|
|
// "content" => "",
|
|
|
|
// "details" => "<p><img src=\"https => //store.lanzu.vip/attachment/images/2/2020/06/J1Z5N818NqCt581LF1V1Tqd88151fV.jpg\" _src=\"https => //store.lanzu.vip/attachment/images/2/2020/06/J1Z5N818NqCt581LF1V1Tqd88151fV.jpg\" alt=\"冬菜.jpg\" style=\"max-width => 100%\"></p><p><br></p>",
|
|
|
|
// "created_at" => null,
|
|
|
|
// "updated_at" => 1598769782,
|
|
|
|
// "deleted_at" => null,
|
|
|
|
// '净含量' => '约500G',
|
|
|
|
// '保存条件' => '常温',
|
|
|
|
// '保质期' => '10天'
|
|
|
|
// ];
|
|
|
|
$goods['detail'] = Db::table('lanzu_goods')->where('id',35)->get(); |
|
|
|
$goods['detail'] = Goods::query()->where('id',35)->get(); |
|
|
|
$goods['banner'] = $this->getBanner(); |
|
|
|
return $goods; |
|
|
|
} |
|
|
|
|