|
@@ -61,8 +61,6 @@ function verifyLoginEnvironment() {
|
|
|
isCorpWX.value = currentEnvironment.indexOf("wxwork") > 0 ? true : false
|
|
|
isWX.value = currentEnvironment.indexOf("micromessenger") > 0 ? true : false
|
|
|
const href = window.location.href;
|
|
|
- console.log(isCorpWX.value, isWX.value, '<====== 开始执行 企业微信和微信的判断')
|
|
|
- console.log(href, '<====== 开始执行 verifyLoginEnvironment 方法')
|
|
|
if (href.indexOf("userId") > 0) {
|
|
|
let loginUserId = href.substring(href.indexOf("userId=") + "userId=".length);
|
|
|
if (loginUserId.includes('#/')) {
|
|
@@ -72,7 +70,6 @@ function verifyLoginEnvironment() {
|
|
|
} else {
|
|
|
// 判断是否为企业微信授权
|
|
|
if (isCorpWX.value || isWX.value) {
|
|
|
- console.log(href, '<====== 开始执行 企业微信和微信的判断')
|
|
|
// 判断企业微信,是否存在授权
|
|
|
if (href.includes("com/?code")) {
|
|
|
bindIfNessary()
|
|
@@ -117,9 +114,7 @@ function tryAutoLogin() {
|
|
|
function bindIfNessary() {
|
|
|
const href = window.location.href;
|
|
|
const requestUrl = isCorpWX.value ? '/wxcorp/bindCorpWeiXin' : isWX.value ? '/wechat/bindWeiXin' : '';
|
|
|
- console.log(requestUrl, '<======== 开始执行 bindIfNessary 方法')
|
|
|
if (requestUrl.length > 0) {
|
|
|
- console.log(href, '<========== url包括 com/?code 证明为从微信跳转回来的')
|
|
|
//url包括 com/?code 证明为从微信跳转回来的
|
|
|
if (href.includes("com/?code")) {
|
|
|
const url = href; //vue自动在末尾加了 #/ 符号,截取去掉
|