├── .gitignore ├── App.vue ├── LICENSE ├── README.md ├── change.md ├── components ├── header.vue ├── imt-audio.vue ├── listBook.vue ├── loading.vue ├── menu.vue ├── menuTree.vue ├── scrollBook.vue ├── search.vue └── tab.vue ├── config.example.js ├── main.js ├── manifest.json ├── pages.json ├── pages ├── bind │ └── bind.vue ├── bookmarks │ └── bookmarks.vue ├── bookshelf │ └── bookshelf.vue ├── cate │ └── cate.vue ├── comment │ └── comment.vue ├── history │ └── history.vue ├── index │ └── index.vue ├── intro │ └── intro.vue ├── list │ └── list.vue ├── login │ └── login.vue ├── me │ └── me.vue ├── menu │ └── menu.vue ├── notfound │ └── notfound.vue ├── rank │ └── rank.vue ├── read │ └── read.vue ├── reg │ └── reg.vue ├── search │ └── search.vue └── ucenter │ └── ucenter.vue ├── static ├── css │ ├── bookchat.css │ ├── markdown.css │ └── reg-login.css └── images │ ├── 404.png │ ├── about-us.png │ ├── bg-poster.jpg │ ├── book.png │ ├── bookmark-add.png │ ├── bookmark-added.png │ ├── bookmark.png │ ├── cate-default.png │ ├── cate-selected.png │ ├── cate.png │ ├── checked.png │ ├── clear.png │ ├── clock.png │ ├── collect-selected.png │ ├── collect.png │ ├── comment.png │ ├── document.png │ ├── download.png │ ├── error.png │ ├── eye.png │ ├── fans.png │ ├── follow.png │ ├── font-minus.png │ ├── font-plus.png │ ├── font.png │ ├── header-back.png │ ├── header-home.png │ ├── history.png │ ├── home-black.png │ ├── home-selected.png │ ├── home.png │ ├── loading-white.png │ ├── loading.gif │ ├── loading.png │ ├── login.png │ ├── logo.png │ ├── me-selected.png │ ├── me.png │ ├── menu.png │ ├── more.png │ ├── next-disable.png │ ├── next.png │ ├── pre-disable.png │ ├── pre.png │ ├── rank.png │ ├── read-white.png │ ├── read.png │ ├── readed.png │ ├── recycle.png │ ├── refresh-o.png │ ├── reg.png │ ├── report.png │ ├── right-angle.png │ ├── search-black.png │ ├── search.png │ ├── share.png │ ├── sign.png │ ├── signed.png │ ├── sprite_star.png │ ├── star-half.png │ ├── star-highlight.png │ ├── star-selected.png │ ├── star.png │ └── wxcode-black.png ├── unpackage ├── images │ ├── alipay.jpg │ ├── book-intro-2.png │ ├── book-intro.png │ ├── bookshelf.png │ ├── category.png │ ├── index.png │ ├── iphone │ │ ├── bookshelf.png │ │ ├── category.png │ │ ├── index.png │ │ ├── intro.png │ │ ├── loading.png │ │ ├── me.png │ │ ├── read.png │ │ └── search.png │ ├── login.png │ ├── me.png │ ├── read-menu.png │ ├── read-setting.png │ ├── read.png │ ├── search-book-2.png │ ├── search-book.png │ └── wxpay.jpg └── res │ └── icons │ ├── 1024x1024.png │ ├── 120x120.png │ ├── 144x144.png │ ├── 152x152.png │ ├── 167x167.png │ ├── 180x180.png │ ├── 192x192.png │ ├── 20x20.png │ ├── 29x29.png │ ├── 40x40.png │ ├── 58x58.png │ ├── 60x60.png │ ├── 72x72.png │ ├── 76x76.png │ ├── 80x80.png │ ├── 87x87.png │ └── 96x96.png └── utils ├── api.js └── util.js /.gitignore: -------------------------------------------------------------------------------- 1 | unpackage/dist/* 2 | unpackage/resources/* 3 | unpackage/.DS_Store 4 | unpackage/release/* 5 | .DS_Store 6 | */.DS_Store 7 | config.js 8 | .idea 9 | .hbuilderx -------------------------------------------------------------------------------- /App.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 95 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [TOC] 2 | 3 | # BookChatApp 4 | 5 | ![](static/images/logo.png) 6 | 7 | 通用书籍阅读APP,[BookChat](https://gitee.com/truthhun/BookChat) 的 `uni-app` 实现版本,支持多端分发,编译生成 Android 和 iOS 手机APP以及各平台的小程序。 8 | 9 | 使用`BookChatApp`,您可以轻松地将您的电子书、文档手册和在线书籍分发到各个小程序平台,以及编译生成手机APP发布到各大手机软件市场供用户下载和使用。 10 | 11 | ## APP 体验 12 | 13 | 目前 `BookChatApp` 已经打包编译生成的 Android 和 iOS 手机APP,您可以直接下载体验和感受下。 14 | 15 | APP下载体验地址: https://www.bookstack.cn/app 16 | 17 | ## 设计开发 18 | 19 | `BookChatApp`的设计开发跟微信小程序[BookChat](https://gitee.com/truthhun/BookChat)几乎没有两样,如果有不一样的地方, 20 | 那就是从微信小程序的原生开发迁移到了使用`uni-app`的vue开发上来。 21 | 22 | `BookChatApp`中对HTML内容的渲染,经过多次对性能和渲染效果体验的对比,最终没有采用网上开源的第三方渲染组件,直接使用了`uni-app`自带的`rich-text`组件, 23 | 而将`BookChatApp`编译成各平台的小程序的时候,同样也是用了各小程序平台的`rich-text`组件。 24 | 25 | 26 | ## 特点 27 | 28 | - 开源:基于 Apache 2.0 开源协议进行开源,对商业友好 29 | - 秀气:简洁、美观,给您焕然一新的视觉体验,让你都不敢相信这是一个擅长后端的程序员设计和开发实现的 30 | - 丰富:注册、登录、搜索、书架、书签、阅读偏好设置等功能齐全,麻雀虽小,五脏俱全 31 | - 强大:尽管`BookChatApp`使用的是混合开发,但是编译生成的手机App以及各平台的小程序,性能和体验也没见得真比原生的差 32 | 33 | 34 | ## 二次开发 35 | 36 | 可能您对现有程序的功能和主题色调不是很满意,或者有自己的一套UI设计方案,那么,您可以对`BookChatApp`进行二次开发,如果您对`Vue`熟悉。 37 | 38 | 39 | 40 | ### 后端程序 41 | 42 | `BookChatApp`的配套后端程序是 [BookStack](https://gitee.com/truthhun/BookStack) v2.1 以上版本。 43 | 44 | `BookStack`的安装部署教程,看这里--> [BookStack安装部署](https://www.bookstack.cn/read/help/Ubuntu.md) 45 | 46 | > 注意: BookStack 的安装部署,不是使用源码进行部署的,而是用编译好了的可执行程序进行部署 47 | 48 | **BookStack 开源地址** 49 | 50 | - Gitee: https://gitee.com/truthhun/BookStack 51 | - GitHub: https://github.com/truthhun/BookStack 52 | 53 | **BookStack 官网** 54 | 55 | 书栈网: https://www.bookstack.cn 56 | 57 | ### 二次开发基本步骤 58 | 59 | 1. 安装部署`BookStack` 60 | 1. 克隆下载`BookChatApp`源码 61 | 1. 使用`HBuilderX`打开项目文件夹 62 | 1. 将下载程序中的`config.example.js`文件重命名为`config.js`文件 63 | 1. 根据自己的开发环境,设置`host`配置项 64 | 65 | > 如果是在开发环境,请把`debug`设置为true,编译生成生产程序的时候,把`debug`设置为false 66 | 67 | ## 程序页面 68 | 69 | - [x] 目录页 /pages/menu/menu 70 | - [x] 书籍阅读页 /pages/read/read 71 | - [x] 用户中心页 /pages/ucenter/ucenter 72 | - [x] 首页 /pages/index/index 73 | - [x] 分类页 /pages/cate/cate 74 | - [x] 书架页 /pages/bookshelf/bookshelf 75 | - [x] 列表页 /pages/list/list 76 | - [x] 个人主页 /pages/me/me 77 | - [x] 书签页 /pages/bookmarks/bookmarks 78 | - [x] 搜索结果页 /pages/search/search 79 | - [x] 内容点评页 /pages/comment/comment 80 | - [x] 404页 /pages/notfound/notfound 81 | - [x] 登录页 /pages/login/login 82 | - [x] 注册页 /pages/register/register 83 | - [x] 书籍介绍页 /pages/intro/intro 84 | 85 | 86 | ## QQ交流群 87 | 88 | QQ交流群:457803862(猿军团) 89 | 90 | 加群请备注`来自BookChatApp` 91 | 92 | 说明: 93 | 94 | > 该群是一个技术交流群。如果是开源程序遇到问题,请直接提交issues,群里不解答问题. 95 | 96 | ## 作者介绍 97 | 98 | Web 全栈工程师,自带发际线魔法加成,擅长`Ctrl + C` 和 `Ctrl + V` 99 | 100 | - 作者:皇虫(TruthHun) 101 | - Email: TruthHun#QQ.COM(把 # 换成 @ ) 102 | 103 | ## 预览 104 | 105 | ### 启动页 106 | 107 | ![](unpackage/images/iphone/loading.png) 108 | 109 | ### 首页 110 | 111 | 112 | ![](unpackage/images/iphone/index.png) 113 | 114 |
115 |
116 | 117 | ### 分类页 118 | 119 | ![](unpackage/images/iphone/category.png) 120 | 121 |
122 |
123 | 124 | ### 书架页 125 | 126 | ![](unpackage/images/iphone/bookshelf.png) 127 | 128 |
129 |
130 | 131 | ### 书籍介绍页 132 | 133 | ![](unpackage/images/iphone/intro.png) 134 | 135 |
136 |
137 | 138 | ### 书籍阅读页 139 | 140 | ![](unpackage/images/iphone/read.png) 141 | 142 | ----- 143 | 144 | ![](unpackage/images/read-menu.png) 145 | 146 | ----- 147 | 148 | ![](unpackage/images/read-setting.png) 149 | 150 |
151 |
152 | 153 | ### 登录 154 | 155 | 156 | ![](unpackage/images/login.png) 157 | 158 |
159 |
160 | 161 | ### 个人中心 162 | 163 | ![](unpackage/images/iphone/me.png) 164 | 165 |
166 |
167 | 168 | ### 搜索 169 | 170 | ![](unpackage/images/iphone/search.png) 171 | 172 | ----- 173 | 174 | ![](unpackage/images/search-book-2.png) 175 | 176 | 177 | ## 开源协议 178 | 179 | Apache v2.0 180 | 181 | 182 | ## 赞助 183 | 184 | 如果您觉得程序还可以,欢迎 start 和 fork,以及赞助我一杯咖啡 185 | 186 | ![](unpackage/images/alipay.jpg) 187 | ![](unpackage/images/wxpay.jpg) 188 | -------------------------------------------------------------------------------- /change.md: -------------------------------------------------------------------------------- 1 | ## BookChatApp v1.5.0 2 | - [x] 增加显示最近阅读的书籍 3 | - [x] 移除书架书籍引起的书架空白问题的bug 4 | - [x] 使用`ActionSheet`组件优化书架书籍管理方式 5 | - [x] 增加类似通讯录的分类布局。([修改配置方式](https://gitee.com/truthhun/BookChatApp/blob/master/pages/cate/cate.vue#L76)) 6 | - [x] 修复 Android内容阅读亮度调节跳转系统设置的问题(APP请求的手机权限不足的问题造成)([#I1DMRB](https://gitee.com/truthhun/BookChatApp/issues/I1DMRB)) 7 | - [x] 书架收藏的书籍分类太多时,部分机型会出现分类换行显示,导致下边显示的书籍封面被盖住([#I1DMRC](https://gitee.com/truthhun/BookChatApp/issues/I1DMRC)) 8 | 9 | ## BookChatApp v1.4.0 10 | 11 | - [x] 增加本月累计签到和上月累计签到等榜单 12 | - [x] 增加分享功能 13 | 14 | > 本次版本,使用 HBuilderX 2.6.5 进行开发,推荐版本跟进 15 | 16 | ## BookChatApp v1.3.0 17 | - [x] 书籍介绍页面显示书籍标签,以便用户快捷搜索 18 | - [x] 用户退出后,更新书架内容 19 | - [x] 解决类似`mgt-30upx`等class样式不生效的问题,将此类class名更换为`mgt-30` 20 | - [x] 封面样式调整 21 | - [x] `iOS`由 `UIWebView`更换为`WKWebView` 22 | - [x] Fix: 内容阅读设置,恢复默认值时,屏幕亮度没有跟着恢复的问题 23 | - [x] 自定义header,增加`home`键和`搜索按钮` 24 | - [x] 用户个人中心,显示个人相关阅读时长等数据 25 | - [x] 收藏到书架的书籍,点击的时候直接跳转到书籍内容阅读页 26 | - [x] APP签到功能 27 | - [x] 榜单功能显示 28 | - [x] 书籍列表、分类列表增加懒加载功能(之前懒加载使用方式没使用正确) 29 | - [x] 使用`localstorage`的方式存储`app.globalData`,以避免`h5`下的其他问题 30 | 31 | > **注意事项**: 不要使用 `v3` 模式进行编译,不然阅读页面的内容会渲染不出来 32 | 33 | ## BookChatApp v1.2.0 34 | - [x] 平板适配页面 35 | - [x] 目录页 /pages/menu/menu 36 | - [x] 书籍阅读页 /pages/read/read 37 | - [x] 用户中心页 /pages/ucenter/ucenter 38 | - [x] 首页 /pages/index/index 39 | - [x] 分类页 /pages/cate/cate 40 | - [x] 书架页 /pages/bookshelf/bookshelf 41 | - [x] 列表页 /pages/list/list 42 | - [x] 个人主页 /pages/me/me 43 | - [x] 书签页 /pages/bookmarks/bookmarks 44 | - [x] 搜索结果页 /pages/search/search 45 | - [x] 内容点评页 /pages/comment/comment 46 | - [x] 404页 /pages/notfound/notfound 47 | - [x] 登录页 /pages/login/login 48 | - [x] 注册页 /pages/register/register 49 | - [x] 书籍介绍页 /pages/intro/intro 50 | - [x] 平板适配微调 51 | - [x] `tab` 内边距太大 52 | - [x] 书架中书籍名称行高太大 53 | - [x] 搜索输入框优化 54 | - [x] 内容阅读页面代码块显示优化 55 | - [x] Banner 等HTTP链接允许外部打开 56 | - [x] APP版本升级提示(仅针对Android,iOS有App Store,不需要升级提示) 57 | - [x] 书架,长按可以将书籍从书架中移除 -------------------------------------------------------------------------------- /components/header.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 135 | 136 | 193 | -------------------------------------------------------------------------------- /components/imt-audio.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 132 | 133 | 227 | -------------------------------------------------------------------------------- /components/listBook.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 66 | 67 | 149 | -------------------------------------------------------------------------------- /components/loading.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 26 | 27 | 31 | -------------------------------------------------------------------------------- /components/menu.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 113 | 114 | 149 | -------------------------------------------------------------------------------- /components/menuTree.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 54 | 55 | 99 | -------------------------------------------------------------------------------- /components/scrollBook.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 36 | 37 | 71 | -------------------------------------------------------------------------------- /components/search.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 79 | 80 | 150 | -------------------------------------------------------------------------------- /components/tab.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 69 | 70 | 123 | -------------------------------------------------------------------------------- /config.example.js: -------------------------------------------------------------------------------- 1 | // api host,末尾不要带斜杠。后端程序是BookStack (https://github.com/truthhun/BookStack) 2 | // let host = 'http://localhost:8181/bookchat' 3 | 4 | // 默认分享的内容 5 | let shareContent = 'BookChat,程序员IT互联网开源编程书籍免费阅读' 6 | let shareLink = 'https://www.bookstack.cn/read/help/app.md' 7 | 8 | // 是否是调试模式。如果是生产环境,请设置为false 9 | const debug = true 10 | 11 | // 横幅广告id,如果申请了腾讯小程序的广告,则创建一个横幅广告,把广告的AdUnitId粘贴进来即可,不投放广告,则把该值设置为空 12 | const bannerAdUnitId = '' 13 | 14 | // 程序信息,置空则不显示 15 | const info = { 16 | about: 'help/about', // "关于我们"的文档标识 17 | version: 'v1.7.0', 18 | copyright: 'BookStack.CN', 19 | license: 'Apache 2.0', 20 | author: 'TruthHun', 21 | } 22 | 23 | const api = { 24 | banners: `${host}/api/v1/banners`, 25 | register: `${host}/api/v1/register`, 26 | login: `${host}/api/v1/login`, 27 | loginByWechat: `${host}/api/v1/login-by-wechat`, 28 | loginBindWechat: `${host}/api/v1/login-bind-wechat`, 29 | loginedBindWechat: `${host}/api/v1/login-bind-wechat`, 30 | logout: `${host}/api/v1/logout`, 31 | categories: `${host}/api/v1/book/categories`, 32 | bookLists: `${host}/api/v1/book/lists`, 33 | bookListsByCids: `${host}/api/v1/book/lists-by-cids`, 34 | bookInfo: `${host}/api/v1/book/info`, 35 | historyReadBook: `${host}/api/v1/book/history`, 36 | bookMenu: `${host}/api/v1/book/menu`, 37 | bookDownload: `${host}/api/v1/book/download`, 38 | searchBook: `${host}/api/v1/search/book`, 39 | searchDoc: `${host}/api/v1/search/doc`, 40 | bookmark: `${host}/api/v1/book/bookmark`, 41 | read: `${host}/api/v1/book/read`, 42 | userInfo: `${host}/api/v1/user/info`, 43 | userMoreInfo: `${host}/api/v1/user/more-info`, 44 | userRelease: `${host}/api/v1/user/release`, 45 | userFans: `${host}/api/v1/user/fans`, 46 | userFollow: `${host}/api/v1/user/follow`, 47 | userSign: `${host}/api/v1/user/sign`, 48 | bookshelf: `${host}/api/v1/user/bookshelf`, 49 | bookStar: `${host}/api/v1/book/star`, 50 | comment: `${host}/api/v1/book/comment`, 51 | bookRelated: `${host}/api/v1/book/related`, 52 | changeAvatar: `${host}/api/v1/user/change-avatar`, 53 | changePassword: `${host}/api/v1/user/change-password`, 54 | lastestVersion: `${host}/api/v1/version`, 55 | rank: `${host}/api/v1/rank`, 56 | } 57 | 58 | module.exports = { 59 | api, 60 | debug, 61 | info, 62 | shareContent, 63 | shareLink, 64 | } 65 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | 4 | Vue.config.productionTip = false 5 | 6 | App.mpType = 'app' 7 | 8 | const app = new Vue({ 9 | ...App 10 | }) 11 | app.$mount() 12 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "BookChat", 3 | "appid" : "__UNI__8FAB29C", 4 | "description" : "", 5 | "versionName" : "1.7.0", 6 | "versionCode" : 170, 7 | "transformPx" : false, 8 | /* 5+App特有相关 */ 9 | "app-plus" : { 10 | "kernel" : { 11 | "ios" : "WKWebview" // UIWebview 或者 "WKWebview" 12 | }, 13 | "usingComponents" : true, 14 | "splashscreen" : { 15 | "alwaysShowBeforeRender" : true, 16 | "waiting" : true, 17 | "autoclose" : true, 18 | "delay" : 0 19 | }, 20 | // 屏幕方向 21 | "screenOrientation" : [ 22 | "portrait-primary", 23 | "landscape-primary", 24 | "portrait-secondary", 25 | "landscape-secondary" 26 | ], 27 | /* 模块配置 */ 28 | "modules" : {}, 29 | /* 应用发布信息 */ 30 | "distribute" : { 31 | /* android打包配置 */ 32 | "android" : { 33 | "permissions" : [ 34 | "", 35 | "", 36 | "", 37 | "" 38 | ], 39 | "schemes" : "", 40 | "autoSdkPermissions" : true 41 | }, 42 | /* ios打包配置 */ 43 | "ios" : { 44 | "urltypes" : "" 45 | }, 46 | /* SDK配置 */ 47 | "sdkConfigs" : { 48 | "ad" : {}, 49 | "speech" : {} 50 | }, 51 | "icons" : { 52 | "android" : { 53 | "hdpi" : "unpackage/res/icons/72x72.png", 54 | "xhdpi" : "unpackage/res/icons/96x96.png", 55 | "xxhdpi" : "unpackage/res/icons/144x144.png", 56 | "xxxhdpi" : "unpackage/res/icons/192x192.png" 57 | }, 58 | "ios" : { 59 | "appstore" : "unpackage/res/icons/1024x1024.png", 60 | "ipad" : { 61 | "app" : "unpackage/res/icons/76x76.png", 62 | "app@2x" : "unpackage/res/icons/152x152.png", 63 | "notification" : "unpackage/res/icons/20x20.png", 64 | "notification@2x" : "unpackage/res/icons/40x40.png", 65 | "proapp@2x" : "unpackage/res/icons/167x167.png", 66 | "settings" : "unpackage/res/icons/29x29.png", 67 | "settings@2x" : "unpackage/res/icons/58x58.png", 68 | "spotlight" : "unpackage/res/icons/40x40.png", 69 | "spotlight@2x" : "unpackage/res/icons/80x80.png" 70 | }, 71 | "iphone" : { 72 | "app@2x" : "unpackage/res/icons/120x120.png", 73 | "app@3x" : "unpackage/res/icons/180x180.png", 74 | "notification@2x" : "unpackage/res/icons/40x40.png", 75 | "notification@3x" : "unpackage/res/icons/60x60.png", 76 | "settings@2x" : "unpackage/res/icons/58x58.png", 77 | "settings@3x" : "unpackage/res/icons/87x87.png", 78 | "spotlight@2x" : "unpackage/res/icons/80x80.png", 79 | "spotlight@3x" : "unpackage/res/icons/120x120.png" 80 | } 81 | } 82 | } 83 | }, 84 | "uniStatistics" : { 85 | "enable" : true 86 | }, 87 | "compilerVersion" : 2 88 | }, 89 | /* 快应用特有相关 */ 90 | "quickapp" : {}, 91 | /* 小程序特有相关 */ 92 | "mp-weixin" : { 93 | "appid" : "wx3485915f4bdab8fb", 94 | "setting" : { 95 | "urlCheck" : false, 96 | "es6" : false 97 | }, 98 | "usingComponents" : true, 99 | "uniStatistics" : { 100 | "enable" : true 101 | } 102 | }, 103 | "mp-alipay" : { 104 | "usingComponents" : true, 105 | "uniStatistics" : { 106 | "enable" : true 107 | } 108 | }, 109 | "mp-baidu" : { 110 | "usingComponents" : true, 111 | "uniStatistics" : { 112 | "enable" : true 113 | } 114 | }, 115 | "mp-toutiao" : { 116 | "usingComponents" : true, 117 | "uniStatistics" : { 118 | "enable" : true 119 | } 120 | }, 121 | "h5" : { 122 | "uniStatistics" : { 123 | "enable" : true 124 | } 125 | }, 126 | "mp-qq" : { 127 | "uniStatistics" : { 128 | "enable" : true 129 | } 130 | }, 131 | "uniStatistics" : { 132 | "enable" : true 133 | } 134 | } 135 | /* ios打包配置 *//* SDK配置 */ 136 | 137 | -------------------------------------------------------------------------------- /pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages 3 | { 4 | "path": "pages/index/index", 5 | "style": { 6 | "navigationBarTitleText": "BookChat" 7 | } 8 | }, { 9 | "path": "pages/read/read" 10 | }, { 11 | "path": "pages/menu/menu", 12 | "style": {} 13 | }, { 14 | "path": "pages/notfound/notfound", 15 | "style": { 16 | "navigationBarTitleText": "未找到对象" 17 | } 18 | }, 19 | { 20 | "path": "pages/comment/comment", 21 | "style": { 22 | "navigationBarTitleText": "点评" 23 | } 24 | }, 25 | { 26 | "path": "pages/reg/reg", 27 | "style": { 28 | "navigationBarTitleText": "注册" 29 | } 30 | }, 31 | { 32 | "path": "pages/login/login", 33 | "style": { 34 | "navigationBarTitleText": "登录" 35 | } 36 | }, 37 | { 38 | "path": "pages/list/list", 39 | "style": { 40 | "navigationBarTitleText": "列表" 41 | } 42 | }, 43 | { 44 | "path": "pages/cate/cate", 45 | "style": { 46 | "navigationBarTitleText": "分类" 47 | } 48 | }, 49 | { 50 | "path": "pages/me/me", 51 | "style": { 52 | "navigationBarTitleText": "我的" 53 | } 54 | }, { 55 | "path": "pages/bookshelf/bookshelf", 56 | "style": { 57 | "navigationBarTitleText": "书架" 58 | } 59 | }, { 60 | "path": "pages/ucenter/ucenter", 61 | "style": {} 62 | }, { 63 | "path": "pages/intro/intro", 64 | "style": {} 65 | }, { 66 | "path": "pages/bookmarks/bookmarks", 67 | "style": { 68 | "navigationBarTitleText": "书签" 69 | } 70 | }, { 71 | "path": "pages/search/search", 72 | "style": { 73 | "navigationBarTitleText": "搜索" 74 | } 75 | }, { 76 | "path": "pages/rank/rank", 77 | "style": {} 78 | }, { 79 | "path": "pages/history/history", 80 | "style": { 81 | "enablePullDownRefresh": true 82 | } 83 | } 84 | ,{ 85 | "path" : "pages/bind/bind", 86 | "style" : 87 | { 88 | "navigationBarTitleText": "", 89 | "enablePullDownRefresh": false 90 | } 91 | 92 | } 93 | ], 94 | "tabBar": { 95 | "list": [{ 96 | "pagePath": "pages/index/index", 97 | "text": "首页", 98 | "iconPath": "static/images/home.png", 99 | "selectedIconPath": "static/images/home-selected.png" 100 | }, 101 | { 102 | "pagePath": "pages/cate/cate", 103 | "text": "分类", 104 | "iconPath": "static/images/cate.png", 105 | "selectedIconPath": "static/images/cate-selected.png" 106 | }, 107 | { 108 | "pagePath": "pages/bookshelf/bookshelf", 109 | "text": "书架", 110 | "iconPath": "static/images/collect.png", 111 | "selectedIconPath": "static/images/collect-selected.png" 112 | }, 113 | { 114 | "pagePath": "pages/me/me", 115 | "text": "我的", 116 | "iconPath": "static/images/me.png", 117 | "selectedIconPath": "static/images/me-selected.png" 118 | } 119 | ], 120 | "backgroundColor": "#ffffff", 121 | "color": "#888888", 122 | "selectedColor": "#1aad19" 123 | }, 124 | "globalStyle": { 125 | "navigationBarTextStyle": "black", 126 | "navigationBarTitleText": "BookChat", 127 | "navigationBarBackgroundColor": "#FFFFFF", 128 | "backgroundColor": "#FFFFFF", 129 | "navigationStyle": "custom" 130 | }, 131 | "condition": { //模式配置,仅开发期间生效 132 | "current": 0, //当前激活的模式(list 的索引项) 133 | "list": [{ 134 | "name": "", //模式名称 135 | "path": "", //启动页面,必选 136 | "query": "" //启动参数,在页面的onLoad函数里面得到 137 | }] 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /pages/bind/bind.vue: -------------------------------------------------------------------------------- 1 | 73 | 74 | 146 | 147 | 187 | -------------------------------------------------------------------------------- /pages/bookmarks/bookmarks.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 105 | 106 | 138 | -------------------------------------------------------------------------------- /pages/bookshelf/bookshelf.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 289 | 290 | 397 | -------------------------------------------------------------------------------- /pages/cate/cate.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 134 | 135 | 279 | -------------------------------------------------------------------------------- /pages/comment/comment.vue: -------------------------------------------------------------------------------- 1 |