| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace mall\controllers;
- use biz\merchant\services\MerchantExtendService;
- use biz\merchant\services\MerchantService;
- use biz\merchant\services\ShopService;
- use Yii;
- use yii\web\Controller;
- use common\components\util;
- class MerchantController extends BaseController
- {
-
- //当前用户获取门店信息
- public function actionGetShopInfo()
- {
- $merchant = $this->merchant;
- $merchant['defaultShop'] = ShopService::getDefaultShopInfo($merchant);
- util::success($merchant);
- }
-
- //当前用户获取商家信息
- public function actionGetInfo()
- {
- $merchant = MerchantService::getInfo($this->merchant, $this->merchantExtend);
- util::success($merchant);
- }
-
- //客户的会员等级 shish 2020.1.2
- public function actionUserGrade()
- {
- $list = MerchantExtendService::getGradeList($this->merchantExtend, 'asc', false);
- util::success($list);
- }
-
- //获取商家的到期时间 shish 2020.2.22
- public function actionGetDeadline()
- {
- $id = Yii::$app->request->get('merchantId');
- $merchant = MerchantService::getById($id);
- $deadline = $merchant['deadline'];
- util::success(['date' => $deadline]);
- }
-
- }
|