|
|
@@ -11,6 +11,8 @@
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
+use App\Services\UsdtWalletService;
|
|
|
+
|
|
|
/**
|
|
|
* 会员-模型
|
|
|
* @author laravel开发员
|
|
|
@@ -55,6 +57,7 @@ class MemberModel extends BaseModel
|
|
|
if (isset($info['birthday'])) {
|
|
|
$info['birthday'] = $info['birthday']? datetime($info['birthday']) : '';
|
|
|
}
|
|
|
+
|
|
|
// 城市
|
|
|
if ($info['province_id'] && $info['city_id'] && $info['district_id']) {
|
|
|
$city = [];
|
|
|
@@ -63,6 +66,16 @@ class MemberModel extends BaseModel
|
|
|
$city[] = $info['district_id'];
|
|
|
$info['city'] = $city;
|
|
|
}
|
|
|
+
|
|
|
+ // 钱包余额
|
|
|
+ $trcNum = UsdtWalletService::make()->getTrxBalance($info['trc_address']);
|
|
|
+ $info['trc_num'] = floatval($trcNum);
|
|
|
+ $trcUsdtNum = UsdtWalletService::make()->getTrc20Usdt($info['trc_address']);
|
|
|
+ $info['trc_usdt_num'] = floatval($trcUsdtNum);
|
|
|
+ $ercNum = UsdtWalletService::make()->getErcBalance($info['erc_hexaddress']);
|
|
|
+ $info['erc_num'] = floatval($ercNum);
|
|
|
+ $ercUsdtNum = UsdtWalletService::make()->getErc20Usdt($info['erc_hexaddress']);
|
|
|
+ $info['erc_usdt_num'] = floatval($ercUsdtNum);
|
|
|
}
|
|
|
return $info;
|
|
|
}
|