feat: 新增授权文件
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 47s

This commit is contained in:
sexygoat
2026-04-13 11:13:47 +08:00
parent 8bdd3a2d2a
commit 243f795e3e
2 changed files with 14 additions and 7 deletions

View File

@@ -0,0 +1 @@
yU2Z8mp831jh6QX7

View File

@@ -58,7 +58,7 @@
const userStore = useUserStore(); const userStore = useUserStore();
const identifier = ref(''); const identifier = ref('TEST5G');
const loading = ref(false); const loading = ref(false);
const agreed = ref(true); const agreed = ref(true);
const inputFocus = ref(false); const inputFocus = ref(false);
@@ -74,8 +74,9 @@
}; };
const redirectToWxAuth = (assetToken) => { const redirectToWxAuth = (assetToken) => {
const redirectUri = encodeURIComponent(window.location.href.split('?')[0]); sessionStorage.setItem('assetToken', assetToken);
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APP_ID}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_userinfo&state=${assetToken}#wechat_redirect`; const redirectUri = encodeURIComponent('https://cmp-c.boss160.cn/');
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APP_ID}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_userinfo&state=wechat_auth#wechat_redirect`;
window.location.href = url; window.location.href = url;
}; };
@@ -113,7 +114,7 @@
if (!USE_WECHAT_AUTH) return; if (!USE_WECHAT_AUTH) return;
const code = getCode(); const code = getCode();
const assetToken = userStore.state.assetToken; const assetToken = sessionStorage.getItem('assetToken');
if (!code || !assetToken) return; if (!code || !assetToken) return;
@@ -145,6 +146,11 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #FFFFFF; background: #FFFFFF;
padding: 0 40rpx;
}
.content {
width: 100%;
} }
.card { .card {
@@ -158,7 +164,7 @@
font-size: 40rpx; font-size: 40rpx;
font-weight: 600; font-weight: 600;
color: #1A1A1A; color: #1A1A1A;
margin-bottom: 48rpx; margin-bottom: 20rpx;
} }
.form-item { .form-item {
@@ -177,8 +183,8 @@
background: #F9FAFB; background: #F9FAFB;
border: 2rpx solid #E5E7EB; border: 2rpx solid #E5E7EB;
border-radius: 16rpx; border-radius: 16rpx;
padding: 0 24rpx; padding: 28rpx 24rpx;
height: 96rpx; margin-top: 40rpx;
transition: all 0.2s; transition: all 0.2s;
} }