dist
This commit is contained in:
@@ -132,7 +132,7 @@ export function toindex(){
|
||||
}
|
||||
const url = GetUrlRelativePath()
|
||||
console.log(url)
|
||||
const list = ['/wblogin','/wbloginerr','/fblogin','/fbloginerr']
|
||||
const list = ['/wblogin','/wbloginerr','/fblogin','/fbloginerr', '/wxlogin']
|
||||
for(const i in list){
|
||||
if(list[i] == url){
|
||||
console.log("return")
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
</div>
|
||||
<div class="icons">
|
||||
<img src="@/static/images/weixin.png" alt="" class="icon" />
|
||||
<img src="@/static/images/weixin.png" alt="" class="icon" @click="slogin(1)" />
|
||||
<img src="@/static/images/weibo.png" alt="" class="icon" @click="slogin(2)" />
|
||||
<img src="@/static/images/facebook.png" alt="" class="icon" @click="slogin(3)" />
|
||||
</div>
|
||||
@@ -296,6 +296,10 @@ export default defineComponent({
|
||||
if(index == 2){
|
||||
window.location.href="https://api.weibo.com/oauth2/authorize?client_id=2754574056&response_type=code&redirect_uri=https://beelink.theluyuan.com/wblogin"
|
||||
}
|
||||
if(index == 1){
|
||||
window.location.href=`https://open.weixin.qq.com/connect/qrconnect?appid=wx90b8841b63a86633&redirect_uri=${escape('https://beelink.theluyuan.com/wxlogin')}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect`
|
||||
|
||||
}
|
||||
}
|
||||
const text = computed(()=> store.state.infotext)
|
||||
return {
|
||||
|
||||
46
src/views/login/wxlogin.vue
Normal file
46
src/views/login/wxlogin.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { accessToken, authLogin } from "@/api";
|
||||
import { setToken } from "@/api/base";
|
||||
import router from "@/router";
|
||||
import store from "@/store";
|
||||
import { saveValue } from "@/utils/common";
|
||||
import { message } from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import { defineComponent } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
|
||||
export default defineComponent(({
|
||||
setup(){
|
||||
const code: any = useRoute().query.code;
|
||||
console.log(code)
|
||||
// accessToken(code).then((res: any)=>{
|
||||
// console.log(res)
|
||||
// authLogin(res.uid, 2).then((res: any)=>{
|
||||
// if(res.redirect == 1){
|
||||
// sessionStorage.setItem('mid',res.memberid);
|
||||
// router.push("/sign")
|
||||
|
||||
// }else{
|
||||
// if(!saveValue("token", res.api_token) && !saveValue("memberid", res.memberid) ){
|
||||
// message.error("存储错误, 请允许网页使用本地存储!")
|
||||
// return false;
|
||||
// }else{
|
||||
// setToken();
|
||||
// store.commit("login", true);
|
||||
// store.dispatch("setUserInfo");
|
||||
// router.push("/mine/archives")
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// window.location.href=`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}`
|
||||
}
|
||||
}))
|
||||
</script>
|
||||
Reference in New Issue
Block a user