commit
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapMutations, mapActions } from 'vuex'
|
import { mapMutations, mapActions } from 'vuex'
|
||||||
|
import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
data () {
|
data () {
|
||||||
@@ -292,6 +293,34 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
let url = window.location.search
|
||||||
|
if (url) {
|
||||||
|
url = url.substr(1);
|
||||||
|
url = url.split('&');
|
||||||
|
let info = [];
|
||||||
|
let obj = {};
|
||||||
|
for (let i = 0,len = url.length; i < len; i++) {
|
||||||
|
info = url[i].split('=')
|
||||||
|
obj[info[0]] = decodeURI(info[1]);
|
||||||
|
url[i] = obj;
|
||||||
|
}
|
||||||
|
var code = url[0].code
|
||||||
|
axios.post('http://testsso1.foton.com.cn/oauth2.0/accessTokenByJson',
|
||||||
|
{
|
||||||
|
client_id: 'app_slrs',
|
||||||
|
client_secret: 'wj5iDTqyguQCxnsoo5VU21BoRSZqevhI',
|
||||||
|
grant_type: 'authorization_code',
|
||||||
|
redirect_uri: 'http://62.234.136.153:8038',
|
||||||
|
code: code
|
||||||
|
}
|
||||||
|
).then(function (response) {
|
||||||
|
console.log(response);
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
|
||||||
if (this.$store.state.laws_urm !== '') {
|
if (this.$store.state.laws_urm !== '') {
|
||||||
this.isRemember = true
|
this.isRemember = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user