|
|
@@ -20,10 +20,71 @@ use App\Models\Config;
|
|
|
use App\Models\PaymentOrder;
|
|
|
use App\Models\Order;
|
|
|
use App\Models\LhcOrder;
|
|
|
+use App\Models\Bank;
|
|
|
+use App\Models\Address;
|
|
|
+use App\Services\Payment\QianBaoService;
|
|
|
|
|
|
class Wallet extends Controller
|
|
|
{
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取提现通道
|
|
|
+ */
|
|
|
+ public function withdrawChannel()
|
|
|
+ {
|
|
|
+ $list = QianBaoService::withdrawChannel();
|
|
|
+ $data[] = ['label' => 'USDT', 'value' => 'USDT'];
|
|
|
+ foreach ($list as $key => $item) {
|
|
|
+ $data[] = ['label' => $item, 'value' => $key];
|
|
|
+ }
|
|
|
+ return $this->success($data);
|
|
|
+ }
|
|
|
+
|
|
|
+ //银行卡/支付宝列表
|
|
|
+ public function bankList()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $params = request()->validate([
|
|
|
+ 'channel' => 'nullable',
|
|
|
+ 'member_id' => 'nullable',
|
|
|
+ ]);
|
|
|
+ $where = [];
|
|
|
+ if (!empty($params['channel'])) {
|
|
|
+ $where[] = ['channel', '=', $params['channel']];
|
|
|
+ }
|
|
|
+ if (!empty($params['member_id'])) {
|
|
|
+ $where[] = ['member_id', '=', $params['member_id']];
|
|
|
+ }
|
|
|
+ $list = Bank::where($where)->get()->toArray();
|
|
|
+
|
|
|
+ return $this->success([
|
|
|
+ 'list' => $list,
|
|
|
+ ]);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ return $this->error($e->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //地址列表
|
|
|
+ public function address()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $params = request()->validate([
|
|
|
+ 'member_id' => 'nullable',
|
|
|
+ ]);
|
|
|
+ $where = [];
|
|
|
+ if (!empty($params['member_id'])) {
|
|
|
+ $where[] = ['member_id', '=', $params['member_id']];
|
|
|
+ }
|
|
|
+ $list = Address::where($where)->get()->toArray();
|
|
|
+
|
|
|
+ return $this->success([
|
|
|
+ 'list' => $list,
|
|
|
+ ]);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ return $this->error($e->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
public function getChangeTypes()
|
|
|
{
|