From fc0646f5a7d8ff66470fc3228ac7cff24497d54c Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期五, 22 八月 2025 17:30:30 +0800
Subject: [PATCH] 添加蓉政通登陆接口

---
 src/views/dingdingLogin copy.vue |   58 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/views/dingdingLogin copy.vue b/src/views/dingdingLogin copy.vue
index ac7b967..d0994a0 100644
--- a/src/views/dingdingLogin copy.vue
+++ b/src/views/dingdingLogin copy.vue
@@ -19,40 +19,40 @@
 };
 onMounted(() => {
   const route = useRoute();
-  let code = route.query.code;
+  let code = route.query.code as string;
   if (code) {
     getUserDate(code);
   } else {
     // STEP3锛氬湪闇�瑕佺殑鏃跺�欙紝璋冪敤 window.DTFrameLogin 鏂规硶鏋勯�犵櫥褰曚簩缁寸爜锛屽苟澶勭悊鐧诲綍鎴愬姛鎴栧け璐ョ殑鍥炶皟銆�
-    window.DTFrameLogin(
-      {
-        id: 'self_defined_element',
-        width: 300,
-        height: 300
-      },
-      {
-        redirect_uri: encodeURIComponent('https://f060-183-223-248-101.ngrok-free.app/auth/dingdingLogin'),
-        client_id: 'dingl5dxahaj3uzfug66',
-        scope: 'openid',
-        response_type: 'code',
-        state: 'STATE',
-        prompt: 'consent'
-      },
-      (loginResult: any) => {
-        console.log('loginResult:' + loginResult);
+    // window.DTFrameLogin(
+    //   {
+    //     id: 'self_defined_element',
+    //     width: 300,
+    //     height: 300
+    //   },
+    //   {
+    //     redirect_uri: encodeURIComponent('https://f060-183-223-248-101.ngrok-free.app/auth/dingdingLogin'),
+    //     client_id: 'dingl5dxahaj3uzfug66',
+    //     scope: 'openid',
+    //     response_type: 'code',
+    //     state: 'STATE',
+    //     prompt: 'consent'
+    //   },
+    //   (loginResult: any) => {
+    //     console.log('loginResult:' + loginResult);
 
-        debugger;
-        const { redirectUrl, authCode, state } = loginResult;
-        // 杩欓噷鍙互鐩存帴杩涜閲嶅畾鍚�
-        window.location.href = redirectUrl;
-        // 涔熷彲浠ュ湪涓嶈烦杞〉闈㈢殑鎯呭喌涓嬶紝浣跨敤code杩涜鎺堟潈
-        console.log(authCode);
-      },
-      (errorMsg: any) => {
-        // 杩欓噷涓�鑸渶瑕佸睍绀虹櫥褰曞け璐ョ殑鍏蜂綋鍘熷洜,鍙互浣跨敤toast绛夎交鎻愮ず
-        console.error(`errorMsg of errorCbk: ${errorMsg}`);
-      }
-    );
+    //     debugger;
+    //     const { redirectUrl, authCode, state } = loginResult;
+    //     // 杩欓噷鍙互鐩存帴杩涜閲嶅畾鍚�
+    //     window.location.href = redirectUrl;
+    //     // 涔熷彲浠ュ湪涓嶈烦杞〉闈㈢殑鎯呭喌涓嬶紝浣跨敤code杩涜鎺堟潈
+    //     console.log(authCode);
+    //   },
+    //   (errorMsg: any) => {
+    //     // 杩欓噷涓�鑸渶瑕佸睍绀虹櫥褰曞け璐ョ殑鍏蜂綋鍘熷洜,鍙互浣跨敤toast绛夎交鎻愮ず
+    //     console.error(`errorMsg of errorCbk: ${errorMsg}`);
+    //   }
+    // );
   }
 });
 </script>

--
Gitblit v1.8.0