# 升级指导 # 升级指导 **环境要求php7.1+** **升级前请注意备份站点和数据库!!!** 建议备份目录 ``` <pre class="calibre14">``` backup<span class="token1">/</span> public<span class="token1">/</span>uploads<span class="token1">/</span> ``` ``` 1. 修改微信服务授权地址: `/api/wechat/serve` 2. 公众号菜单商城首页地址去掉wap,直接填写网址即可,例如:原来http://www.abc.com/wap 改为 <http://www.abc.com> 3. 支付授权目录原来多个,改为:<http://www.abc.com> 即可 4. 修改nginx或 mysql 项目根目录为`项目目录/public/` 5. 升级 PHP至 `7.1+` 6. 修改公众号微信支付目录为网站域名 例如网站域名为`http://www.crmeb.com`则修改为`www.crmeb.com/` 7. 在数据库中执行数据库更新文件`update.sql` 8. 复制根目录`.example.env`另存为`.env`,重新配置数据库连接信息 ``` <pre class="calibre14">``` APP_DEBUG <span class="token1">=</span> <span class="token">true</span> <span class="token2">[</span>APP<span class="token2">]</span> DEFAULT_TIMEZONE <span class="token1">=</span> Asia<span class="token1">/</span>Shanghai <span class="token2">[</span>DATABASE<span class="token2">]</span> TYPE <span class="token1">=</span> mysql HOSTNAME <span class="token1">=</span> <span class="token">127.0</span><span class="token">.0</span><span class="token">.1</span> #数据库连接地址 DATABASE <span class="token1">=</span> test #数据库名称 USERNAME <span class="token1">=</span> username #数据库登录账号 PASSWORD <span class="token1">=</span> password #数据库登录密码 HOSTPORT <span class="token1">=</span> <span class="token">3306</span> #数据库端口 CHARSET <span class="token1">=</span> utf8 DEBUG <span class="token1">=</span> <span class="token">true</span> <span class="token2">[</span>LANG<span class="token2">]</span> default_lang <span class="token1">=</span> zh<span class="token1">-</span>cn ``` ``` 8. 开启服务器 `20002`,`20003`端口, 用于长连接服务.如果是云服务器需要在安全组中开启端口 9. h5端 调试``` <pre class="calibre14">``` npm run serve ``` ``` 打包``` <pre class="calibre14">``` npm run build ``` ``` 配置 `.env.production` 文件``` <pre class="calibre24">``` VUE_APP_API_URL<span class="token1">=</span> #接口地址<span class="token2">,</span>例如 http<span class="token2">:</span><span class="token1">/</span><span class="token1">/</span>www<span class="token2">.</span>abc<span class="token2">.</span>com<span class="token1">/</span>api VUE_APP_WS_URL<span class="token1">=</span> #长连接服务地址<span class="token2">,</span>例如 ws<span class="token2">:</span><span class="token1">/</span><span class="token1">/</span>www<span class="token2">.</span>abc<span class="token2">.</span>com<span class="token2">:</span><span class="token">20003</span> ``` ``` 打包好的页面文件,上传至public目录下 10、组合数据需要重新配置,例如:个人中心菜单,首页导航链接