|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace mall\controllers;
|
|
|
|
|
|
+use bizHd\recharge\classes\RechargeShbClass;
|
|
|
+use bizHd\recharge\classes\RechargeSqClass;
|
|
|
use bizMall\hd\classes\HdClass;
|
|
|
use common\components\imgUtil;
|
|
|
use common\components\util;
|
|
|
@@ -61,7 +63,25 @@ class HdController extends BaseController
|
|
|
$customId = $hd->customId;
|
|
|
$custom = \bizMall\custom\classes\CustomClass::getById($customId, true);
|
|
|
}
|
|
|
- util::success(['hd' => $hd, 'custom' => $custom]);
|
|
|
+
|
|
|
+ // 根据 xhShop 中的 `rechargeWeal`来选择返回快捷充值选项
|
|
|
+ if ($shop->rechargeWeal == 1) {
|
|
|
+ $itemType = 'money'; //送钱
|
|
|
+ $itemList = [];
|
|
|
+ $weal = RechargeSqClass::getAllByCondition(['mainId' => $shop->mainId], 'recharge asc', '*', null, true);
|
|
|
+ if (!empty($weal)) {
|
|
|
+ foreach ($weal as $key => $val) {
|
|
|
+ $recharge = floatval($val->recharge);
|
|
|
+ $give = floatval($val->give);
|
|
|
+ $itemList[] = ['recharge' => $recharge, 'give' => $give];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if ($shop->rechargeWeal == 2) {
|
|
|
+ $itemType = 'hb'; //送红包
|
|
|
+ $itemList = RechargeShbClass::getList('*', ['shopId' => $shop->id]);
|
|
|
+ }
|
|
|
+
|
|
|
+ util::success(['hd' => $hd, 'custom' => $custom, 'itemType' => $itemType, 'itemList' => $itemList]);
|
|
|
}
|
|
|
}
|
|
|
|