|
|
@@ -4,6 +4,7 @@ namespace saas\controllers;
|
|
|
|
|
|
use biz\merchant\classes\MerchantExtendClass;
|
|
|
use biz\merchant\services\MerchantAssetService;
|
|
|
+use biz\merchant\services\ShopService;
|
|
|
use biz\retail\services\RetailAssetService;
|
|
|
use biz\user\services\UserService;
|
|
|
use common\components\util;
|
|
|
@@ -62,8 +63,13 @@ class UserController extends BaseController
|
|
|
public function actionApplyCode()
|
|
|
{
|
|
|
$id = Yii::$app->request->get('id');
|
|
|
- $url = MerchantExtendClass::getApplyMemberCode($id);
|
|
|
+ $shop = ShopService::getById($id);
|
|
|
+ $merchantId = isset($shop['merchantId']) ? $shop['merchantId'] : 0;
|
|
|
+ if (empty($merchantId)) {
|
|
|
+ util::fail('没有找到商家');
|
|
|
+ }
|
|
|
+ $url = MerchantExtendClass::getApplyMemberCode($merchantId);
|
|
|
echo "<img src='{$url}' />";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|