thinkphp+vue+antpro前后端权限管理系统

6 篇文章 0 订阅

有位网友上传的完整理系统,Thinkphp6.0-Antd-vue前后端权限管理系统

开发环境安装部署如下:

服务端

git clone https://gitee.com/ShiXingXinYa/Thinkphp6.0-Antd-vue.git
composer install

安装php>7.4
安装redis,PHP.INI开启redis
安装mysql,建库,导入/antsign.sql
配置database.php

php think run
跑起在8000端口,可以直接访问,但发布的前端好像有点问题

客户端 antdpro3.02

git clone https://gitee.com/ShiXingXinYa/ant-design-pro-vue-3.0.2.git
yarn install
配置vue.config.js的devproxy

  devServer: {
    // development server port 8000
    port: 8002,
    // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:8000',
        ws: false,
        changeOrigin: true
      }
    }
  },
yarn run serve

服务器发布

测试成功,上传服务器,分别建立静态与动态站点,对API进行NGIX反向代理,apache开启伪静态
在antdpro/src/public中添加.htaccess,以便每次编译都能开启伪静态

<IfModule mod_rewrite.c>
  RewriteEngine On    #重写引擎
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule> 

参见https://editor.csdn.net/md/?articleId=126245219

antdpro3.02升级到3.03

  • main.js
import { TreeSelect, Tree } from 'ant-design-vue' //添加此行,在权限设置中用

// mock
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
// import './mock'           //此行改动,注销MOCK

import bootstrap from './core/bootstrap'
import './core/lazy_use' // use lazy load components
import './permission' // permission control
import './utils/filter' // global filter
import './global.less' // global style

Vue.config.productionTip = false
Vue.use(TreeSelect)  //添加此行
Vue.use(Tree)        //添加此行
  • api/login.js,替换API列表
const userApi = {
  Login: '/auth/login',
  Logout: '/auth/logout',
  ForgePassword: '/auth/forge-password',
  Register: '/auth/register',
  twoStepCode: '/auth/2step-code',
  SendSms: '/account/sms',
  SendSmsErr: '/account/sms_err',
  // get my info
  UserInfo: '/user/info',
  UserMenu: '/user/nav'
}
  • 改src\router\generator-routers.js,增加view页面:
  // 角色管理
  Rules: () => import('@/views/system/rules/index'),
  Roles: () => import('@/views/system/roles/index'),
  // psy
  PsyManager: () => import('@/views/psy/typeManager/index'),
  PsyType: () => import('@/views/psy/typeManager/index'),
 
  QuestionManager: () => import('@/views/psy/questionManager/index'),
  //个人设置
  BaseSettings: () => import('@/views/account/settings/BaseSetting'),
  • 复制文件:
api/psyManager.js,system.js
src\views\account\settings\BaseSetting.vue
src\views\list\modules\QuestionForm.vue    RulesForm.vue
src\views\system\*
src\views\psy\*
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值