# reader **Repository Path**: imjcw/reader ## Basic Information - **Project Name**: reader - **Description**: 电子读书器 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-09-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # reader > ebook reader ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report ``` ## localStorage **localStorage** 会在初次进入主页时进行初始化。 每次缓存章节或者从服务器端获取章节的时候,都会计算占用内存,并移除当前章节 **前9+** 和 **后100+** 的内容缓存 ### reader **格式:** object **键值:** | 键 | 说明 | 类型 | | ------------- | ------------------ | ------ | | story | 当前阅读小说 | string | | chapters | 已经缓存的章节 | object | | chapter | 当前阅读章节 | string | | page | 当前阅读页 | number | | theme | 当前主题 | string | | fontSize | 当前字体大小 | number | | contentHeight | 小说内容窗口原大小 | number | | margin | 小说内容窗口外边距 | number | | height | 小说内容窗口高度 | number | ### story **格式:** array **键值:** | 键 | 说明 | 类型 | | ---- | -------- | ------ | | id | 小说ID | string | | name | 小说名称 | string | | img | 小说图片 | string | ### menu **格式:** array **键值:** | 键 | 说明 | 类型 | | ---- | -------- | ------ | | id | 章节ID | string | | name | 章节名称 | string | ### 内容信息 **格式:** object **键值:** | 键 | 说明 | 类型 | | ------- | ---------- | ------ | | id | 章节ID | string | | chapter | 章节名称 | string | | content | 小说内容 | string | | prev | 上一章节ID | string | | next | 下一章节ID | string |