-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a189b67
Showing
97 changed files
with
30,566 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"modules": false, | ||
"targets": { | ||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"] | ||
} | ||
}], | ||
"stage-2" | ||
], | ||
"plugins": ["transform-vue-jsx", "transform-runtime"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.history | ||
/back-end | ||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// https://github.com/michael-ciniawsky/postcss-load-config | ||
|
||
module.exports = { | ||
"plugins": { | ||
"postcss-import": {}, | ||
"postcss-url": {}, | ||
// to edit target browsers: use "browserslist" field in package.json | ||
"autoprefixer": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
# PrototypeManager | ||
|
||
[![npm](https://img.shields.io/npm/v/vue-lowdb.svg)](https://www.npmjs.com/package/vue-lowdb) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) | ||
|
||
> 产品原型压缩版管理 | ||
## 功能 | ||
|
||
* 新增分类 | ||
* 删除分类 | ||
* 编辑分类 | ||
* 查询分类 | ||
* 新增原型版本 | ||
* 删除原型版本 | ||
* 编辑原型版本 | ||
* 查询原型版本 | ||
* 新建管理员账号、菜单权限 | ||
* 编辑管理员账号、菜单权限 | ||
* 导出数据 | ||
|
||
![img](static/image/产品原型管理工具.png) | ||
|
||
### 【管理员】 | ||
![img](./static/image/demo.png) | ||
|
||
### 【访客】 | ||
![img](./static/image/demo2.png) | ||
|
||
|
||
## 开发环境 | ||
|
||
|名称|版本| | ||
|-|-| | ||
|nodejs|v12.13.0| | ||
|vue|v2.5.2| | ||
|
||
## 安装 | ||
1.下载Nodejs | ||
|
||
>http://nodejs.cn/download/ | ||
2.安装Nodejs | ||
|
||
(1)检查版本 | ||
```bash | ||
node -v | ||
``` | ||
(2)设置淘宝镜像(提升安装速度) | ||
```bash | ||
npm config set registry http://registry.npm.taobao.org/ | ||
``` | ||
|
||
>如果你已安装Nodejs环境,可跳过1和2步骤 | ||
3.安装与使用 | ||
|
||
(1)服务端 | ||
|
||
① 打开终端窗口,进入目录/PrototypeManager/server下 | ||
|
||
```bash | ||
cd /PrototypeManager/server | ||
``` | ||
② 执行安装 | ||
|
||
```bash | ||
cnpm install | ||
``` | ||
|
||
③启动后端 | ||
```bash | ||
nodemon server | ||
``` | ||
|
||
![img](static/image/back-end-server.png) | ||
|
||
(2)前端 | ||
|
||
①再次打开新的cmd终端窗口,进入目录/PrototypeManager下,执行命令行如下命令: | ||
|
||
```bash | ||
cd /PrototypeManager | ||
``` | ||
|
||
②安装 | ||
|
||
* 安装cnpm | ||
``` | ||
npm install -g cnpm --registry=https://registry.npm.taobao.org | ||
``` | ||
|
||
* 安装node-sass | ||
```bash | ||
cnpm install node-sass --save | ||
``` | ||
* 安装 | ||
```bash | ||
cnpm install | ||
``` | ||
③启动前端 | ||
```bash | ||
npm run dev | ||
``` | ||
![img](static/image/front-end-server.png) | ||
|
||
(3)浏览器地址访问 | ||
>http://localhost:8088 | ||
|
||
|
||
# 操作手册 | ||
|
||
## 登录管理员 | ||
|
||
账号:admin | ||
密码:123456 | ||
|
||
![img](static/image/login.jpg) | ||
|
||
>访客无需登录,仅有查看权限 | ||
## 新增原型版本 | ||
|
||
![img](static/image/add_url.jpg) | ||
|
||
|
||
## 新增分类 | ||
|
||
![img](static/image/add_category.jpg) | ||
|
||
|
||
## 筛选分类 | ||
|
||
![img](static/image/add_category2.jpg) | ||
|
||
## 新增账号 | ||
|
||
![img](static/image/add_username.jpg) | ||
|
||
## 导出数据 | ||
|
||
![img](static/image/add_output.jpg) | ||
|
||
## 注意事项 | ||
|
||
* 1.产品原型压缩包,暂不支持文件夹嵌套压缩。 | ||
|
||
例如: 压缩包.zip 解压后根目录就是原型文件内容,而不是还有一层文件夹进去才是原型文件内容。 | ||
|
||
* 2.压缩包名称和解压后文件夹名称要一致。 | ||
|
||
## TODO 开发中 | ||
|
||
* 1.支持rar、tar | ||
* 2.多层级解压 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use strict' | ||
require('./check-versions')() | ||
|
||
process.env.NODE_ENV = 'production' | ||
|
||
const ora = require('ora') | ||
const rm = require('rimraf') | ||
const path = require('path') | ||
const chalk = require('chalk') | ||
const webpack = require('webpack') | ||
const config = require('../config') | ||
const webpackConfig = require('./webpack.prod.conf') | ||
|
||
const spinner = ora('building for production...') | ||
spinner.start() | ||
|
||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | ||
if (err) throw err | ||
webpack(webpackConfig, (err, stats) => { | ||
spinner.stop() | ||
if (err) throw err | ||
process.stdout.write(stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. | ||
chunks: false, | ||
chunkModules: false | ||
}) + '\n\n') | ||
|
||
if (stats.hasErrors()) { | ||
console.log(chalk.red(' Build failed with errors.\n')) | ||
process.exit(1) | ||
} | ||
|
||
console.log(chalk.cyan(' Build complete.\n')) | ||
console.log(chalk.yellow( | ||
' Tip: built files are meant to be served over an HTTP server.\n' + | ||
' Opening index.html over file:// won\'t work.\n' | ||
)) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
'use strict' | ||
const chalk = require('chalk') | ||
const semver = require('semver') | ||
const packageConfig = require('../package.json') | ||
const shell = require('shelljs') | ||
|
||
function exec (cmd) { | ||
return require('child_process').execSync(cmd).toString().trim() | ||
} | ||
|
||
const versionRequirements = [ | ||
{ | ||
name: 'node', | ||
currentVersion: semver.clean(process.version), | ||
versionRequirement: packageConfig.engines.node | ||
} | ||
] | ||
|
||
if (shell.which('npm')) { | ||
versionRequirements.push({ | ||
name: 'npm', | ||
currentVersion: exec('npm --version'), | ||
versionRequirement: packageConfig.engines.npm | ||
}) | ||
} | ||
|
||
module.exports = function () { | ||
const warnings = [] | ||
|
||
for (let i = 0; i < versionRequirements.length; i++) { | ||
const mod = versionRequirements[i] | ||
|
||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { | ||
warnings.push(mod.name + ': ' + | ||
chalk.red(mod.currentVersion) + ' should be ' + | ||
chalk.green(mod.versionRequirement) | ||
) | ||
} | ||
} | ||
|
||
if (warnings.length) { | ||
console.log('') | ||
console.log(chalk.yellow('To use this template, you must update following to modules:')) | ||
console.log() | ||
|
||
for (let i = 0; i < warnings.length; i++) { | ||
const warning = warnings[i] | ||
console.log(' ' + warning) | ||
} | ||
|
||
console.log() | ||
process.exit(1) | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.