File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 *
Original file line number Diff line number Diff 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 => '百度小程序 ' ,
Original file line number Diff line number Diff line change 55use Yii ;
66use yii \base \Model ;
77use common \enums \AppEnum ;
8+ use common \components \Init ;
89
910/**
1011 * trait BaseAction
Original file line number Diff line number Diff 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 *
You can’t perform that action at this time.
0 commit comments