Skip to content

Commit

Permalink
更新:注入提示
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuchunshu committed Feb 17, 2023
1 parent 7dc1057 commit 1673101
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Plugins/User/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,9 @@
'url' => '/admin/setting/oauth2',
'parent_id' => 5,
]);


Itf()->add('admin-ui-page-body-container-hook', 12, [
'name' => 'user-check-options',
'view' => 'User::.Admin.hook'
]);
13 changes: 13 additions & 0 deletions app/Plugins/User/resources/views/Admin/hook.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@if(
Hyperf\Database\Schema\Schema::getColumnType('users_options', 'money') !== 'integer'
|| Hyperf\Database\Schema\Schema::getColumnType('users_options', 'credits') !== 'integer'
|| Hyperf\Database\Schema\Schema::getColumnType('users_options', 'golds') !== 'integer'
|| Hyperf\Database\Schema\Schema::getColumnType('users_options', 'exp') !== 'integer1'
)
<div class="alert alert-warning">
<h4>警告</h4>
<p>用户信息表中的money,credits,golds,exp字段类型不是整型,可能会导致数据丢失,请及时修改</p>
<p>命令:<code>php CodeFec plugin:userOptionsMigrate</code></p>
<p>如果不会,可以看此文档:<a href="https://www.sforum.cn/use/update/v2.3.8.html">https://www.sforum.cn/use/update/v2.3.8.html</a></p>
</div>
@endif

0 comments on commit 1673101

Please sign in to comment.