Commit 47e27532 authored by shajiaiming's avatar shajiaiming

添加推荐币种时完全匹配

parent e36e6444
...@@ -71,7 +71,6 @@ class CoinRecommendController extends BaseController ...@@ -71,7 +71,6 @@ class CoinRecommendController extends BaseController
$platform_id = empty($get['platform_id']) ? 1 : $get['platform_id']; $platform_id = empty($get['platform_id']) ? 1 : $get['platform_id'];
$user_platform_id = Yii::$app->user->identity->platform_id; $user_platform_id = Yii::$app->user->identity->platform_id;
#var_dump($platform_id, $user_platform_id);exit;
if (1 != $user_platform_id && $user_platform_id != $platform_id) { if (1 != $user_platform_id && $user_platform_id != $platform_id) {
return ['code' => -1, 'msg' => '没有权限修改']; return ['code' => -1, 'msg' => '没有权限修改'];
} }
......
...@@ -84,7 +84,7 @@ class CoinRecommend extends BaseActiveRecord ...@@ -84,7 +84,7 @@ class CoinRecommend extends BaseActiveRecord
$type = $params['type'] ?? 1; $type = $params['type'] ?? 1;
$chain = $params['chain'] ?? ''; $chain = $params['chain'] ?? '';
$coin = Coin::findOne(['name' => strtoupper($coin_name)]); $coin = Coin::findOne(['name' => strtoupper($coin_name), 'platform' => strtoupper($chain)]);
if (empty($coin)) { if (empty($coin)) {
return ['code' => -1, 'msg' => '币种不存在']; return ['code' => -1, 'msg' => '币种不存在'];
} }
......
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