这是indexloc提供的服务,不要输入任何密码
Skip to content

Vfuryx/BFERP

Repository files navigation

ERP

运行环境

  • Nginx 1.8+
  • PHP 7.0+
  • Mysql 5.7+
  • Redis 3.0+

开发环境部署/安装

本项目代码使用 PHP 框架 Laravel 5.5 开发,本地开发环境使用 Laravel Homestead。

下文将在假定已经安装好了 Homestead 的情况下进行说明。如果您还未安装 Homestead,可以参照 Homestead 安装与设置 进行安装配置。

composer 扩展包说明

扩展包 描述 场景
dingo/api api开发包
tymon/jwt-auth jwt认证 用户登录授权策略
barryvdh/laravel-debugbar 页面调试工具栏 (对 phpdebugbar 的封装) 开发环境中的 DEBUG
viacreative/sudo-su 用户切换 开发环境中快速切换登录账号
gregwar/captcha 图片验证码 api开发专用图片验证码
  • liyu/dingo-serializer-switch: 单一资源输出去掉data包裹, 在路由中添加 'middleware' => ['serializer:array', 'bindings']中间件: api输出结构:
{
    "id": 1,
    "markcode": "CANCELORDER",
    "markname": "取消订单",
    "color": "#555555",
    "description": "描述",
    "status": false,
    "created_at": "2018-06-11 15:04:17",
    "updated_at": "2018-06-11 15:04:17"
}

原来的结构:

{
    "data": [
        {
            "id": 1,
            "markcode": "CANCELORDER",
            "markname": "取消订单",
            "color": "#555555",
            "description": "描述",
            "status": false,
            "created_at": "2018-06-11 15:04:17",
            "updated_at": "2018-06-11 15:04:17"
        }
    ]
}

API说明


  • 调用说明:除了登录、注册以外,其他所有调用都必须在header中附带Authorization头 Authorization:bearer eyJ0eXA...
  • 生成接口文档命令:

php artisan api:docs --name API文档 --output-file docs/apidocs/apidoc.md

编写规则:https://laravel-china.org/docs/dingo-api/2.0.0/API-Blueprint-Documentation/1454

前端开发说明


路由方面,根据router中的路由配置文件index.js,组件不需要注册,在index.js中添加路由即可动态生成父级及子级路由。

 {
    name: 'CRMCustomer',
    path: '/CRMCustomer',
    component: Layout,
    redirect: '/CRMCustomer/customerManagement',
    meta: {title: 'CRM客户管理', icon: 'cus',requireAuth: true},
    children: [
      {
        path: 'customerMag',
        name: 'CustomerMag',
        component: resolve => void(require(['../views/CRMCustomer/customerMag.vue'], resolve)),
        meta: {title: '客户管理', icon: 'cusMag',requireAuth: true}
      },
      {
        path: 'SMSTemplate',
        name: 'SMSTemplate',
        component: resolve => void(require(['../views/CRMCustomer/SMSTemplate.vue'], resolve)),
        meta: {title: '短信模板', icon: 'ordMsg',requireAuth: true}
      }
    ]
  }
  • 注:children中至少有两个子路由才会展示子级,否则按一个父级路由处理;

About

请只推送至开发分支

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published