|
|
@@ -15,6 +15,8 @@ use yii\web\Controller;
|
|
|
class MerchantController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ public $guestAccessAction = ['detail'];
|
|
|
+
|
|
|
//运费设置 shish 2019.12.8
|
|
|
public function actionFreightSetting()
|
|
|
{
|
|
|
@@ -100,50 +102,50 @@ class MerchantController extends BaseController
|
|
|
util::success(['ids' => $ids]);
|
|
|
}
|
|
|
|
|
|
- //商家信息 shish 2020.1.11
|
|
|
- public function actionIntroduceShop()
|
|
|
- {
|
|
|
- $id = Yii::$app->request->get('id');
|
|
|
- $merchant = MerchantService::getMerchantById($id);
|
|
|
- if (empty($merchant)) {
|
|
|
- util::fail('没有找到介绍人');
|
|
|
- }
|
|
|
- $merchantName = isset($merchant['merchantName']) ? $merchant['merchantName'] : '';
|
|
|
- $smallLogoUrl = isset($merchant['smallLogoUrl']) ? $merchant['smallLogoUrl'] : '';
|
|
|
- $logoUrl = isset($merchant['logoUrl']) ? $merchant['logoUrl'] : '';
|
|
|
- $data = ['merchantName' => $merchantName, 'smallLogoUrl' => $smallLogoUrl, 'id' => $id, 'logoUrl' => $logoUrl, 'fullAddress' => '暂无'];
|
|
|
- util::success($data);
|
|
|
- }
|
|
|
-
|
|
|
- //当前用户获取门店信息
|
|
|
- public function actionGetShopInfo()
|
|
|
- {
|
|
|
- $merchant = $this->sj;
|
|
|
- $merchant['defaultShop'] = ShopService::getDefaultShopInfo($merchant);
|
|
|
- util::success($merchant);
|
|
|
- }
|
|
|
-
|
|
|
- //当前用户获取商家信息
|
|
|
- public function actionGetInfo()
|
|
|
- {
|
|
|
- $merchant = MerchantService::getInfo($this->sj, $this->sjExtend);
|
|
|
- util::success($merchant);
|
|
|
- }
|
|
|
-
|
|
|
- //客户的会员等级 shish 2020.1.2
|
|
|
- public function actionUserGrade()
|
|
|
- {
|
|
|
- $list = MerchantExtendService::getGradeList($this->sjExtend, '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]);
|
|
|
- }
|
|
|
+ //商家信息 shish 2020.1.11
|
|
|
+ public function actionIntroduceShop()
|
|
|
+ {
|
|
|
+ $id = Yii::$app->request->get('id');
|
|
|
+ $merchant = MerchantService::getMerchantById($id);
|
|
|
+ if (empty($merchant)) {
|
|
|
+ util::fail('没有找到介绍人');
|
|
|
+ }
|
|
|
+ $merchantName = isset($merchant['merchantName']) ? $merchant['merchantName'] : '';
|
|
|
+ $smallLogoUrl = isset($merchant['smallLogoUrl']) ? $merchant['smallLogoUrl'] : '';
|
|
|
+ $logoUrl = isset($merchant['logoUrl']) ? $merchant['logoUrl'] : '';
|
|
|
+ $data = ['merchantName' => $merchantName, 'smallLogoUrl' => $smallLogoUrl, 'id' => $id, 'logoUrl' => $logoUrl, 'fullAddress' => '暂无'];
|
|
|
+ util::success($data);
|
|
|
+ }
|
|
|
+
|
|
|
+ //当前用户获取门店信息
|
|
|
+ public function actionGetShopInfo()
|
|
|
+ {
|
|
|
+ $merchant = $this->sj;
|
|
|
+ $merchant['defaultShop'] = ShopService::getDefaultShopInfo($merchant);
|
|
|
+ util::success($merchant);
|
|
|
+ }
|
|
|
+
|
|
|
+ //当前用户获取商家信息
|
|
|
+ public function actionGetInfo()
|
|
|
+ {
|
|
|
+ $merchant = MerchantService::getInfo($this->sj, $this->sjExtend);
|
|
|
+ util::success($merchant);
|
|
|
+ }
|
|
|
+
|
|
|
+ //客户的会员等级 shish 2020.1.2
|
|
|
+ public function actionUserGrade()
|
|
|
+ {
|
|
|
+ $list = MerchantExtendService::getGradeList($this->sjExtend, '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]);
|
|
|
+ }
|
|
|
|
|
|
}
|