request->headers; $platform_id = $header['FZM-PLATFORM-ID'] ?? null; $data = null; if (false == $platform_id) { $msg = '参数错误'; $code = -1; goto doEnd; } $supported_chain_model = CoinSupportedChain::find()->where(['platform_id' => $platform_id])->all(); if (false == $supported_chain_model) { $msg = 'success'; $code = 0; goto doEnd; } $data = []; foreach ($supported_chain_model as $key => &$val) { $data[] = !empty($val->coin) ? $val->coin : ''; } $msg = 'success'; $code = 0; doEnd : return ['code' => $code, 'msg' => $msg, 'data' => $data]; } }