Commit a9997d64 authored by shajiaiming's avatar shajiaiming

调整逻辑

parent 184b26a4
......@@ -223,15 +223,15 @@ class CoinController extends BaseController
return ['code' => 0, 'data' => []];
}
foreach ($names as $key => $val) {
if(strpos($val, ',') !== false){
if (strpos($val, ',') !== false) {
$val_array = explode(',', $val);
if('USDT' == strtoupper($val_array[0]) && 'BTC' == strtoupper($val_array[1])) {
if ('USDT' == strtoupper($val_array[0]) && 'BTC' == strtoupper($val_array[1])) {
$condition[] = [$val_array[0], 'omni'];
continue;
}
$condition[] = [$val_array[0], $val_array[1]];
} else {
$condition[] = $val;
$condition[] = $val;
}
}
$result = ExchangeBusiness::getApiListForIndex(1, 999, $condition);
......@@ -344,14 +344,16 @@ class CoinController extends BaseController
$request = Yii::$app->request;
$platform = $request->get('platform', '');
$coin_name = $request->get('coinname', '');
$platform_with_hold = CoinPlatformWithHold::getRecord($platform);
if (empty($platform_with_hold)) {
return ['code' => 0, 'data' => null];
}
if (empty($coin_name)) {
$platform_with_hold = CoinPlatformWithHold::getRecord($platform);
$des = Yii::$app->des;
$platform_with_hold['private_key'] = $des->encrypt($platform_with_hold['private_key']);
$platform_with_hold['coins_name'] = '';
return ['code' => 0, 'data' => $platform_with_hold];
}
$platform_with_hold = CoinPlatformWithHold::getRecord($platform);
$coin_info = Coin::find()->select('treaty')->where(['name' => strtoupper($coin_name), 'platform' => $platform])->asArray()->one();
$des = Yii::$app->des;
$platform_with_hold['private_key'] = $des->encrypt($platform_with_hold['private_key']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment