Commit 80cf90a6 authored by rlgy's avatar rlgy

update

parent a979ca0f
......@@ -43,7 +43,7 @@ class CoinController extends BaseController
$condition[] = ['recommend' => $recommend];
}
if (Yii::$app->user->identity->group != 'administrator') {
$condition[] = ['group' => Yii::$app->user->identity->group];
$condition[] = ['OR', ['group' => Yii::$app->user->identity->group], ['>', 'recommend', 0]];
}
$data = CoinBusiness::getList($page, $limit, $condition);
$data['code'] = 0;
......@@ -105,6 +105,8 @@ class CoinController extends BaseController
if ($result === true) {
return ['code' => 0, 'msg' => 'succeed'];
}
}else{
return ['code' => -1, 'msg' => '没有权限修改'];
}
}
$coin = Yii::createObject(Coin::className());
......@@ -131,7 +133,6 @@ class CoinController extends BaseController
return $this->render('edit', ['model' => $coin]);
}
}
}
/**
......
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