|
|
|
|
@ -1,46 +1,47 @@
|
|
|
|
|
<template> |
|
|
|
|
<div class="wrapper"> |
|
|
|
|
<header> |
|
|
|
|
<img src="/imgs/bg1.png" alt="" /> |
|
|
|
|
</header> |
|
|
|
|
<main> |
|
|
|
|
<div class="flex gap-10 center mt-20"> |
|
|
|
|
<a |
|
|
|
|
class="flex v-center center gap-16" |
|
|
|
|
@click="router.push('/realName/auth')" |
|
|
|
|
> |
|
|
|
|
<div style="width: 48px"> |
|
|
|
|
<img src="/imgs/write.png" alt="" /> |
|
|
|
|
</div> |
|
|
|
|
<span>我要写信</span> |
|
|
|
|
</a> |
|
|
|
|
<a |
|
|
|
|
class="flex v-center center gap-16" |
|
|
|
|
@click="router.push('/mail?active=my')" |
|
|
|
|
> |
|
|
|
|
<div style="width: 48px"> |
|
|
|
|
<img src="/imgs/search.png" alt="" /> |
|
|
|
|
</div> |
|
|
|
|
<span>回复查询</span> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
<p class="text-center mt-20"> |
|
|
|
|
局长信箱只接受实名举报投诉,不受理报警业务 |
|
|
|
|
</p> |
|
|
|
|
<p class="text-center">如遇紧急情况请拨打110</p> |
|
|
|
|
|
|
|
|
|
</main> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<Loading :loading="loading" /> |
|
|
|
|
|
|
|
|
|
<div class="wrapper"> |
|
|
|
|
<header> |
|
|
|
|
<img src="/imgs/bg1.png" alt=""/> |
|
|
|
|
</header> |
|
|
|
|
<main> |
|
|
|
|
<div class="flex gap-10 center mt-20"> |
|
|
|
|
<a |
|
|
|
|
class="flex v-center center gap-16" |
|
|
|
|
@click="router.push('/realName/auth')" |
|
|
|
|
> |
|
|
|
|
<div style="width: 48px"> |
|
|
|
|
<img src="/imgs/write.png" alt=""/> |
|
|
|
|
</div> |
|
|
|
|
<span>我要写信</span> |
|
|
|
|
</a> |
|
|
|
|
<a |
|
|
|
|
class="flex v-center center gap-16" |
|
|
|
|
@click="router.push('/mail?active=my')" |
|
|
|
|
> |
|
|
|
|
<div style="width: 48px"> |
|
|
|
|
<img src="/imgs/search.png" alt=""/> |
|
|
|
|
</div> |
|
|
|
|
<span>回复查询</span> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
<p class="text-center mt-20"> |
|
|
|
|
局长信箱只接受实名举报投诉,不受理报警业务 |
|
|
|
|
</p> |
|
|
|
|
<p class="text-center">如遇紧急情况请拨打110</p> |
|
|
|
|
|
|
|
|
|
</main> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<Loading :loading="loading"/> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { useRoute, useRouter } from "vue-router"; |
|
|
|
|
import { auth, authOpenid } from "@/api/auth"; |
|
|
|
|
import {useRoute, useRouter} from "vue-router"; |
|
|
|
|
import {auth, authOpenid} from "@/api/auth"; |
|
|
|
|
import UserStore from "@/store/user"; |
|
|
|
|
import { setToken, getToken } from "@/util/cookie"; |
|
|
|
|
import {setToken, getToken} from "@/util/cookie"; |
|
|
|
|
import WxStore from "@/store/wx"; |
|
|
|
|
|
|
|
|
|
const wxStore = WxStore(); |
|
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
|
@ -51,58 +52,60 @@ const code = route.query.code;
|
|
|
|
|
const loading = ref(true) |
|
|
|
|
|
|
|
|
|
if (!getToken()) { |
|
|
|
|
if (code) { |
|
|
|
|
// 授权登录 |
|
|
|
|
auth(code).then((data) => { |
|
|
|
|
setToken(data.token); |
|
|
|
|
userStore.user = data.user; |
|
|
|
|
loading.value = false |
|
|
|
|
|
|
|
|
|
wxStore.initSign() |
|
|
|
|
}); |
|
|
|
|
} else if (route.query.openid) { |
|
|
|
|
// 自定义登录 |
|
|
|
|
authOpenid(route.query.openid).then((data) => { |
|
|
|
|
setToken(data.token); |
|
|
|
|
userStore.user = data.user; |
|
|
|
|
loading.value = false |
|
|
|
|
|
|
|
|
|
wxStore.initSign() |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
const appid = "wx795f76e4bc3b0062"; |
|
|
|
|
// const location = window.location.href |
|
|
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent( |
|
|
|
|
"https://mailbox.biutag.com/" |
|
|
|
|
)}&response_type=code&scope=snsapi_base&state=#wechat_redirect`; |
|
|
|
|
// window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent('https://mailbox.biutag.com/#/code?abc')}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` |
|
|
|
|
// https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx795f76e4bc3b0062&redirect_uri=https%3A%2F%2Fmailbox.biutag.com%2F&response_type=code&scope=snsapi_base&state=123#wechat_redirect' |
|
|
|
|
} |
|
|
|
|
if (code) { |
|
|
|
|
// 授权登录 |
|
|
|
|
auth(code).then((data) => { |
|
|
|
|
setToken(data.token); |
|
|
|
|
userStore.user = data.user; |
|
|
|
|
loading.value = false |
|
|
|
|
window.location.href = "https://mailbox.biutag.com/" |
|
|
|
|
// wxStore.initSign() |
|
|
|
|
}); |
|
|
|
|
} else if (route.query.openid) { |
|
|
|
|
// 自定义登录 |
|
|
|
|
authOpenid(route.query.openid).then((data) => { |
|
|
|
|
setToken(data.token); |
|
|
|
|
userStore.user = data.user; |
|
|
|
|
loading.value = false |
|
|
|
|
window.location.href = "https://mailbox.biutag.com/" |
|
|
|
|
// wxStore.initSign() |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
const appid = "wx795f76e4bc3b0062"; |
|
|
|
|
// const location = window.location.href |
|
|
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent( |
|
|
|
|
"https://mailbox.biutag.com/" |
|
|
|
|
)}&response_type=code&scope=snsapi_base&state=#wechat_redirect`; |
|
|
|
|
// window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent('https://mailbox.biutag.com/#/code?abc')}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` |
|
|
|
|
// https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx795f76e4bc3b0062&redirect_uri=https%3A%2F%2Fmailbox.biutag.com%2F&response_type=code&scope=snsapi_base&state=123#wechat_redirect' |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
loading.value = false |
|
|
|
|
|
|
|
|
|
wxStore.initSign() |
|
|
|
|
loading.value = false |
|
|
|
|
wxStore.initSign() |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.wrapper { |
|
|
|
|
background-color: #fff; |
|
|
|
|
background-color: #fff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
header { |
|
|
|
|
img { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
img { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
a { |
|
|
|
|
width: 45.2%; |
|
|
|
|
height: 84px; |
|
|
|
|
text-decoration: none; |
|
|
|
|
border: 1px solid var(--primary-color); |
|
|
|
|
color: var(--primary-color); |
|
|
|
|
font-weight: bold; |
|
|
|
|
font-size: 18px; |
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
width: 45.2%; |
|
|
|
|
height: 84px; |
|
|
|
|
text-decoration: none; |
|
|
|
|
border: 1px solid var(--primary-color); |
|
|
|
|
color: var(--primary-color); |
|
|
|
|
font-weight: bold; |
|
|
|
|
font-size: 18px; |
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
</style> |
|
|
|
|
|