├── .gitignore ├── LICENSE ├── README.md ├── miniProgram ├── .gitignore ├── app.js ├── app.json ├── app.wxss ├── image │ ├── icon │ │ ├── index-select.png │ │ ├── index.png │ │ ├── money.png │ │ ├── password.png │ │ ├── right-arrow.png │ │ ├── user-center-select.png │ │ ├── user-center.png │ │ └── user.png │ └── page │ │ ├── buy.png │ │ ├── index_bg.jpg │ │ ├── sell.png │ │ ├── 头像.JPG │ │ ├── 封面.jpg │ │ └── 背景1.gif ├── pages │ ├── _center │ │ ├── _center.js │ │ ├── _center.json │ │ ├── _center.wxml │ │ └── _center.wxss │ ├── _public │ │ ├── _public.js │ │ ├── _public.json │ │ ├── _public.wxml │ │ └── _public.wxss │ ├── center │ │ ├── center.js │ │ ├── center.json │ │ ├── center.wxml │ │ └── center.wxss │ ├── details │ │ ├── details.js │ │ ├── details.json │ │ ├── details.wxml │ │ └── details.wxss │ ├── help │ │ ├── help.js │ │ ├── help.json │ │ ├── help.wxml │ │ └── help.wxss │ ├── index │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── login │ │ ├── login.js │ │ ├── login.json │ │ ├── login.wxml │ │ └── login.wxss │ ├── messageBoard │ │ ├── messageBoard.js │ │ ├── messageBoard.json │ │ ├── messageBoard.wxml │ │ └── messageBoard.wxss │ ├── person │ │ ├── person.js │ │ ├── person.json │ │ ├── person.wxml │ │ └── person.wxss │ ├── public │ │ ├── public.js │ │ ├── public.json │ │ ├── public.wxml │ │ └── public.wxss │ ├── register │ │ ├── register.js │ │ ├── register.json │ │ ├── register.wxml │ │ └── register.wxss │ ├── revise │ │ ├── revise.js │ │ ├── revise.json │ │ ├── revise.wxml │ │ └── revise.wxss │ ├── revisebook │ │ ├── revisebook.js │ │ ├── revisebook.json │ │ ├── revisebook.wxml │ │ └── revisebook.wxss │ ├── sell │ │ ├── sell.js │ │ ├── sell.json │ │ ├── sell.wxml │ │ └── sell.wxss │ ├── updatacenter │ │ ├── updatacenter.js │ │ ├── updatacenter.json │ │ ├── updatacenter.wxml │ │ └── updatacenter.wxss │ └── user │ │ ├── user.js │ │ ├── user.json │ │ ├── user.wxml │ │ └── user.wxss ├── project.config.json ├── sitemap.json └── utils │ └── util.js └── server ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── ouc │ │ └── usedbook │ │ ├── UsedbookApplication.java │ │ ├── config │ │ └── SwaggerConfig.java │ │ ├── controller │ │ ├── CommentController.java │ │ ├── UsedbookController.java │ │ └── UserController.java │ │ ├── dto │ │ ├── CommentDTO.java │ │ ├── CommentViewDTO.java │ │ ├── DeleteDTO.java │ │ ├── LoginDTO.java │ │ ├── RegisterDTO.java │ │ └── UsedbookDTO.java │ │ ├── entity │ │ ├── Comment.java │ │ ├── Usedbook.java │ │ └── User.java │ │ ├── repository │ │ ├── CommentRepository.java │ │ ├── UsedbookRepository.java │ │ └── UserRepository.java │ │ ├── service │ │ ├── CommentService.java │ │ ├── UsedbookService.java │ │ └── UserService.java │ │ └── util │ │ └── Response.java └── resources │ ├── application.properties │ └── static │ └── cover │ ├── cyuyan.jpg │ ├── czxt.jpg │ ├── rjjh.jpg │ └── shjk.jpg └── test └── java └── com └── ouc └── usedbook ├── UsedbookApplicationTests.java └── repository └── UserRepositoryTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 sunshine2285 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # used-books-market-miniProgram 2 | 基于微信小程序的二手书交易市场 3 | -------------------------------------------------------------------------------- /miniProgram/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /miniProgram/app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | // 展示本地存储能力 5 | var logs = wx.getStorageSync('logs') || [] 6 | logs.unshift(Date.now()) 7 | wx.setStorageSync('logs', logs) 8 | 9 | // 登录 10 | wx.login({ 11 | success: res => { 12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 13 | } 14 | }) 15 | // 获取用户信息 16 | wx.getSetting({ 17 | success: res => { 18 | if (res.authSetting['scope.userInfo']) { 19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 20 | wx.getUserInfo({ 21 | success: res => { 22 | // 可以将 res 发送给后台解码出 unionId 23 | this.globalData.userInfo = res.userInfo 24 | 25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 26 | // 所以此处加入 callback 以防止这种情况 27 | if (this.userInfoReadyCallback) { 28 | this.userInfoReadyCallback(res) 29 | } 30 | } 31 | }) 32 | } 33 | } 34 | }) 35 | }, 36 | globalData: { 37 | userInfo: null 38 | } 39 | }) -------------------------------------------------------------------------------- /miniProgram/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/login/login", 4 | "pages/help/help", 5 | "pages/person/person", 6 | "pages/_public/_public", 7 | "pages/register/register", 8 | "pages/index/index", 9 | "pages/center/center", 10 | "pages/messageBoard/messageBoard", 11 | "pages/details/details", 12 | "pages/revise/revise", 13 | "pages/public/public", 14 | "pages/revisebook/revisebook", 15 | "pages/updatacenter/updatacenter" 16 | ], 17 | "window": { 18 | "backgroundTextStyle": "light", 19 | "navigationBarBackgroundColor": "#fff", 20 | "navigationBarTitleText": "书香墨海", 21 | "navigationBarTextStyle": "black" 22 | }, 23 | "tabBar": { 24 | "list": [ 25 | { 26 | "pagePath": "pages/index/index", 27 | "text": "主页", 28 | "iconPath": "/image/icon/index.png", 29 | "selectedIconPath": "/image/icon/index-select.png" 30 | }, 31 | { 32 | "pagePath": "pages/person/person", 33 | "text": "个人中心", 34 | "iconPath": "/image/icon/user-center.png", 35 | "selectedIconPath": "/image/icon/user-center-select.png" 36 | } 37 | ] 38 | }, 39 | "style": "v2", 40 | "sitemapLocation": "sitemap.json" 41 | } -------------------------------------------------------------------------------- /miniProgram/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 | box-sizing: border-box; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /miniProgram/image/icon/index-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/index-select.png -------------------------------------------------------------------------------- /miniProgram/image/icon/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/index.png -------------------------------------------------------------------------------- /miniProgram/image/icon/money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/money.png -------------------------------------------------------------------------------- /miniProgram/image/icon/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/password.png -------------------------------------------------------------------------------- /miniProgram/image/icon/right-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/right-arrow.png -------------------------------------------------------------------------------- /miniProgram/image/icon/user-center-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/user-center-select.png -------------------------------------------------------------------------------- /miniProgram/image/icon/user-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/user-center.png -------------------------------------------------------------------------------- /miniProgram/image/icon/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/icon/user.png -------------------------------------------------------------------------------- /miniProgram/image/page/buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/buy.png -------------------------------------------------------------------------------- /miniProgram/image/page/index_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/index_bg.jpg -------------------------------------------------------------------------------- /miniProgram/image/page/sell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/sell.png -------------------------------------------------------------------------------- /miniProgram/image/page/头像.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/头像.JPG -------------------------------------------------------------------------------- /miniProgram/image/page/封面.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/封面.jpg -------------------------------------------------------------------------------- /miniProgram/image/page/背景1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunshine2285/used-books-market-miniProgram/fe3ad7855bd05d354751af9082a00413254bbe62/miniProgram/image/page/背景1.gif -------------------------------------------------------------------------------- /miniProgram/pages/_center/_center.js: -------------------------------------------------------------------------------- 1 | // pages/center/center.js 2 | const app=getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | college: '', 10 | mail: '', 11 | major: '', 12 | password: '', 13 | tel: '', 14 | username: '', 15 | year: '' 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad: function (options) { 22 | var th = this; 23 | let data = app.globalData.userInfo 24 | th.setData({ 25 | college: data.college, 26 | mail: data.mail, 27 | major: data.major, 28 | password: data.password, 29 | tel: data.tel, 30 | username: data.username, 31 | year: data.year 32 | }) 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面初次渲染完成 37 | */ 38 | onReady: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面显示 44 | */ 45 | onShow: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面隐藏 51 | */ 52 | onHide: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 生命周期函数--监听页面卸载 58 | */ 59 | onUnload: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面相关事件处理函数--监听用户下拉动作 65 | */ 66 | onPullDownRefresh: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 页面上拉触底事件的处理函数 72 | */ 73 | onReachBottom: function () { 74 | 75 | }, 76 | 77 | /** 78 | * 用户点击右上角分享 79 | */ 80 | onShareAppMessage: function () { 81 | 82 | } 83 | }) -------------------------------------------------------------------------------- /miniProgram/pages/_center/_center.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/_center/_center.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{username}} 8 | 9 | 10 | 学院: 11 | 12 | {{college}} 13 | 14 | 15 | 16 | 专业: 17 | 18 | {{major}} 19 | 20 | 21 | 22 | 年级: 23 | 24 | {{year}} 25 | 26 | 27 | 28 | 手机号: 29 | 30 | {{tel}} 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /miniProgram/pages/_center/_center.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/center.wxss */ 2 | .photo-ground{ 3 | height: 175rpx; 4 | } 5 | .user-item{ 6 | display: flex; 7 | align-items: center; 8 | } 9 | .username{ 10 | margin-left: 80rpx; 11 | } 12 | .user-photo{ 13 | width: 150rpx; 14 | height: 150rpx; 15 | margin-left: 40rpx; 16 | } 17 | .conton-item{ 18 | font-size: 30rpx; 19 | color: black; 20 | margin-top: 50rpx; 21 | margin-left: 40rpx; 22 | } 23 | .conton-item>.text-boder{ 24 | margin-top: 20rpx; 25 | align-items: center; 26 | font-size: 30rpx; 27 | color: gray; 28 | } 29 | .bt{ 30 | margin-top: 80rpx; 31 | margin-left: 40rpx; 32 | font-size: 20rpx; 33 | display: flex; 34 | align-items: center; 35 | } -------------------------------------------------------------------------------- /miniProgram/pages/_public/_public.js: -------------------------------------------------------------------------------- 1 | // pages/_public/_public.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /miniProgram/pages/_public/_public.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/_public/_public.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | C Primer Plus 13 | 14 | 作者:史蒂芬 普拉达 15 | 出版社:人民邮电出版社 16 | 新旧程度:八成新 17 | 备注:可私聊价格 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | C Primer Plus 27 | 28 | 作者:史蒂芬 普拉达 29 | 出版社:人民邮电出版社 30 | 新旧程度:八成新 31 | 备注:可私聊价格 32 | 33 | 34 | 35 | 36 | 37 | 38 | C Primer Plus 39 | 40 | 作者:史蒂芬 普拉达 41 | 出版社:人民邮电出版社 42 | 新旧程度:八成新 43 | 备注:可私聊价格 44 | 45 | 46 | 47 |
-------------------------------------------------------------------------------- /miniProgram/pages/_public/_public.wxss: -------------------------------------------------------------------------------- 1 | /* pages/_public/_public.wxss */ 2 | .cover{ 3 | margin: 40rpx 40rpx; 4 | width: 200rpx; 5 | height: 200rpx; 6 | } 7 | .book-name{ 8 | margin-left: 40rpx; 9 | } 10 | .book-author-pub-old{ 11 | display: flex; 12 | flex-direction: column; 13 | margin-left: 80rpx; 14 | font-size: 30rpx; 15 | color: gray; 16 | } 17 | .search-v{ 18 | display: flex; 19 | align-items: center; 20 | } 21 | .search{ 22 | margin-left: 40rpx; 23 | border: 1rpx solid black; 24 | } 25 | .search1{ 26 | font-size: 30rpx; 27 | } 28 | .book-message{ 29 | display: flex; 30 | align-items: center; 31 | } -------------------------------------------------------------------------------- /miniProgram/pages/center/center.js: -------------------------------------------------------------------------------- 1 | // pages/center/center.js 2 | const app = getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | college: '', 10 | mail: '', 11 | major: '', 12 | password: '', 13 | tel: '', 14 | username:'', 15 | year: '' 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad: function (options) { 22 | var th=this; 23 | let data = app.globalData.userInfo 24 | th.setData({ 25 | college: data.college, 26 | mail: data.mail, 27 | major: data.major, 28 | password: data.password, 29 | tel: data.tel, 30 | username: data.username, 31 | year: data.year 32 | }) 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面初次渲染完成 37 | */ 38 | onReady: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面显示 44 | */ 45 | onShow: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面隐藏 51 | */ 52 | onHide: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 生命周期函数--监听页面卸载 58 | */ 59 | onUnload: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面相关事件处理函数--监听用户下拉动作 65 | */ 66 | onPullDownRefresh: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 页面上拉触底事件的处理函数 72 | */ 73 | onReachBottom: function () { 74 | 75 | }, 76 | 77 | /** 78 | * 用户点击右上角分享 79 | */ 80 | onShareAppMessage: function () { 81 | 82 | } 83 | }) -------------------------------------------------------------------------------- /miniProgram/pages/center/center.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/center/center.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{username}} 8 | 9 | 10 | 学院: 11 | 12 | {{college}} 13 | 14 | 15 | 16 | 专业: 17 | 18 | {{major}} 19 | 20 | 21 | 22 | 年级: 23 | 24 | {{year}} 25 | 26 | 27 | 28 | 手机号: 29 | 30 | {{tel}} 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /miniProgram/pages/center/center.wxss: -------------------------------------------------------------------------------- 1 | /* pages/center/center.wxss */ 2 | .photo-ground{ 3 | height: 175rpx; 4 | } 5 | .user-item{ 6 | display: flex; 7 | align-items: center; 8 | } 9 | .username{ 10 | margin-left: 80rpx; 11 | } 12 | .user-photo{ 13 | width: 150rpx; 14 | height: 150rpx; 15 | margin-left: 40rpx; 16 | } 17 | .conton-item{ 18 | font-size: 30rpx; 19 | color: black; 20 | margin-top: 50rpx; 21 | margin-left: 40rpx; 22 | } 23 | .conton-item>.text-boder{ 24 | margin-top: 20rpx; 25 | align-items: center; 26 | font-size: 30rpx; 27 | color: gray; 28 | } -------------------------------------------------------------------------------- /miniProgram/pages/details/details.js: -------------------------------------------------------------------------------- 1 | // pages/details/details.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /miniProgram/pages/details/details.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/details/details.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | I am here 10 | 11 | 水产学院 海洋资源与环境 12 | 13 | 14 | 15 | 16 | 17 | 18 | C Primer Plus 19 | 20 | 作者:史蒂芬 普拉达 21 | 出版社:人民邮电出版社 22 | 新旧程度:八成新 23 | 备注:可私聊价格 24 | 25 | 26 | 27 | 28 | 售价:10元 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 全部留言 41 |
42 | 43 | 44 | 45 | I am here 46 | 47 | 48 | 49 |
50 |
-------------------------------------------------------------------------------- /miniProgram/pages/details/details.wxss: -------------------------------------------------------------------------------- 1 | /* pages/details/details.wxss */ 2 | .photo-ground{ 3 | height: 175rpx; 4 | } 5 | .con{ 6 | display: flex; 7 | flex-direction: column; 8 | } 9 | .user-item{ 10 | display: flex; 11 | align-items: center; 12 | } 13 | .username{ 14 | margin-left: 40rpx; 15 | } 16 | .user-photo{ 17 | width: 150rpx; 18 | height: 150rpx; 19 | margin-left: 40rpx; 20 | } 21 | .other-detils{ 22 | margin-top: 20rpx; 23 | display: flex; 24 | align-items: center; 25 | margin-left: 40rpx; 26 | font-size: 25rpx; 27 | color: gray; 28 | } 29 | .right-arrow{ 30 | width: 30rpx; 31 | height: 30rpx; 32 | margin-left: 100rpx; 33 | } 34 | .cover{ 35 | margin: 40rpx 50rpx 50rpx 50rpx; 36 | width: 650rpx; 37 | } 38 | .book-name{ 39 | margin-left: 40rpx; 40 | } 41 | .book-author-pub-old{ 42 | display: flex; 43 | flex-direction: column; 44 | margin-left: 80rpx; 45 | font-size: 30rpx; 46 | color: gray; 47 | } 48 | .price{ 49 | margin-left: 40rpx; 50 | font-size: 30rpx; 51 | } 52 | .Button{ 53 | margin: 40rpx 40rpx; 54 | margin-top: 20rpx; 55 | display: flex; 56 | align-items: center; 57 | border-bottom: gainsboro 1rpx solid; 58 | } 59 | 60 | .message{ 61 | margin-top: 20rpx; 62 | font-size: 30rpx; 63 | margin-left: 40rpx; 64 | margin-bottom: 100rpx; 65 | } 66 | .user-photo-test{ 67 | height: 80rpx; 68 | width: 80rpx; 69 | } 70 | .user-item-test{ 71 | margin-top: 10rpx; 72 | display: flex; 73 | flex-direction: column; 74 | } 75 | .head-photo{ 76 | display: flex; 77 | align-items: center; 78 | } 79 | .Button-right > button{ 80 | margin-left: 40rpx; 81 | font-size: 28rpx; 82 | } -------------------------------------------------------------------------------- /miniProgram/pages/help/help.js: -------------------------------------------------------------------------------- 1 | // pages/help/help.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /miniProgram/pages/help/help.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/help/help.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 本小程序旨在为校园的二手书交易提供一个信息展示平台,二手书的交易不在本平台进行,需要自行在发布者的联系方式一栏进行联系。 4 | -------------------------------------------------------------------------------- /miniProgram/pages/help/help.wxss: -------------------------------------------------------------------------------- 1 | /* pages/help/help.wxss */ 2 | .center{ 3 | align-content: center; 4 | } -------------------------------------------------------------------------------- /miniProgram/pages/index/index.js: -------------------------------------------------------------------------------- 1 | // pages/index/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /miniProgram/pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 我要买书 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 我要卖书 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /miniProgram/pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/index.wxss */ 2 | .index-bg{ 3 | width: 100%; 4 | height: 650rpx; 5 | margin-bottom: 40rpx; 6 | } 7 | 8 | .item{ 9 | display: flex; 10 | justify-content: space-between; 11 | align-items: center; 12 | padding: 30rpx 40rpx; 13 | transition: ease 0.3s; 14 | } 15 | 16 | .item-hover{ 17 | background-color: #f4f4f4; 18 | } 19 | 20 | .item-body{ 21 | display: flex; 22 | align-items: center; 23 | } 24 | 25 | .item-icon{ 26 | width: 120rpx; 27 | height: 120rpx; 28 | margin-right: 30rpx; 29 | } 30 | 31 | .right-arrow{ 32 | width: 40rpx; 33 | height: 40rpx; 34 | } 35 | 36 | .subtle-bottom-border{ 37 | border-bottom: rgba(225, 225, 225, 0.3) solid 1rpx; 38 | margin: 0 70rpx; 39 | } -------------------------------------------------------------------------------- /miniProgram/pages/login/login.js: -------------------------------------------------------------------------------- 1 | // pages/login/login.js 2 | const app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | 10 | }, 11 | 12 | forget_pwd: function (e) { 13 | wx.showModal({ 14 | title: '忘记密码', 15 | content: '请发送邮件给管理员!sxmh_OUC@163.com', 16 | showCancel: false, 17 | }) 18 | }, 19 | login: function (e) { 20 | let data = e.detail.value; 21 | wx.request({ 22 | url: 'http://sunshine-sun.cn:8080/user/login', 23 | method: 'POST', 24 | data: { 25 | mail: data.user, 26 | password: data.password 27 | }, 28 | success(res) { 29 | if (res.data.code === 200) { 30 | //保存返回的数据到全局对象 31 | app.globalData.userInfo=res.data.data; 32 | wx.showToast({ 33 | title: '登录成功', 34 | icon: 'success' 35 | }); 36 | //跳转页面 37 | wx.switchTab({ 38 | url: '/pages/index/index', 39 | }); 40 | } 41 | } 42 | }) 43 | }, 44 | register: function (e) { 45 | wx.navigateTo({ 46 | url: '/pages/register/register', 47 | }) 48 | }, 49 | 50 | /** 51 | * 生命周期函数--监听页面加载 52 | */ 53 | onLoad: function (options) { 54 | 55 | }, 56 | 57 | /** 58 | * 生命周期函数--监听页面初次渲染完成 59 | */ 60 | onReady: function () { 61 | 62 | }, 63 | 64 | /** 65 | * 生命周期函数--监听页面显示 66 | */ 67 | onShow: function () { 68 | 69 | }, 70 | 71 | /** 72 | * 生命周期函数--监听页面隐藏 73 | */ 74 | onHide: function () { 75 | 76 | }, 77 | 78 | /** 79 | * 生命周期函数--监听页面卸载 80 | */ 81 | onUnload: function () { 82 | 83 | }, 84 | 85 | /** 86 | * 页面相关事件处理函数--监听用户下拉动作 87 | */ 88 | onPullDownRefresh: function () { 89 | 90 | }, 91 | 92 | /** 93 | * 页面上拉触底事件的处理函数 94 | */ 95 | onReachBottom: function () { 96 | 97 | }, 98 | 99 | /** 100 | * 用户点击右上角分享 101 | */ 102 | onShareAppMessage: function () { 103 | 104 | } 105 | }) -------------------------------------------------------------------------------- /miniProgram/pages/login/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/login/login.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 7 | 20 | 28 | 34 | 35 | 36 | 37 |
38 |
39 | 40 | -------------------------------------------------------------------------------- /miniProgram/pages/login/login.wxss: -------------------------------------------------------------------------------- 1 | /* pages/login/login.wxss */ 2 | .icon { 3 | width: 40rpx; 4 | height: 40rpx; 5 | } 6 | 7 | .btn { 8 | font-size: 30rpx; 9 | font-weight: normal; 10 | } 11 | 12 | .primary-btn{ 13 | margin-top: 40rpx; 14 | background-color: #4da84d; 15 | color: #fff; 16 | } 17 | 18 | .primary-btn-hover{ 19 | background-color: #3db13d; 20 | color: #fff; 21 | } 22 | 23 | .secondary-btn{ 24 | margin-top: 30rpx; 25 | background-color: #dcdde1; 26 | color: #000; 27 | } 28 | 29 | .secondary-btn-hover{ 30 | background-color: #f5f6fa; 31 | color: #000; 32 | } 33 | 34 | .input-placeholder{ 35 | font-size: 28rpx; 36 | } 37 | 38 | .login-title{ 39 | font-size: 38rpx; 40 | margin-left: 40rpx; 41 | } 42 | 43 | .login-warper{ 44 | margin: 100rpx 50rpx; 45 | } 46 | 47 | .login-item{ 48 | padding: 20rpx; 49 | margin: 40rpx 20rpx; 50 | } 51 | 52 | .login-item > .login-item-header{ 53 | display: flex; 54 | align-items: center; 55 | } 56 | .login-item > .login-item-header > .icon{ 57 | margin-right: 15rpx; 58 | } 59 | .login-item > input{ 60 | padding: 10rpx; 61 | margin: 20rpx 0; 62 | font-size: 30rpx; 63 | border-bottom: rgba(0, 0, 0, 0.3) solid 1rpx; 64 | } 65 | 66 | .login-item > .forget-pwd{ 67 | display: inline; 68 | padding: 0; 69 | font-size: 28rpx; 70 | font-weight: normal; 71 | color: #4da84d; 72 | background-color: #fff; 73 | } 74 | 75 | .login-item > .forget-pwd-hover{ 76 | background-color: #fff; 77 | } 78 | 79 | .login-item > .forget-pwd:hover{ 80 | color: #63cd63; 81 | } 82 | 83 | .login-item > .forget-pwd:active{ 84 | color: #53cd53; 85 | } -------------------------------------------------------------------------------- /miniProgram/pages/messageBoard/messageBoard.js: -------------------------------------------------------------------------------- 1 | // pages/messageBoard/messageBoard.js 2 | const app=getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | 10 | }, 11 | evaSubmit:function(e){ 12 | let data=e.detial.value; 13 | wx.request({ 14 | url: 'http://sunshine-sun.cn:8080/comment/add', 15 | method: 'POST', 16 | data: { 17 | bid: 0, 18 | content: data.evaContent, 19 | uid: 0 20 | }, 21 | success(res) { 22 | if (res.data.code === 200) { 23 | //保存返回的数据到全局对象 24 | app.globalData.userInfo = res.data.data; 25 | wx.showToast({ 26 | title: '留言成功', 27 | icon: 'success' 28 | }); 29 | //跳转页面 30 | wx.navigateTo({ 31 | url: '/pages/details/details', 32 | }); 33 | } 34 | } 35 | }) 36 | 37 | }, 38 | /** 39 | * 生命周期函数--监听页面加载 40 | */ 41 | onLoad: function (options) { 42 | 43 | }, 44 | 45 | /** 46 | * 生命周期函数--监听页面初次渲染完成 47 | */ 48 | onReady: function () { 49 | 50 | }, 51 | 52 | /** 53 | * 生命周期函数--监听页面显示 54 | */ 55 | onShow: function () { 56 | 57 | }, 58 | 59 | /** 60 | * 生命周期函数--监听页面隐藏 61 | */ 62 | onHide: function () { 63 | 64 | }, 65 | 66 | /** 67 | * 生命周期函数--监听页面卸载 68 | */ 69 | onUnload: function () { 70 | 71 | }, 72 | 73 | /** 74 | * 页面相关事件处理函数--监听用户下拉动作 75 | */ 76 | onPullDownRefresh: function () { 77 | 78 | }, 79 | 80 | /** 81 | * 页面上拉触底事件的处理函数 82 | */ 83 | onReachBottom: function () { 84 | 85 | }, 86 | 87 | /** 88 | * 用户点击右上角分享 89 | */ 90 | onShareAppMessage: function () { 91 | 92 | } 93 | }) -------------------------------------------------------------------------------- /miniProgram/pages/messageBoard/messageBoard.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniProgram/pages/messageBoard/messageBoard.wxml: -------------------------------------------------------------------------------- 1 | 2 | 请留下您宝贵的意见: 3 | 4 | 5 |
6 |