Houjie
2025-07-07 0a48655d2162b709ecb80d249a4085971add6140
pages/login/loginOauth2.vue
@@ -47,7 +47,7 @@
            if (/wxwork/i.test(navigator.userAgent)) {
                this.env.thirdApp = true
                this.env.wxWork = true
                //this.env.thirdType='wechat_enterprise'
        this.env.thirdType = 'wechat_enterprise'
            }
            // 判断当时是否是钉钉环境
            if (/dingtalk/i.test(navigator.userAgent)) {
@@ -91,7 +91,14 @@
        doThirdLogin(token) {
            this.ThirdLogin({token: token, thirdType: this.env.thirdType}).then(res => {
                if (res.data.success) {
          uni.showToast({
            title: '登录',
            icon: 'none',
            duration: 3000,
            content: res
          });
                    this.loginSuccess()
                } else {
                    this.requestFailed(res)
                }
@@ -103,7 +110,12 @@
               this.$Router.replaceAll({name: 'index'})
        },
        requestFailed(err) {
            this.$message.warning("登录失败")
      uni.showToast({
        title: '登录',
        icon: 'none',
        duration: 3000,
        content: err
      });
        },
        goRedirectUrl() {
            let obj = getUrlParams(this.redirectUrl);
@@ -137,7 +149,7 @@
        /** 后台构造oauth2登录地址 */
        sysOAuth2Login(source) {
            let domainURL = configService.apiUrl;
            let url = `${domainURL}/sys/thirdLogin/oauth2/${source}/login`;
            let url = `http://houjie.xalxzn.com:8866/jeecg-boot/sys/thirdLogin/oauth2/${source}/login`;
            let state = window.location.origin + window.location.search
            url += `?state=${encodeURIComponent(state)}`;
            console.log('sysOAuth2Login====》', url)