Skip to content

Commit 75f4779

Browse files
author
jianyan74
committed
修复基础
1 parent 02b6146 commit 75f4779

4 files changed

Lines changed: 2 additions & 43 deletions

File tree

api/controllers/OnAuthController.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,6 @@ public function actions()
3131
return $actions;
3232
}
3333

34-
/**
35-
* 验证更新是否本人
36-
*
37-
* @param $action
38-
* @return bool
39-
* @throws NotFoundHttpException
40-
* @throws \yii\base\InvalidConfigException
41-
* @throws \yii\web\BadRequestHttpException
42-
* @throws \yii\web\ForbiddenHttpException
43-
*/
44-
public function beforeAction($action)
45-
{
46-
if (!parent::beforeAction($action)) {
47-
return false;
48-
}
49-
50-
if ($action == 'update' && Yii::$app->user->identity->member_id != Yii::$app->request->get('id', null)) {
51-
throw new NotFoundHttpException('权限不足.');
52-
}
53-
54-
return true;
55-
}
56-
5734
/**
5835
* 首页
5936
*

common/enums/AccessTokenGroupEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function getMap(): array
3434
self::H5 => 'H5',
3535
self::PC => 'PC',
3636
self::WECHAT => '微信',
37-
self::WECHAT_MQ => '微信小git程序',
37+
self::WECHAT_MQ => '微信小程序',
3838
self::ALI_MQ => '支付宝小程序',
3939
self::QQ_MQ => 'QQ小程序',
4040
self::BAIDU_MQ => '百度小程序',

common/traits/BaseAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Yii;
66
use yii\base\Model;
77
use common\enums\AppEnum;
8+
use common\components\Init;
89

910
/**
1011
* trait BaseAction

oauth2/controllers/OnAuthController.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,6 @@ public function actions()
2929
return $actions;
3030
}
3131

32-
/**
33-
* 验证更新是否本人
34-
*
35-
* @param $action
36-
* @return bool
37-
* @throws NotFoundHttpException
38-
* @throws \yii\base\InvalidConfigException
39-
* @throws \yii\web\BadRequestHttpException
40-
* @throws \yii\web\ForbiddenHttpException
41-
*/
42-
public function beforeAction($action)
43-
{
44-
if ($action == 'update' && Yii::$app->user->identity->client_id != Yii::$app->request->get('id', null)) {
45-
throw new NotFoundHttpException('权限不足.');
46-
}
47-
48-
return parent::beforeAction($action);
49-
}
50-
5132
/**
5233
* 首页
5334
*

0 commit comments

Comments
 (0)