读取可用商户

pull/1/head
limu 10 months ago
parent c1ed784f48
commit 64cea60eb3
  1. 8
      app/api/controller/Store.php
  2. 6
      app/api/service/Store.php

@ -65,11 +65,17 @@ class Store extends Controller
return $this->renderSuccess(config('store.store_type'));
}
public function joinData():Json
public function joinData(): Json
{
// 当前用户信息
$userInfo = UserService::getCurrentLoginUser(true);
$service = new StoreService;
return $this->renderSuccess($service->joinData($userInfo->user_id));
}
public function getStore(): Json
{
$service = new StoreService;
return $this->renderSuccess($service->getStore());
}
}

@ -184,4 +184,10 @@ class Store extends BaseService
];
}
public function getStore()
{
$storeList = Db::query('select store_id,store_name from yoshop_store where status = 1 and is_recycle = 0 and is_delete= 0');
return $storeList;
}
}
Loading…
Cancel
Save