Giter Club home page Giter Club logo

mp-scan-login-demo's Introduction

mp-scan-login-demo

小程序扫码登录demo。
基于小程序页面授权,使用微信扫描PC端小程序码实现获取用户信息进行系统登录。
即:PC扫小程序码登录。

使用技术

  • vue:2.6.11
  • vuex:3.1.2
  • vue-router:3.1.5
  • element-ui:2.13.0
  • koa:2.11.0
  • 小程序云开发

安装

web端

env配置

VUE_APP_BASE_API = 'http://localhost:2002'

安装依赖

npm install

开发

npm run serve

访问

http://localhost:9556

web端默认使用9556端口

小程序修改

服务端

  • koa

安装依赖

cd server
npm install

配置小程序,复制一份config.sample.js重命名为config.js填好如下配置

module.exports = {
  port: '', // 服务端端口号
  appId: '', // 小程序appid
  appSecret: '' // 小程序secrect
}

启动服务

node app.js

访问地址

http://localhost:2002

服务端接口使用2002端口

mp-scan-login-demo's People

Contributors

xdmjun 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.