diff --git a/app/data/controller/UserTransfer.php b/app/data/controller/UserTransfer.php index aec3ad392..3f279133b 100644 --- a/app/data/controller/UserTransfer.php +++ b/app/data/controller/UserTransfer.php @@ -3,7 +3,7 @@ namespace app\data\controller; use app\data\service\UserService; -use app\data\service\UserUpgradeService; +use app\data\service\UserTransferService; use think\admin\Controller; use think\admin\extend\CodeExtend; use think\admin\service\AdminService; @@ -21,14 +21,6 @@ class UserTransfer extends Controller */ private $table = 'DataUserTransfer'; - protected $types = [ - 'wechat_user' => '转账到我的微信零钱', - 'wechat_qrcode' => '线下转账微信收款码', - 'alipay_qrcode' => '线下转账支付宝收款码', - 'alipay_account' => '线下到账到支付宝账户', - 'bank_offline' => '线下转账到银行卡账户', - ]; - /** * 提现配置配置 * @throws \think\db\exception\DataNotFoundException @@ -39,6 +31,7 @@ class UserTransfer extends Controller { $this->skey = 'TransferRule'; $this->title = '提现规则配置'; + $this->types = UserTransferService::instance()->types(); $this->_sysdata(); } diff --git a/app/data/service/UserTransferService.php b/app/data/service/UserTransferService.php new file mode 100644 index 000000000..0861062cd --- /dev/null +++ b/app/data/service/UserTransferService.php @@ -0,0 +1,44 @@ + '转账到我的微信零钱', + 'wechat_qrcode' => '线下微信收款码转账', + 'alipay_qrcode' => '线下支付宝收款码转账', + 'alipay_account' => '线下转账到支付宝账户', + 'transfer_banks' => '线下转账到银行卡账户', + ]; + + /** + * 获取转账类型 + * @return array + */ + public function types(): array + { + return $this->types; + } + + /** + * 获取提现配置 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function config(): array + { + return sysdata('TransferRule'); + } + +} \ No newline at end of file diff --git a/app/data/view/user_transfer/config.html b/app/data/view/user_transfer/config.html index ad256ebf2..824d1afb7 100644 --- a/app/data/view/user_transfer/config.html +++ b/app/data/view/user_transfer/config.html @@ -1,10 +1,21 @@ + +