Browse Source

介绍人

shish 6 years ago
parent
commit
dcff56a388

+ 0 - 4
app/shop/controllers/ApplyController.php

@@ -58,10 +58,6 @@ class ApplyController extends BaseController
 		$get['long'] = isset($get['longitude']) ? $get['longitude'] : '';
 		$get['lat'] = isset($get['latitude']) ? $get['latitude'] : '';
 		$introMerchantId = isset($get['introMerchantId']) && !empty($get['introMerchantId']) ? $get['introMerchantId'] : 0;
-		if (getenv('YII_ENV') == 'test') {
-			$introMerchantId = 12358;
-			$get['introMerchantId'] = $introMerchantId;
-		}
 		if (empty($introMerchantId)) {
 			util::fail('目前仅开放邀请注册');
 		}

+ 15 - 0
app/shop/controllers/MerchantController.php

@@ -97,4 +97,19 @@ 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);
+	}
+
 }