调成回调url一致
This commit is contained in:
parent
d2f244aabf
commit
f5959bb96b
|
@ -3,7 +3,7 @@ import {onMounted} from "vue";
|
||||||
// import wx from "weixin-js-sdk";
|
// import wx from "weixin-js-sdk";
|
||||||
|
|
||||||
const appId="wx1bbe5c15d28b500c"
|
const appId="wx1bbe5c15d28b500c"
|
||||||
const redirect_uri="https://localhost:5173/welcome"
|
const redirect_uri="https://test.xn--7p0a.site/welcome"
|
||||||
const scope="snsapi_userinfo"
|
const scope="snsapi_userinfo"
|
||||||
const state="123"
|
const state="123"
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
|
@ -11,8 +11,7 @@ onMounted(()=>{
|
||||||
})
|
})
|
||||||
const login=()=>{
|
const login=()=>{
|
||||||
//引导至 https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
|
//引导至 https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
|
||||||
window.open(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=${scope}&state=STATE#wechat_redirect`)
|
window.location.href=`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue