Coder Social home page Coder Social logo

blackantx / yii2-tech Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itswuanran/yii2-tech

0.0 1.0 0.0 34.43 MB

Yii2使用积累

Home Page: http://tech.anruence.com

License: Other

PHP 61.09% CSS 35.21% Shell 0.81% Batchfile 0.19% JavaScript 2.69%

yii2-tech's Introduction

后台管理系统beta

安装说明:

git clone https://github.com/anruence/yii2-tech.git

cd yii2-tech

composer install --no-dev

数据库迁移

  • 先解压tech.sql.zip文件。
  • tech.sql中保存了sql语句,暂时没写migrate脚本。后续会扩展。
  • 后台 用户名:test 密码:testpass

修改测试环境的common/config/main-local.php文件

environments/dev/common/config/main-local.php

正式环境对应

environments/prod/common/config/main-local.php

<?php
return [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=tech',
            'username' => 'your-username',
            'password' => 'your-password',
            'charset' => 'utf8',
        ],
        //...
    ],
];
php yii migrate

php yii migrate --migrationPath=@yii/rbac/migrations

## 使用了yii2-admin组件,如果需要配置菜单执行下面命令

php yii migrate --migrationPath=@mdm/admin/migrations

## 集成了yii2-audit组件,如需使用迁移表即可

php yii migrate --migrationPath=@bedezign/yii2/audit/migrations

提供了sql文件,可以用命令直接导入。

mysql -uusername -ppassword dbname < tech.sql

效果图

  • 前端页面 前端页面
  • 后台管理 后台管理
  • 商品管理(详情页集成ckeditor) 商品管理
  • 树形分类 树形分类
  • audit访问记录 audit trails
  • calendar展示 calendar

nginx配置

建议配置多个二级域名

# 支付端
server {
    listen       80;
    server_name  pay.domain.app;
    root  /data/yii2-tech/pay/web;
    index index.php;
    location / {
        try_files $uri /index.php?$args;
        # index index.php index.html;
    }

    location ~ \.php$ {
        fastcgi_index  index.php;
        fastcgi_pass unix:/var/run/php7.0-fpm.sock;
        # fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}
# 博客端
server {
    listen       80;
    server_name  tech.domain.app;
    root  /data/yii2-tech/tech/web;
    index index.php;
    location / {
        try_files $uri /index.php?$args;
        # index index.php index.html;
    }

    location ~ \.php$ {
        fastcgi_index  index.php;
        fastcgi_pass unix:/var/run/php7.0-fpm.sock;
        # fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}
# 后端mis
server {
    listen       80;
    server_name  mis.domain.app;
    root  /data/yii2-tech/backend/web;
    index index.php;
    location / {
        try_files $uri /index.php?$args;
        # index index.php index.html;
    }

    location ~ \.php$ {
        fastcgi_index  index.php;
        fastcgi_pass unix:/var/run/php7.0-fpm.sock;
        # fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

# 前端应用
server {
    listen       80;
    server_name  www.domain.app;
    root  /data/yii2-tech/frontend/web;
    index index.php;
    location / {
        try_files $uri /index.php?$args;
        # index index.php index.html;
    }

    location ~ \.php$ {
        fastcgi_index  index.php;
        fastcgi_pass unix:/var/run/php7.0-fpm.sock;
        # fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

elasticsearch接入(TODO)

oauth2.0配置(TODO)

sso系统(TODO)

支付系统

微信(支持多商户,APP & H5)

支付宝(支持多商户,APP & H5)

增加seotools配置

php yii migrate --migrationPath=@vendor/jpunanua/yii2-seotools/migrations

seotools路由

  • seotools/manage
  • seotools/manage/create

备注

本项目主要是Yii2常见组件的使用积累,仅供学习参考,如需线上应用请folk然后自由定制自己所需功能。

yii2-tech's People

Watchers

James Cloos 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.