wbdenglu
This commit is contained in:
parent
50ccb29d76
commit
de4096830b
@ -144,7 +144,12 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
component: () => import('../views/login/About.vue')
|
||||
}
|
||||
},{
|
||||
path: '/wblogin',
|
||||
name: 'About',
|
||||
component: () => import('../views/login/wblogin.vue')
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
21
src/views/login/wblogin.vue
Normal file
21
src/views/login/wblogin.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import axios from "axios";
|
||||
import { defineComponent } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
|
||||
export default defineComponent(({
|
||||
setup(){
|
||||
const code = useRoute().params.code;
|
||||
axios.get(`https://api.weibo.com/oauth2/access_token?client_id=2754574056&client_secret=2f16267634db2de14cda7891c49aa54a&grant_type=authorization_code&redirect_uri=https://beelink.theluyuan.com/wblogin&code=${code}`).then((res)=>{
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}))
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user