shish пре 6 година
родитељ
комит
e865356c88
2 измењених фајлова са 6 додато и 5 уклоњено
  1. 4 4
      app/shop/controllers/ShopController.php
  2. 2 1
      biz/merchant/classes/ShopClass.php

+ 4 - 4
app/shop/controllers/ShopController.php

@@ -42,7 +42,7 @@ class ShopController extends BaseController
 		ShopService::addShop($data);
 		util::complete();
 	}
-	
+
 	//下载微信和支付宝收款码 shish 2020.2.29
 	public function actionGatheringCode()
 	{
@@ -54,7 +54,7 @@ class ShopController extends BaseController
 		if (file_exists($file) == false) {
 			util::fail('没有找到收款码');
 		}
-		$fileName = "收款码{$id}.jpg";
+		$fileName = "门店({$id})收款码.jpg";
 		$contentType = 'image/jpeg';
 		header("Cache-control: private");
 		header("Content-type: $contentType"); //设置要下载的文件类型
@@ -62,7 +62,7 @@ class ShopController extends BaseController
 		header("Content-Disposition: attachment; filename=" . urldecode($fileName)); //设置要下载文件的文件名
 		readfile($file);
 	}
-	
+
 	//获取小程序的收款码 shish
 	public function actionGatheringMiniCode()
 	{
@@ -120,5 +120,5 @@ class ShopController extends BaseController
 		ShopService::deleteShop($shop);
 		util::complete();
 	}
-
+	
 }

+ 2 - 1
biz/merchant/classes/ShopClass.php

@@ -89,8 +89,9 @@ class ShopClass extends BaseClass
 		$url = Yii::$app->params['mallDomain'] . "/#/pages/pay/index?account={$merchantId}&shopId=" . $shopId;
 		//强制转成https
 		$url = httpUtil::becomeHttps($url);
+		Yii::info('收款链接:' . $url);
 		$gatheringCode = qrCodeUtil::generateGatheringQrCode($url, $merchantId, $shopId, '', 10);
 		return $gatheringCode;
 	}
-	
+
 }