退款失败测试
This commit is contained in:
@@ -117,17 +117,12 @@ class FinanceController extends BaseAdminController
|
||||
{
|
||||
$identity = \Yii::$app->user->identity;
|
||||
|
||||
ds(json_encode(\Yii::$app->user));
|
||||
if ($identity != 10) {
|
||||
if ($identity->role != 10) {
|
||||
throw new Exception('权限不足,仅超管有权限退款');
|
||||
}
|
||||
|
||||
// 获取前端传递的POST数据
|
||||
try {
|
||||
$post = \Yii::$app->request->post();
|
||||
} catch (\Exception $e) {
|
||||
throw new Exception('参数错误'. $e->getMessage(). '--'. $e->getLine());
|
||||
}
|
||||
$post = \Yii::$app->request->post();
|
||||
|
||||
// 对必要的字段进行验证
|
||||
$this->requestValidate($post, [
|
||||
|
||||
Reference in New Issue
Block a user