import{_ as e,p as a,q as n,a1 as s}from"./framework-cf3d8b6f.js";const d={},i=s(`<h1 id="常见问题" tabindex="-1"><a class="header-anchor" href="#常见问题" aria-hidden="true">#</a> 常见问题</h1><h2 id="怎么升级版本" tabindex="-1"><a class="header-anchor" href="#怎么升级版本" aria-hidden="true">#</a> 怎么升级版本？</h2><p>每次升级完最新版本后，请执行更新命令完成SQL语句升级 <code>php bin/hyperf.php mine:update</code></p><h2 id="菜单添加后页面不显示" tabindex="-1"><a class="header-anchor" href="#菜单添加后页面不显示" aria-hidden="true">#</a> 菜单添加后页面不显示</h2><p>一般是以下问题造成的：</p><ul><li>组件路径地址错误，导致页面显示不出来</li><li>菜单代码标识重复，这个要保证全局唯一</li><li>菜单路由地址重复，这个要保证全局唯一</li></ul><h2 id="前端登录提示-未知错误" tabindex="-1"><a class="header-anchor" href="#前端登录提示-未知错误" aria-hidden="true">#</a> 前端登录提示“未知错误”</h2><p>一般是jwt私有密钥未初始化，执行下面两条命令进行初始化：</p><ul><li><code>php bin/hyperf.php mine:jwt-gen --jwtSecret=JWT_SECRET</code></li><li><code>php bin/hyperf.php mine:jwt-gen --jwtSecret=JWT_API_SECRET</code></li></ul><h2 id="上传图片前端不显示" tabindex="-1"><a class="header-anchor" href="#上传图片前端不显示" aria-hidden="true">#</a> 上传图片前端不显示</h2><p>打开前端 <code>config/upload.js</code>，根据自己情况配置地址</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token comment">// 文件存储URL地址</span>
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  <span class="token literal-property property">storage</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token constant">LOCAL</span><span class="token operator">:</span> <span class="token string">&#39;http://127.0.0.1:9501&#39;</span><span class="token punctuation">,</span>
    <span class="token constant">OSS</span><span class="token operator">:</span> <span class="token string">&#39;&#39;</span><span class="token punctuation">,</span>
    <span class="token constant">COS</span><span class="token operator">:</span> <span class="token string">&#39;&#39;</span><span class="token punctuation">,</span>
    <span class="token constant">QINIU</span><span class="token operator">:</span> <span class="token string">&#39;&#39;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="提示-队列相关功能未开启" tabindex="-1"><a class="header-anchor" href="#提示-队列相关功能未开启" aria-hidden="true">#</a> 提示“队列相关功能未开启”</h2><p>打开 <code>App\\System\\Queue\\Consumer\\MessageConsumer.php</code> 搜索文件 把 <code>//#[Consumer...]</code> 前面的 <code>//</code> 去掉</p><p>打开 <code>App\\System\\Queue\\Producer\\MessageProducer.php</code> 搜索文件 把 <code>//#[Producer...]</code> 前面的 <code>//</code> 去掉</p><h2 id="登录后台白屏没有任何跳转" tabindex="-1"><a class="header-anchor" href="#登录后台白屏没有任何跳转" aria-hidden="true">#</a> 登录后台白屏没有任何跳转</h2><p>有以下几种可能，请逐一排查</p><ul><li><code>数据库</code> 或者 <code>redis</code> 没有正确配置</li><li>没有 <code>真正</code>的完成安装项目，需要再次运行 <code>php bin/hyperf mine:install</code> 命令</li><li>检查 <code>.env</code>文件的 <code>SUPER_ADMIN</code>的值是否与用户表的超管ID一致</li><li>检查用户是否绑定了 <code>角色</code>，同时角色是否至少绑定了一个 <code>菜单</code></li><li>清除 <code>Redis</code>缓存</li></ul><h2 id="系统监控-卡死" tabindex="-1"><a class="header-anchor" href="#系统监控-卡死" aria-hidden="true">#</a> [系统监控]卡死</h2><p>请使用 <code>root</code>账户来启动项目。</p><h2 id="为何出现-您访问的资源不存在" tabindex="-1"><a class="header-anchor" href="#为何出现-您访问的资源不存在" aria-hidden="true">#</a> 为何出现“您访问的资源不存在”</h2><ul><li>确认是否配置了此菜单</li><li>确认后端路由定义是否存在，并检查是否需要参数</li><li>确认服务器是否重启</li><li>确认是否删除 <code>runtime/container</code> 目录</li></ul><h2 id="超级管理员怎么设置" tabindex="-1"><a class="header-anchor" href="#超级管理员怎么设置" aria-hidden="true">#</a> 超级管理员怎么设置</h2><p>超级管理员，也就是创始人，必须在 <code>.env</code>中的 <code>SUPER_ADMIN</code>定义</p><h2 id="docker里连不上数据库、redis" tabindex="-1"><a class="header-anchor" href="#docker里连不上数据库、redis" aria-hidden="true">#</a> docker里连不上数据库、Redis</h2><p>这种情况一般是 <code>数据库</code>和 <code>redis</code>安装在 <code>本地（宿主机）</code></p><p>可使用以下命令查看本机ID地址</p><ul><li>Windows: <code>ipconfig</code></li><li>Linux: <code>ip addr</code> or <code>ifconfig</code></li><li>Mac: <code>ifconfig</code></li></ul><p>然后以局域网地址连接</p><p>或者使用Docker的专用地址：<code>host.docker.internal</code></p><h2 id="前端是否需要部署在docker里面" tabindex="-1"><a class="header-anchor" href="#前端是否需要部署在docker里面" aria-hidden="true">#</a> 前端是否需要部署在docker里面？</h2><p>不需要</p><h2 id="安装的sql文件在哪里" tabindex="-1"><a class="header-anchor" href="#安装的sql文件在哪里" aria-hidden="true">#</a> 安装的SQL文件在哪里？</h2><p><code>MineAdmin</code>没有使用传统SQL文件安装，而是使用了数据迁移工具进行建表和数据填充工作</p><p>相关的文件在每个模块下的 <code>Database</code>里</p><h2 id="前端一些页面不想缓存怎么操作" tabindex="-1"><a class="header-anchor" href="#前端一些页面不想缓存怎么操作" aria-hidden="true">#</a> 前端一些页面不想缓存怎么操作</h2><p>目前生成的vue页面里都有两个 <code>script</code>标签，只需要删掉 <code>export default { name: &#39;xxx&#39; }</code> 这行标签的代码即可不缓存</p><h2 id="如何开启jwt多点登录" tabindex="-1"><a class="header-anchor" href="#如何开启jwt多点登录" aria-hidden="true">#</a> 如何开启JWT多点登录</h2><p>在后端 <code>config/autoload/jwt.php</code> 里找到下面这行，把 <code>sso</code> 改为 <code>mpop</code> 即可</p><div class="language-php line-numbers-mode" data-ext="php"><pre class="language-php"><code><span class="token string single-quoted-string">&#39;login_type&#39;</span> <span class="token operator">=&gt;</span> <span class="token function">env</span><span class="token punctuation">(</span><span class="token string single-quoted-string">&#39;JWT_LOGIN_TYPE&#39;</span><span class="token punctuation">,</span> <span class="token string single-quoted-string">&#39;sso&#39;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token comment">//  登录方式，sso为单点登录，mpop为多点登录</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="定时任务怎么不执行" tabindex="-1"><a class="header-anchor" href="#定时任务怎么不执行" aria-hidden="true">#</a> 定时任务怎么不执行</h2><p>一般发生在类任务，默认的 <code>定时清理日志任务</code> 由于在安装数据时 <code>\\</code> 被转义了，在后台看到的就是：</p><ul><li>AppSystemCrontabClearLogCrontab</li></ul><p>而实际上应该是带有命名空间含义的类地址，带上斜杠后，系统就能找到这个类了。</p><ul><li>\\App\\System\\Crontab\\ClearLogCrontab</li></ul><h2 id="提示-ssl-verify-failed" tabindex="-1"><a class="header-anchor" href="#提示-ssl-verify-failed" aria-hidden="true">#</a> 提示 SSL verify failed</h2><p>一般多发生于宝塔用户</p><h4 id="首先更新-libopenssl" tabindex="-1"><a class="header-anchor" href="#首先更新-libopenssl" aria-hidden="true">#</a> 首先更新 libopenssl</h4><ul><li><strong>ubuntu/debian</strong></li></ul><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> libcurl4-openssl-dev
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li><strong>centos/redhat</strong></li></ul><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code><span class="token function">sudo</span> yum <span class="token function">install</span> libcurl-devel
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li><strong>alpine</strong></li></ul><div class="language-bash line-numbers-mode" data-ext="sh"><pre class="language-bash"><code>apk <span class="token function">add</span> curl-dev
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h4 id="最后重新编译安装-swoole-即可" tabindex="-1"><a class="header-anchor" href="#最后重新编译安装-swoole-即可" aria-hidden="true">#</a> 最后重新编译安装 Swoole 即可</h4><h2 id="插件安装需知" tabindex="-1"><a class="header-anchor" href="#插件安装需知" aria-hidden="true">#</a> 插件安装需知</h2><p>安装插件后请手动重启服务</p><h4 id="前端不生效-无页面" tabindex="-1"><a class="header-anchor" href="#前端不生效-无页面" aria-hidden="true">#</a> 前端不生效 无页面</h4><p>检查 插件配置文件，路径：(/config/autoload/mine-extension.php) 中</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>/*
     * The root directory where the front-end code resides.
     *
     * 前端代码所在根目录.
     */
    &#39;front_directory&#39; =&gt; &#39;./web/&#39;,
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>配置是否正确 是否为当前运行前端目录</p><h2 id="数据迁移、填充和更新的执行顺序是什么" tabindex="-1"><a class="header-anchor" href="#数据迁移、填充和更新的执行顺序是什么" aria-hidden="true">#</a> 数据迁移、填充和更新的执行顺序是什么</h2><p>迁移 -&gt; 填充 -&gt; 更新。首先进行数据结构的迁移，然后填充初始数据，最后执行更新操作。</p><h2 id="数据库填充文件是否只在安装时执行一次" tabindex="-1"><a class="header-anchor" href="#数据库填充文件是否只在安装时执行一次" aria-hidden="true">#</a> 数据库填充文件是否只在安装时执行一次</h2><p>是的，数据库填充文件只在安装时执行一次。系统的迁移机制会检测并记录所有已执行的操作，防止重复执行</p><h2 id="安装所有模块后-如何执行特定操作" tabindex="-1"><a class="header-anchor" href="#安装所有模块后-如何执行特定操作" aria-hidden="true">#</a> 安装所有模块后，如何执行特定操作</h2><p>目前没有直接的方式来在所有模块安装完毕后执行特定操作。原始设计考虑到的是内部开发使用，但插件系统可能支持这种功能。\\</p><h2 id="数据权限中的-本部门及以下数据权限-与-本部门及以下数据权限-数据表部门-id-有何区别" tabindex="-1"><a class="header-anchor" href="#数据权限中的-本部门及以下数据权限-与-本部门及以下数据权限-数据表部门-id-有何区别" aria-hidden="true">#</a> 数据权限中的&#39;本部门及以下数据权限&#39;与&#39;本部门及以下数据权限(数据表部门 ID)&#39;有何区别？</h2><p>&#39;本部门及以下数据权限&#39;基于创建者(created_by)实现，而&#39;本部门及以下数据权限(数据表部门 ID)&#39;则基于部门ID(dept_id)。如果人员更换部门，使用dept_id的权限设置将无法访问原部门的数据。</p><h2 id="如果需要使用dept-id-应如何操作" tabindex="-1"><a class="header-anchor" href="#如果需要使用dept-id-应如何操作" aria-hidden="true">#</a> 如果需要使用dept_id，应如何操作？</h2><p>需要在数据表中添加dept_id字段，并手动维护此字段的更新。相对的，created_by字段是在AOP（面向切面编程）环境中自动维护的。可以考虑实现一个AOP来自动维护dept_id字段</p>`,71),o=[i];function r(c,t){return a(),n("div",null,o)}const p=e(d,[["render",r],["__file","index.html.vue"]]);export{p as default};
