diff --git a/app/data/controller/api/auth/Transfer.php b/app/data/controller/api/auth/Transfer.php new file mode 100644 index 000000000..772bb788a --- /dev/null +++ b/app/data/controller/api/auth/Transfer.php @@ -0,0 +1,50 @@ +_vali([ + 'code.value' => CodeExtend::uniqidDate(20, 'T'), + 'type.require' => '提现方式不能为空!', + 'amount.require' => '提现金额不能为空!', + ]); + + $chargeRate = floatval(UserTransferService::instance()->config('transfer_charge')); + $chargeAmount = $chargeRate * $data['amount']; + } + + public function get() + { + } + + /** + * 获取用户提现配置 + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function config() + { + $data = UserTransferService::instance()->config(); + $this->success('获取用户提现配置', $data); + } +} \ 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 e52af8893..a74471259 100644 --- a/app/data/view/user_transfer/config.html +++ b/app/data/view/user_transfer/config.html @@ -14,14 +14,14 @@
用户提现状态 - Transfer State + Transfer Status
- {php} $data['transfer_state'] = $data['transfer_state'] ?? 0; {/php} + {php} $data['status'] = $data['status'] ?? 0; {/php} {foreach ['关闭用户提现', '开启用户提现'] as $k => $v} - {if $data.transfer_state eq $k} - + {if $data.status eq $k} + {else} - + {/if}{/foreach}
@@ -29,7 +29,7 @@ @@ -50,32 +50,36 @@ {foreach $types as $k => $t} - {php} $key = 'transfer_'.$k.'_state'; {/php} - {if isset($data[$key]) and $data[$key] eq 1} + {php} $key = 'items['.$k.']["state"]'; {/php} + + {if isset($data['items'][$k]['state']) and $data['items'][$k]['state'] eq 1} {else} {/if} - {php} $key = 'transfer_'.$k.'_audit'; {/php} - {if isset($data[$key]) and $data[$key] eq 1} + {php} $key = 'items['.$k.']["audit"]'; {/php} + + {if isset($data['items'][$k]['audit']) and $data['items'][$k]['audit'] eq 1} {else} {/if} + {php} $key = 'items['.$k.'][title]'; {/php} + -