想找个做前端页面设计的朋友,完善这个商城项目,自娱自乐
发布于 2个月前 作者 njaulj 294 次浏览 来自 分享

想找个做前端页面设计的朋友,完善这个商城项目,自娱自乐

本人精通后台,奈何对前端美学和用户体验资质平庸,前段时间想写一个商城,搭好了大部分后台功能,发现自己的时间精力都无法再去弄前端,所以想找个精通前端设计的有兴趣的朋友为这个商城设计一套漂亮的前台展示页面,有意者联系:QQ:717010686 Email:[email protected] 如有朋友有一些好看的商城前台页面,亦可邮箱分享于我,在此先谢过

录了一小段功能视频,可以看下已有的一些功能

Routes:

router.get('/',site.index)   //首页
router.get('/signup',user.showSignup)  注册
router.post('/signup',user.signup)  提交注册
router.get('/signin',user.showSignin) 登录
router.post('/signin',user.signin)  提交登陆
router.get('/logout',user.logout) 注销
router.get('/newgroup', group.new)   新增商品分组
router.get('/newcate',category.new)  新增商品分类
router.get('/newbrand',brand.new)   新增商品品牌
router.get('/newdiffer',differ.new)  新增单个商品种类
router.get('/upload',product.showupload);   测试新增商品
router.post('/upload',product.upload);  提交新增商品
router.get('/newcomm',comment.new)  测试单个商品评论
router.post('/comment',comment.save); 评论提交
router.get('/newadd',address.new)  新增收货地址
router.get('/neworder',order.new)  新增订单
router.get('/addCart/:bid/:pid/:did/:num/:picid',cart.addCart)//ajax 新增购物车中商品
router.get('/product/:id',product.showProduct) 单个商品展示
router.get('/cart',cart.cart) 显示购物车中所有商品
router.get('/cart/add/:cid',cart.addOnce) ajax 数量+1
router.get('/cart/minus/:cid',cart.minusOnce) ajax 数量-1
router.get('/cart/del/:cid',cart.delOnce) ajax 删除商品
router.post('/cart/po',cart.cartpo) 购物车所选商品-》欲购买页面 cart.state=2
router.get('/cart/buy',cart.cartbuy) //欲购买页面 show all the products in cart  which state=2
router.post('/order/pay',order.pay) 欲购买-》购买页面 cart.state=3 已购买
router.get('/order/:id',order.show) 单个订单详情
router.get('/order/list',order.list) 所有订单列表

Schemas:

### user.js   用户
var mongoose = require('mongoose')
var Schema = mongoose.Schema

var UserSchema = new Schema({
    userName:{type:String},
    password:{type:String},
    role:{type:Number,default:0}, //角色分类,分为普通用户role=0,铜牌会员1<role<5、银牌会员5<role<10、金牌会员10<role<99、管理员 role=99
    message:{type:Number,default:0},//未读信息
    cart:{type:Number,default:0},//购物车商品数量
    money:{type:Number,default:0},//余额
    order:{type:Number,default:0},//订单数
    cost:{type:Number,default:0},//已消费
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        },
        lastLogin:{
            type:Date
        }
    }
})
### address.js 收获地址
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var AddressSchema = new Schema({
    user_id: {type: ObjectId, ref: 'User'},
    who: {type:String},//收件人
    contact: {type: String},//联系方式
    where: {type:String},//收件地址
    meta: {
        createAt: {
          type: Date,
          default: Date.now()
        },
        updateAt: {
          type: Date,
          default: Date.now()
    }
    },
    state:{type:Number}
})

### cart.js  购物车
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var cartSchema = new Schema({
    user_id:{type:ObjectId,ref:'User'}, //所属用户
    brand_id:{type:ObjectId,ref:'Brand'}, //对应商品品牌
    differ_id:{type:ObjectId,ref:'Differ'},//商品详细类别
    product_id:{type:ObjectId,ref:"Product"},//商品
    num:{type:Number,default:1,min:1,max:999},
    pic_id:{type:ObjectId,ref:'Pic'},//商品图片
    state:{type:Number,default:1},//1 为正常物品 0为下架 2为欲购买 3为已购买
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})

