Browse Source

收款工具

shish 6 năm trước cách đây
mục cha
commit
5dca907142
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      app/saas/controllers/UserController.php

+ 4 - 3
app/saas/controllers/UserController.php

@@ -87,16 +87,17 @@ class UserController extends BaseController
 		}
 		$gatheringCode = isset($shop['gatheringCode']) ? $shop['gatheringCode'] : '';
 		$file = dirUtil::getImgDir() . $gatheringCode;
+		$url = Yii::$app->params['mDomain'] . "/#/pages/pay/index?account={$merchantId}&shopId=" . $id;
+		$url = httpUtil::becomeHttps($url);
 		if (empty($gatheringCode) || file_exists($file) == false) {
-			$url = Yii::$app->params['mDomain'] . "/#/pages/pay/index?account={$merchantId}&shopId=" . $id;
 			//强制转成https
-			$url = httpUtil::becomeHttps($url);
 			$gatheringCode = qrCodeUtil::generateGatheringQrCode($url, $merchantId, $id, '', 10);
 			ShopService::updateById($id, ['gatheringCode' => $gatheringCode]);
 		}
 		$imgUrl = Yii::$app->params['imgHost'] . $gatheringCode;
 		echo '<br /><br />收款码<br /><br />';
-		echo "<img width='300' src='{$imgUrl}' />";
+		echo "<img width='300' src='{$imgUrl}' /><br /><br />";
+		echo $url;
 	}
 
 }