| 12345678910111213141516171819202122232425 |
- <?php
- namespace app\controller\merchant;
- use app\model\hx\HxAgent;
- use support\Request;
- use support\Response;
- class Detail
- {
- public function getStoreData(Request $request): Response
- {
- try {
- $agentId = $request->user['agent_id'];
- if (empty($agentId)) return error("门店信息错误");
- $agent = (new HxAgent)->where('agent_id',$agentId)->field('name,vip_end,appid,account,status')->findOrEmpty();
- if ($agent->isEmpty()) return error("门店信息错误");
- return success('ok',$agent->toArray());
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- }
|