|
@@ -26,6 +26,8 @@ class UserStoreController
|
|
|
{
|
|
|
$user = $request->user();
|
|
|
if (!$user['user_store_id']) return app('json')->fail('非商家身份');
|
|
|
+ $store_info = SystemStore::where('id', $user['user_store_id'])->find();
|
|
|
+ if (!$store_info) return app('json')->fail('门店不存在');
|
|
|
$where['store_id'] = $user['user_store_id'];
|
|
|
$list = StoreBill::where($where)
|
|
|
->field(['title', 'type'])
|
|
@@ -34,7 +36,7 @@ class UserStoreController
|
|
|
->select()
|
|
|
->toArray();
|
|
|
$balance = SystemStore::where('id', $user['user_store_id'])->value('money');
|
|
|
- return app('json')->successful('ok', compact('list', 'balance'));
|
|
|
+ return app('json')->successful('ok', compact('list', 'balance', 'store_info'));
|
|
|
}
|
|
|
|
|
|
/**
|