| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace client\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 = $this->merchant;
- 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['setDeadline'];
- $date = date("Y-m-d H:i", $deadline);
- util::success(['date' => $date]);
- }
- }
|