| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\common\controller;
- use Lettered\Support\Auth as IAuth;
- use think\App;
- class SellerController extends BaseController
- {
- /**
- * @var null
- */
- protected $auth = null;
- /**
- * @var mixed|null
- */
- protected $seller = null;
- /**
- * SellerController constructor.
- * @param App|null $app
- * @param IAuth $auth
- * @throws \Lettered\Support\Exceptions\FailedException
- */
- public function __construct(App $app = null,IAuth $auth)
- {
- parent::__construct($app);
- $this->auth = $auth->guard('user');
- // 读取商户
- $this->seller = model('common/Seller')->getBy(['user_id' => $this->auth->user()['id']]);
- }
- }
|