|
|
@@ -3,6 +3,7 @@
|
|
|
namespace client\controllers;
|
|
|
|
|
|
use biz\merchant\services\MerchantExtendService;
|
|
|
+use biz\merchant\services\MerchantService;
|
|
|
use biz\merchant\services\ShopService;
|
|
|
use Yii;
|
|
|
use yii\web\Controller;
|
|
|
@@ -18,19 +19,29 @@ class MerchantController extends BaseController
|
|
|
$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]);
|
|
|
+ }
|
|
|
|
|
|
}
|