|
@@ -64,6 +64,7 @@ import api from '@/api'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
|
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
+import { getCode } from '../../utils/dingding'
|
|
|
|
|
|
export default {
|
|
|
name: 'Login',
|
|
@@ -90,6 +91,20 @@ export default {
|
|
|
// 页面打开时,默认已登录
|
|
|
created() {
|
|
|
Vue.ls.remove(ACCESS_TOKEN)
|
|
|
+ //钉钉免登录
|
|
|
+ //获取临时授权码
|
|
|
+ // getCode(code=>{
|
|
|
+ // //登录
|
|
|
+ // // 异步操作
|
|
|
+ // this.dingLogin({code:code})
|
|
|
+ // .then(res => {
|
|
|
+ // this.getDataList() // 待办、已办 列表
|
|
|
+ // this.getActiveKeyAll() // OA 4个按钮
|
|
|
+ // })
|
|
|
+ // .catch(err => {
|
|
|
+ // console.log(err)
|
|
|
+ // })
|
|
|
+ // })
|
|
|
// 进入页面自动登录
|
|
|
this.autoLogin()
|
|
|
.then(res => {
|
|
@@ -105,11 +120,11 @@ export default {
|
|
|
// this.getDataList()
|
|
|
// },
|
|
|
// 映射store/user.js 中 actions的方法
|
|
|
- ...mapActions(['Login']),
|
|
|
+ ...mapActions(['Login','dingLogin']),
|
|
|
|
|
|
// 自动登录
|
|
|
async autoLogin() {
|
|
|
- var that = this
|
|
|
+ var that = this
|
|
|
let loginParams = {}
|
|
|
loginParams.username = 'fenghf'
|
|
|
loginParams.password = 'fenghf`123456'
|
|
@@ -128,7 +143,7 @@ export default {
|
|
|
|
|
|
// 点击全部 跳转页面
|
|
|
todo() {
|
|
|
- this.$router.push({ path: '/user/todo' })
|
|
|
+ this.$router.push({ name: 'todo' })
|
|
|
console.log(this.$router)
|
|
|
},
|
|
|
|