### order.js 订单
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var OrderSchema = new Schema({
    user_id:{type:ObjectId,ref:'User'},//所属用户
    total:{type:Number,default:0},//订单总额
    address:{ //收件信息
        who: {type:String},
        contact: {type: String},
        where: {type:String}
    },
    state:{type:Number,default:1},//状态跟踪,1为待付款 2为待发货 3为已签收 4未交易异常
    payment:{type:Number},//1为在线支付 2为货到付款
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})

### detail.js 订单单条详情
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var DetailSchema = new Schema({
    user_id:{type:ObjectId,ref:'User'},
    order_id:{type:ObjectId,ref:'Order'},
    brand_id:{type:ObjectId,ref:'Brand'},
    differ_id:{type:ObjectId,ref:'Differ'},
    product_id:{type:ObjectId,ref:"Product"},
    num:{type:Number,default:1,min:1,max:999},
    pic_id:{type:ObjectId,ref:'Pic'},
    subtotal:{type:Number,default:0.00},
    state:{type:Number,default:1},
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})


### category.js 商品分类  e.x. 母婴、校园、女性、居家
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var CategorySchema = new Schema({
    group_id:{type:ObjectId,ref:'Group'},
    categoryName:{type:String},
    categoryDesp:{type:String},
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})

### group 商品分组 e.x. 母婴-健康饮食、女性-烈焰红唇
var mongoose = require('mongoose')
var Schema = mongoose.Schema

var GroupSchema = new Schema({
    groupName:{type:String},
    groupDesp:{type:String},
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})

### brand.js 商品品牌 e.x. 劳力士、花王、悦诗风吟
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var BrandSchema = new Schema({
    category_id:{type:ObjectId,ref:'Category'},
    brandName:{type:String},
    brandDesp:{type:String},
    brandPic:{type:String},
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})
###product.js 商品详情
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var ProductSchema = new Schema({
    brand_id:{type:ObjectId,ref:'Brand'},//所属品牌
    productName:{type:String},//商品名称
    productDesp:{type:String},//商品长描述
    shortDesp:{type:String},//商品短描述
    productPic:[{type:ObjectId,ref:'Pic'}],//商品图片
    pv:{type:Number,default:0},//浏览量
    sold:{type:Number,default:0},//已售
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})
### differ.js  单个商品种类
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var DifferSchema = new Schema({
    product_id:{type:ObjectId,ref:'Product'}, //所属商品
    differName:{type:String},//种类名称,100毫升、200毫升、300毫升/颜色分类 红色、黄色、黑色
    differDesp:{type:String},//种类描述
    amount:{type:Number,default:999},//库存
    differPrice:{type:Number},//分类价格
    sold:{type:Number,default:0},//已售
    mailFee:{type:Number,default:0},//邮费
    meta: {
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})

### pic.js
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var PicSchema = new Schema({
    product_id:{type:ObjectId,ref:'Product'},
    picName:{type:String},
    picPath:{type:String},
    meta:{
        createAt: {
            type: Date,
            default: Date.now()
        },
        updateAt: {
            type: Date,
            default: Date.now()
        }
    }
})


### comment 商品评论
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var ObjectId = Schema.Types.ObjectId

var CommentSchema = new Schema({
    product_id:{type:ObjectId,ref:'Product'},
    from: {type: ObjectId, ref: 'User'},
    reply: [{
        from: {type: ObjectId, ref: 'User'},
        to: {type: ObjectId, ref: 'User'},
        content: {type:String}
    }],
    content: {type:String},
    meta: {
        createAt: {
          type: Date,
          default: Date.now()
        },
        updateAt: {
          type: Date,
          default: Date.now()
    }
    }
})
```****
1 回复

eshop一年没更新了…

回到顶部