|
|
@@ -10,6 +10,7 @@ use biz\wx\classes\WxMessageClass;
|
|
|
use bizGhs\custom\classes\CustomClass;
|
|
|
use bizGhs\custom\services\CustomService;
|
|
|
use bizGhs\merchant\classes\WlClass;
|
|
|
+use common\components\qrCodeUtil;
|
|
|
use bizGhs\order\classes\OrderClass;
|
|
|
use bizHd\saas\classes\ApplyClass;
|
|
|
use bizHd\saas\services\ApplyService;
|
|
|
@@ -25,6 +26,32 @@ use Yii;
|
|
|
class CustomController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //获取收款码 ssh 20240530
|
|
|
+ public function actionGetGatheringCode()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $custom = CustomClass::getById($id, true);
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有找到客户');
|
|
|
+ }
|
|
|
+ if ($custom->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的客户哈');
|
|
|
+ }
|
|
|
+ $ghsId = $custom->ghsId ?? 0;
|
|
|
+ $salt = $custom->salt ?? '';
|
|
|
+ //有同个地方要同步修改,关键词 custom_go_ghs_gathering_code
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ $url = "https://mall.huahb.cn/#/admin/ghs/pay?id={$ghsId}&salt={$salt}";
|
|
|
+ } else {
|
|
|
+ $url = "https://mall.huaml.com/#/admin/ghs/pay?id={$ghsId}&salt={$salt}";
|
|
|
+ }
|
|
|
+ $unique = "recharge_to_ghs_" . $id;
|
|
|
+ $imgUrl = qrCodeUtil::generateRechargeQrCode($url, $unique);
|
|
|
+ $imageUrl = imgUtil::groupImg($imgUrl);
|
|
|
+ util::success(['imgUrl' => $imageUrl]);
|
|
|
+ }
|
|
|
+
|
|
|
//供货商给客户充值和结账 ssh 20240309
|
|
|
public function actionRecharge()
|
|
|
{
|