service = $service; } public function goods() { return $this->ok([ "id" => 1, "image_list" => [ Image::imageUrl(), Image::imageUrl(), ], "spec" => [ "id" => 1, "name" => "颜色", "attr" => [ [ "id" => 1, "name" => "红色", ], ], ], "sku" => [ [ "id" => 1, "sn" => "sn", "url_3d" => "", "spec_attr" => [ [ "id" => 1, "name" => "白色", ], [ "id" => 3, "name" => "大号", ], ], ], ], "desc_html" => "

desc_html

", "spec_attr_html" => "

desc_html

", "faq_html" => "

desc_html

", ]); } public function search() { return $this->ok([ "total" => 1, "page_total" => 1, "list" => [ [ "id" => 1, "name" => "商品名称", "thumb" => Image::imageUrl(), ], ], "category" => [ [ "id" => 1, "thumb" => Image::imageUrl(), "name" => "分类名称", ], ], ]); } public function fav() { return $this->ok(); } public function ask() { return $this->ok([ "id" => 1, "thumb" => Image::imageUrl(), "name" => "商品名称", "url" => "http://baidu.com/xxxx", ]); } }