├── README.md
├── mysql数据库
├── miniwechat.sql
└── miniwechat用这个.sql
├── 关于系统.txt
├── 前端代码
├── app.js
├── app.json
├── app.wxss
├── images
│ ├── about.png
│ ├── about_us.png
│ ├── address-bg-bd.png
│ ├── address.png
│ ├── address
│ │ ├── address.png
│ │ ├── buyer.png
│ │ ├── delete.png
│ │ └── edit.png
│ ├── address_right.png
│ ├── aftersale.png
│ ├── cart.png
│ ├── cart@selected.png
│ ├── category.png
│ ├── category@selected.png
│ ├── checkbox.png
│ ├── clear_input.png
│ ├── comment.png
│ ├── complete.png
│ ├── coupon.png
│ ├── customer.png
│ ├── del-address.png
│ ├── detail_back.png
│ ├── down.png
│ ├── edit-address.png
│ ├── feedback.png
│ ├── footprint.png
│ ├── friend.png
│ ├── go.png
│ ├── goright.png
│ ├── group.png
│ ├── home.png
│ ├── home@selected.png
│ ├── ic_menu_shoping_nor.png
│ ├── ic_menu_topic_nor.png
│ ├── ic_menu_topic_pressed.png
│ ├── ico-addr.png
│ ├── icon_close.png
│ ├── icon_collect.png
│ ├── icon_collect_checked.png
│ ├── icon_error.png
│ ├── icon_go_more.png
│ ├── mei.png
│ ├── mi.png
│ ├── mobile.png
│ ├── my.png
│ ├── my@selected.png
│ ├── oneplus.png
│ ├── pendpay.png
│ ├── profile.png
│ ├── receive.png
│ ├── selnum.png
│ ├── send.png
│ ├── share.png
│ ├── telephone.png
│ ├── wechat.png
│ └── wxpay.png
├── pages
│ ├── addaddress
│ │ ├── addaddress.js
│ │ ├── addaddress.json
│ │ ├── addaddress.wxml
│ │ └── addaddress.wxss
│ ├── address
│ │ ├── address.js
│ │ ├── address.json
│ │ ├── address.wxml
│ │ └── address.wxss
│ ├── buygoods
│ │ ├── buygoods.js
│ │ ├── buygoods.json
│ │ ├── buygoods.wxml
│ │ └── buygoods.wxss
│ ├── collect
│ │ ├── collect.js
│ │ ├── collect.json
│ │ ├── collect.wxml
│ │ └── collect.wxss
│ ├── detail
│ │ ├── detail.js
│ │ ├── detail.json
│ │ ├── detail.wxml
│ │ └── detail.wxss
│ ├── index
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── login
│ │ ├── login.js
│ │ ├── login.json
│ │ ├── login.wxml
│ │ └── login.wxss
│ ├── logs
│ │ ├── logs.js
│ │ ├── logs.json
│ │ ├── logs.wxml
│ │ └── logs.wxss
│ ├── mine
│ │ ├── mine.js
│ │ ├── mine.json
│ │ ├── mine.wxml
│ │ └── mine.wxss
│ ├── regist
│ │ ├── regist.js
│ │ ├── regist.json
│ │ ├── regist.wxml
│ │ └── regist.wxss
│ ├── release
│ │ ├── release.js
│ │ ├── release.json
│ │ ├── release.wxml
│ │ └── release.wxss
│ └── search
│ │ ├── search.js
│ │ ├── search.json
│ │ ├── search.wxml
│ │ └── search.wxss
├── project.config.json
├── sitemap.json
└── utils
│ └── util.js
└── 后台代码
└── MiniWechat
├── .classpath
├── .project
├── .settings
├── .jsdtscope
├── org.eclipse.jdt.core.prefs
├── org.eclipse.wst.common.component
├── org.eclipse.wst.common.project.facet.core.xml
├── org.eclipse.wst.jsdt.ui.superType.container
└── org.eclipse.wst.jsdt.ui.superType.name
├── WebContent
├── META-INF
│ └── MANIFEST.MF
├── WEB-INF
│ ├── lib
│ │ ├── c3p0-0.9.1.2.jar
│ │ ├── commons-beanutils-1.8.3.jar
│ │ ├── commons-dbutils-1.6.jar
│ │ ├── commons-fileupload-1.2.1.jar
│ │ ├── fastjson-1.2.2.jar
│ │ └── mysql-connector-java-5.1.39-bin.jar
│ └── web.xml
├── admin
│ ├── admin.html
│ ├── admin1.html
│ ├── login.html
│ └── userList.html
├── css
│ ├── bootstrap-theme.css
│ ├── bootstrap-theme.css.map
│ ├── bootstrap-theme.min.css
│ ├── bootstrap-theme.min.css.map
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── login.css
│ ├── login2.css
│ └── style.css
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── image
│ ├── 5c_80.png
│ ├── MIX-80.jpg
│ ├── banner.jpg
│ ├── banner2.jpg
│ ├── compare.jpg
│ ├── ghs.png
│ ├── gwc_xiaomi6.jpg
│ ├── hjh_01.gif
│ ├── hjh_02.gif
│ ├── hjh_03.gif
│ ├── hjh_04.gif
│ ├── hjh_05.gif
│ ├── hjh_06.gif
│ ├── hm4-80.jpg
│ ├── hm4A-80.jpg
│ ├── hm4x_80.png
│ ├── hmn4x80.png
│ ├── hmnote4-80.jpg
│ ├── hongmi4x.png
│ ├── hongmin4.png
│ ├── liebiao_hongmin4.jpg
│ ├── liebiao_hongmin42.jpg
│ ├── liebiao_hongmin4_dd.jpg
│ ├── liebiao_hongmin4x.jpg
│ ├── liebiao_xiaomi5.jpg
│ ├── liebiao_xiaomi5c.jpg
│ ├── liebiao_xiaomi5s.jpg
│ ├── liebiao_xiaomi6.jpg
│ ├── liebiao_xiaomimix.jpg
│ ├── liebiao_xiaomint2.jpg
│ ├── liulangengduo.png
│ ├── login_bg.jpg
│ ├── logo_foot.png
│ ├── logo_top.png
│ ├── mimobile.jpg
│ ├── mistore_logo.png
│ ├── peijian1.jpg
│ ├── peijian10.jpg
│ ├── peijian2.jpg
│ ├── peijian3.jpg
│ ├── peijian4.jpg
│ ├── peijian5.jpg
│ ├── peijian6.png
│ ├── peijian7.jpg
│ ├── peijian8.jpg
│ ├── peijian9.jpg
│ ├── pinghengche.jpg
│ ├── pinpai1.png
│ ├── pinpai2.png
│ ├── pinpai3.png
│ ├── pinpai4.png
│ ├── pinpai5.png
│ ├── star_red.gif
│ ├── xiaomi5.jpg
│ ├── xm5-80.jpg
│ ├── xm5S-80.jpg
│ ├── xm5Splus.jpg
│ ├── xm6_80.png
│ ├── xmNOTE2-80.jpg
│ ├── xmad_14926862610682_UhkfS.png
│ ├── yanzhengma.jpg
│ └── yyymix.gif
└── js
│ ├── DatePicker.js
│ ├── bootstrap.js
│ ├── bootstrap.min.js
│ ├── jquery-1.12.4.js
│ ├── jquery.form.min.js
│ ├── jquery.min.js
│ ├── jquery.validate.min.js
│ └── npm.js
├── build
└── classes
│ ├── c3p0-config.xml
│ └── com
│ └── zjj
│ └── miniwechat
│ ├── controller
│ ├── AddAddressServlet.class
│ ├── AddCollection.class
│ ├── AddGoodsServlet.class
│ ├── AddOrderServlet.class
│ ├── AddUserServlet.class
│ ├── AdminFindAllOrdersServlet.class
│ ├── AdmintFindAllGoods.class
│ ├── AdmitLoginServlet.class
│ ├── DeleteAddressServlet.class
│ ├── DeleteGoodsByIdServlet.class
│ ├── FindALLGoodsServlet.class
│ ├── FindAddressServlet.class
│ ├── FindAllUserSerlvlet.class
│ ├── FindCollectionByUid.class
│ ├── FindGoodsByName.class
│ ├── FindMyReleased.class
│ ├── FindOneAddressServlet.class
│ ├── FindOneGoodServlet.class
│ ├── FindSomeoneOrder.class
│ ├── RemoveCollectionServlet.class
│ ├── SearchOrderServlet.class
│ ├── SelectSomeUser.class
│ ├── ShipmentsGoodsServlet.class
│ ├── ShipmentsMyGoodsServlet.class
│ ├── UpdateOrderServlet.class
│ └── UserLoginServlet.class
│ ├── dao
│ ├── AddressDao.class
│ ├── CollectionDao.class
│ ├── GoodsDao.class
│ ├── OrderDao.class
│ ├── UserDao.class
│ └── impl
│ │ ├── AddressDaoImpl.class
│ │ ├── CollectionDaoImpl.class
│ │ ├── GoodDaoImpl.class
│ │ ├── OrderDaoImpl.class
│ │ └── UserDaoImpl.class
│ ├── entity
│ ├── Address.class
│ ├── Collection.class
│ ├── Goods.class
│ ├── Order.class
│ └── User.class
│ ├── filter
│ └── EncodingFilter.class
│ ├── service
│ ├── AddressService.class
│ ├── CollectionService.class
│ ├── GoodsService.class
│ ├── Impl
│ │ ├── AddressServiceImpl.class
│ │ ├── CollectionServiceImpl.class
│ │ ├── GoodsServiceImpl.class
│ │ ├── OrderServiceImpl.class
│ │ └── UserServiceImpl.class
│ ├── OrderService.class
│ └── UserService.class
│ ├── utils
│ ├── JdbcUtils.class
│ └── JsonUtils.class
│ └── vo
│ ├── JsonBean.class
│ ├── VCollection.class
│ ├── VGoods.class
│ └── VOrders.class
└── src
├── c3p0-config.xml
└── com
└── zjj
└── miniwechat
├── controller
├── AddAddressServlet.java
├── AddCollection.java
├── AddGoodsServlet.java
├── AddUserServlet.java
├── AdminFindAllOrdersServlet.java
├── AdmintFindAllGoods.java
├── AdmitLoginServlet.java
├── DeleteAddressServlet.java
├── DeleteGoodsByIdServlet.java
├── RemoveCollectionServlet.java
├── SearchOrderServlet.java
├── SelectSomeUser.java
├── ShipmentsGoodsServlet.java
├── ShipmentsMyGoodsServlet.java
├── UpdateOrderServlet.java
└── UserLoginServlet.java
├── dao
├── AddressDao.java
├── CollectionDao.java
├── GoodsDao.java
├── OrderDao.java
├── UserDao.java
└── impl
│ ├── AddressDaoImpl.java
│ ├── CollectionDaoImpl.java
│ ├── GoodDaoImpl.java
│ ├── OrderDaoImpl.java
│ └── UserDaoImpl.java
├── entity
├── Address.java
├── Collection.java
├── Goods.java
├── Order.java
└── User.java
├── filter
└── EncodingFilter.java
├── service
├── AddressService.java
├── CollectionService.java
├── GoodsService.java
├── Impl
│ ├── AddressServiceImpl.java
│ ├── CollectionServiceImpl.java
│ ├── GoodsServiceImpl.java
│ ├── OrderServiceImpl.java
│ └── UserServiceImpl.java
├── OrderService.java
└── UserService.java
├── utils
├── JdbcUtils.java
└── JsonUtils.java
└── vo
├── JsonBean.java
├── VCollection.java
├── VGoods.java
└── VOrders.java
/README.md:
--------------------------------------------------------------------------------
1 | # WeChat_MiniProgram_Campus_second-hand
2 | 基于微信小程序的校园二手商品交易平台设计毕业源码案例设计
3 |
4 | ## 开发工具:Eclipse + 微信web开发者工具
5 |
6 | ## web端环境:JDK1.8 + Tomcat8 + Servlet
7 |
8 | 基于微信小程序开发的校园二手交易平台的实现,一共2个身份,用户和管理员。用户在微信小程序客户端注册登录,可以查询搜索商品信息,也可以自己发布二手商品,对自己感兴趣的宝贝可以加入收藏夹方便以后购买,可以管理自己发布的宝贝,查询自己的订单信息列表和管理自己的收货地址等;管理员主要在web端后台登录,管理员可以管理所有用户信息,管理删除违规商品,查询订单并处理发货登记。程序使用JDBC与数据库连接,后台使用JAVA编写,界面使用HTML5、AJAX等。
9 |
--------------------------------------------------------------------------------
/关于系统.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/关于系统.txt
--------------------------------------------------------------------------------
/前端代码/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | globalData: {
4 | chooseAddres:[],
5 | gimagepath:'',
6 | user: [],
7 | URL: 'http://localhost:8080/MiniWechat'
8 | }
9 | })
--------------------------------------------------------------------------------
/前端代码/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/login/login",
5 | "pages/mine/mine",
6 | "pages/release/release",
7 | "pages/detail/detail",
8 | "pages/collect/collect",
9 | "pages/addaddress/addaddress",
10 | "pages/myreleased/myreleased",
11 | "pages/myreleased2/myreleased2",
12 | "pages/buygoods/buygoods",
13 | "pages/search/search",
14 | "pages/address/address",
15 | "pages/regist/regist",
16 | "pages/orders/orders",
17 | "pages/logs/logs"
18 | ],
19 | "window": {
20 | "backgroundTextStyle": "light",
21 | "navigationBarBackgroundColor": "#fff",
22 | "navigationBarTitleText": "二手商城",
23 | "navigationBarTextStyle": "black"
24 | },
25 | "tabBar": {
26 | "list": [
27 | {
28 | "pagePath": "pages/index/index",
29 | "text": "首页",
30 | "iconPath": "/images/home.png",
31 | "selectedIconPath": "/images/home@selected.png"
32 | },
33 | {
34 | "pagePath": "pages/collect/collect",
35 | "text": "收藏夹",
36 | "iconPath": "/images/cart.png",
37 | "selectedIconPath": "/images/cart@selected.png"
38 | },
39 | {
40 | "pagePath": "pages/release/release",
41 | "text": "发布商品",
42 | "iconPath": "/images/address.png",
43 | "selectedIconPath": "/images/address.png"
44 | },
45 | {
46 | "pagePath": "pages/mine/mine",
47 | "text": "我的",
48 | "iconPath": "/images/my.png",
49 | "selectedIconPath": "/images/my@selected.png"
50 | }
51 | ]
52 | },
53 |
54 | "sitemapLocation": "sitemap.json"
55 | }
--------------------------------------------------------------------------------
/前端代码/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 |
--------------------------------------------------------------------------------
/前端代码/images/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/about.png
--------------------------------------------------------------------------------
/前端代码/images/about_us.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/about_us.png
--------------------------------------------------------------------------------
/前端代码/images/address-bg-bd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address-bg-bd.png
--------------------------------------------------------------------------------
/前端代码/images/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address.png
--------------------------------------------------------------------------------
/前端代码/images/address/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address/address.png
--------------------------------------------------------------------------------
/前端代码/images/address/buyer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address/buyer.png
--------------------------------------------------------------------------------
/前端代码/images/address/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address/delete.png
--------------------------------------------------------------------------------
/前端代码/images/address/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address/edit.png
--------------------------------------------------------------------------------
/前端代码/images/address_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/address_right.png
--------------------------------------------------------------------------------
/前端代码/images/aftersale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/aftersale.png
--------------------------------------------------------------------------------
/前端代码/images/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/cart.png
--------------------------------------------------------------------------------
/前端代码/images/cart@selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/cart@selected.png
--------------------------------------------------------------------------------
/前端代码/images/category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/category.png
--------------------------------------------------------------------------------
/前端代码/images/category@selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/category@selected.png
--------------------------------------------------------------------------------
/前端代码/images/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/checkbox.png
--------------------------------------------------------------------------------
/前端代码/images/clear_input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/clear_input.png
--------------------------------------------------------------------------------
/前端代码/images/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/comment.png
--------------------------------------------------------------------------------
/前端代码/images/complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/complete.png
--------------------------------------------------------------------------------
/前端代码/images/coupon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/coupon.png
--------------------------------------------------------------------------------
/前端代码/images/customer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/customer.png
--------------------------------------------------------------------------------
/前端代码/images/del-address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/del-address.png
--------------------------------------------------------------------------------
/前端代码/images/detail_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/detail_back.png
--------------------------------------------------------------------------------
/前端代码/images/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/down.png
--------------------------------------------------------------------------------
/前端代码/images/edit-address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/edit-address.png
--------------------------------------------------------------------------------
/前端代码/images/feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/feedback.png
--------------------------------------------------------------------------------
/前端代码/images/footprint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/footprint.png
--------------------------------------------------------------------------------
/前端代码/images/friend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/friend.png
--------------------------------------------------------------------------------
/前端代码/images/go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/go.png
--------------------------------------------------------------------------------
/前端代码/images/goright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/goright.png
--------------------------------------------------------------------------------
/前端代码/images/group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/group.png
--------------------------------------------------------------------------------
/前端代码/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/home.png
--------------------------------------------------------------------------------
/前端代码/images/home@selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/home@selected.png
--------------------------------------------------------------------------------
/前端代码/images/ic_menu_shoping_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/ic_menu_shoping_nor.png
--------------------------------------------------------------------------------
/前端代码/images/ic_menu_topic_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/ic_menu_topic_nor.png
--------------------------------------------------------------------------------
/前端代码/images/ic_menu_topic_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/ic_menu_topic_pressed.png
--------------------------------------------------------------------------------
/前端代码/images/ico-addr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/ico-addr.png
--------------------------------------------------------------------------------
/前端代码/images/icon_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/icon_close.png
--------------------------------------------------------------------------------
/前端代码/images/icon_collect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/icon_collect.png
--------------------------------------------------------------------------------
/前端代码/images/icon_collect_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/icon_collect_checked.png
--------------------------------------------------------------------------------
/前端代码/images/icon_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/icon_error.png
--------------------------------------------------------------------------------
/前端代码/images/icon_go_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/icon_go_more.png
--------------------------------------------------------------------------------
/前端代码/images/mei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/mei.png
--------------------------------------------------------------------------------
/前端代码/images/mi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/mi.png
--------------------------------------------------------------------------------
/前端代码/images/mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/mobile.png
--------------------------------------------------------------------------------
/前端代码/images/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/my.png
--------------------------------------------------------------------------------
/前端代码/images/my@selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/my@selected.png
--------------------------------------------------------------------------------
/前端代码/images/oneplus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/oneplus.png
--------------------------------------------------------------------------------
/前端代码/images/pendpay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/pendpay.png
--------------------------------------------------------------------------------
/前端代码/images/profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/profile.png
--------------------------------------------------------------------------------
/前端代码/images/receive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/receive.png
--------------------------------------------------------------------------------
/前端代码/images/selnum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/selnum.png
--------------------------------------------------------------------------------
/前端代码/images/send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/send.png
--------------------------------------------------------------------------------
/前端代码/images/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/share.png
--------------------------------------------------------------------------------
/前端代码/images/telephone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/telephone.png
--------------------------------------------------------------------------------
/前端代码/images/wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/wechat.png
--------------------------------------------------------------------------------
/前端代码/images/wxpay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/前端代码/images/wxpay.png
--------------------------------------------------------------------------------
/前端代码/pages/addaddress/addaddress.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | tel:'',
10 | address:'',
11 | uid:0,
12 | editAddress:[]
13 | },
14 | //表单提交
15 | formSubmit: function (e) {
16 |
17 | const id = app.globalData.user.user.uid //在全局变量中 获取用户的id
18 | this.data.uid = id //将id赋给uid
19 | // console.log(e.detail.value.telephone)
20 | // console.log(this.data.uid)
21 | wx.request({
22 | url: '' + app.globalData.URL + '/addAddress.do',
23 | method: 'POST',
24 | data: {
25 | tel: e.detail.value.telephone,
26 | address: e.detail.value.address,
27 | uid: this.data.uid,
28 | },
29 | header: {
30 | "Content-Type": "application/x-www-form-urlencoded"
31 | },
32 | success: res => {
33 |
34 | wx.navigateBack({
35 |
36 | })
37 | wx.showToast({
38 | title: '添加地址成功',
39 | })
40 | }
41 | })
42 | },
43 | /**
44 | * 生命周期函数--监听页面加载
45 | */
46 | onLoad: function (options) {
47 | var that = this
48 | if (options.aid != null) {
49 |
50 | this.data.aid = options.aid
51 | //console.log(this.data.aid)
52 |
53 | wx.request({
54 | url: '' + app.globalData.URL + '/findOneAddress.do?aid=' + this.data.aid + '',
55 | method: 'GET',
56 | data: {
57 | },
58 | header: {
59 | 'content-type': 'application/json' // 默认值
60 | },
61 | success: res => {
62 | //console.log(res.data.info) 地址的详细信息
63 | this.setData({
64 | editAddress: res.data.info
65 | })
66 | }
67 | })
68 | }
69 | },
70 |
71 | /**
72 | * 生命周期函数--监听页面初次渲染完成
73 | */
74 | onReady: function () {
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面显示
80 | */
81 | onShow: function () {
82 |
83 | },
84 |
85 | /**
86 | * 生命周期函数--监听页面隐藏
87 | */
88 | onHide: function () {
89 |
90 | },
91 |
92 | /**
93 | * 生命周期函数--监听页面卸载
94 | */
95 | onUnload: function () {
96 |
97 | },
98 |
99 | /**
100 | * 页面相关事件处理函数--监听用户下拉动作
101 | */
102 | onPullDownRefresh: function () {
103 |
104 | },
105 |
106 | /**
107 | * 页面上拉触底事件的处理函数
108 | */
109 | onReachBottom: function () {
110 |
111 | },
112 |
113 | /**
114 | * 用户点击右上角分享
115 | */
116 | onShareAppMessage: function () {
117 |
118 | }
119 | })
--------------------------------------------------------------------------------
/前端代码/pages/addaddress/addaddress.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "添加地址",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/addaddress/addaddress.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
41 |
--------------------------------------------------------------------------------
/前端代码/pages/addaddress/addaddress.wxss:
--------------------------------------------------------------------------------
1 | .page{
2 | display: flex;
3 | flex-direction: column;
4 | font-size: 30rpx;
5 | color: #444;
6 | }
7 |
8 | .item{
9 | display: flex;
10 | align-items: center;
11 | height: 40px;
12 | border-bottom: 1rpx solid #ccc;
13 | }
14 |
15 | .item text{
16 | margin-right: 30px;
17 | }
18 |
19 | .set{
20 | margin-top: 15px;
21 | }
22 | .set icon{
23 | margin-right: 10px;
24 | }
25 | .button button{
26 | width: 120px;
27 | height: 30px;
28 | line-height: 30px;
29 | margin-top: 20px;
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/前端代码/pages/address/address.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "我的地址",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/address/address.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item.tel}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{item.address}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 编辑
29 |
30 | 删除
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/前端代码/pages/address/address.wxss:
--------------------------------------------------------------------------------
1 | /* pages/address/address.wxss */
2 | .page{
3 | display: flex;
4 | flex-direction: column;
5 | }
6 | .detail-item{
7 | display: flex;
8 | flex-direction: column;
9 | margin-bottom: 20px;
10 | }
11 | .detail-item text{
12 | font-size: 28rpx;
13 | color: #666;
14 | }
15 | .line{
16 | display: flex;
17 | flex-direction: column;
18 | justify-content: center;
19 | border-top: 5px solid #eee;
20 | border-bottom: 1rpx solid #ccc;
21 | height: 70px;
22 | }
23 | .line image{
24 | margin-right: 10px;
25 | }
26 | .detail-item .userinfo{
27 | display: flex;
28 | }
29 | .detail-item .userinfo text{
30 | padding-right: 50px;
31 | }
32 | .detail-item .userinfo image{
33 | width: 18px;
34 | height: 18px;
35 | }
36 | .address{
37 | margin-top: 5px;
38 | }
39 | .address image{
40 | width: 18px;
41 | height: 18px;
42 | }
43 | .edit{
44 | display: flex;
45 | justify-content: space-between;
46 | }
47 | .edit image{
48 | width: 16px;
49 | height: 16px;
50 | }
51 | .edit .default icon{
52 | margin-left: 5px;
53 | margin-right: 5px;
54 | }
55 | .edit .editdelete{
56 | margin-right: 20px;
57 | }
58 | .edit .editdelete image{
59 | margin-right: 5px;
60 | margin-left: 20px;
61 | }
62 |
63 | .add{
64 | display: flex;
65 | justify-content: center;
66 | }
67 | .add button{
68 | font-size: 30rpx;
69 | height: 30px;
70 | width: 80%;
71 | line-height: 30px;
72 | position: fixed;
73 | bottom: 20px;
74 | right: 38px;
75 | }
76 | .father{
77 | height: 60px;
78 | }
79 |
--------------------------------------------------------------------------------
/前端代码/pages/buygoods/buygoods.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "购买商品",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/buygoods/buygoods.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 收获地址
4 |
5 |
6 |
7 |
8 | {{address.tel}}
9 |
10 |
11 |
12 | {{address.address}}
13 |
14 |
15 |
16 |
17 |
18 |
19 | 商品信息
20 |
21 |
22 |
23 |
24 |
25 | {{buyProduct.gname}}
26 | ¥{{buyProduct.gprice}}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 总价
35 | ¥{{buyProduct.gprice}}
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/前端代码/pages/buygoods/buygoods.wxss:
--------------------------------------------------------------------------------
1 | .page{
2 | display: flex;
3 | flex-direction: column;
4 | }
5 | .buyerInfo{
6 | display: flex;
7 | flex-direction: column;
8 | justify-content: center;
9 | height: 90px;
10 |
11 | border-bottom: 1rpx solid #ccc;
12 | }
13 |
14 | .buyerInfo .title{
15 | border-bottom: 5px solid #ddd;
16 | font-size: 30rpx;
17 | color: #666;
18 | height: 20px;
19 | line-height: 0px;
20 | margin-bottom: 10px;
21 | }
22 |
23 | .buyerInfo text{
24 | font-size: 28rpx;
25 | color: #666;
26 | }
27 |
28 | .buyerInfo image{
29 | width: 18px;
30 | height: 18px;
31 | }
32 | .buyer{
33 | display: flex;
34 | margin-bottom: 10px;
35 | }
36 |
37 | .buyer text{
38 | margin-left: 10px;
39 | margin-right: 50px;
40 | }
41 | .buy .telephone{
42 | margin-left: 400px;
43 | }
44 | .address{
45 | display: flex;
46 | }
47 | .address text{
48 | margin-left: 10px;
49 | }
50 |
51 | .title{
52 | border-bottom: 5px solid #ddd;
53 | font-size: 30rpx;
54 | color: #666;
55 | height: 30px;
56 | line-height: 30px;
57 | margin-bottom: 10px;
58 | }
59 | .goods{
60 | display: flex;
61 | font-size: 35rpx;
62 | height: 70px;
63 | color: #555;
64 | border-bottom: 5px solid #eeee;
65 | }
66 | .goods image{
67 | width: 50px;
68 | height: 60px;
69 | margin-left: 20px;
70 | margin-right: 60px;
71 | }
72 | .goods .price{
73 | color: #f00;
74 | font-size: 40rpx;
75 | }
76 | .detail-price{
77 | display: flex;
78 | flex-direction: column;
79 | justify-content: space-around;
80 | }
81 | .allitem{
82 | display: flex;
83 | flex-direction: column;
84 | font-size: 30rpx;
85 | color: #666;
86 | }
87 | .allitem .item{
88 | display: flex;
89 | justify-content: space-between;
90 | align-items: center;
91 | height: 50px;
92 | border-bottom: 1rpx solid #ccc;
93 | }
94 | .allitem .item text{
95 | margin-left: 10px;
96 | margin-right: 10px;
97 | }
98 |
99 | input{
100 | font-size: 30rpx;
101 | }
102 | .tail{
103 | display: flex;
104 | height: 40px;
105 | align-items: center;
106 | position: fixed;
107 | bottom: 5px;
108 | font-size: 30rpx;
109 | color: #666;
110 | }
111 | .tail .price{
112 | color: red;
113 | font-size: 40rpx;
114 | }
115 | button{
116 | position: relative;
117 | left: 160px;
118 | bottom: 5px;
119 | background-color: red;
120 | color: white;
121 | }
122 |
123 | .arrow{
124 | width: 10px;
125 | height: 10px;
126 | border-top: 2px solid #999;
127 | border-right: 2px solid #999;
128 | position: absolute;
129 | left: 355px;
130 | transform: rotate(45deg);
131 |
132 | }
--------------------------------------------------------------------------------
/前端代码/pages/collect/collect.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "我的收藏",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/collect/collect.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 | {{item.gname}}
15 | ¥{{item.gprice}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 全选
28 |
29 |
30 |
31 |
32 | {{carts.length}}件商品
33 | ¥{{totalMoney}}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/前端代码/pages/collect/collect.wxss:
--------------------------------------------------------------------------------
1 | /* pages/cart/cart.wxss */
2 | .item{
3 | display: flex;
4 | flex-direction: column;
5 |
6 | border-bottom: 5px solid #ccc;
7 | }
8 | .product-detail{
9 | display: flex;
10 | align-items: center;
11 | margin-top: 10px;
12 | height: 80px;
13 | border-bottom: 1px solid #ccc;
14 |
15 | }
16 | .icon-image{
17 | display: flex;
18 | align-items: center;
19 | }
20 | .product-detail .detail{
21 | display: flex;
22 | flex-direction: column;
23 | justify-content: space-around;
24 | font-size: 35rpx;
25 | color: #666;
26 | }
27 | .product-detail .detail .price{
28 | font-size: 40rpx;
29 | color: red;
30 | }
31 | .image{
32 | width: 70px;
33 | height: 70px;
34 | }
35 | .item .product-detail image{
36 | width: 70px;
37 | height: 70px;
38 | }
39 | .number{
40 | display: flex;
41 | justify-content: flex-end;
42 | margin-top: 10px;
43 | margin-bottom: 10px;
44 | font-size: 25rpx;
45 | color: #555;
46 | }
47 | .minus{
48 | display: block;
49 | text-align: center;
50 | margin-right: 5px;
51 | border: 1px solid black;
52 | width: 26rpx;
53 | height: 26rpx;
54 | }
55 | .count{
56 | text-align: center;
57 | margin-right: 5px;
58 | border: 1px solid black;
59 | width: 52rpx;
60 | height: 26rpx;
61 | }
62 | .plus{
63 | display: block;
64 | text-align: center;
65 | margin-right: 5px;
66 | border: 1px solid black;
67 | width: 26rpx;
68 | height: 26rpx;
69 | }
70 | .empty{
71 | display: flex;
72 | }
73 | .empty image{
74 | height: 140px;
75 | width: 275px;
76 | }
77 | .empty text{
78 | margin-top: 40px;
79 | font-size: 30rpx;
80 | }
81 | .desc{
82 | display: flex;
83 | flex-direction: column;
84 | }
85 | .goShop{
86 | color: white;
87 | border:1px solid red;
88 | background-color: orangered;
89 | text-align: center;
90 | border-radius: 5px;
91 | }
92 | .settle{
93 | display: flex;
94 | justify-content: space-between;
95 | background-color: #fff;
96 | align-items: center;
97 | height: 60px;
98 | position: fixed;
99 | bottom: 0;
100 | width: 100%;
101 |
102 | border: 1px solid #ccc;
103 | }
104 | .select{
105 | display: flex;
106 | align-items: center;
107 | }
108 | .submit{
109 | display: flex;
110 | }
111 | .submit .total{
112 | display: flex;
113 | flex-direction: column;
114 | font-size: 25rpx;
115 | color: #555;
116 | }
117 | .submit .total .price{
118 | font-size: 40rpx;
119 | color: red;
120 | }
121 | .remove{
122 | position: absolute;
123 | left: 350px;
124 | }
125 |
126 | .father{
127 | height: 60px;
128 |
129 | }
--------------------------------------------------------------------------------
/前端代码/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "商品详情",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | ¥{{product.gprice}}
10 | {{product.gname}}
11 | 商品描述:{{product.gdesc}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 加入收藏
21 |
22 | 立即购买
23 |
24 |
25 |
--------------------------------------------------------------------------------
/前端代码/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 |
2 | .slides{
3 | height: 300px;
4 | }
5 |
6 | .slides swiper-item {
7 | display:flex;
8 | justify-content: center;
9 |
10 | }
11 | .slides swiper-item image{
12 | width: 220px;
13 |
14 | }
15 |
16 | .product-detail{
17 | display: flex;
18 | flex-direction: column;
19 | justify-content: space-between;
20 | background-color: white;
21 | height: 100px;
22 | margin-top: 2px;
23 | }
24 | .product-detail .title{
25 | font-size: 35rpx;
26 | font-weight: bold;
27 | }
28 | .product-detail .title-detailed{
29 | font-size: 28rpx;
30 | color:black;
31 | }
32 | .product-detail .price{
33 | width: 700px;
34 | background-color: red;
35 | font-size: 45rpx;
36 | font-weight: bold;
37 | color: rgb(255, 255, 255);
38 | }
39 | .service-detaild{
40 | display:flex;
41 | font-size: 30rpx;
42 | background-color: #9999;
43 | border-radius: 2px;
44 | margin-top: 10px;
45 | }
46 |
47 | .service-detaild .title{
48 | margin-left:25px;
49 | flex: 1;
50 | color: red;
51 | }
52 | .service-detaild .desc{
53 | flex: 3;
54 | }
55 |
56 | .evaluation{
57 | display: flex;
58 | flex-direction: column;
59 | margin-top: 50px;
60 |
61 | }
62 | .evaluation .title{
63 | width: 220rpx;
64 | height: 50rpx;
65 | margin: 0px auto;
66 | text-align: center;
67 | font-size: 35rpx;
68 | color: red;
69 | border-radius: 10px;
70 | }
71 |
72 | .evaluation .area{
73 | display: flex;
74 | flex-direction: column;
75 | border: 1rpx solid #9999;
76 | border-radius: 5px;
77 | margin-bottom: 10px;
78 | }
79 | .evaluation image{
80 | width: 30px;
81 | height: 30px;
82 | border-radius: 25px;
83 | margin-right: 10px;
84 | }
85 | .evaluation .area .name{
86 | font-size: 12px;
87 | color: #666;
88 | }
89 | .evaluation .area .userinfo{
90 | display: flex;
91 |
92 | }
93 |
94 | .evaluation .area text{
95 | padding-top: 7px;
96 | font-size: 30rpx;
97 | color:black;
98 |
99 | }
100 | .evaluation .area .eval{
101 | margin-left: 20px;
102 | }
103 |
104 | .evaluation .area .buydetail{
105 | display: flex;
106 | justify-content: space-around
107 | }
108 | .evaluation .area .product-name{
109 | font-size: 12px;
110 | color: #666;
111 | }
112 | .evaluation .area .buydate{
113 | font-size: 12px;
114 | color: #666;
115 | }
116 | .cart-buy{
117 | display: flex;
118 | justify-content: flex-end;
119 | align-items: center;
120 | position: fixed;
121 | bottom: 0;
122 | width: 100%;
123 | height: 50px;
124 | border: 1px solid lightgreen;
125 | background-color: white;
126 | }
127 | .cart-buy .cart{
128 | padding: 5px;
129 | font-size: 35rpx;
130 | color: red;
131 | background-color:orange;
132 | border: 1px solid red;
133 | border-radius: 5px;
134 | margin-right: 10px;
135 | }
136 |
137 | .cart-buy .buy{
138 | padding: 5px;
139 | font-size: 35rpx;
140 | color: rgb(255, 255, 255);
141 | background-color: red;
142 | border-radius: 5px;
143 | margin-right: 10px;
144 | }
145 | .father{
146 | height: 60px;
147 | }
148 |
149 |
--------------------------------------------------------------------------------
/前端代码/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //获取应用实例
2 | const app = getApp()
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | goods:[],
11 | radomnum:''
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | wx.request({
19 | url: '' + app.globalData.URL + '/findAllGoods.do',
20 | method:'POST',
21 | data:{
22 |
23 | },
24 | header:{
25 | "Content-Type": "application/x-www-form-urlencoded"
26 | },
27 | success:res=>{
28 | //console.log(res.data)
29 | this.setData({
30 | goods: res.data.info
31 | })
32 | }
33 | })
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面初次渲染完成
38 | */
39 | onReady: function () {
40 |
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面显示
45 | */
46 | onShow: function () {
47 | this.onLoad();
48 | },
49 |
50 | /**
51 | * 生命周期函数--监听页面隐藏
52 | */
53 | onHide: function () {
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面卸载
59 | */
60 | onUnload: function () {
61 |
62 | },
63 |
64 | /**
65 | * 页面相关事件处理函数--监听用户下拉动作
66 | */
67 | onPullDownRefresh: function () {
68 |
69 | },
70 |
71 | /**
72 | * 页面上拉触底事件的处理函数
73 | */
74 | onReachBottom: function () {
75 |
76 | },
77 |
78 | /**
79 | * 用户点击右上角分享
80 | */
81 | onShareAppMessage: function () {
82 |
83 | }
84 | })
--------------------------------------------------------------------------------
/前端代码/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/前端代码/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 商品搜索
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 | {{item.gname}}
28 | ¥{{item.gprice}}
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/前端代码/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 |
2 | .content{
3 | width: 100%;
4 | margin: 0 auto;
5 | }
6 | .slide{
7 | background-color: #ccc;
8 | }
9 | .slide image{
10 | display: block;
11 | width: 100%;
12 | height: 180px;
13 | }
14 |
15 | .portals{
16 | display: flex;
17 | flex-direction: column;
18 | flex-wrap: wrap;
19 | background-color: #ccc;
20 |
21 | }
22 | .portals .navList{
23 | display: flex;
24 | justify-content: space-between;
25 | align-items: flex-end;
26 | width: 100%;
27 | height: 150rpx;
28 | border-radius: 15rpx;
29 | background-color: white;
30 | margin-bottom: 10px;
31 | }
32 | .portals .navList .item{
33 | display: flex;
34 | flex-direction: column;
35 | justify-content: center;
36 | align-items: center;
37 | width: 180rpx;
38 | height: 150rpx;
39 | border: 1rpx solid #ccc;
40 | font-size: 30rpx;
41 |
42 | color: #666;
43 | }
44 | .portals .navList .item .ctrl{
45 | display: flex;
46 | flex-direction: column;
47 | }
48 | .portals .navList .item image{
49 | width: 50px;
50 | height: 50px;
51 | }
52 | .portals .title{
53 | width: 220rpx;
54 | height: 50rpx;
55 | border: 1px solid red;
56 | margin: 0px auto;
57 | text-align: center;
58 | font-size: 35rpx;
59 | color: red;
60 | border-radius: 10px;
61 | }
62 | .portals .list{
63 | display: flex;
64 | flex-wrap: wrap;
65 | align-items: center;
66 | align-content: center;
67 | margin-top: 10px;
68 | border: 1rpx solid #666;
69 |
70 | }
71 |
72 | .list .item{
73 | flex: 1;
74 | display: flex;
75 | flex-direction: column;
76 | justify-content: center;
77 | align-items: center;
78 | width: 300rpx;
79 | height: 350rpx;
80 | background-color:white;
81 | border-top: 1rpx solid #ddd;
82 | border-right: 1rpx solid #ddd;
83 | }
84 | .list .item text{
85 | color: red;
86 | }
87 | .list .item .name{
88 | color: grey;
89 | font-size: 25rpx;
90 | }
91 | .list .item image{
92 |
93 | width: 250rpx;
94 | height: 250rpx;
95 |
96 |
97 | }
98 |
99 | .search {
100 | height: 88rpx;
101 | width: 100%;
102 | padding: 0 30rpx;
103 | background: #fff;
104 | display: flex;
105 | align-items: center;
106 | }
107 |
108 | .search .input {
109 | width: 700rpx;
110 | height: 56rpx;
111 | background: #ededed;
112 | border-radius: 8rpx;
113 | display: flex;
114 | align-items: center;
115 | justify-content: center;
116 | }
117 |
118 | .search .icon {
119 | background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/search2-2fb94833aa.png) center no-repeat;
120 | background-size: 100%;
121 | width: 28rpx;
122 | height: 28rpx;
123 | }
124 |
125 | .search .txt {
126 | height: 42rpx;
127 | line-height: 42rpx;
128 | color: #666;
129 | padding-left: 10rpx;
130 | font-size: 30rpx;
131 | }
132 |
--------------------------------------------------------------------------------
/前端代码/pages/login/login.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 | Page({
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | username: '',
9 | password: '',
10 | user: [],
11 | haslogin:false
12 | },
13 |
14 | formSubmit: function (e) {
15 | //
16 | // console.log(e.detail.value)
17 | wx.request({
18 | url: '' + app.globalData.URL + '/user/login.do',
19 | method: 'POST',
20 | data: {
21 | username: e.detail.value.username,
22 | },
23 | header: {
24 | "Content-Type": "application/x-www-form-urlencoded"
25 | },
26 |
27 | success: res => {
28 | //console.log(res.data)
29 | this.setData({
30 | user: res.data.info
31 | })
32 |
33 | app.globalData.user = this.data //将登录信息 写入到全局变量中
34 |
35 | //console.log(app.globalData.user)
36 | //const username = res.data.info.username
37 | //console.log(username)
38 | //const pwd = res.data.info.password
39 | if (app.globalData.user.user == null) {
40 | //没有此联系人
41 | wx.showModal({
42 | title: '提示',
43 | content: '用户名不存在',
44 | showCancel: false,
45 | cancelColor: 'red'
46 | })
47 | } else {
48 | //联系人有,验证密码
49 | if (e.detail.value.password == app.globalData.user.user.password) {
50 | wx.switchTab({
51 | url: '../index/index',
52 | success: function (res) {
53 | wx.showToast({
54 | title: '登录成功',
55 | icon: 'none',
56 | duration: 2000
57 | })
58 | },
59 | fail: function (res) { },
60 | complete: function (res) { },
61 | })
62 | } else {
63 | wx.showModal({
64 | title: '提示',
65 | content: '密码错误',
66 | showCancel: false
67 | })
68 | }
69 |
70 | }
71 |
72 | }
73 |
74 | })
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面加载
80 | */
81 | onLoad: function (options) {
82 |
83 |
84 | },
85 |
86 | /**
87 | * 生命周期函数--监听页面初次渲染完成
88 | */
89 | onReady: function () {
90 |
91 | },
92 |
93 | /**
94 | * 生命周期函数--监听页面显示
95 | */
96 | onShow: function () {
97 |
98 | },
99 |
100 | /**
101 | * 生命周期函数--监听页面隐藏
102 | */
103 | onHide: function () {
104 |
105 | },
106 |
107 | /**
108 | * 生命周期函数--监听页面卸载
109 | */
110 | onUnload: function () {
111 |
112 | },
113 |
114 | /**
115 | * 页面相关事件处理函数--监听用户下拉动作
116 | */
117 | onPullDownRefresh: function () {
118 |
119 | },
120 |
121 | /**
122 | * 页面上拉触底事件的处理函数
123 | */
124 | onReachBottom: function () {
125 |
126 | },
127 |
128 | /**
129 | * 用户点击右上角分享
130 | */
131 | onShareAppMessage: function () {
132 |
133 | }
134 | })
--------------------------------------------------------------------------------
/前端代码/pages/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "用户登录",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/前端代码/pages/login/login.wxss:
--------------------------------------------------------------------------------
1 | /* pages/login/login.wxss */
2 | form{
3 | width: 310px;
4 | height: 240px;
5 | line-height: 40px;
6 | /* border: 1px solid red; */
7 | }
8 | input{
9 | border: 1px solid #ccc;
10 | width: 310px;
11 | height: 40px;
12 | }
13 | .button{
14 | margin-top: 20px;
15 | }
16 | .header text{
17 | font-size: 25px;
18 | color: #666;
19 | }
20 | form text{
21 | font-size: 20px;
22 | color: #666;
23 | }
24 | .fpwd{
25 | margin-top: 100px;
26 | }
27 | .fpwd text{
28 | color: #ccc;
29 | font-size: 18px;
30 | }
31 | .regist{
32 | width: 310px;
33 | }
34 |
--------------------------------------------------------------------------------
/前端代码/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/前端代码/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志",
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/前端代码/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/前端代码/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/前端代码/pages/mine/mine.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "个人中心",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/mine/mine.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 您还未登录
6 |
7 | 点击请登录
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{user.user.username}}
16 |
17 | 退出登录
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 我买过的
27 |
28 |
29 |
30 |
31 |
32 |
33 | 待发货
34 |
35 |
36 |
37 | 我发布的
38 |
39 |
40 |
41 | 待收货
42 |
43 |
44 |
45 | 待完善
46 |
47 |
48 |
49 |
50 |
51 | 必备工具
52 |
53 |
54 |
55 |
56 | 地址管理
57 |
58 |
59 |
60 |
61 | 意见反馈
62 |
63 |
64 |
65 |
66 |
67 | 联系客服
68 |
69 |
70 |
71 | 关于我们
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/前端代码/pages/mine/mine.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | height: 100%;
3 | width: 100%;
4 | background: #f4f4f4;
5 | }
6 | .userInfo{
7 | display: flex;
8 | align-items: center;
9 | margin: 3px;
10 | height: 80px;
11 | border: 1rpx solid #ccc;
12 | border-radius: 5px;
13 | width: 100%;
14 | }
15 | .userInfo image{
16 | width: 60px;
17 | height: 60px;
18 |
19 | border-radius: 3px;
20 | margin: 10px;
21 | }
22 | .userInfo .name{
23 | display: flex;
24 | flex-direction: column;
25 | justify-content: center;
26 | }
27 | .userInfo .nickname{
28 | font-size: 40rpx;
29 | font-weight: bold;
30 | }
31 | .userInfo .username{
32 | font-size: 30rpx;
33 | color: #666;
34 | }
35 |
36 | .container {
37 | background: #f4f4f4;
38 | height: auto;
39 | overflow: hidden;
40 | width: 100%;
41 | }
42 |
43 |
44 |
45 | .user_area {
46 | /* border: 1px solid black; */
47 | width: 100%;
48 | height: 100%;
49 | /* margin: 0 auto; */
50 | margin-top: -8rpx;
51 | background: #fff;
52 | /* border-top: 1px solid #f4f4f4; */
53 | }
54 |
55 | .user_row {
56 | /* border: 1px solid black; */
57 | height: 86rpx;
58 | line-height: 86rpx;
59 | border-bottom: 1px solid #fafafa;
60 | }
61 |
62 | .user_row_left {
63 | /* border: 1px solid #757575; */
64 | float: left;
65 | height: 86rpx;
66 | font-weight: 550;
67 | line-height: 86rpx;
68 | margin-left: 35rpx;
69 | font-size: 26rpx;
70 | letter-spacing: 1rpx;
71 | }
72 |
73 | .user_row_right {
74 | /* border: 1px solid #757575; */
75 | float: right;
76 | height: 40rpx;
77 | width: 40rpx;
78 | font-weight: 550;
79 | line-height: 86rpx;
80 | margin-top: 28rpx;
81 | margin-right: 30rpx;
82 | }
83 |
84 | .user_column {
85 | /* border: 1px solid black; */
86 | height: 140rpx;
87 | display: flex;
88 | justify-content: center;
89 | align-items: center;
90 | }
91 |
92 | .user_column_item {
93 | width: 30%;
94 | height: 140rpx;
95 | background: #fff;
96 | text-align: center;
97 | position: relative;
98 | }
99 |
100 | .user_column_item_badge {
101 | height: 28rpx;
102 | width: 28rpx;
103 | position: absolute;
104 | background: #b4282d;
105 | color: #fff;
106 | border-radius: 50%;
107 | margin-top: 20rpx;
108 | margin-left: 40rpx;
109 | }
110 |
111 | .user_column_item_image {
112 | width: 50rpx;
113 | height: 50rpx;
114 | margin-top: 30rpx;
115 | }
116 |
117 | .user_column_item_text {
118 | /* border: 1px solid black; */
119 | margin-top: 5rpx;
120 | font-size: 24rpx;
121 | color: #555;
122 | }
123 |
124 | .separate {
125 | background: #e0e3da;
126 | width: 100%;
127 | height: 6rpx;
128 | }
129 |
130 | .user_column_item_phone {
131 | width: 30%;
132 | text-align: center;
133 | display: flex;
134 | justify-content: center;
135 | align-items: center;
136 | flex-wrap: wrap;
137 | float: left;
138 | background: #fff;
139 | border-bottom: 1px solid #fafafa;
140 | }
141 |
142 | .user_column_item_phone::after {
143 | border: none;
144 | }
145 |
146 | .logout {
147 | margin-top: 30rpx;
148 | height: 100rpx;
149 | width: 100%;
150 | line-height: 100rpx;
151 | text-align: center;
152 | background: #fff;
153 | color: red;
154 | font-size: 30rpx;
155 | }
156 |
--------------------------------------------------------------------------------
/前端代码/pages/regist/regist.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | username: '',
10 | password: ''
11 | },
12 |
13 |
14 | /**
15 | * 绑定的函数
16 | */
17 | formSubmit: function (e) {
18 | //console.log(e.detail.value)
19 | const userName = e.detail.value.username;
20 | const passWord = e.detail.value.password;
21 | if (userName != '' && passWord != '') {
22 | this.setData({
23 | username: userName,
24 | password: passWord
25 | });
26 | } else {
27 | wx.showModal({
28 | title: '提示',
29 | content: '请将信息填写完整',
30 | })
31 | }
32 |
33 | //提交到服务器端
34 | wx.request({
35 | url: '' + app.globalData.URL + '/addUser.do',
36 | method: 'POST',
37 | data: {
38 | username: userName,
39 | password: passWord
40 | },
41 | header: {
42 | "Content-Type": "application/x-www-form-urlencoded"
43 | },
44 | success: res => {
45 | //console.log(res.data)
46 | if (res.data.code == 0) {
47 | //该用户名已被注册
48 | wx.showModal({
49 | title: '提示',
50 | content: '该用户名已被注册',
51 | })
52 | } else {
53 | wx.showModal({
54 | title: '提示',
55 | content: '注册成功,跳转登录界面',
56 | success: function (res) {
57 | if (res.cancel) {
58 | //点击取消,默认隐藏弹框
59 | }
60 | if (res.confirm) {
61 | //点击确定,跳转到登录界面
62 | wx.navigateTo({
63 | url: '../login/login',
64 | })
65 | }
66 | }
67 | })
68 | }
69 | }
70 | })
71 | },
72 |
73 | /**
74 | * 生命周期函数--监听页面加载
75 | */
76 | onLoad: function (options) {
77 |
78 | },
79 |
80 | /**
81 | * 生命周期函数--监听页面初次渲染完成
82 | */
83 | onReady: function () {
84 |
85 | },
86 |
87 | /**
88 | * 生命周期函数--监听页面显示
89 | */
90 | onShow: function () {
91 |
92 | },
93 |
94 | /**
95 | * 生命周期函数--监听页面隐藏
96 | */
97 | onHide: function () {
98 |
99 | },
100 |
101 | /**
102 | * 生命周期函数--监听页面卸载
103 | */
104 | onUnload: function () {
105 |
106 | },
107 |
108 | /**
109 | * 页面相关事件处理函数--监听用户下拉动作
110 | */
111 | onPullDownRefresh: function () {
112 |
113 | },
114 |
115 | /**
116 | * 页面上拉触底事件的处理函数
117 | */
118 | onReachBottom: function () {
119 |
120 | },
121 |
122 | /**
123 | * 用户点击右上角分享
124 | */
125 | onShareAppMessage: function () {
126 |
127 | }
128 | })
--------------------------------------------------------------------------------
/前端代码/pages/regist/regist.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "用户注册",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/regist/regist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
25 |
26 |
27 |
28 | 已有账号,去登录
29 |
30 |
31 |
--------------------------------------------------------------------------------
/前端代码/pages/regist/regist.wxss:
--------------------------------------------------------------------------------
1 | /* pages/login/login.wxss */
2 | form{
3 | width: 310px;
4 | height: 340px;
5 | line-height: 40px;
6 | /* border: 1px solid red; */
7 | }
8 | input{
9 | border: 1px solid #ccc;
10 | width: 310px;
11 | height: 40px;
12 | }
13 | .button{
14 | margin-top: 20px;
15 | }
16 | .header text{
17 | font-size: 25px;
18 | color: #666;
19 | }
20 | form text{
21 | font-size: 20px;
22 | color: #666;
23 | }
24 | .regist{
25 | margin-top: 20px;
26 | width: 310px;
27 | }
28 | .fpwd{
29 | margin-top: 70px;
30 | }
31 | .fpwd text{
32 | color: #ccc;
33 | font-size: 16px;
34 | }
35 |
--------------------------------------------------------------------------------
/前端代码/pages/release/release.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | gimage:'',
11 | gname:'',
12 | gprice:'',
13 | gdesc:'',
14 | gnum:'',
15 | uid:''
16 | },
17 |
18 | //添加图片
19 | chooseImageTap: function (options){
20 | if (app.globalData.user.user == null) {
21 | wx.showToast({
22 | title: '请先登录',
23 | icon: 'none',
24 | duration: 2000
25 | })
26 | } else{
27 | var that = this;
28 | wx.chooseImage({
29 | count: 1,
30 | sizeType: ['compressed'],
31 | sourceType: ['ablum', 'camera'],//从相册中选择和从拍照中选择
32 | success: function (res) {
33 | var gimage = res.tempFilePaths;
34 | //console.log(gimage)
35 | that.setData({
36 | gimage: gimage,
37 | }),
38 | app.globalData.gimagepath = that.data.gimage //将上传图片的路径写入全局变量
39 | // console.log(app.globalData.gimagepath)
40 | // console.log(app.globalData.user.user.uid)
41 | },
42 | })
43 | }
44 |
45 | },
46 | //表单提交
47 | formSubmit:function(e){
48 | if (app.globalData.user.user == null) {
49 | wx.showToast({
50 | title: '请先登录',
51 | icon: 'none',
52 | duration: 2000
53 | })
54 | } else {
55 | // console.log(e.detail.value)
56 | wx.request({
57 | url: '' + app.globalData.URL + '/addGoods.do',
58 | method: 'POST',
59 | data: {
60 | gname: e.detail.value.gname,
61 | gprice: e.detail.value.gprice,
62 | gdesc: e.detail.value.gdesc,
63 | gnum: e.detail.value.gnum,
64 | gimage: app.globalData.gimagepath,
65 | uid: app.globalData.user.user.uid
66 | },
67 | header: {
68 | "Content-Type": "application/x-www-form-urlencoded"
69 | },
70 |
71 | success: res => {
72 |
73 | wx.switchTab({
74 | url: '../index/index',
75 | success: function (res) {
76 | wx.showToast({
77 | title: '发布成功',
78 | icon: 'none',
79 | duration: 2000
80 | })
81 | },
82 | fail: function (res) { },
83 | complete: function (res) { },
84 | })
85 | }
86 | })
87 | }
88 |
89 | },
90 | /**
91 | * 生命周期函数--监听页面加载
92 | */
93 | onLoad: function (options) {
94 |
95 | },
96 |
97 | /**
98 | * 生命周期函数--监听页面初次渲染完成
99 | */
100 | onReady: function () {
101 |
102 | },
103 |
104 | /**
105 | * 生命周期函数--监听页面显示
106 | */
107 | onShow: function () {
108 |
109 | },
110 |
111 | /**
112 | * 生命周期函数--监听页面隐藏
113 | */
114 | onHide: function () {
115 |
116 | },
117 |
118 | /**
119 | * 生命周期函数--监听页面卸载
120 | */
121 | onUnload: function () {
122 |
123 | },
124 |
125 | /**
126 | * 页面相关事件处理函数--监听用户下拉动作
127 | */
128 | onPullDownRefresh: function () {
129 |
130 | },
131 |
132 | /**
133 | * 页面上拉触底事件的处理函数
134 | */
135 | onReachBottom: function () {
136 |
137 | },
138 |
139 | /**
140 | * 用户点击右上角分享
141 | */
142 | onShareAppMessage: function () {
143 |
144 | }
145 | })
--------------------------------------------------------------------------------
/前端代码/pages/release/release.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#f4f4f4",
3 | "navigationBarTitleText": "发布商品",
4 | "enablePullDownRefresh": false
5 | }
--------------------------------------------------------------------------------
/前端代码/pages/release/release.wxml:
--------------------------------------------------------------------------------
1 |
2 |
25 |
--------------------------------------------------------------------------------
/前端代码/pages/release/release.wxss:
--------------------------------------------------------------------------------
1 | input{
2 | border: 1px solid #ccc;
3 | width: 98%;
4 | height: 40px;
5 | margin: 8px;
6 | align-content: center;
7 | }
8 |
9 | .btn{
10 | background: green;
11 | color: white;
12 | }
--------------------------------------------------------------------------------
/前端代码/pages/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/search/search.js
2 | var app = getApp()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | goods: [],
10 | input:'',
11 | },
12 |
13 |
14 |
15 | formSubmit: function(e) {
16 | wx.request({
17 | url: '' + app.globalData.URL + '/findGoodsByName.do',
18 | method: 'GET',
19 | data: {
20 | input: e.detail.value.input,
21 | },
22 | header: {
23 | "Content-Type": "application/x-www-form-urlencoded"
24 | },
25 |
26 | success: res => {
27 | //console.log(res.data)
28 | this.setData({
29 | goods: res.data.info
30 | })
31 | }
32 | })
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面加载
37 | */
38 | onLoad: function (options) {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面初次渲染完成
44 | */
45 | onReady: function () {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面显示
51 | */
52 | onShow: function () {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面隐藏
58 | */
59 | onHide: function () {
60 |
61 | },
62 |
63 | /**
64 | * 生命周期函数--监听页面卸载
65 | */
66 | onUnload: function () {
67 |
68 | },
69 |
70 | /**
71 | * 页面相关事件处理函数--监听用户下拉动作
72 | */
73 | onPullDownRefresh: function () {
74 |
75 | },
76 |
77 | /**
78 | * 页面上拉触底事件的处理函数
79 | */
80 | onReachBottom: function () {
81 |
82 | },
83 |
84 | /**
85 | * 用户点击右上角分享
86 | */
87 | onShareAppMessage: function () {
88 |
89 | }
90 | })
--------------------------------------------------------------------------------
/前端代码/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "搜索"
3 | }
--------------------------------------------------------------------------------
/前端代码/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
18 |
20 |
21 | {{item.gname}}
22 | ¥{{item.gprice}}
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/前端代码/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search.wxss */
2 | page {
3 | min-height: 100%;
4 | background-color: #f4f4f4;
5 | }
6 |
7 | .container {
8 | min-height: 100%;
9 | background-color: #f4f4f4;
10 | }
11 |
12 | .search-header {
13 | position: fixed;
14 | top: 0;
15 | width: 685rpx;
16 | height: 91rpx;
17 | display: flex;
18 | background: #fff;
19 | border-bottom: 1px solid rgba(0, 0, 0, 0.15);
20 | padding: 0 31.25rpx;
21 | font-size: 29rpx;
22 | color: #333;
23 | }
24 |
25 | .search-header .input-box {
26 | position: relative;
27 | margin-top: 16rpx;
28 | float: left;
29 | width: 0;
30 | flex: 1;
31 | height: 59rpx;
32 | line-height: 59rpx;
33 | padding: 0 20rpx;
34 | background: #f4f4f4;
35 | }
36 |
37 | .search-header .icon {
38 | position: absolute;
39 | top: 14rpx;
40 | left: 20rpx;
41 | width: 31rpx;
42 | height: 31rpx;
43 | }
44 |
45 | .search-header .del {
46 | position: absolute;
47 | top: 3rpx;
48 | right: 10rpx;
49 | width: 53rpx;
50 | height: 53rpx;
51 | z-index: 10;
52 | }
53 |
54 | .search-header .keywrod {
55 | position: absolute;
56 | top: 0;
57 | left: 40rpx;
58 | width: 506rpx;
59 | height: 59rpx;
60 | padding-left: 30rpx;
61 | }
62 |
63 | .search-header .right {
64 | margin-top: 22rpx;
65 | margin-left: 33rpx;
66 | margin-right: 6rpx;
67 | width: 120rpx;
68 | height: 50rpx;
69 | line-height: 43rpx;
70 | float: right;
71 | }
72 | .search-header .right .txt {
73 | color:red;
74 | }
75 |
76 |
77 | .portals .list{
78 | display: flex;
79 | flex-wrap: wrap;
80 | align-items: center;
81 | align-content: center;
82 | margin-top: 10px;
83 | border: 1rpx solid #666;
84 |
85 | }
86 |
87 | .list .item{
88 | flex: 1;
89 | display: flex;
90 | flex-direction: column;
91 | justify-content: center;
92 | align-items: center;
93 | width: 300rpx;
94 | height: 350rpx;
95 | background-color:white;
96 | border-top: 1rpx solid #ddd;
97 | border-right: 1rpx solid #ddd;
98 | }
99 | .list .item text{
100 | color: red;
101 | }
102 | .list .item .name{
103 | color: grey;
104 | font-size: 25rpx;
105 | }
106 | .list .item image{
107 |
108 | width: 250rpx;
109 | height: 250rpx;
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/前端代码/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": false,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true,
12 | "autoAudits": false,
13 | "checkInvalidKey": true
14 | },
15 | "compileType": "miniprogram",
16 | "libVersion": "2.0.4",
17 | "appid": "wx977a202385225d6b",
18 | "projectname": "lanlan",
19 | "debugOptions": {
20 | "hidedInDevtools": []
21 | },
22 | "isGameTourist": false,
23 | "simulatorType": "wechat",
24 | "simulatorPluginLibVersion": {},
25 | "condition": {
26 | "search": {
27 | "current": -1,
28 | "list": []
29 | },
30 | "conversation": {
31 | "current": -1,
32 | "list": []
33 | },
34 | "game": {
35 | "currentL": -1,
36 | "list": []
37 | },
38 | "miniprogram": {
39 | "current": -1,
40 | "list": []
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/前端代码/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/前端代码/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MiniWechat
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.common.project.facet.core.builder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.validation.validationbuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.jem.workbench.JavaEMFNature
26 | org.eclipse.wst.common.modulecore.ModuleCoreNature
27 | org.eclipse.wst.common.project.facet.core.nature
28 | org.eclipse.jdt.core.javanature
29 | org.eclipse.wst.jsdt.core.jsNature
30 |
31 |
32 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.compliance=1.8
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.8
8 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/后台代码/MiniWechat/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/c3p0-0.9.1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/c3p0-0.9.1.2.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-beanutils-1.8.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-beanutils-1.8.3.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-dbutils-1.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-dbutils-1.6.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/fastjson-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/fastjson-1.2.2.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/lib/mysql-connector-java-5.1.39-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/WEB-INF/lib/mysql-connector-java-5.1.39-bin.jar
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MiniWechat
4 |
5 | index.html
6 | index.htm
7 | index.jsp
8 | default.html
9 | default.htm
10 | default.jsp
11 |
12 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/admin/admin1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/admin/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
25 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
49 |
50 |
72 |
73 |
74 |
75 |
76 |
77 |
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/5c_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/5c_80.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/MIX-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/MIX-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/banner.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/banner2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/banner2.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/compare.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/compare.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/ghs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/ghs.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/gwc_xiaomi6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/gwc_xiaomi6.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_01.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_02.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_02.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_03.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_04.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_04.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_05.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_05.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hjh_06.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hjh_06.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hm4-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hm4-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hm4A-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hm4A-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hm4x_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hm4x_80.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hmn4x80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hmn4x80.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hmnote4-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hmnote4-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hongmi4x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hongmi4x.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/hongmin4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/hongmin4.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_hongmin42.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_hongmin42.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4_dd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4_dd.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_hongmin4x.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5c.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5c.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi5s.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomi6.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomimix.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomimix.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liebiao_xiaomint2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liebiao_xiaomint2.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/liulangengduo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/liulangengduo.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/login_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/login_bg.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/logo_foot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/logo_foot.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/logo_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/logo_top.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/mimobile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/mimobile.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/mistore_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/mistore_logo.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian1.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian10.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian2.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian3.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian4.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian5.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian6.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian7.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian8.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/peijian9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/peijian9.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinghengche.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinghengche.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinpai1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinpai1.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinpai2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinpai2.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinpai3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinpai3.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinpai4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinpai4.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/pinpai5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/pinpai5.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/star_red.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/star_red.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xiaomi5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xiaomi5.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xm5-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xm5-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xm5S-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xm5S-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xm5Splus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xm5Splus.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xm6_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xm6_80.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xmNOTE2-80.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xmNOTE2-80.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/xmad_14926862610682_UhkfS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/xmad_14926862610682_UhkfS.png
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/yanzhengma.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/yanzhengma.jpg
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/image/yyymix.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/WebContent/image/yyymix.gif
--------------------------------------------------------------------------------
/后台代码/MiniWechat/WebContent/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/c3p0-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.mysql.jdbc.Driver
6 | jdbc:mysql://localhost:3306/miniwechat?useSSL=true
7 | root
8 | 123456
9 |
10 | 3
11 | 6
12 | 2000
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddAddressServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddAddressServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddCollection.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddCollection.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddGoodsServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddGoodsServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddOrderServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddOrderServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddUserServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AddUserServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdminFindAllOrdersServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdminFindAllOrdersServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdmintFindAllGoods.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdmintFindAllGoods.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdmitLoginServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/AdmitLoginServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/DeleteAddressServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/DeleteAddressServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/DeleteGoodsByIdServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/DeleteGoodsByIdServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindALLGoodsServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindALLGoodsServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindAddressServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindAddressServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindAllUserSerlvlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindAllUserSerlvlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindCollectionByUid.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindCollectionByUid.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindGoodsByName.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindGoodsByName.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindMyReleased.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindMyReleased.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindOneAddressServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindOneAddressServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindOneGoodServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindOneGoodServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindSomeoneOrder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/FindSomeoneOrder.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/RemoveCollectionServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/RemoveCollectionServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/SearchOrderServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/SearchOrderServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/SelectSomeUser.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/SelectSomeUser.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/ShipmentsGoodsServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/ShipmentsGoodsServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/ShipmentsMyGoodsServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/ShipmentsMyGoodsServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/UpdateOrderServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/UpdateOrderServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/UserLoginServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/controller/UserLoginServlet.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/AddressDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/AddressDao.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/CollectionDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/CollectionDao.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/GoodsDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/GoodsDao.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/OrderDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/OrderDao.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/UserDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/UserDao.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/AddressDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/AddressDaoImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/CollectionDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/CollectionDaoImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/GoodDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/GoodDaoImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/OrderDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/OrderDaoImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/UserDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/dao/impl/UserDaoImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Address.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Address.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Collection.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Collection.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Goods.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Goods.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Order.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/Order.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/entity/User.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/filter/EncodingFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/filter/EncodingFilter.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/AddressService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/AddressService.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/CollectionService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/CollectionService.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/GoodsService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/GoodsService.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/AddressServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/AddressServiceImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/CollectionServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/CollectionServiceImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/GoodsServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/GoodsServiceImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/OrderServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/OrderServiceImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/UserServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/Impl/UserServiceImpl.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/OrderService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/OrderService.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/UserService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/service/UserService.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/utils/JdbcUtils.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/utils/JdbcUtils.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/utils/JsonUtils.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/utils/JsonUtils.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/JsonBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/JsonBean.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VCollection.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VCollection.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VGoods.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VGoods.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VOrders.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangjianlin1985/WeChat_MiniProgram_Campus_second-hand/37c9389579e5b8e44895a9481660f469617df6f2/后台代码/MiniWechat/build/classes/com/zjj/miniwechat/vo/VOrders.class
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/c3p0-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.mysql.jdbc.Driver
6 | jdbc:mysql://localhost:3306/miniwechat?useSSL=true
7 | root
8 | 123456
9 |
10 | 3
11 | 6
12 | 2000
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AddAddressServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.entity.Address;
11 | import com.zjj.miniwechat.service.AddressService;
12 | import com.zjj.miniwechat.service.Impl.AddressServiceImpl;
13 | import com.zjj.miniwechat.utils.JsonUtils;
14 |
15 | /**
16 | * Servlet implementation class AddAddressServlet
17 | */
18 | @WebServlet("/addAddress.do")
19 | public class AddAddressServlet extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 | private AddressService addressService = new AddressServiceImpl();
23 |
24 |
25 | /**
26 | * @see HttpServlet#HttpServlet()
27 | */
28 | public AddAddressServlet() {
29 | super();
30 | // TODO Auto-generated constructor stub
31 | }
32 |
33 | /**
34 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
35 | */
36 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
37 | // TODO Auto-generated method stub
38 | String tel = request.getParameter("tel");
39 | String address = request.getParameter("address");
40 | String uid = request.getParameter("uid");
41 | //String aid = request.getParameter("aid");
42 | // System.out.println("dizhi" +address);
43 | // System.out.println("dianhua" +tel);
44 | Address userAddress = new Address();
45 | userAddress.setTel(tel);
46 | userAddress.setAddress(address);
47 | userAddress.setUid(Integer.parseInt(uid));
48 |
49 | try {
50 |
51 | addressService.addAddress(userAddress);
52 | JsonUtils.writeJsonStr(null, response);
53 | } catch (Exception e) {
54 | // TODO: handle exception
55 | e.getStackTrace();
56 | JsonUtils.writeJsonStr(e.getStackTrace(), response);
57 | }
58 | }
59 |
60 | /**
61 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
62 | */
63 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
64 | // TODO Auto-generated method stub
65 | doGet(request, response);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AddCollection.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.entity.Collection;
11 | import com.zjj.miniwechat.service.CollectionService;
12 | import com.zjj.miniwechat.service.Impl.CollectionServiceImpl;
13 | import com.zjj.miniwechat.utils.JsonUtils;
14 |
15 | /**
16 | * Servlet implementation class AddCollection
17 | */
18 | @WebServlet("/addCollection.do")
19 | public class AddCollection extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 |
23 | private CollectionService collectionService = new CollectionServiceImpl();
24 | /**
25 | * @see HttpServlet#HttpServlet()
26 | */
27 | public AddCollection() {
28 | super();
29 | // TODO Auto-generated constructor stub
30 | }
31 |
32 | /**
33 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
34 | */
35 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
36 | // TODO Auto-generated method stub
37 |
38 | String gid = request.getParameter("gid");
39 | String uid = request.getParameter("uid");
40 |
41 |
42 | Collection collection = new Collection();
43 |
44 | collection.setGid(Integer.parseInt(gid));
45 | collection.setUid(Integer.parseInt(uid));
46 |
47 | try {
48 | collectionService.addCollection(collection);
49 | JsonUtils.writeJsonStr(null, response);
50 | } catch (Exception e) {
51 | // TODO: handle exception
52 | e.getStackTrace();
53 | JsonUtils.writeJsonStr(e.getMessage(), response);
54 | }
55 | }
56 |
57 | /**
58 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
59 | */
60 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
61 | // TODO Auto-generated method stub
62 | doGet(request, response);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AddGoodsServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import org.apache.commons.beanutils.BeanUtils;
13 | import org.apache.commons.fileupload.FileItem;
14 | import org.apache.commons.fileupload.disk.DiskFileItemFactory;
15 | import org.apache.commons.fileupload.servlet.ServletFileUpload;
16 |
17 |
18 | import com.zjj.miniwechat.entity.Goods;
19 | import com.zjj.miniwechat.service.GoodsService;
20 | import com.zjj.miniwechat.service.Impl.GoodsServiceImpl;
21 | import com.zjj.miniwechat.utils.JsonUtils;
22 |
23 | /**
24 | * Servlet implementation class AddGoodsServlet
25 | */
26 | @WebServlet("/addGoods.do")
27 | public class AddGoodsServlet extends HttpServlet {
28 | private static final long serialVersionUID = 1L;
29 |
30 |
31 | private GoodsService goodsService = new GoodsServiceImpl();
32 | /**
33 | * @see HttpServlet#HttpServlet()
34 | */
35 | public AddGoodsServlet() {
36 | super();
37 | // TODO Auto-generated constructor stub
38 | }
39 |
40 | /**
41 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
42 | */
43 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
44 | // TODO Auto-generated method stub
45 | String gname = request.getParameter("gname");
46 | String gprice = request.getParameter("gprice");
47 | String gdesc = request.getParameter("gdesc");
48 | String gnum = request.getParameter("gnum");
49 | String gimage = request.getParameter("gimage");
50 | String uid = request.getParameter("uid");
51 |
52 | Goods goods = new Goods();
53 | goods.setGname(gname);
54 | goods.setGprice(Integer.parseInt(gprice));
55 | goods.setGdesc(gdesc);
56 | goods.setGnum(Integer.parseInt(gnum));
57 | goods.setGimage(gimage);
58 | goods.setUid(Integer.parseInt(uid));
59 |
60 | try {
61 | goodsService.addGoods(goods);
62 | JsonUtils.writeJsonStr(null, response);
63 | } catch (Exception e) {
64 | // TODO: handle exception
65 | e.getStackTrace();
66 | JsonUtils.writeJsonStr(e.getMessage(), response);
67 | }
68 |
69 |
70 | }
71 |
72 | /**
73 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
74 | */
75 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
76 | // TODO Auto-generated method stub
77 | doGet(request, response);
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AddUserServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.entity.User;
11 | import com.zjj.miniwechat.service.UserService;
12 | import com.zjj.miniwechat.service.Impl.UserServiceImpl;
13 | import com.zjj.miniwechat.utils.JsonUtils;
14 |
15 | /**
16 | * Servlet implementation class AddUserServlet
17 | */
18 | @WebServlet("/addUser.do")
19 | public class AddUserServlet extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 | private UserService userService = new UserServiceImpl();
23 |
24 | /**
25 | * @see HttpServlet#HttpServlet()
26 | */
27 | public AddUserServlet() {
28 | super();
29 | // TODO Auto-generated constructor stub
30 | }
31 |
32 | /**
33 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
34 | */
35 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
36 | // TODO Auto-generated method stub
37 | //获得前台出来的参数
38 | String username = request.getParameter("username");
39 | String password = request.getParameter("password");
40 |
41 | User user = new User();
42 | user.setUsername(username);
43 | user.setPassword(password);
44 |
45 | //查询用户是否存在
46 | User findUser = userService.findUser(username);
47 | if (null == findUser) {
48 | try {
49 | //用户不存在,添加
50 | userService.addUser(user);
51 | JsonUtils.writeJsonStr2(1, null, response);
52 | } catch (Exception e) {
53 | // TODO: handle exception
54 | e.getStackTrace();
55 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
56 | }
57 | } else {
58 | JsonUtils.writeJsonStr2(0, "用户名已存在", response);
59 | }
60 |
61 | }
62 |
63 | /**
64 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
65 | */
66 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
67 | // TODO Auto-generated method stub
68 | doGet(request, response);
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AdminFindAllOrdersServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 |
13 | import com.zjj.miniwechat.service.OrderService;
14 | import com.zjj.miniwechat.service.Impl.OrderServiceImpl;
15 | import com.zjj.miniwechat.utils.JsonUtils;
16 | import com.zjj.miniwechat.vo.VOrders;
17 |
18 | /**
19 | * Servlet implementation class AdminFindAllgoodsServlet
20 | */
21 | @WebServlet("/adminFindAllOrders.do")
22 | public class AdminFindAllOrdersServlet extends HttpServlet {
23 | private static final long serialVersionUID = 1L;
24 |
25 |
26 | private OrderService orderService = new OrderServiceImpl();
27 | /**
28 | * @see HttpServlet#HttpServlet()
29 | */
30 | public AdminFindAllOrdersServlet() {
31 | super();
32 | // TODO Auto-generated constructor stub
33 | }
34 |
35 | /**
36 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
37 | */
38 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
39 | try {
40 | // TODO Auto-generated method stub
41 | List
list = orderService.findAllOrder();
42 | JsonUtils.writeJsonStr2(1, list, response);
43 | } catch (Exception e) {
44 | // TODO: handle exception
45 |
46 | e.getStackTrace();
47 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
48 | }
49 | }
50 |
51 | /**
52 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
53 | */
54 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
55 | // TODO Auto-generated method stub
56 | doGet(request, response);
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AdmintFindAllGoods.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.zjj.miniwechat.entity.Goods;
13 | import com.zjj.miniwechat.service.GoodsService;
14 | import com.zjj.miniwechat.service.Impl.GoodsServiceImpl;
15 | import com.zjj.miniwechat.utils.JsonUtils;
16 |
17 | /**
18 | * Servlet implementation class AdmintFindAllGoods
19 | */
20 | @WebServlet("/admintFindAllGoods.do")
21 | public class AdmintFindAllGoods extends HttpServlet {
22 | private static final long serialVersionUID = 1L;
23 |
24 |
25 | private GoodsService goodsService = new GoodsServiceImpl();
26 | /**
27 | * @see HttpServlet#HttpServlet()
28 | */
29 | public AdmintFindAllGoods() {
30 | super();
31 | // TODO Auto-generated constructor stub
32 | }
33 |
34 | /**
35 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
36 | */
37 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
38 | try {
39 | // TODO Auto-generated method stub
40 | List list = goodsService.findAllGoods();
41 | JsonUtils.writeJsonStr2(1, list, response);
42 | } catch (Exception e) {
43 | // TODO: handle exception
44 | e.getStackTrace();
45 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
46 | }
47 | }
48 |
49 | /**
50 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
51 | */
52 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
53 | // TODO Auto-generated method stub
54 | doGet(request, response);
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/AdmitLoginServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.entity.User;
11 | import com.zjj.miniwechat.service.UserService;
12 | import com.zjj.miniwechat.service.Impl.UserServiceImpl;
13 | import com.zjj.miniwechat.utils.JsonUtils;
14 |
15 | /**
16 | * Servlet implementation class AdmitLoginServlet
17 | */
18 | @WebServlet("/adminLogin.do")
19 | public class AdmitLoginServlet extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 |
23 | private UserService userService = new UserServiceImpl();
24 | /**
25 | * @see HttpServlet#HttpServlet()
26 | */
27 | public AdmitLoginServlet() {
28 | super();
29 | // TODO Auto-generated constructor stub
30 | }
31 |
32 | /**
33 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
34 | */
35 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
36 | // TODO Auto-generated method stub
37 | String username = request.getParameter("username");
38 | String password = request.getParameter("password");
39 |
40 | try {
41 | User findUser = userService.findUser(username);
42 |
43 | if (findUser != null ) {
44 | //判断用户名和密码是否正确
45 | if (findUser.getUsername().equals(username) && findUser.getPassword().equals(password)) {
46 | //判断权限
47 | if (1 == findUser.getUroleId()) {
48 | JsonUtils.writeJsonStr2(1, null, response);
49 | } else {
50 | RuntimeException exception = new RuntimeException("权限不足,无法进入后台");
51 | JsonUtils.writeJsonStr2(0, exception , response);
52 | }
53 |
54 | } else {
55 | RuntimeException exception = new RuntimeException("用户名或者密码不正确");
56 | JsonUtils.writeJsonStr2(0, exception , response);
57 | }
58 | } else {
59 | RuntimeException exception = new RuntimeException("用户名或者密码不正确");
60 | JsonUtils.writeJsonStr2(0, exception , response);
61 | }
62 | } catch (Exception e) {
63 | // TODO: handle exception
64 | e.getStackTrace();
65 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
66 | }
67 |
68 |
69 | }
70 |
71 | /**
72 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
73 | */
74 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
75 | // TODO Auto-generated method stub
76 | doGet(request, response);
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/DeleteAddressServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.AddressService;
11 | import com.zjj.miniwechat.service.Impl.AddressServiceImpl;
12 | import com.zjj.miniwechat.utils.JsonUtils;
13 |
14 | /**
15 | * Servlet implementation class DeleteAddressServlet
16 | */
17 | @WebServlet("/deleteAddress.do")
18 | public class DeleteAddressServlet extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 |
22 | private AddressService addressService = new AddressServiceImpl();
23 | /**
24 | * @see HttpServlet#HttpServlet()
25 | */
26 | public DeleteAddressServlet() {
27 | super();
28 | // TODO Auto-generated constructor stub
29 | }
30 |
31 | /**
32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35 | // TODO Auto-generated method stub
36 | String aid = request.getParameter("aid");
37 | try {
38 | addressService.deleteAddress(Integer.parseInt(aid));
39 | JsonUtils.writeJsonStr(null, response);
40 | } catch (Exception e) {
41 | // TODO: handle exception
42 | e.getStackTrace();
43 | JsonUtils.writeJsonStr(e.getMessage(), response);
44 | }
45 | }
46 |
47 | /**
48 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
49 | */
50 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
51 | // TODO Auto-generated method stub
52 | doGet(request, response);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/DeleteGoodsByIdServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.GoodsService;
11 | import com.zjj.miniwechat.service.Impl.GoodsServiceImpl;
12 | import com.zjj.miniwechat.utils.JsonUtils;
13 |
14 | /**
15 | * Servlet implementation class DeleteGoodsByIdServlet
16 | */
17 | @WebServlet("/deleteGoods.do")
18 | public class DeleteGoodsByIdServlet extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 |
22 | private GoodsService goodsService = new GoodsServiceImpl();
23 | /**
24 | * @see HttpServlet#HttpServlet()
25 | */
26 | public DeleteGoodsByIdServlet() {
27 | super();
28 | // TODO Auto-generated constructor stub
29 | }
30 |
31 | /**
32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35 | // TODO Auto-generated method stub
36 |
37 | String gid = request.getParameter("gid");
38 | try {
39 | goodsService.deleteGoodsById(Integer.parseInt(gid));
40 | //JsonUtils.writeJsonStr2(1, null, response);
41 | } catch (Exception e) {
42 | // TODO: handle exception
43 | e.getStackTrace();
44 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
45 | }
46 | }
47 |
48 | /**
49 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
50 | */
51 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
52 | // TODO Auto-generated method stub
53 | doGet(request, response);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/RemoveCollectionServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.CollectionService;
11 | import com.zjj.miniwechat.service.Impl.CollectionServiceImpl;
12 | import com.zjj.miniwechat.utils.JsonUtils;
13 |
14 | /**
15 | * Servlet implementation class RemoveCollectionServlet
16 | */
17 | @WebServlet("/removeCollection.do")
18 | public class RemoveCollectionServlet extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 |
22 | private CollectionService collectionService = new CollectionServiceImpl();
23 | /**
24 | * @see HttpServlet#HttpServlet()
25 | */
26 | public RemoveCollectionServlet() {
27 | super();
28 | // TODO Auto-generated constructor stub
29 | }
30 |
31 | /**
32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35 | // TODO Auto-generated method stub
36 | String cid = request.getParameter("cid");
37 | try {
38 | collectionService.removeCollection(Integer.parseInt(cid));
39 | JsonUtils.writeJsonStr(null, response);
40 | } catch (Exception e) {
41 | // TODO: handle exception
42 | e.getStackTrace();
43 | JsonUtils.writeJsonStr(e.getMessage(), response);
44 | }
45 | }
46 |
47 | /**
48 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
49 | */
50 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
51 | // TODO Auto-generated method stub
52 | doGet(request, response);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/SearchOrderServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.zjj.miniwechat.service.OrderService;
13 | import com.zjj.miniwechat.service.Impl.OrderServiceImpl;
14 | import com.zjj.miniwechat.utils.JsonUtils;
15 | import com.zjj.miniwechat.vo.VOrders;
16 |
17 | /**
18 | * Servlet implementation class SearchOrderServlet
19 | */
20 | @WebServlet("/searchSomeOrder.do")
21 | public class SearchOrderServlet extends HttpServlet {
22 | private static final long serialVersionUID = 1L;
23 |
24 |
25 | private OrderService orderService = new OrderServiceImpl();
26 | /**
27 | * @see HttpServlet#HttpServlet()
28 | */
29 | public SearchOrderServlet() {
30 | super();
31 | // TODO Auto-generated constructor stub
32 | }
33 |
34 | /**
35 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
36 | */
37 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
38 | // TODO Auto-generated method stub
39 |
40 | String name = request.getParameter("name");
41 | String type = request.getParameter("type");
42 |
43 | // System.out.println("name="+name);
44 | // System.out.println("type="+type);
45 | try {
46 | List list = orderService.findOrderBySomeThings(name, Integer.parseInt(type));
47 | JsonUtils.writeJsonStr2(1, list, response);
48 | } catch (Exception e) {
49 | // TODO: handle exception
50 | e.getStackTrace();
51 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
52 | }
53 | }
54 |
55 | /**
56 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
57 | */
58 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
59 | // TODO Auto-generated method stub
60 | doGet(request, response);
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/SelectSomeUser.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.util.List;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.zjj.miniwechat.entity.User;
13 | import com.zjj.miniwechat.service.UserService;
14 | import com.zjj.miniwechat.service.Impl.UserServiceImpl;
15 | import com.zjj.miniwechat.utils.JsonUtils;
16 |
17 | /**
18 | * Servlet implementation class SelectSomeUser
19 | */
20 | @WebServlet("/selectSomeUser.do")
21 | public class SelectSomeUser extends HttpServlet {
22 | private static final long serialVersionUID = 1L;
23 |
24 |
25 | private UserService userService = new UserServiceImpl();
26 | /**
27 | * @see HttpServlet#HttpServlet()
28 | */
29 | public SelectSomeUser() {
30 | super();
31 | // TODO Auto-generated constructor stub
32 | }
33 |
34 | /**
35 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
36 | */
37 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
38 | // TODO Auto-generated method stub
39 |
40 | String username = request.getParameter("username");
41 | String roleId = request.getParameter("roleId");
42 |
43 | List list = null;
44 | try {
45 | list = userService.selectUser(username, Integer.parseInt(roleId));
46 | JsonUtils.writeJsonStr2(1, list, response);
47 | } catch (Exception e) {
48 | // TODO: handle exception
49 | e.getStackTrace();
50 | JsonUtils.writeJsonStr2(0, e.getMessage(), response);
51 | }
52 | }
53 |
54 | /**
55 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
56 | */
57 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
58 | // TODO Auto-generated method stub
59 | doGet(request, response);
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/ShipmentsGoodsServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.OrderService;
11 | import com.zjj.miniwechat.service.Impl.OrderServiceImpl;
12 | import com.zjj.miniwechat.utils.JsonUtils;
13 |
14 | /**
15 | * Servlet implementation class ShipmentsGoodsServlet
16 | */
17 | @WebServlet("/shipments.do")
18 | public class ShipmentsGoodsServlet extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 |
22 | private OrderService orderService = new OrderServiceImpl();
23 | /**
24 | * @see HttpServlet#HttpServlet()
25 | */
26 | public ShipmentsGoodsServlet() {
27 | super();
28 | // TODO Auto-generated constructor stub
29 | }
30 |
31 | /**
32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35 | // TODO Auto-generated method stub
36 | String oid = request.getParameter("oid");
37 | try {
38 | orderService.shipmentsGoods(Integer.parseInt(oid));
39 | JsonUtils.writeJsonStr2(1, null, response);
40 | } catch (Exception e) {
41 | // TODO: handle exception
42 | e.getStackTrace();
43 | JsonUtils.writeJsonStr2(1, e.getMessage(), response);
44 | }
45 | }
46 |
47 | /**
48 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
49 | */
50 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
51 | // TODO Auto-generated method stub
52 | doGet(request, response);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/ShipmentsMyGoodsServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.GoodsService;
11 | import com.zjj.miniwechat.service.OrderService;
12 | import com.zjj.miniwechat.service.Impl.GoodsServiceImpl;
13 | import com.zjj.miniwechat.service.Impl.OrderServiceImpl;
14 | import com.zjj.miniwechat.utils.JsonUtils;
15 |
16 | /**
17 | * Servlet implementation class ShipmentsMyGoodsServlet
18 | */
19 | @WebServlet("/shipmentsMyGoods.do")
20 | public class ShipmentsMyGoodsServlet extends HttpServlet {
21 | private static final long serialVersionUID = 1L;
22 |
23 |
24 | private GoodsService goodsService = new GoodsServiceImpl();
25 |
26 |
27 | private OrderService orderService = new OrderServiceImpl();
28 | /**
29 | * @see HttpServlet#HttpServlet()
30 | */
31 | public ShipmentsMyGoodsServlet() {
32 | super();
33 | // TODO Auto-generated constructor stub
34 | }
35 |
36 | /**
37 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
38 | */
39 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
40 | // TODO Auto-generated method stub
41 | String gid = request.getParameter("gid");
42 | try {
43 | goodsService.shipmentsGoods(Integer.parseInt(gid));
44 | orderService.updateOrderByGid(Integer.parseInt(gid));
45 | JsonUtils.writeJsonStr(null, response);
46 | } catch (Exception e) {
47 | // TODO: handle exception
48 | e.getStackTrace();
49 | JsonUtils.writeJsonStr(e.getMessage(), response);
50 | }
51 | }
52 |
53 | /**
54 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
55 | */
56 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
57 | // TODO Auto-generated method stub
58 | doGet(request, response);
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/UpdateOrderServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.zjj.miniwechat.service.OrderService;
11 | import com.zjj.miniwechat.service.Impl.OrderServiceImpl;
12 | import com.zjj.miniwechat.utils.JsonUtils;
13 |
14 | /**
15 | * Servlet implementation class UpdateOrderServlet
16 | */
17 | @WebServlet("/updateOrderByGid.do")
18 | public class UpdateOrderServlet extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 |
22 | private OrderService orderService = new OrderServiceImpl();
23 | /**
24 | * @see HttpServlet#HttpServlet()
25 | */
26 | public UpdateOrderServlet() {
27 | super();
28 | // TODO Auto-generated constructor stub
29 | }
30 |
31 | /**
32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
35 | // TODO Auto-generated method stub
36 | String gid = request.getParameter("gid");
37 | try {
38 | orderService.updateOrderByGid(Integer.parseInt(gid));
39 | JsonUtils.writeJsonStr(null, response);
40 | } catch (Exception e) {
41 | // TODO: handle exception
42 | e.getStackTrace();
43 | JsonUtils.writeJsonStr(e.getMessage(), response);
44 | }
45 | }
46 |
47 | /**
48 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
49 | */
50 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
51 | // TODO Auto-generated method stub
52 | doGet(request, response);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/controller/UserLoginServlet.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.controller;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 | import java.io.Writer;
6 |
7 | import javax.servlet.ServletException;
8 | import javax.servlet.annotation.WebServlet;
9 | import javax.servlet.http.HttpServlet;
10 | import javax.servlet.http.HttpServletRequest;
11 | import javax.servlet.http.HttpServletResponse;
12 |
13 | import com.zjj.miniwechat.dao.UserDao;
14 | import com.zjj.miniwechat.entity.User;
15 | import com.zjj.miniwechat.service.UserService;
16 | import com.zjj.miniwechat.service.Impl.UserServiceImpl;
17 | import com.zjj.miniwechat.utils.JsonUtils;
18 |
19 | /**
20 | * Servlet implementation class UserLoginServlet
21 | */
22 | @WebServlet("/user/login.do")
23 | public class UserLoginServlet extends HttpServlet {
24 | private static final long serialVersionUID = 1L;
25 |
26 |
27 | private UserService userService = new UserServiceImpl();
28 | /**
29 | * @see HttpServlet#HttpServlet()
30 | */
31 | public UserLoginServlet() {
32 | super();
33 | // TODO Auto-generated constructor stub
34 | }
35 |
36 | /**
37 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
38 | */
39 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
40 | // TODO Auto-generated method stub
41 | response.setContentType("text/html;charset=utf-8");
42 | /* 设置响应头允许ajax跨域访问 */
43 | response.setHeader("Access-Control-Allow-Origin", "*");
44 | /* 星号表示所有的异域请求都可以接受, */
45 | response.setHeader("Access-Control-Allow-Methods", "GET,POST");
46 |
47 | String uname = request.getParameter("username");
48 | try {
49 |
50 | User user = userService.findUser(uname);
51 | if (user != null ) {
52 | JsonUtils.writeJsonStr(user, response);
53 | } else {
54 | JsonUtils.writeJsonStr(null, response);
55 | }
56 | } catch (Exception e) {
57 | // TODO: handle exception
58 | e.getStackTrace();
59 | JsonUtils.writeJsonStr(e.getMessage(), response);
60 | }
61 | }
62 |
63 | /**
64 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
65 | */
66 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
67 | // TODO Auto-generated method stub
68 | doGet(request, response);
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/AddressDao.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.zjj.miniwechat.entity.Address;
6 |
7 | /**
8 | * @author 张建军
9 | *
10 | * 2019年5月7日下午7:24:22
11 | */
12 | public interface AddressDao {
13 | /**
14 | * @param uid
15 | * @return
16 | */
17 | public List findAddressById(int uid);
18 |
19 | /**
20 | * @param aid
21 | */
22 | public void deleteAddress(int aid);
23 |
24 | /**
25 | * @param aid
26 | * @return
27 | */
28 | public Address findOneAddress(int aid);
29 |
30 | /**
31 | * @param address
32 | */
33 | public void addAddress(Address address);
34 |
35 | // /**更新某个地址为默认的地址
36 | // * @param aid
37 | // */
38 | // public void updateDefaultAddress(int aid);
39 | }
40 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/CollectionDao.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao;
2 |
3 |
4 | import java.util.List;
5 |
6 | import com.zjj.miniwechat.entity.Collection;
7 | import com.zjj.miniwechat.vo.VCollection;
8 |
9 | /**
10 | * @author 张建军
11 | *
12 | * 2019年5月6日下午8:58:20
13 | */
14 | public interface CollectionDao {
15 | /**
16 | * @param collection
17 | */
18 | public void addCollection(Collection collection);
19 |
20 | /**
21 | * @param uid
22 | * @return
23 | */
24 | public List findByUid(int uid);
25 |
26 | public void removeCollection(int cid);
27 | }
28 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/GoodsDao.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.zjj.miniwechat.entity.Goods;
6 | import com.zjj.miniwechat.vo.VGoods;
7 |
8 | /**
9 | * @author 张建军
10 | *
11 | * 2019年5月5日下午7:38:24
12 | */
13 | public interface GoodsDao {
14 | /**
15 | * @return
16 | */
17 | public List findAll();
18 |
19 | /**
20 | * @param gid
21 | * @return
22 | */
23 | public Goods findOne(int gid);
24 |
25 | /**
26 | * @param goods
27 | */
28 | public void addGoods(Goods goods);
29 |
30 | /**查找某个用户发布的商品
31 | * @param uid
32 | * @return
33 | */
34 | public List findGoodsByUid(int uid);
35 |
36 | /**
37 | * @return
38 | */
39 | public List findAllGoods();
40 |
41 | public void deleteGoodsById(int id);
42 |
43 | public List findGoodByName(String goodName);
44 |
45 |
46 | /**发货
47 | * @param gid
48 | */
49 | public void shipmentsGoods(int gid);
50 | }
51 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/OrderDao.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.zjj.miniwechat.entity.Order;
6 | import com.zjj.miniwechat.vo.VOrders;
7 |
8 | /**
9 | * @author 张建军
10 | *
11 | * 2019年5月10日下午7:30:27
12 | */
13 | public interface OrderDao {
14 |
15 | /**
16 | * @param order
17 | */
18 | public void addOrder(Order order);
19 |
20 | /**根据用户名和订单的状态查找相关用户的订单
21 | * @param order
22 | * @return
23 | */
24 | public List findAll(int uid, int gstatus);
25 |
26 | /**查找所有的订单
27 | * @return
28 | */
29 | public List findAllOrder();
30 |
31 | public List findOrderBySomeThings(String name,int type);
32 |
33 | /**发货
34 | * @param oid
35 | */
36 | public void shipmentsGoods(int oid);
37 |
38 | public void updateOrderByGid(int gid);
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/UserDao.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.zjj.miniwechat.entity.User;
6 |
7 | /**
8 | * @author 张建军
9 | *
10 | * 2019年5月4日上午10:03:07
11 | */
12 | public interface UserDao {
13 | /**
14 | * @param uname
15 | * @return
16 | */
17 | public User findUser(String uname);
18 |
19 |
20 | /**用户注册
21 | * @param user
22 | */
23 | public void addUser(User user);
24 |
25 | /**
26 | * @return
27 | */
28 | public List findAll();
29 |
30 |
31 | /**根据条件查询用户
32 | * @return
33 | */
34 | public List selectUser(String username, int roleId);
35 | }
36 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/impl/AddressDaoImpl.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import org.apache.commons.dbutils.QueryRunner;
7 | import org.apache.commons.dbutils.handlers.BeanHandler;
8 | import org.apache.commons.dbutils.handlers.BeanListHandler;
9 |
10 | import com.zjj.miniwechat.dao.AddressDao;
11 | import com.zjj.miniwechat.entity.Address;
12 | import com.zjj.miniwechat.utils.JdbcUtils;
13 |
14 | /**
15 | * @author 张建军
16 | *
17 | * 2019年5月7日下午7:26:44
18 | */
19 | public class AddressDaoImpl implements AddressDao {
20 |
21 | /** (non-Javadoc)
22 | * @see com.zjj.miniwechat.dao.AddressDao#findAddressById(int)
23 | */
24 | @Override
25 | public List findAddressById(int uid) {
26 | // TODO Auto-generated method stub
27 | String sql = "select * from t_address where uid = ?";
28 | QueryRunner qr = JdbcUtils.getQueryRunner();
29 | List list = null;
30 | try {
31 | list = qr.query(sql, new BeanListHandler<>(Address.class),uid);
32 | } catch (SQLException e) {
33 | // TODO Auto-generated catch block
34 | e.printStackTrace();
35 | }
36 | return list;
37 | }
38 |
39 | /** (non-Javadoc)
40 | * @see com.zjj.miniwechat.dao.AddressDao#deleteAddress(int)
41 | */
42 | @Override
43 | public void deleteAddress(int aid) {
44 | // TODO Auto-generated method stub
45 | String sql = "delete from t_address where aid = ?";
46 | QueryRunner qr = JdbcUtils.getQueryRunner();
47 | try {
48 | qr.update(sql, aid);
49 | } catch (SQLException e) {
50 | // TODO Auto-generated catch block
51 | e.printStackTrace();
52 | }
53 | }
54 |
55 | /** (non-Javadoc)
56 | * @see com.zjj.miniwechat.dao.AddressDao#findOneAddress(int)
57 | */
58 | @Override
59 | public Address findOneAddress(int aid) {
60 | // TODO Auto-generated method stub
61 | String sql = "select * from t_address where aid = ?";
62 | QueryRunner qr = JdbcUtils.getQueryRunner();
63 | Address address = null;
64 | try {
65 | address = qr.query(sql, new BeanHandler<>(Address.class),aid);
66 | } catch (SQLException e) {
67 | // TODO Auto-generated catch block
68 | e.printStackTrace();
69 | }
70 | return address;
71 | }
72 |
73 | /** (non-Javadoc)
74 | * @see com.zjj.miniwechat.dao.AddressDao#addAddress(com.zjj.miniwechat.entity.Address)
75 | */
76 | @Override
77 | public void addAddress(Address address) {
78 | // TODO Auto-generated method stub
79 | String sql = "insert into t_address values(null, ? , ?, ?)";
80 | Object[] args = {
81 | address.getTel(),
82 | address.getAddress(),
83 | address.getUid()
84 | };
85 | QueryRunner qr = JdbcUtils.getQueryRunner();
86 | try {
87 | qr.update(sql, args);
88 | } catch (SQLException e) {
89 | // TODO Auto-generated catch block
90 | e.printStackTrace();
91 | }
92 | }
93 |
94 |
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/impl/CollectionDaoImpl.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import org.apache.commons.dbutils.QueryRunner;
7 | import org.apache.commons.dbutils.handlers.BeanListHandler;
8 |
9 | import com.zjj.miniwechat.dao.CollectionDao;
10 | import com.zjj.miniwechat.entity.Collection;
11 | import com.zjj.miniwechat.utils.JdbcUtils;
12 | import com.zjj.miniwechat.vo.VCollection;
13 |
14 | /**
15 | * @author 张建军
16 | *
17 | * 2019年5月6日下午8:59:39
18 | */
19 | public class CollectionDaoImpl implements CollectionDao{
20 |
21 | /** (non-Javadoc)
22 | * @see com.zjj.miniwechat.dao.CollectionDao#addCollection(com.zjj.miniwechat.entity.Collection)
23 | */
24 | @Override
25 | public void addCollection(Collection collection) {
26 | // TODO Auto-generated method stub
27 | String sql = "insert into t_collection values(null, ?, ?,0)";
28 | Object[] args = {collection.getGid(), collection.getUid()};
29 | QueryRunner qr = JdbcUtils.getQueryRunner();
30 | try {
31 | qr.update(sql, args);
32 | } catch (SQLException e) {
33 | // TODO Auto-generated catch block
34 | e.printStackTrace();
35 | }
36 | }
37 |
38 | /** (non-Javadoc)
39 | * @see com.zjj.miniwechat.dao.CollectionDao#findByUid(int)
40 | */
41 | @Override
42 | public List findByUid(int uid) {
43 | // TODO Auto-generated method stub
44 | String sql = "select c.cid,g.gimage,g.gname,g.gprice ,c.isselect,c.uid from t_collection c\r\n" +
45 | "inner join t_goods g\r\n" +
46 | "on g.gid=c.gid\r\n" +
47 | "where c.uid = ?";
48 |
49 | QueryRunner qr = JdbcUtils.getQueryRunner();
50 |
51 | List list = null;
52 | try {
53 | list = qr.query(sql, new BeanListHandler<>(VCollection.class),uid);
54 | } catch (SQLException e) {
55 | // TODO Auto-generated catch block
56 | e.printStackTrace();
57 | }
58 | return list;
59 | }
60 |
61 | /** (non-Javadoc)
62 | * @see com.zjj.miniwechat.dao.CollectionDao#removeCollection(int)
63 | */
64 | @Override
65 | public void removeCollection(int cid) {
66 | // TODO Auto-generated method stub
67 | String sql = "delete from t_collection where cid = ?";
68 | QueryRunner qr = JdbcUtils.getQueryRunner();
69 | try {
70 | qr.update(sql, cid);
71 | } catch (SQLException e) {
72 | // TODO Auto-generated catch block
73 | e.printStackTrace();
74 | }
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/后台代码/MiniWechat/src/com/zjj/miniwechat/dao/impl/UserDaoImpl.java:
--------------------------------------------------------------------------------
1 | package com.zjj.miniwechat.dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | import org.apache.commons.dbutils.QueryRunner;
8 | import org.apache.commons.dbutils.handlers.BeanHandler;
9 | import org.apache.commons.dbutils.handlers.BeanListHandler;
10 |
11 | import com.zjj.miniwechat.dao.UserDao;
12 | import com.zjj.miniwechat.entity.User;
13 | import com.zjj.miniwechat.utils.JdbcUtils;
14 |
15 | /**
16 | * @author 张建军
17 | *
18 | * 2019年5月4日上午10:04:37
19 | */
20 | public class UserDaoImpl implements UserDao{
21 |
22 | /** (non-Javadoc)
23 | * @see com.zjj.miniwechat.dao.UserDao#findUser(java.lang.String)
24 | */
25 | @Override
26 | public User findUser(String uname) {
27 | // TODO Auto-generated method stub
28 | String sql = "select * from t_user where username=?";
29 | QueryRunner qr = JdbcUtils.getQueryRunner();
30 | User user = null;
31 | try {
32 | user = qr.query(sql, new BeanHandler<>(User.class),uname);
33 | } catch (SQLException e) {
34 | // TODO Auto-generated catch block
35 | e.printStackTrace();
36 | }
37 | return user;
38 | }
39 |
40 | /** (non-Javadoc)
41 | * @see com.zjj.miniwechat.dao.UserDao#addUser(com.zjj.miniwechat.entity.User)
42 | */
43 | @Override
44 | public void addUser(User user) {
45 | // TODO Auto-generated method stub
46 | String sql = "insert into t_user values(null, ?, ?, 0)";
47 | Object[] args = {user.getUsername(), user.getPassword()};
48 | QueryRunner qr = JdbcUtils.getQueryRunner();
49 | try {
50 | qr.update(sql, args);
51 | } catch (SQLException e) {
52 | // TODO Auto-generated catch block
53 | e.printStackTrace();
54 | }
55 |
56 | }
57 |
58 | /** (non-Javadoc)
59 | * @see com.zjj.miniwechat.dao.UserDao#findAll()
60 | */
61 | @Override
62 | public List findAll() {
63 | // TODO Auto-generated method stub
64 | String sql = "select * from t_user";
65 | QueryRunner qr = JdbcUtils.getQueryRunner();
66 | List list = null;
67 | try {
68 | list = qr.query(sql, new BeanListHandler<>(User.class));
69 | } catch (SQLException e) {
70 | // TODO Auto-generated catch block
71 | e.printStackTrace();
72 | }
73 | return list;
74 | }
75 |
76 | /** (non-Javadoc)
77 | * @see com.zjj.miniwechat.dao.UserDao#selectUser()
78 | */
79 | @Override
80 | public List selectUser(String username, int roleId) {
81 | // TODO Auto-generated method stub
82 | //模糊查询
83 | String sql = "select * from t_user where 1=1 ";
84 | List