pull/1/head
wangmingchuan321@qq.com 10 months ago
parent 16fe953e25
commit 395510db33
  1. 3
      app/api/controller/Goods.php
  2. 1
      app/api/controller/Order.php
  3. 23
      app/api/service/Goods.php

@ -50,7 +50,7 @@ class Goods extends Controller
*/ */
public function detail(int $goodsId, bool $verifyStatus = true): Json public function detail(int $goodsId, bool $verifyStatus = true): Json
{ {
// 商品详情 // wmc商品详情
$model = new GoodsModel; $model = new GoodsModel;
$goodsInfo = $model->getDetails($goodsId, $verifyStatus); $goodsInfo = $model->getDetails($goodsId, $verifyStatus);
return $this->renderSuccess(['detail' => $goodsInfo]); return $this->renderSuccess(['detail' => $goodsInfo]);
@ -142,7 +142,6 @@ class Goods extends Controller
} }
public function cityInfo(): Json public function cityInfo(): Json
{ {
$service = new GoodsService; $service = new GoodsService;

@ -36,6 +36,7 @@ class Order extends Controller
*/ */
public function list(string $dataType): Json public function list(string $dataType): Json
{ {
echo 12113;die;
$model = new OrderModel; $model = new OrderModel;
$list = $model->getList($dataType); $list = $model->getList($dataType);
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));

@ -181,15 +181,32 @@ class Goods extends GoodsService
public function cityInfo(): array public function cityInfo(): array
{ {
$model = new ShopModel; $model = new ShopModel;
$list = $model->where([ $info = $model->where([
'is_delete' => 0, 'is_delete' => 0,
'status' => 1, 'status' => 1,
'store_id' => $_GET['store_id'], 'store_id' => $_GET['store_id'],
'is_main' => 1, 'is_main' => 1,
])->field('shop_name,star,shop_hours, ])->field('shop_name,star,shop_hours,summary,phone,
province_id,city_id,region_id,shop_id,address,latitude,longitude')->find()->toArray(); province_id,city_id,region_id,shop_id,address,latitude,longitude')->find()->toArray();
return $list; $info['remark'] = ['手机选购', '电脑选购'];
$info['star'] = 5;
$info['fuwu_hours'] = 5;
$info['fuwu_num'] = 15;
$info['star'] = 5;
$info['wechat'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240127/12bb1b1747e652d258443247a5c4777c.png';
$info['history'] = ['time' => '2022-01-01', 'contenmt' => 'yml与2000年成立'];
$info['evaluate'] = [
'image' => 'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png',
'nickname' => 'wmc',
'content' => '很好',
];
$info['imageList'] = [
'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png',
'https://www.saas.njrenzhou.com/uploads/10001/20240116/18adc22ad9ea021ab2586878fe1035b0.png'
];
return $info;
} }
// //抢购会场列表 // //抢购会场列表

Loading…
Cancel
Save