|
|
@@ -7,6 +7,8 @@ use biz\merchant\services\MerchantAssetService;
|
|
|
use biz\merchant\services\ShopService;
|
|
|
use biz\retail\services\RetailAssetService;
|
|
|
use biz\user\services\UserService;
|
|
|
+use common\components\httpUtil;
|
|
|
+use common\components\qrCodeUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
|
|
|
@@ -72,4 +74,22 @@ class UserController extends BaseController
|
|
|
echo "<img width='300' src='{$url}' />";
|
|
|
}
|
|
|
|
|
|
+ //收款码查看 shish 2020.2.20
|
|
|
+ public function actionGatheringCode()
|
|
|
+ {
|
|
|
+ $id = Yii::$app->request->get('id');
|
|
|
+ $shop = ShopService::getById($id);
|
|
|
+ $merchantId = isset($shop['merchantId']) ? $shop['merchantId'] : 0;
|
|
|
+ if (empty($merchantId)) {
|
|
|
+ util::fail('没有找到商家');
|
|
|
+ }
|
|
|
+ $url = Yii::$app->params['mDomain'] . "/#/pages/pay/index?account={$merchantId}&shopId=" . $id;
|
|
|
+ //强制转成https
|
|
|
+ $url = httpUtil::becomeHttps($url);
|
|
|
+
|
|
|
+ $logo = !empty($this->merchant['logo']) ? $webRoot . $this->merchant['logo'] : '';
|
|
|
+ $gatheringQrcodeUrl = qrCodeUtil::generate($url, $unique, $logo, 10);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|