From 396b9a06392db5736eb5a7d485879174d73bb39a Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期五, 09 一月 2026 16:03:45 +0800
Subject: [PATCH] 补签
---
src/views/rztLogin.vue | 66 +++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/src/views/rztLogin.vue b/src/views/rztLogin.vue
new file mode 100644
index 0000000..78c9fa4
--- /dev/null
+++ b/src/views/rztLogin.vue
@@ -0,0 +1,66 @@
+<template>
+ <div id="content" class="content">
+ </div>
+</template>
+<script setup name="Oss" lang="ts">
+import { useRoute } from 'vue-router';
+import { rztLogin } from '@/api/system/user';
+import { setToken, removeToken,setPlat } from '@/utils/auth';
+
+import { ElMessage } from 'element-plus';
+import { any } from 'vue-types';
+
+const getUserData = async (code: string) => {
+ await rztLogin({
+ code: code
+ })
+ .then((res: any) => {
+ console.log("____________res:" + JSON.stringify(res));
+ if (res) {
+ var data = { value: res, expirse: new Date().getTime() };
+
+ setToken(JSON.stringify(data));
+ window.location.href = '/index';
+ } else {
+ ElMessage({ message: '鏃犳潈璁块棶', type: 'error' });
+ setTimeout(() => {
+ window.location.href = '/rzt_login';
+ }, 3000);
+ }
+ })
+ .catch((e: any) => {
+ setTimeout(() => {
+ window.location.href = '/rzt_login';
+ }, 3000);
+ });
+};
+onMounted(() => {
+ setPlat('rzt');
+ removeToken()
+ const router = useRoute();
+ let code = router.query.code;
+ if (code) {
+ getUserData(code);
+ } else {
+ var mode = 'openid corpid';
+
+ window.location.href =
+ // 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww9904fd98c1b0df9e&redirect_uri=http://171.221.173.53:8801/rzt_login&response_type=code&scope=SCOPE&agentid=1000128&state=STATE#wechat_redirect';
+ 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwa1a67ed0008261d9&redirect_uri=' + encodeURI('http://171.221.173.53:8801/rzt_login') + '&response_type=code&scope=SCOPE&agentid=1000414&state=STATE#wechat_redirect';
+
+ }
+});
+</script>
+
+<style lang="scss" scoped>
+.content {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.self-defined-classname {
+ // width: 300px;
+ // height: 300px;
+}
+</style>
--
Gitblit v1.8.0