Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xuguangwen authored Jun 2, 2017
1 parent bedc8b0 commit f6bd0b7
Showing 1 changed file with 47 additions and 39 deletions.
86 changes: 47 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# vue-node-mysql
## this is bootstrap+vue+node+express+mysql porject
## This is a project based on amazeui+vue+node+express+bootstrap+mysql development.
## 该系统为建设一个高可扩展的H5企业网站,主要功能模块图如下:

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/mvc.png)
Expand All @@ -16,6 +16,14 @@

### 本系统需要安装通过install express cookie cookie-session body-parser mysql express-static express-route multer consolidate ejs -D来安装模块依赖。

### 该系统的功能代码结构图如下:

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/jiegou.png)

### 该系统数据库表图如下:

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/shujuku.png)

#### 后台管理登录页 采用md5加密,主要功能代码为:<br>
const crypto=require('crypto');<br>
module.exports={<br>
Expand All @@ -27,84 +35,84 @@ module.exports={<br>
}<br>
};<br>
之后再验证登录:
const express=require('express');
const common=require('../../libs/common');
const mysql=require('mysql');
var db=mysql.createPool({host: 'localhost', user: 'root', password: 'root', database: 'web'});
module.exports=function (){
var router=express.Router();
const express=require('express');<br><br><br><br>
const common=require('../../libs/common');<br><br><br>
const mysql=require('mysql');<br><br>
var db=mysql.createPool({host: 'localhost', user: 'root', password: 'root', database: 'web'});<br>
module.exports=function (){<br>
var router=express.Router();<br>
router.get('/', (req, res)=>{
res.render('admin/login.ejs', {});
});
res.render('admin/login.ejs', {});<br>
});<br>
router.post('/', (req, res)=>{
var username=req.body.username;
var password=common.md5(req.body.password+common.MD5_SUFFIX);
var username=req.body.username;<br>
var password=common.md5(req.body.password+common.MD5_SUFFIX);<br>
db.query(`SELECT * FROM admin_table WHERE username='${username}'`, (err, data)=>{
if(err){
console.error(err);
res.status(500).send('database error').end();
res.status(500).send('database error').end();<br>
}else{
if(data.length==0){
res.status(400).send('no this admin').end();
res.status(400).send('no this admin').end();<br>
}else{
if(data[0].password==password){
//成功
req.session['admin_id']=data[0].ID;
res.redirect('/admin/');
req.session['admin_id']=data[0].ID;<br>
res.redirect('/admin/');<br>
}else{
res.status(400).send('this password is incorrect').end();
res.status(400).send('this password is incorrect').end();<br>
}
}
}
});
});
return router;
};

});<br>
});<br>
return router;<br>
};<br>
后台登录页面效果图如下:
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/login01.png)

后台管理首页
#### 后台管理首页

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/02.png)

公司案例产品管理页
部分内容管理截图:<br>
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/concent.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/03.png)
#### 公司案例产品管理页:<br>
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/03.png)<br>
添加功能:![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/add.png)<br>
修改功能:![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/med.png)<br>
删除功能:![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/del.png)<br>

合作伙伴管理
#### 合作伙伴管理

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/04.png)
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/04.1.png)

关于我们
#### 关于我们

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/05.png)

联系我们
#### 联系我们

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/06.png)

#### 前台页面


代码结构

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/jiegou.png)

数据库数据

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/shujuku.png)

前台页面
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/login.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/index.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/news.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/news2.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/nxinxi.png)
![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/nxinxi1.png)

![image](https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/readme/fuwu.png)

详情请下载https://github.com/k2-xu/vue-express-ejs-node-mysql/blob/master/%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.doc  说明文档。

如有问题欢迎咨询本人QQ:326531916  微信:xu326531916
如有问题欢迎咨询本人QQ:326531916  微信:xu326531916 电话:18688793260


0 comments on commit f6bd0b7

Please sign in to comment.