You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Service\v3\Implementations;
use App\Service\v3\Interfaces\GoodsServiceInterface;use Hyperf\DbConnection\Db;
class GoodsService implements GoodsServiceInterface{ public function detail() { /* * 返回商品 封面图 * * 返回商品 轮播图 * 返回商品信息 包括名称 规格 tag等 * 返回店铺信息 * 返回商品规格信息 * 猜你喜欢 * 限时抢购 * 为你推荐 * */ $goods['detail'] = Db::table('lanzu_goods')->where('id',170)->get(); $goods['banner'] = $this->getBanner(); $goods['spec'] = $this->getSpec(); return $goods; }
public function getBanner() { $banner = [ [ 'id' => 1, 'type' => 1, 'path' => 'https://img.lanzu.vip/static/img/dic_banners/dic_banner_0.jpg' ], [ 'id' => 2, 'type' => 1, 'path' => 'https://img.lanzu.vip/static/img/dic_banners/dic_banner_1.jpg' ] ]; return $banner; }
public function getSpec() { $spec = [ [ '净含量' => '约500G', '保存条件' => '常温', '保质期' => '10天' ] ]; return $spec; }
public function do() { // TODO: Implement do() method.
}
public function check($goodsId) { // TODO: Implement check() method.
}
public function undo() { // TODO: Implement undo() method.
}}
|