1.0.1 • Published 3 years ago

readboy-oa-login v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

read-oa-login

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

1.简单的封装了弹窗式的OA登录

需要注意的是插件内会默认给路由表内添加此路由,用来接收返回的code,路由收尾有进行拦截的话请将/auth-redirect 加入到白名单中。

router.addRoute({
        path: '/auth-redirect',
        name:'AuthRedirect',
        component: authRedirect,
})
//main.js
import ReadOaLogin from './lib/index.js'

Vue.use(ReadOaLogin,{AppId:'xxxxx'})  //配置{AppId:string,authBase:string}
<template>
  <div>
  	<ReadOaLogin @getCode="getCode" @getError="getError">
    	OA登录测试按钮
  	</ReadOaLogin>
  </div>
  </template>

    getCode(value){
    //获取到认证中心的code后
    }
	getError(err){
	//错误信息{code:1,msg:'获取code失败'}
    }

后续用用看,目前还没加其他配置项

1.0.1

3 years ago

1.0.0

3 years ago