|
@@ -13,6 +13,14 @@ const authInfoText = ref('');
|
|
|
const shouldShowAuthInfoPopup = ref(false);
|
|
const shouldShowAuthInfoPopup = ref(false);
|
|
|
const externalContactPopupVisible = ref(false);
|
|
const externalContactPopupVisible = ref(false);
|
|
|
const externalContactPopupText = ref('');
|
|
const externalContactPopupText = ref('');
|
|
|
|
|
+
|
|
|
|
|
+const getCodeFromLocation = () => {
|
|
|
|
|
+ if (typeof window === 'undefined') return ''
|
|
|
|
|
+
|
|
|
|
|
+ const searchParams = new URLSearchParams(window.location.search)
|
|
|
|
|
+ return searchParams.get('code') || ''
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onLoad(async (option) => {
|
|
onLoad(async (option) => {
|
|
|
if (option && option.code) {
|
|
if (option && option.code) {
|
|
|
const { code } = option;
|
|
const { code } = option;
|
|
@@ -21,6 +29,14 @@ onLoad(async (option) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!codeParams.value) {
|
|
if (!codeParams.value) {
|
|
|
|
|
+ const codeFromLocation = getCodeFromLocation()
|
|
|
|
|
+ if (codeFromLocation) {
|
|
|
|
|
+ codeParams.value = codeFromLocation
|
|
|
|
|
+ shouldShowAuthInfoPopup.value = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!codeParams.value) {
|
|
|
showNotify({ type: 'warning', message: '缺少企业微信授权参数,请重新进入页面' });
|
|
showNotify({ type: 'warning', message: '缺少企业微信授权参数,请重新进入页面' });
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|