├── pages ├── read │ ├── read.json │ ├── read.wxml │ ├── read.wxss │ └── read.js ├── detail │ ├── detail.json │ ├── detail.wxml │ ├── detail.wxss │ └── detail.js ├── login │ ├── login.json │ ├── login.wxss │ ├── login.wxml │ └── login.js ├── mine │ ├── mine.json │ ├── mine.wxml │ ├── mine.wxss │ └── mine.js ├── about │ ├── about.json │ ├── about.wxss │ ├── about.wxml │ └── about.js ├── shelf │ ├── shelf.json │ ├── shelf.wxml │ ├── shelf.wxss │ └── shelf.js ├── register │ ├── register.json │ ├── register.wxss │ ├── register.wxml │ └── register.js ├── books │ ├── books.json │ ├── books.wxss │ ├── books.wxml │ └── books.js └── index │ ├── index.wxss │ ├── index.wxml │ └── index.js ├── wxapp.png ├── image ├── dev.png ├── ic_mine.png ├── empty-book.png ├── ic_chapter.png ├── ic_mine_HL.png ├── ic_shelf.png ├── ic_classify.png ├── ic_mine_arc.png ├── ic_shelf_HL.png ├── ic_classify_HL.png └── ic_chapter_current.png ├── template ├── book-type-template │ ├── book_type_template.wxml │ └── book_type_template.wxss ├── empty-template │ ├── empty_template.wxml │ └── empty_template.wxss ├── index-template │ ├── index_template.wxml │ └── index_template.wxss └── books-template │ ├── books_template.wxml │ └── books_template.wxss ├── app.js ├── README.md ├── app.wxss ├── style └── weui-navbar.wxss ├── app.json └── utils ├── dev_request.js └── md5.js /pages/read/read.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/detail/detail.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/login/login.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText":"登录"} -------------------------------------------------------------------------------- /pages/mine/mine.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "我的"} -------------------------------------------------------------------------------- /pages/about/about.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText":"关于作者"} -------------------------------------------------------------------------------- /pages/shelf/shelf.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "书架"} -------------------------------------------------------------------------------- /pages/register/register.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "注册"} -------------------------------------------------------------------------------- /pages/books/books.json: -------------------------------------------------------------------------------- 1 | { 2 | "onReachBottomDistance": 1 3 | } 4 | 5 | -------------------------------------------------------------------------------- /wxapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/wxapp.png -------------------------------------------------------------------------------- /image/dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/dev.png -------------------------------------------------------------------------------- /image/ic_mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_mine.png -------------------------------------------------------------------------------- /image/empty-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/empty-book.png -------------------------------------------------------------------------------- /image/ic_chapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_chapter.png -------------------------------------------------------------------------------- /image/ic_mine_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_mine_HL.png -------------------------------------------------------------------------------- /image/ic_shelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_shelf.png -------------------------------------------------------------------------------- /image/ic_classify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_classify.png -------------------------------------------------------------------------------- /image/ic_mine_arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_mine_arc.png -------------------------------------------------------------------------------- /image/ic_shelf_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_shelf_HL.png -------------------------------------------------------------------------------- /image/ic_classify_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_classify_HL.png -------------------------------------------------------------------------------- /image/ic_chapter_current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiangLuDev/WeYue-wxapp/HEAD/image/ic_chapter_current.png -------------------------------------------------------------------------------- /template/book-type-template/book_type_template.wxml: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /template/empty-template/empty_template.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/book-type-template/book_type_template.wxss: -------------------------------------------------------------------------------- 1 | .book_type_text{ 2 | font-size: 25rpx; 3 | color: #00BCD4; 4 | border-radius: 30rpx; 5 | border: 2rpx solid black; 6 | padding: 0rpx 20rpx; 7 | display:inline-block; 8 | height: 40rpx; 9 | line-height: 40rpx; 10 | margin: 10rpx; 11 | } -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | // 打开调试 5 | wx.setEnableDebug({ 6 | enableDebug: true 7 | }) 8 | }, 9 | globalData: { 10 | openid: 'openid', 11 | appid: 'wxcf431e81711984db', 12 | appsecret: '07a921c4ff08a0609411c25ed0c1fb08', 13 | user_info:'', 14 | } 15 | }) -------------------------------------------------------------------------------- /pages/about/about.wxss: -------------------------------------------------------------------------------- 1 | .page{ 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | width: 100%; 6 | } 7 | 8 | .img_avatar { 9 | margin-top: 20rpx; 10 | width: 128rpx; 11 | height: 128rpx; 12 | border-radius: 50%; 13 | } 14 | 15 | .about_v{ 16 | font-size: 28rpx; 17 | color: black; 18 | margin: 20rpx; 19 | } -------------------------------------------------------------------------------- /template/index-template/index_template.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 微Yue电子书阅读-微信小程序 2 | #### 前言 3 | > 微信小程序依赖微信,趋势所向,闲暇之余翻翻官方api,根据Android版学习写了一个小程序。 4 | #### 功能模块 5 | > 主要是用来练手学习小程序。 6 | - 登录注册 7 | - 添加书架 8 | - 阅读书籍 9 | - 书籍分类 10 | 11 | #### 小程序预览 12 | ![Alt text](./wxapp.png) 13 | #### 小程序体验 14 | > 因为书籍类小程序需要以企业身份上架,所以没法以小程序二维码的方式体验。 15 | 16 | 想要体验的直接使用 17 | ```git clone https://github.com/LiangLuDev/WeYue-wxapp.git``` 18 | 导入到微信开发者工具里面就能直接跑起来。 19 | 20 | 21 | -------------------------------------------------------------------------------- /pages/about/about.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 作者是Android Developer,开发这个小程序的辛酸历程(只有我懂),官方api是最好的教程,本项目设计主要是来源于Android端,后端使用NodeJs,有很多不足,谅解(毕竟第一次) 5 |
6 |
7 |
8 | 项目GitHub地址 9 | https://github.com/LiangLuDev/WeYue-wxapp 10 |
-------------------------------------------------------------------------------- /template/empty-template/empty_template.wxss: -------------------------------------------------------------------------------- 1 | .empty-view-content { 2 | width: 100%; 3 | min-height: 500px; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | } 9 | 10 | .empty-image { 11 | width: 89rpx; 12 | height: 64rpx; 13 | } 14 | 15 | .empty-text { 16 | color: #333333; 17 | margin-top: 20rpx; 18 | font-size: 25rpx; 19 | } -------------------------------------------------------------------------------- /pages/books/books.wxss: -------------------------------------------------------------------------------- 1 | @import "../../template/books-template/books_template.wxss"; 2 | @import "../../template/empty-template/empty_template.wxss"; 3 | page, .page, .page__bd { 4 | height: 100%; 5 | 6 | } 7 | 8 | ::-webkit-scrollbar { 9 | width: 0; 10 | height: 0; 11 | color: transparent; 12 | } 13 | 14 | .page__bd { 15 | padding-bottom: 0; 16 | } 17 | 18 | .weui-tab__content { 19 | padding-top: 50px; 20 | } 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | @import "../../template/index-template/index_template.wxss"; 2 | 3 | page, .page, .page__bd { 4 | height: 100%; 5 | } 6 | 7 | ::-webkit-scrollbar { 8 | width: 0; 9 | height: 0; 10 | color: transparent 11 | } 12 | 13 | .page__bd { 14 | padding-bottom: 0; 15 | } 16 | 17 | .weui-tab__content { 18 | padding-top: 50px; 19 | text-align: center; 20 | background-color: #fafafa; 21 | } 22 | 23 | .tab-view { 24 | background-color: #fafafa; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | @import 'style/weui-navbar.wxss'; 3 | 4 | page { 5 | background-color: #f8f8f8; 6 | font-size: 16px; 7 | font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif; 8 | font-family: '微软雅黑', Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial, sans-serif; 9 | } 10 | 11 | .container { 12 | height: 100%; 13 | display: flex; 14 | flex-direction: column; 15 | align-items: center; 16 | justify-content: space-between; 17 | padding: 200rpx 0; 18 | box-sizing: border-box; 19 | } 20 | -------------------------------------------------------------------------------- /pages/mine/mine.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{username}} 9 | 10 | 关于作者 11 | 12 | 退出登录 13 | 14 | 15 | -------------------------------------------------------------------------------- /pages/login/login.wxss: -------------------------------------------------------------------------------- 1 | .input-username { 2 | border: 1px solid lightgrey; 3 | height: 60rpx; 4 | padding-left: 20rpx; 5 | margin: 20rpx; 6 | border-radius: 8rpx; 7 | font-size: 25rpx; 8 | } 9 | 10 | .text-username{ 11 | display: flex; 12 | margin-top:10rpx; 13 | margin-left: 20rpx; 14 | font-size: 25rpx; 15 | } 16 | 17 | .button-confirm{ 18 | font-size: 28rpx; 19 | margin-top: 20rpx; 20 | margin-left: 20rpx; 21 | margin-right: 20rpx; 22 | background-color: #00BCD4; 23 | color: #f0f0f0; 24 | height: 70rpx; 25 | } -------------------------------------------------------------------------------- /pages/register/register.wxss: -------------------------------------------------------------------------------- 1 | .input-username { 2 | border: 1px solid lightgrey; 3 | height: 60rpx; 4 | padding-left: 20rpx; 5 | margin: 20rpx; 6 | border-radius: 8rpx; 7 | font-size: 25rpx; 8 | } 9 | 10 | .text-username{ 11 | display: flex; 12 | margin-top:10rpx; 13 | margin-left: 20rpx; 14 | font-size: 25rpx; 15 | } 16 | 17 | .button-confirm{ 18 | font-size: 28rpx; 19 | margin-top: 20rpx; 20 | margin-left: 20rpx; 21 | margin-right: 20rpx; 22 | background-color: #00BCD4; 23 | color: #f0f0f0; 24 | height: 70rpx; 25 | } -------------------------------------------------------------------------------- /pages/login/login.wxml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 用户名: 4 | 5 | 6 | 密码: 7 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 |
-------------------------------------------------------------------------------- /pages/register/register.wxml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 用户名: 4 | 5 | 6 | 密码: 7 | 9 | 10 | 确认密码: 11 | 13 | 14 | 15 | 16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /template/index-template/index_template.wxss: -------------------------------------------------------------------------------- 1 | 2 | .classify__content { 3 | display: flex; 4 | flex-direction: row; 5 | background-color: white; 6 | border-radius: 10rpx; 7 | box-shadow:6rpx 6rpx 6rpx rgba(0,0,0,0.1); 8 | text-align: left; 9 | align-items: center; 10 | border-bottom: 1px solid #f0f0f0; 11 | padding: 20rpx; 12 | margin: 20rpx; 13 | 14 | } 15 | 16 | .classify__image { 17 | width: 40rpx; 18 | height: 40rpx; 19 | margin-left: 10rpx; 20 | } 21 | 22 | .classify__text__name { 23 | padding-left: 30rpx; 24 | font-size: 28rpx; 25 | color: black; 26 | } 27 | 28 | .classify__text__count { 29 | padding-right: 30rpx; 30 | text-align: right; 31 | font-size: 24rpx; 32 | color: #666; 33 | flex: 1; 34 | } -------------------------------------------------------------------------------- /pages/shelf/shelf.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |