Giter VIP home page Giter VIP logo

vue-reader's Introduction

基于vue+express+nodejs爬虫的移动书城

技术栈:vue + vue-router + vuex + webpack + axios + less + flex + express + nodejs + mysql + localStorage

预览地址

api地址

爬虫地址

另外推荐一下自己另外一个高仿网易云音乐和一个MD风格Cnode社区

使用说明

#克隆项目
git clone [email protected]:tgxhx/vue-reader.git

# 安装依赖
npm install

# 本地开发环境 访问http://localhost:8080
npm run dev

# 构建生产
npm run build

项目说明

该项目很早以前就开始写了,算是用vue写的第一个项目,所以代码还是有不少问题,但是应该很符合vue入门使用者的写法,比如直接修改state:this.$store.state.xx = xx。

最开始是用jQuery写了阅读器部分,后来为了学习,就尝试用vue重构,学习了整个vue技术栈。

后来想想阅读器写好了,没有书可不行,想想应该用爬虫爬点数据,于是各种查找node爬虫的资料,写了不少爬虫,本项目使用的爬虫地址在这:地址

数据有了,接下来该构建api了,谷歌了一下发现用express好像不错,于是又学习了express部分,构建了所需的api,地址在这

有的同学刚开始学习vue的时候可能有点茫然,不光是vue本身的用法、api、组件等等,查资料后发现还有vue-router、vuex等等需要学习。

本项目就是那个阶段写的第一个比较完善的vue项目,现在才拿出来是因为中间有不少事耽搁了,如果你想看代码,可能会发现不少地方跟自己写得很像,一共只有四个路由,够简单吧,但是用到的东西在其他复杂应用中也是必需的,仔细想想其实vue也就那么点东西,多写就容易了。

vue-router方面,常用的内容基本都用到了,比如 动态路由、编程式导航、命名路由、重定向、数据获取时的loading、懒加载等等。

vuex采用分离的写法,state、mutation、action分开写,方便维护。

另外本项目中还写了一些可直接迁移使用的组件、比如loading组件、左右弹出层的背景阴影组件。

功能

  • 首页推荐
  • 书籍详情
  • 相似推荐
  • 分类查看
  • 阅读器
  • 章节跳转
  • 更改字体
  • 更换主题
  • 夜间模式
  • 翻页浏览
  • 本地存储(存储每本书的阅读进度)
  • 书架(待考虑)

项目截图

vue-reader's People

Contributors

tgxhx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.