|
|
@@ -119,8 +119,8 @@ class Ledger extends Api
|
|
|
public function frozenTransfer(UserModel $userModel, LedgerWalletModel $ledgerWalletModel)
|
|
|
{
|
|
|
$amount = $this->request->post('amount'); // 茶宝
|
|
|
- $type = $this->request->post('type/d', 0); // type: 0地址 1uid
|
|
|
$account= $this->request->post('account', ''); // 账号
|
|
|
+ $type = (strlen($account) > 11)? 0: 1; // type: 0地址 1uid
|
|
|
if(empty($amount) || empty($account)){
|
|
|
$this->error(__('Parameter error'));
|
|
|
}
|
|
|
@@ -170,8 +170,8 @@ class Ledger extends Api
|
|
|
public function chabaoGift(UserModel $userModel, LedgerWalletModel $ledgerWalletModel)
|
|
|
{
|
|
|
$amount = $this->request->post('amount'); // 茶宝
|
|
|
- $type = $this->request->post('type/d', 0); // type: 0地址 1uid
|
|
|
$account= $this->request->post('account', ''); // 账号
|
|
|
+ $type = (strlen($account) > 11)? 0: 1; // type: 0地址 1uid
|
|
|
if(empty($amount) || empty($account)){
|
|
|
$this->error(__('Parameter error'));
|
|
|
}
|