GithubHelp home page GithubHelp logo

admin_iview_scaffold's Introduction

##Vue + Iview + lumen Admin 脚手架

###先上图 演示地址 http://121.40.203.96/ admin / admin123 ###简介 此项目是一个后台开发脚手架,项目功能从后端分层 前端分层做了规划,实现管理员,角色,菜单,权限基础的功能

后续开发人员只需要不断在在基础上堆业务代码即可

另外我的另外一个项目是前台API脚手架, 主要会涵盖,直接调用即可用,可以和业务功能解耦

  • 支付
  •   三方登录
    
  •   推送
    
  •   邮件/短信
    
  •   队列
    
  •   定时任务
    
  •   分库
    
  •   日志监控
    
  •   swoole
    

###使用的框架

  • php lumen
  • vue2.0+
  • iview 前端css组件库

###安装

  • git clone

  • composer install

###配置后端Api

nginx:

 server {
    listen       8081;
    server_name  localhost;
    root /data/www/admin_iview_scaffold/public;
    index  index.php index.html;
    location / { 
        try_files $uri $uri/ /index.php?$args; 
    } 

  
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9001;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
        include        fastcgi_params;
    }
}

###运行前端

  • npm install

  • npm run dev

###解决跨域 1 nginx 反向代理

server {
  listen 80;
  server_name 127.0.0.1;

  set $web_root 前端build的目录/dist;

  location / {
    root   $web_root;
    index index.html;
    try_files $uri $uri/ /index_prod.html =404;
  }

  location /api {
    rewrite ^/api/(.*) /$1 break;
    proxy_pass http://127.0.0.1:82;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

}

2 临时开发解决  public/index.php 更改为前端地址 比如http://localhost:88
	header('Access-Control-Allow-Origin: http://localhost:88');
	header('Access-Control-Allow-Credentials: true');
	header('Access-Control-Allow-Methods:POST,GET,OPTIONS');
	header('Access-Control-Allow-Headers:x-requested-with, content-type');
	
	if (strtolower($_SERVER['REQUEST_METHOD']) == 'options') {
	    exit;
	}

###加群讨论 961413356

admin_iview_scaffold's People

Contributors

fengshuang110 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.