modules 添加web

This commit is contained in:
Xwite
2023-04-07 20:28:21 +08:00
parent 3447e46176
commit 57e2c3a418
88 changed files with 5784 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# 「阅读3.0」 web 端(已打包进阅读3.0,不能设置IP)
本程序为「阅读3.0」的配套 web 端,需要保证手机和电脑在同一局域网内,然后手机端打开 web 服务。
~~在线地址 http://alanskycn.gitee.io/vip/reader/~~
## 具体实现
使用 Vue3 开发
## 功能特性
- 本地存储阅读记录与设置
- 阅读主题切换
- 夜间模式
- 字号调节
- 字体调节
- 阅读宽度调节
## 使用方法
```shell
pnpm install
#安装项目
pnpm serve
#开发模式
pnpm build
#打包
pnpm lint
#格式化代码
```
- 调试的时候可以修改.env.development里面的地址连接手机端调试
## 预览
![](imgs/1.jpg)
![](imgs/2.jpg)
![](imgs/3.jpg)
![](imgs/4.jpg)
+25
View File
@@ -0,0 +1,25 @@
import API from "@api";
import { useBookStore } from "@/store";
import "@/assets/bookshelf.css";
/**
* pc移动端判断
*/
const bookStore = useBookStore();
bookStore.setMiniInterface(window.innerWidth < 750);
window.onresize = () => {
bookStore.setMiniInterface(window.innerWidth < 750);
};
/**
* 加载配置
*/
API.getReadConfig().then((res) => {
var data = res.data.data;
if (data) {
const bookStore = useBookStore();
let config = JSON.parse(data);
let defaultConfig = bookStore.config;
config = Object.assign(defaultConfig, config);
bookStore.setConfig(config);
}
});
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="zh" class="">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
+8
View File
@@ -0,0 +1,8 @@
import { createApp } from "vue";
import App from "@/App.vue";
import bookRouter from "@/router";
import store from "@/store";
createApp(App).use(store).use(bookRouter).mount("#app");
import("./config");
+34
View File
@@ -0,0 +1,34 @@
# legado_web_editor
![image-20220901202413040](https://cdn.jsdelivr.net/gh/jgckM/image@main/image/202209031638325.png)
## 🚧开发注意
如果你想要调试项目 请修改文件`.env.development``VITE_API`为阅读web服务ip
## 路由
/rssSource 订阅源编辑
/rssSource 书源编辑
## 🎨Project setup
```
pnpm i
```
### Compiles and hot-reloads for development
```
pnpm dev
```
### Compiles and minifies for production
```
pnpm build
```
### Lints and fixes files
```
pnpm lint
```
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="zh" class="">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
+6
View File
@@ -0,0 +1,6 @@
import { createApp } from "vue";
import App from "@/App.vue";
import sourceRouter from "@/router";
import store from "@/store";
createApp(App).use(store).use(sourceRouter).mount("#app");