Skip to content

z836454898/vue-token-login

 
 

Repository files navigation

vue-token-login

使用 vue + token 的登录 demo

  • 首次登录,发送账号密码给后端
  • 后端根据秘钥 + username + 过期时间生成 Token,返回给前端
  • 前端拿到之后存储在 localStroage 和 Vuex 中
  • 每次发送请求在 header 里添加 Token

Build Setup

# 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

# run unit tests
npm run unit

# run all tests
npm test

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

About

a login demo usedof vue &&token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.2%
  • Vue 11.0%
  • HTML 0.8%