Commit c3210db7c5b51458b0f2f4bf4f213f05a641f7db
1 parent
6f8b7daa
Exists in
master
app-ht(v1.8.6 build 9)
1.后台配置文件恢复
Showing
2 changed files
with
26 additions
and
4 deletions
Show diff stats
app-ht/config/main.php
... | ... | @@ -34,9 +34,19 @@ $config = [ |
34 | 34 | 'my'=>[ |
35 | 35 | 'class' => 'app\ht\modules\my\Module', |
36 | 36 | ], |
37 | + 'project' => [ | |
38 | + 'class' => 'app\ht\modules\project\Module', | |
39 | + ], | |
40 | + 'model' => [ | |
41 | + 'class' => 'app\ht\modules\model\Module', | |
42 | + ], | |
37 | 43 | 'home' => [ |
38 | 44 | 'class' => 'app\ht\modules\home\Module', |
39 | 45 | ] |
46 | + , | |
47 | + 'production' => [ | |
48 | + 'class' => 'app\ht\modules\production\Module', | |
49 | + ] | |
40 | 50 | ], |
41 | 51 | 'components' => [ |
42 | 52 | 'user' => [ |
... | ... | @@ -59,8 +69,10 @@ $config = [ |
59 | 69 | 'thousandSeparator' => ' ', |
60 | 70 | 'currencyCode' => 'CNY', |
61 | 71 | ], |
62 | - | |
63 | - | |
72 | + 'urlManager' => [ | |
73 | + 'enablePrettyUrl' => true, | |
74 | + 'showScriptName' => false, | |
75 | + ], | |
64 | 76 | ], |
65 | 77 | 'params' => $params, |
66 | 78 | 'as access' => [ |
... | ... | @@ -81,11 +93,21 @@ $config = [ |
81 | 93 | 'site/ajax-instant', |
82 | 94 | 'site/ajax-wares-tab', |
83 | 95 | 'site/ajax-member-chart', |
96 | + 'my/default/index', // 个人中心登陆即可 | |
97 | + 'my/default/do-update', | |
98 | + 'my/default/password', | |
99 | + 'my/default/do-password', | |
100 | + 'device/index', | |
101 | + 'device/index/index', | |
84 | 102 | 'test/index', |
85 | 103 | ] |
86 | 104 | ], |
87 | 105 | |
88 | - | |
106 | + 'on beforeRequest' => function($event) { | |
107 | + Event::on(BaseActiveRecord::className(), BaseActiveRecord::EVENT_AFTER_INSERT, ['common\components\adminlog\AdminLogs', 'write']); | |
108 | + Event::on(BaseActiveRecord::className(), BaseActiveRecord::EVENT_AFTER_UPDATE, ['common\components\adminlog\AdminLogs', 'write']); | |
109 | + Event::on(BaseActiveRecord::className(), BaseActiveRecord::EVENT_AFTER_DELETE, ['common\components\adminlog\AdminLogs', 'write']); | |
110 | + }, | |
89 | 111 | ]; |
90 | 112 | |
91 | 113 | return $config; | ... | ... |